2017-02-24 82 views
1

The browser compatibility table for OfflineAudioContext.suspend有一個Firefox的空單元格,這是相當混亂的。您可以暫停Firefox上的離線音頻上下文嗎?

它在Chrome中正常工作。我仍然認爲OfflineAudioContext.suspend目前在Firefox(v51.0.1)中實現,因爲我可以調用該方法。我的問題是,每當我把這種方法,我得到:

DOMException [NotSupportedError: "Operation is not supported" 
code: 9 
nsresult: 0x80530009 
location: http://localhost:4200/main.bundle.js:13603] 

這是兩個主要的調用以上

offlineContext.suspend(0).then(() => ..., e => console.log(e)) 
offlineContext.startRendering() 

console.log(e)打印錯誤消息的順序,所以它不會進入成功回調then

我試着修改suspend方法的「suspendTime」參數,在startRendering方法之後放置調用,但沒有成功。

它實際上應該在Firefox中工作嗎?我認爲讓他們允許我們調用這個方法會很奇怪,但是讓它一直失敗。

+0

新鮮的音頻環境非常便宜...建議的智慧是避免暫停而不是殺死並獲得新的環境 –

回答

0

很可能Firefox還沒有開始爲離線環境實現此功能。 (不過,我認爲掛起支持在線音頻上下文)。