Embed live game

I would like to spectate any live 9x9 game (one game at a time) on my web page similar to how Lichess, Lidraughts, and Lishogi have widgets cast any live game and I can embed those on my web page.

(Technically my web page is static content on my desktop which I use when using OBS Studio to livestream software development and am writing code or waiting on a build, I can see a live chess game, a live draughts game, and a live shogi game, but not yet a live go game.)

4 Likes

Pretty sure you can do this with the real time api.

I don’t understand, probably because I don’t know the widgets you’re talking about.
OGS games are on web pages. Why would you embed an OGS game into another web page?

Same reason you’d embed a YouTube video on another webpage :stuck_out_tongue_winking_eye:

@Toadofsky one could always try an iframe… Unfortunately there is no dedicated embed link for games, so you get all the sidebars and stuff. Check out the below issue for the feature request.

@Toadofsky out of curiosity, could you share your current set up? Like a screenshot of the webpage or the page itself if publicly available?

I would be interested to see how the other sites you mentioned look, and/or how you’d expect OGS to look in a widget. Like would it be just the board?

2 Likes

Thanks for your interest. I’m using board widgets from:

each as a separate browser source, along with the Kaspersky globe widget:

2 Likes

Embed Links for Live Games

You can now embed a live game in your own webpage or here on the forums!

How do I do this?

The easiest way is to click to the “Link to game” icon in the game dock:

Then copy the text to the right of “Embed”:

Notes & Limitations

  • Only works for games right now, not reviews or demos
  • Games cannot be played directly in the iframe, but if you click the board it will take you to the game. (Much like what happens on the Observe Games page)
10 Likes

This is insane :slight_smile:

So we could technically kibitz games on the forums now :stuck_out_tongue:

Though of course kibitzing in the game chat might be more inclusive of people that don’t use the forums :slight_smile:

2 Likes

image

3 Likes

Very cool feature! Some probably unwanted behavior:

  • I sometimes see a scrollbar (it was flickering in and out of existence earlier, now it is constant and only shows for one of the three examples)
  • Site notifications show up inside the embed :smile:

image

5 Likes

There is no escape!

5 Likes

Yeah so the scrollbar, I don’t have a great fix for - Discourse (our forums software) ignores the scrolling="no" and style attributes. If you’re embedding in your own website, there won’t be a scrollbar.

Regarding notifications, that’s a nasty one! Let me see what I can do. resists urge to remove popup notifications altogether :smiling_imp:

2 Likes

That could be a feature and not a bug :slight_smile: We’re getting everything directly to the forums. Just slap on one of those through the years games, and you have a way to get OGS site notifications on the forums :stuck_out_tongue:

I was able to x the notifications anyway :slight_smile:

2 Likes

Off-topic, but does this mean that it is technically possible to embed any custom webpage here on the forums? I’m thinking this could be somehow used to streamline our variants threads, but I couldn’t get it to work with another src in the iframe. Does the linked page need to be formatted in some specific way?

2 Likes

Nope there’s an allowlist (I actually had to specially request to allowlist online-go.com :joy:)

See Supporting iframe embeds from different domains? - #61 by simon - feature - Discourse Meta

2 Likes

Sooooo can we suggest that https://vsotvep.github.io and https://multicapturego.antontobi.com/ be allowed?

3 Likes

Now if we could embed memes in the game list my life would be complete.

4 Likes

Surely you mean “Yep there’s an allowlist” :wink:

@anoek Any possibility of being allowed to embed a page such as Multi capture go? Totally get it if you don’t want to allow any external sites, but I figure asking can’t hurt :slight_smile: The multiplayer games is one of my favorite things happening on the forums and making them more convenient for the participants would be awesome.

4 Likes

Added :slight_smile:

6 Likes

:heart: :heart: :heart:

3 Likes