NotReadableError: Failed to allocate audiosource in Firefox for getUserMedia

NotReadableError: Failed to allocate audiosource in Firefox for getUserMedia

运行 我的 Firefox 控制台中的以下代码片段 returns 以下错误 [FF/56.0.2(64 位)在 Mac OS 10.13 .1]:

MediaStreamError { name: "NotReadableError", message: "Failed to allocate audiosource", constraint: "", stack: "" } (unknown)

// Sippet
navigator.mediaDevices
      .getUserMedia({
  audio: true,
  video: true
})
      .then(stream=>{
console.log(stream.getAudioTracks())
document.getElementById('storybook-preview-iframe').contentWindow.document.getElementById('video-camera').srcObject = stream
mr = new window.MediaRecorder(stream,  {
      mimeType: 'video/webm'
    })
mr.ondataavailable = console.log
})
      .catch(console.log)

最麻烦的是它在某一时刻工作,然后就停止了。好像有什么东西被永久锁定了......我无法(据我所知)看到音频源有什么问题。

我运行这些精神错乱检查无济于事:

更新: 我把失败代码进一步简化了。

navigator.mediaDevices.getUserMedia({
    audio: true
}).then(function (stream) {
    console.log(stream)
}).catch(console.log)

音频不想注册.....

甚至尝试了 FF 自己的 Test Pilot 也失败了 https://testpilot.firefox.com/experiments/voice-fill/

按照@mrchestnut 的建议,我下载了 Firefox Quantum (which was released as of Nov. 14th 2017) 并且成功了!

Mozilla 上的博客 Post:

https://blog.mozilla.org/blog/2017/11/14/introducing-firefox-quantum/

下载量子:

https://www.mozilla.org/en-US/firefox/new/?scene=2

虽然这并不能解释为什么它不起作用,但糖确实解决了我的问题。