有沒有一種方法可以在沒有緩存的情況下循環SoundManager,因此每次都強制重新加載源音頻文件?我可以讓它循環,但我不能讓它不緩存。循環音頻在沒有緩存的SoundManager中
<script type="text/javascript">
soundManager.url = '../../swf/soundmanager2.swf';
soundManager.debugMode = true;
soundManager.consoleOnly = true;
soundManager.onload = function() {
soundManager.createSound({
id:'mySound1',
url:'path/to/audio.mp3',
stream: true
});
loopSound('mySound1');
}
function loopSound(soundID) {
window.setTimeout(function() {
soundManager.play(soundID,{onfinish:function(){loopSound(soundID);}});
},1);
}</script>
歡迎堆棧溢出。請在回答中添加一些描述,以解釋爲什麼這應該適用於該問題 – Mikkel 2016-12-13 20:30:31