1

I am using iframe to play videos :-

<iframe  width="700" height="395" src="+video_embed_url+?rel=0&autoplay=1" frameborder="0"></iframe>

But not able to autoplay on mobile devices as autoplay won't work on mobile . But if i want how can do it??

aishwarya
  • 272
  • 3
  • 10

2 Answers2

1

Did you add autoplay parameter in the iframe's url ?

Such as : http://www.youtube.com/embed/xxxx?autoplay=1

Schnapse
  • 485
  • 1
  • 5
  • 19
0

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). Here's an excerpt from Apple's documentation:

"Warning: To prevent unsolicited downloads over cellular networks at the user’s expense, embedded media cannot be played automatically in Safari on iOS — the user always initiates playback."

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

mark
  • 1
  • 2