# Passing through rel=0 on YouTube embeddings

**URL:** https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334
**Category:** Feature
**Created:** [09.Май.2017 05:03:31 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334 "2017-05-09T05:03:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![niemeyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/niemeyer/32/120325_2.png) [@niemeyer](https://meta.discourse.org/u/niemeyer)
#### Post date: [09.Май.2017 05:03:31 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/1 "2017-05-09T05:03:31Z")

</div>

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](https://meta.discourse.org/t/embedding-youtube/32638/9) 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](https://developers.google.com/youtube/player_parameters?csw=1#Parameters) and see if anything else is worth adding for the context of Discourse.

Thanks!

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [10.Май.2017 18:22:41 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/2 "2017-05-10T18:22:41Z")

</div>

The code you want is here: [onebox/lib/onebox/engine/youtube\_onebox.rb at main · discourse/onebox · GitHub](https://github.com/discourse/onebox/blob/master/lib/onebox/engine/youtube_onebox.rb#L107)

start & end are already supported.

---

<div class="post-metadata">

### Author: ![niemeyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/niemeyer/32/120325_2.png) [@niemeyer](https://meta.discourse.org/u/niemeyer)
#### Post date: [17.Май.2017 14:03:20 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/3 "2017-05-17T14:03:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [16.Декабрь.2018 17:19:16 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/4 "2018-12-16T17:19:16Z")

</div>

@techAPJ low priority can you make sure this parameter survives when passed through on our end?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [25.Декабрь.2018 01:30:18 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/6 "2018-12-25T01:30:18Z")

</div>

Added support for `rel=0` via:

[https://github.com/discourse/onebox/commit/734c5eef1e370e39f9624da8bb1534d114f4cdf6](https://github.com/discourse/onebox/commit/734c5eef1e370e39f9624da8bb1534d114f4cdf6)

Note that YouTube changed the behaviour for [`rel` parameter](https://developers.google.com/youtube/player_parameters#rel) since September 25, 2018:

> After the change, you will not be able to disable related videos. Instead, if the `rel` parameter is set to `0` , related videos will come from the same channel as the video that was just played.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [25.Декабрь.2018 03:51:37 UTC](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/7 "2018-12-25T03:51:37Z")

</div>


