现在HTML5的getUserMedia用于录音吗? [英] Is HTML5's getUserMedia for audio recording working now?
问题描述
我搜索了很多关于getUserMedia的DEMO和示例,但大多数只是相机捕获,而不是麦克风。
所以我下载了一些例子并自行尝试电脑,相机捕捉是工作,但是当我改变时
navigator.webkitGetUserMedia({video:true},gotStream );
至
navigator.webkitGetUserMedia({audio:true},gotStream);
浏览器要求我先允许麦克风访问,然后在 $ b失败
$ b
document.getElementById(audio)。src = window.webkitURL.createObjectURL(stream);
消息是:
GET BLOB:http%3A // localhost / a5077b7e-097a-4281-b444-8c1d3e327eb4 404(Not Found)
这是我的代码: getUserMedia_simple_audio_test
我做错了什么?或者只有getUserMedia可以用于照相机吗?
目前Google Chrome尚不可用。请参阅问题112367 。
您可以在演示中看到,它总会抛出一个错误, p>
GET blob:http%3A // whatever.it.is / b0058260-9579-419b-b409-18024ef7c6da 404(Not Found) p>
此外,您还无法在
{
video:true,
audio:true
}
I had searched a lot of DEMO and examples about getUserMedia , but most are just camera capturing, not microphone.
So I downloaded some examples and tried on my own computer , camera capturing is work , But when I changed
navigator.webkitGetUserMedia({video : true},gotStream);
to
navigator.webkitGetUserMedia({audio : true},gotStream);
The browser ask me to allow microphone access first, and then it failed at
document.getElementById("audio").src = window.webkitURL.createObjectURL(stream);
The message is :
GET blob:http%3A//localhost/a5077b7e-097a-4281-b444-8c1d3e327eb4 404 (Not Found)
This is my code: getUserMedia_simple_audio_test
Did I do something wrong? Or only getUserMedia can work for camera now ?
It is currently not available in Google Chrome. See Issue 112367.
You can see in the demo, it will always throw an error saying
GET blob:http%3A//whatever.it.is/b0058260-9579-419b-b409-18024ef7c6da 404 (Not Found)
And also you can't listen to the microphone either in
{
video: true,
audio: true
}
这篇关于现在HTML5的getUserMedia用于录音吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!