HTML5 Microphone capture stops after 5 seconds in Firefox

大兔子大兔子 提交于 2019-11-29 09:12:23
csch

It's a bug in Firefox, it can be found here:

https://bugzilla.mozilla.org/show_bug.cgi?id=934512

There's also a workaround:

context = new AudioContext();

navigator.getUserMedia({ audio: true }, function(stream) {
  // the important thing is to save a reference to the MediaStreamAudioSourceNode
  // thus, *window*.source or any other object reference will do
  window.source = context.createMediaStreamSource(stream);
  source.connect(context.destination);
}, alert);

source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!