I am looking for a way to remove more videos when an embed youtube videos is on pause or at the end.
I am talking about removing completely not just the ?rel=0.
Thank You
I am looking for a way to remove more videos when an embed youtube videos is on pause or at the end.
I am talking about removing completely not just the ?rel=0.
Thank You
Take a look at this solution and see if it meets your needs, Vidzflow. CC @Flowout-Luka
I find it a bit funny you’re trying so hard to find free products that will do exactly what you want, and then feel upset that they’re not designed that way.
There is always a cost somewhere in building out the feature set you want, especially when you are picky about how it works.
If you’re into development, you might be able to use the YouTube Player API and javascript to customize the player behavior, or have a “finished” event to something else like hide the vid and show a big play button graphic to restart it.
I am not looking for a free product. I am paying webflow, I am paying a lot of tools. What I found is that youtube remove the fact that ?rel=0 remove all more videos, now it only removes related videos not all of them
And I am working to understand and learn how to do it through the Youtube API.
Vidzflow seems nice for a business not for lone guy with one project it is too expensive for my needs even with the fact that it is nice.
So I am learning through some development.
I have found a solution through reading a long conversation about this in stack overflow. I’ll take the time tomorrow to explain it.
Another option is hosting your videos on Vimeo, the only limitation on free account is 500mb/month upload (at least it was long time ago). Advantage: no ads, no video suggestions after video ends. Vimeo offers player customisation on paid accounts. Vimeo is mostly used by artists so it may be a way to go.
Yes I have an account but too limited for a short term project. Used it for a long time.
I made it work by playing playlist instead of videos. So by putting ?rel=0 on a playlist youtube can’t show more videos considering that it is the playlist that is the reference for the so called most related videos.
I made playlist of 1 video and it works.
In my iframe embed element I put https://www.youtube-nocookie.com/embed/videoseries?list=PLAYLISTID&rel=0 (the addition is the videoseries?list= and the &rel=0 at the end)
my thumbnails that call new id I replace data-id for data-playlist=PLAYLISTID.
And in the code that Stan reference me I did some changes like I put https://www.youtube-nocookie.com/embed/videoseries?list=${playlistId}&autoplay=1&rel=0, replace: v.dataset.id for v.dataset.playlist, and Stan did a function showVideo that was calling a video ID and title changed it for a playlistID.
So no more “more videos” when the video is on pause or at the end.
Nice playlist technique Guillaume,
I’ve implemented a different overlay approach as an attribute-based solution. It has the advantage that it does not need playlists just a YouTube element with a custom attribute. However it’s not ideal for styling. I may redesign it as some point to expand on the overlay design features.
https://video-player-control.webflow.io/youtube/hide-related
UPDATE: Due to the popularity of this issue, I’ve added a nocode overlay solution as part of SA5.
If you’re looking to customize the appearance of embedded YouTube videos to minimize the visibility of related videos, you can use the rel
parameter in the YouTube embed code. Setting the rel
parameter to 0 will prevent related videos from showing at the end of the embedded video. Here’s an example of how you might use it:
<iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID?rel=0" frameborder="0" allowfullscreen></iframe>
Keep in mind that while this helps minimize the display of related videos, it doesn’t completely remove them, and the effectiveness might vary based on user settings and other factors. If YouTube changes its policies or features after my last update in January 2023, it’s advisable to check the latest documentation or community discussions for any new options or changes.
Hey memetican! This works amazing for YT videos that utilize the YouTube element. Any plans for this working for the video link CMS field when a YouTube link is added to the CMS?
Hi Ryan that shouldn’t make a difference, I think you should just be able to apply the same custom attribute to your CMS-bound video element.
Different situation of course for CMS-bound rich-text-elements containing embedded video, since you can’t add custom attributes there.
I haven’t thought much about that specific situation. In theory I could adapt SA5’s lib so that it could have an “affect all YT videos on the page” mode, but I haven’t had any clients who require that yet.
Incidentally in special cases, I more commonly use Plyr.js as it allows deeper branding of the player controls as well. It requires some amount of programming though.
Thanks Metimetician, I noticed the video is hidden on desktop and larger displays, any reason for this
Sure, if you’ve hidden it. You’ll have to look through your element layout styling to determine where you’re hiding or obscuring it in your design.