0
看着previous answer我重試的觀點成爲播放聲音:無法加載,因爲沒有支持的源發現
soundBG.pause();
soundBG.currentTime = 0;
var soundPromise = soundBG.play();
if (soundPromise !== undefined) {
soundPromise.then(function() {
console.log('Sound!');
}).catch(function(error) {
console.error('Failed to start your sound, retrying.');
setTimeout(function(){
soundEffects();
}, 2000);
});
}
,但它仍然沒有工作,當聲音不工作,我不斷收到錯誤:
DOMException: Failed to load because no supported source was found
有無論如何解決這個問題嗎?
請看第一:https://www.google.nl/search?q=DOMException%3A+Failed+to+load +因爲+沒有+支持+源+ + +找到 – mplungjan
找不到任何答案,這就是爲什麼我在這裏問它。 – Sandra