Reputation: 163
I have a page with an iframe youtube player embed, and the controls hidden ( with controls=0 added to the tag). On desktop, this works properly, so that on mouseover the controls appear, but on an iPad, play works, but then pause is not coming up on the screen tap, so then video can't be paused.
I tried controls=1, but then on a desktop, they show up on load, and stay there until the mouseover, so it is more cluttered looking.
Any suggestions much appreciated!
Upvotes: 1
Views: 2476
Reputation: 163
I did read the api. "controls=0 – Player controls do not display in the player. For IFrame embeds, the Flash player loads immediately."
The issue is that on desktop, a mouseover will bring up control to pause, but in ipad, touch doesn't trigger that, so one can't pause the video. I just ended up switching to controls =1 for the ipad. Less tidy, but i'm ok with it for the time being.
Upvotes: 1
Reputation: 23271
autohide (supported players: AS3, AS2, HTML5)
Values: 2 (default), 1, and 0. This parameter indicates whether the video controls will automatically hide after a video begins playing. The default behavior (autohide=2) is for the video progress bar to fade out while the player controls (play button, volume control, etc.) remain visible.
If this parameter is set to 1, then the video progress bar and the player controls will slide out of view a couple of seconds after the video starts playing. They will only reappear if the user moves her mouse over the video player or presses a key on her keyboard. If this parameter is set to 0, the video progress bar and the video player controls will be visible throughout the video and in fullscreen.
<body>
<iframe src='https://www.youtube.com/embed/rxSwgvMg-H4?modestbranding=1&autohide=1&showinfo=0&fs=0' width='300' height='175' frameborder='0' >
</iframe>
</body>
Upvotes: 1