Embedding YouTube without recommended videos at the end?

I have a specific question regarding YouTube videos that I haven’t so far seen answered in any posts on this forum.

We use the Onebox feature to embed YouTube instructional videos into our posts on Discourse so that our users can see how to use our products. The only problem with this is that at the end of the video, YouTube will show links to recommended videos, which are often inappropriate for our audience or promotional videos for competitors. We’d like to use embed codes from YouTube to disable recommendations (and video titles and player actions), but I haven’t been able to find a way of getting the embed links from YouTube to display an embedded video in our posts.

What am I doing wrong here? Is the functionality I’m looking for something that exists in Discourse (v1.4.0.beta6 +79)? I tried looking through the Admin setting for embedding but was unable to make it work, even though I added youtube.com and www.youtube.com to our list of embeddable hosts. Currently, I paste the embed link into a post and it removes the text form the post so that it won’t even display as plain text.

First post on these boards and I have only been using Discourse for two weeks so apologies if this is a silly question!


This would need a patch to the Onebox code… I think I can do it.


Thanks Kane! That’s very helpful.

Hmm, I just looked at the embedding documentation and it looks like they have quietly removed the ability to turn off suggested videos at the end? Or I was mistaken & it was never there.


1 Like

Seems like it’s still there in the YouTube UI

1 Like

the rel=0 parameter is what you want


Hmmm… I just tried appending the URL with ?rel=0, and I still see related videos displayed at the end.

It seems like it can be made to work. Here’s a YouTube video about it: YouTube

For this to work with the YouTube onebox it needs add rel=0 to the embed params. Just adding ?rel=0 to the URL doesn’t work.

1 Like

Yeah, a patch to the onebox code is needed to pass the rel=0 all the way through.