Passing through rel=0 on YouTube embeddings

(Gustavo Niemeyer) #1

Hello there,

I see we pass through width and height on YouTube embeddings. Any chance we can also get the rel=0 parameter through, so that one may disable suggested videos at the end of the linked video? The previous suggestion early last year didn’t seem to get much traction, but it seems like a good one and in line with the idea of keeping things on topic (the suggestions are often pretty random). I’d even argue that it should be the default, but at least passing through would be great.

Other good candidates are start and end, which allow controlling what section of the video linked to is actually played. Seems pretty sensible to support that too.

Perhaps someone should go through the supported parameters and see if anything else is worth adding for the context of Discourse.


(Kane York) #2

The code you want is here: onebox/youtube_onebox.rb at master · discourse/onebox · GitHub

start & end are already supported.

(Gustavo Niemeyer) #3

Thanks. I’m tempted to just patch it to include rel=0 at all times in our distribution, as the whole point of embedding a video in a topic is precisely to let people stay in context while interacting with the conversation in the topic.