Reputation: 285
I googled a lot and found some solution like below:
Adding css below
.vidwrapper.ended iframe, .vidwrapper.paused iframe { visibility: hidden; }
But nothing is working. Please help
Here is my code
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoID?rel=0" frameborder="0" allowfullscreen></iframe>
Upvotes: 0
Views: 1579
Reputation: 285
I got my answer after some research.
As per my findings, previously it was possible to hide related videos by passing some parameter to the embedded YouTube url, but from 2018 disabling related video has been depreciated by Youtube.
What is in our control is: We can restrict to show related videos only from our channel.
FYI, here are some reference links https://developers.google.com/youtube/player_parameters#Revision_History
Upvotes: 2