Skip to content Skip to sidebar Skip to footer

Youtube Api Playvideo Method Doesn't Work On Some Mobile Devices

I am trying to create a website for mobile where after clicking on an image a youtube video to play. I have tested on several Android mobile phones/versions and on some doesn't beh

Solution 1:

Looks like some functions you are using (player.playVideo()) are disabled in Mobile devices. In my case after using player.playVideo() in some Android devices, the video isn´t played even after tapping the player

https://developers.google.com/youtube/iframe_api_reference?hl=zh-TW#Mobile_considerations

Autoplay and Scripted Playback

The HTML5 element, in certain mobile browsers (such as Chrome and Safari), only allows playback to take place if it's initiated by a user interaction (such as tapping on the player).

Due to this restriction, functions and parameters such as autoplay, playVideo(), loadVideoById() won't work in all mobile environments**

Post a Comment for "Youtube Api Playvideo Method Doesn't Work On Some Mobile Devices"