I have a web app that uses the HTML5 tag and for some reason while it works fine on Windows and Mac PCs it doesn't work on iOS and Android. Here's a relevant snippet of my code:
Javascript:
var audioElement = document.querySelector('#audioplayer');
var source = document.querySelector('#mp3');
source.src = tokObject._url;
audioElement.load();
audioElement.play();
HTML:
<center><audio id="audioplayer" style="width:480px;">
<source id="mp3" src="random-placeholder" type="audio/mp3" />
</audio>
</center>
Cheers and thanks!
Aucun commentaire:
Enregistrer un commentaire