Software Archive
Read-only legacy content
17061 Discussions

HTML5 audio tag IOs problem

Diego_Calp
Valued Contributor I
3,566 Views

Hi all,

I'm using the audio tag to play mp3, and works fine except on IOs, as a mobile app or web app. The code is:

<audio controls="controls" preload="none">
<source src="audio/intro.mp3" type="audio/mpeg">
</audio>

The control is displayed fine and the audio is correctly played. But its not possible to restart it and the slider doesn't work either. Only play and pause.

Is the same in app compiled as mobile, or a web app opened with Safari mobile.

Android mobile app, or opening the web app with a browser has all the features. Restart and move the slider to go fwd or back. The web app on OSX Safari works as expected.

Is this a limitation? If it is, anybody knows a workaround?

Thank you very much,

Regards

Diego

0 Kudos
4 Replies
Elroy_A_Intel
Employee
3,566 Views

Applications developed with Apache Cordova are rendered in a native WebView component. The WebView component uses the same web rendering engine as the Safari browser on iOS and the Chrome browser on Android. 

What version of iOS are you experiencing this issue?

0 Kudos
Diego_Calp
Valued Contributor I
3,566 Views

Hi Elroy,

I've tested in IOs 9.2 as an adhoc installed app on Iphone 4S, and on Iphone 5 IOs 9.2.1 with App Preview. The same on both situations, I can't use the slider to move the audio track position:

Here is a screenshot:

adhoc.PNG

As a webapp is the same

webapp.PNG

Thank, regards

Diego

0 Kudos
PaulF_IntelCorp
Employee
3,566 Views

Diego, see the way the WAV file is being played in the hello-cordova sample app when using the html5 option, it uses an audio object, but does not rely on the audio tag to directly play the file, see these locations:

 

0 Kudos
Diego_Calp
Valued Contributor I
3,566 Views

Hi Paul,

Thank you, I've downloaded Hello Cordova demo project and took a quick look to it. I will review it in detail when I have time.

My audios are played on IOs, I can hear the sound, the problem is that the audio tag doesn`t respond to interaction, like move the slider.

My app is about voice excercises, the user may need to go back or forward, or reset the track

Android app works absolutely well. XDK was a great help, thanks for all at Intel that work on this excellent tool.

Regards,

Diego

0 Kudos
Reply