I have created a HTML5 page that loads an audio and autoplays it. The code is shown below:
<audio src="horse.mp3" type="audio/mp3" autoplay preload="auto" /> </audio>
When I test it on Safari or Firefox, it does perform well, but when I compress it on the HTMLResources.zip file as required to be included on DPS, upload it, and then I call the HTML page using a button from the Overlay Creator, it doesn't play on the iPad, nor in the Desktop Viewer
Is something wrong about including these files on the DPS? Is DPS web browsing HTML5 fully-compatible?
Maybe it has to do with these customer-oriented restrictions of WebKit
(see the second heading about "User Control")
Another possibility is the way you're linking to the video file. If the audio file is in the root level of your HTMLResources.zip file, try using "<audio src="../HTMLResources/horse.mp3" type="audio/mp3" autoplay preload="auto" /> </audio>."
No luck with both suggestions.. I can play the sound correctly in a browsert but not in the DPS..
What is more funny is that if I add the controls parameter <audio src="leo.mp3" controls="controls"> it shows the controls on the screen and I can play it well.
I have tried adding a javscript function to allow playing the audio when the HTML page is loading without any luck yet.
Any other ideas?
My reply was not a suggestion but a reason why it won't work.
Try not setting the MP3 to autoplay, but for the test's purpose,
try putting it first in an HTML page into a Folio in a simple way.
Can you play it ? Then it must be the iOS-autoplay restriction.
I have done a full research and iOS is not allowing to play audio automatically unless an User fires an event manually, such as clicking on a button. That really sucks for Apple becuase is not an Adobe restriction.. I was trying to find a workaround for it using jQuery or other solution but so far, I have pulled my hair off without a solution... Any ideas so far?
The reasoning behind Apple's restriction, is that they fear that users might end up with unexpected huge data bills, when a webpage initiates the download of a movie or song automatically. I can understand this policy, but the again, the WebKit might be made a little bit more intelligent, to discover which media are initiated from what source and which network. Using local media or WiFi shouldn't be a problem.
There is not a known solution for this, at least that I'm aware of. Just as Peter has said, Apple has specifically disabled this for a reason. There was a way around it in earlier versions of iOS4, such that you could use an onload or simulate a click, but that workaround has been disabled by Apple.
It looks like there is a way for adobe to allow media to play on html articles without requiring human interaction... if they are using a UIWebView (which is likely), there is a setting they can set that allows media to play without requiring user interaction, it would be a great feature to allow this, or at least make it a setting we can set somewhere.
They need to set the mediaPlaybackRequiresUserAction property to NO on the UIWebView (it defaults to YES).
Here's a link to the documentation on this feature: https://developer.apple.com/library/ios/#documentation/UIKit/Reference /UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instp/UIWebV iew/mediaPlaybackRequiresUserAction
Phone Gap and other products that aid the creation of HTML based Apps use this technique... any ideas on the best channel to get Adobe to implement it quickly?
This setting is supervised by the availibility of a WiFi network. When there's just a mobile connection available through cellular networks, the allowance can be overruled, and autoplay (without interaction) will be prohibited. My guess is that Apple will even reject your app when they come across this bevavior while reviewing it. Though I must say I have seen some apps showing online video when on paid, low-speed mobile connections. Maybe the amount of traffic also counts ?
My main use case is for playing audio from html resources bundled with the folio, so wouldn't require network data usage. Don't see why apple would reject it, its an acceptable behavior for regular InDesign articles...
Hi Bob, I have a similar problem. I have a HTML overlay embeded with in an indesign page, the HTML has buttons that load an audio file as well as run a CSS animation. Up until about 1 week ago the interactivity worked fine in adobe content viewer and folio builder.
However now , when viewed in Adobe Content Viewer, no audio loads / no sound is heard.
Why would this be? Has Content Viewer been updated recently or something and what work around is there as it definately used to work.
Europe, Middle East and Africa