All,

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('MVI_5159.mov', '190', '245', '', 'autoplay', 'true', 'controller', 'true', 'loop', 'true');
</script>

Then I went old school and tried the following which doesn't work on an IPhone:
<embed src="MVI_5159.mov" width="190" height="245" autoplay="true" controller="false" loop="true" pluginspage="http://www.apple.com/quicktime/">

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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.