Youtube Javascript API - disable related videos

后端 未结 8 1059
小蘑菇
小蘑菇 2020-12-02 09:16

Right, this seems to be poorly documented or I can\'t see it in the documentation. I basically want no related videos (?rel=0) using the JavaScript API.

8条回答
  •  失恋的感觉
    2020-12-02 09:31

    The behavior of the rel player parameter has changed.

    From documentation,

    The behavior for the rel parameter is changing on or after September 25, 2018. The effect of the change is that you will not be able to disable related videos. However, you will have the option of specifying that the related videos shown in the player should be from the same channel as the video that was just played

    So, it's no longer possible to disable related videos. Instead playerVars: {rel:0} will change the behavior of the player and shows suggestion from specified channel.

提交回复
热议问题