Vote count:
0
Generating player to play audio files on mobile. Debugging tells me the audio object is present, and the player appears in most mobile simulators, but on my own phone (Nokia Lumina with Windows Phone 8) I only see an empty div open, and random clicking where the controls should be hasn't found anything yet. Everything cool on desktop, and I see no jQuery issues. Any ideas what is occurring?
if (Modernizr.audio) { //use the html5 audio object if supported
myItem.append(
'<div id="player"><audio controls>' + '<source class="audiosource" src="files/' + srcstring + '.mp3" type="audio/mpeg" />' + 'Your browser does not support the audio element.' + '</audio>' + '</div>'
);
var myAudio=$(".audiosource");
$("audio").load();
$("#player").show();
} else {
if ($.flash.available) {
myItem.append('<div id="player"></div>');
$('div#player').flash({
swf: 'dewplayer/dewplayer-multi.swf',
flashvars: 'mp3=files/' + srcstring + '.mp3',
wmode: 'transparent',
width: 320,
height: 30
});
$('div#player').show();
} else { //if flash fails offer download
myItem.append('<div id="player"><a href="files/' + srcstring + '.mp3">No Player. Please Download</a></div>');
}
}
asked 3 mins ago
Aucun commentaire:
Enregistrer un commentaire