How to disable "related videos" from an embedded youtube playlist

Luis Fernandez

I need to embed a Youtube playlist on an iframe. I don't want the user to be able to exit this playlist, so I need to disable the "related video" and "more video" features (the one that shows more videos when the video is stopped and the one that shows them when the video is finished).

I've tested some workarounds but they only used to work for single videos (not playlist) and most of them stopped working after they changed the way ?rel=0 behaves. Is there any way to do this?

This is my code:

.rep {
   position: absolute;
   top: 0px;
   left: 0px;
   width: 1280px;
   height: 640px;
   z-index: 6;
}
<iframe class="rep" src="https://www.youtube.com/embed/videoseries?list=PLUl4u3cNGP63gFHB6xb-kVBiQHYe_4hSi" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

EDIT: The videos must be shown in order, therefore I can't use rel to display only videos from the playlist. Plus, if you click on them a youtube page outside of the iframe will appear.

Davy de Vries

If I look through the YouTube Embedded Players and Player Parameters docs, there is no such thing to order the more videos section if you pause the video.

The two parameters I suggest to get near as possible to your goal is:

You can add:

  • listType=playlist
  • rel=0 to turn off related videos from the more videos section.

Note: The behaviour of rel=0 will be removed after September 25, 2019.


Conclusion:

It seems like what you want to achieve is not possible. With the default embed iframe of YouTube.

You might want to consider to look to other players with playlist options. Something like JW Player note that you need a licence for this player, JW Player playlist docs. I did some reading on JW Player as well, they currently don't support YouTube videos.

But maybe there are other players that have the same functionally for free.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Youtube API v3 - Related videos from specific channel

From Dev

Youtube API v3 - Related videos from specific channel

From Dev

How can I get related videos with php on youtube api?

From Dev

How can I get related videos with php on youtube api?

From Dev

Make embedded YouTube Playlist start at random index

From Dev

Retrieve videos from youtube playlist

From Dev

Disable YouTube captions on embedded video

From Dev

Youtube Related Videos using Youtube V3 API

From Dev

How can I download part of a playlist from YouTube with 'youtube-dl'?

From Dev

How can I download part of a playlist from YouTube with 'youtube-dl'?

From Dev

Youtube embedded playlist diplays playall button instead of the first video

From Dev

Disabling Related Videos in YouTube iOS Helper using Swift

From Dev

URLs from youtube playlist in iOS app

From Dev

Sorting Youtube API result from playlist

From Dev

Batch Delete Videos From YouTube Favorites Playlist

From Dev

Latest youtube video from specific playlist

From Dev

Delete videos from playlist using YouTube API

From Dev

How to paste Youtube Playlist into a ListView - Android?

From Dev

how to build video playlist having youtube videos?

From Dev

How to paste Youtube Playlist into a ListView - Android?

From Dev

How can I download a YouTube playlist?

From Dev

How to manage a YouTube account's playlist automatically

From Dev

How can I download an entire playlist from youtube even it exceeds 25 videos?

From Dev

How Can I Get my playlist videos from Youtube with angular 2

From Dev

Download youtube playlist from youtube-dl. but no sounds

From Dev

change the related videos dynamically whenever the next item of the playlist is loaded in jwplayer 6.8

From Dev

How can I remove the youtube branding completely from embedded video?

From Dev

How can I remove the youtube branding completely from embedded video?

From Dev

How to download a youtube playlist with numbered prefix via youtube-dl?

Related Related

  1. 1

    Youtube API v3 - Related videos from specific channel

  2. 2

    Youtube API v3 - Related videos from specific channel

  3. 3

    How can I get related videos with php on youtube api?

  4. 4

    How can I get related videos with php on youtube api?

  5. 5

    Make embedded YouTube Playlist start at random index

  6. 6

    Retrieve videos from youtube playlist

  7. 7

    Disable YouTube captions on embedded video

  8. 8

    Youtube Related Videos using Youtube V3 API

  9. 9

    How can I download part of a playlist from YouTube with 'youtube-dl'?

  10. 10

    How can I download part of a playlist from YouTube with 'youtube-dl'?

  11. 11

    Youtube embedded playlist diplays playall button instead of the first video

  12. 12

    Disabling Related Videos in YouTube iOS Helper using Swift

  13. 13

    URLs from youtube playlist in iOS app

  14. 14

    Sorting Youtube API result from playlist

  15. 15

    Batch Delete Videos From YouTube Favorites Playlist

  16. 16

    Latest youtube video from specific playlist

  17. 17

    Delete videos from playlist using YouTube API

  18. 18

    How to paste Youtube Playlist into a ListView - Android?

  19. 19

    how to build video playlist having youtube videos?

  20. 20

    How to paste Youtube Playlist into a ListView - Android?

  21. 21

    How can I download a YouTube playlist?

  22. 22

    How to manage a YouTube account's playlist automatically

  23. 23

    How can I download an entire playlist from youtube even it exceeds 25 videos?

  24. 24

    How Can I Get my playlist videos from Youtube with angular 2

  25. 25

    Download youtube playlist from youtube-dl. but no sounds

  26. 26

    change the related videos dynamically whenever the next item of the playlist is loaded in jwplayer 6.8

  27. 27

    How can I remove the youtube branding completely from embedded video?

  28. 28

    How can I remove the youtube branding completely from embedded video?

  29. 29

    How to download a youtube playlist with numbered prefix via youtube-dl?

HotTag

Archive