Youtube autoplay not working on mobile devices with embedded HTML5 player
As it turns out, autoplay cannot be done on iOS devices (iPhone, iPad, iPod touch) and Android.
See https://stackoverflow.com/a/8142187/2054512 and https://stackoverflow.com/a/3056220/2054512
autoplay not working on mobile devices YouTube video
you can add the following code in the end of the onPlayerReady
function:
if(window.innerWidth < 768) {
player.playVideo();
}
This code will start playing the video on mobile devices by checking the screen size.
Youtube embedded video: autoplay feature not working in iphone
It can't be done. For various reasons (including, but not limited to data usage), Apple doesn't allow auto-playing of videos.
See the accepted answer to this question.
Related Topics
Maintain Image Aspect Ratio When Changing Height
Why Does the Checkbox Stay Checked When Reloading the Page
Why Should I Use 'Li' Instead of 'Div'
How to Specify a Starting Number for an Ordered List
How to Print Background Images in Ff or Ie
Dynamically Adding and Removing Components in Angular
CSS Float: Floating an Image to the Left of the Text
Angularjs: Insert HTML from a String
Margin While Printing HTML Page
Why Would a Developer Place a Forward Slash At the Start of Each Relative Path
Is the 'Type' Attribute Necessary For ≪Script≫ Tags
Using CSS Td Width Absolute, Position
What Is the Use of Style="Clear:Both"
How to Display Vertical Text in Table Headers with Auto Height/Without Text Overflow