autoplay=1 not working for <iframe> in playing video in mobile devices

Vishnu Prasad picture Vishnu Prasad · Dec 16, 2014 · Viewed 11.9k times · Source

I'm working with video. When i click on Video Thumbnail a pop appears and Video plays in that,I need to start play the video (without clicking the play button) when popup opened.I tried with code below.

It was working perfect in web but not in mobile devices like iPhone ,iPad

<iframe
        title="YouTube video player"
        id="videoFrame"
        class="youtube_iframe" src="http://www.youtube.com/embed/JW5meKfy3fY?wmode=opaque&amp;autoplay=1"
        frameborder="0"   width="395" height="280"        allowfullscreen=""        scrolling="no">
</iframe>

But not auto played when video is opend in popup. thankx in advancee

Answer

Mark Haveman picture Mark Haveman · Apr 18, 2018

To add muted in an iframe link use it like "&muted=1". The complete link will be something like:

<iframe id="video-iframe" src="https://player.vimeo.com/video/125472391?api=1&player_id=video-iframe&autoplay=1&muted=1&loop=1&color=ffffff" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" frameborder="0"></iframe>