Wednesday 11 September 2019

How to disable "related videos" from a embeded youtube playlist

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 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 as of today?

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>




from How to disable "related videos" from a embeded youtube playlist

No comments:

Post a Comment