I have a .mov file and am wondering what is the best way to have this autoplay so that users don't have to hit the play button while viewing on a IPhone device.

I tried utilizing the ac_quicktime.js script as such (I went to the ac_quicktime.js - a few months back because it helped with some items - that users were exhibiting in regard to when the video was loading)

<script language="JavaScript" src="ac_quicktime.js" type="text/JavaScript"></script>
<script language="JavaScript" type="text/javascript">
QT_WriteOBJECT_XHTML('', '190', '245', '', 'autoplay', 'true', 'controller', 'true', 'loop', 'true');

Then I went old school and tried the following which doesn't work on an IPhone:
<embed src="" width="190" height="245" autoplay="true" controller="false" loop="true" pluginspage="">

Ideally the simplest way to do this in script or html would be great.

Recommended Answers

Don't get hung up on video encoding. Just move forward to HTML5 and use the autoplay tag noted in the docs.

Added with edit. Dummy me. The example shows a .mov. So …

Jump to Post

All 3 Replies

Apple blocks autoplay of media (video or audio) in Safari on iOS by default and if you're going to use the video tag, then I'd recommend to convert your .mov file to .mp4 instead, so that the video also plays in other browsers/devices.

Gentlemedia is right.

At the link supplied "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." So there it is.

Added with edit. Had a second thought and tested it. GIF plays without user intervention. It's not perfect but I did check this out on my iPhone 5s on iOS 10.0.2. Works. If you need a convertor, try Zamzar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.