Is it possible to always show the controls (disable autohide) on an embedded YouTube video?
I've tried adding autohide=0
to the source url but the controls and progress bar still hide after a second or two. I'm confused because the IFrame Player API states...
0 – Regardless of the player's dimensions, the video progress bar and player controls are visible throughout the video.
Is there something I'm missing or has the functionality been removed?
See: https://jsfiddle.net/hmpj3fn6/
Press Ctrl+M to hide or show the YouTube video player controls. When you pause a YouTube video, the player controls don't disappear.
You can use an existing YouTube iframe's ID... var player; function onYouTubeIframeAPIReady() { player = new YT. Player('player', { events: { 'onStateChange': onPlayerStateChange } }); } function onPlayerStateChange() { //... } ...and the constructor will use your existing iframe instead of replacing it with a new one.
YouTube changed the rel=0 parameter as of September 2018 so that it no longer fully disables related videos. However, you can work around this using the YouTube Player API to show custom HTML instead of related videos.
After a little more digging...
This parameter has been deprecated for HTML5 players, which display or hide the video progress bar and player controls automatically (autohide=1).
https://developers.google.com/youtube/player_parameters#autohide
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With