0
以下代碼適用於我的桌面瀏覽器,但不適用於我的iPhone上的Safari,它顯示alert(),但不會播放音頻。我究竟做錯了什麼?SoundManager 2和iPhone
soundManager.url = '/assets/backend/swf/';
soundManager.preferFlash = false;
soundManager.useHTML5Audio = true;
soundManager.onready(function(){
function playSong(){
soundManager.createSound({
id: 'song_<?=$song->ID?>',
url: '/backend/song/play/<?=$song->ID?>',
type: 'audio/mp3'
}).play();
}
$('#play').click(function(){
alert('playSong()');
playSong();
});
});