1
votes

I'm building a mobile site in which in embed some youtube videos with the IFrame player API (https://developers.google.com/youtube/iframe_api_reference).

Basically, I need to start this video after the user clicks a custom play button. This button triggers the player.playVideo() on the loaded youtube iframe to play the video. This works fine on the standard android and iphone browser (video starts playing fullscreen). However in Google Chrome's mobile browser (android and ios) I get a second play button over the video after my first click, thus making me click twice to play the video.

Anyone know a workaround for this?

1
This issue applies not only for YouTube, but also the Soundcloud API. The same broken functionality occurs in the stock Android browser for me on Android 4.4.2, are you not finding the same results? I've been looking for a resolution and have not found one, there are a lot of complaints for iOS: code.google.com/p/gdata-issues/issues/… and Google has documented this shortcoming: developers.google.com/youtube/…Sorry-Im-a-N00b

1 Answers

0
votes

Theoretically the autoplay is disabled on Safari and Google Chrome for Android . In my experience I never could avoid to show the second button with Youtube player API, even with an action triggered by user (the first click).