HTML5的用于录音的getUserMedia现在可以正常工作了吗? [英] Is HTML5's getUserMedia for audio recording working now?

查看:67
本文介绍了HTML5的用于录音的getUserMedia现在可以正常工作了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多有关getUserMedia的DEMO和示例,但是大多数只是摄像头,而不是麦克风.

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);

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); 

消息是:

GET blob:http%3A//localhost/a5077b7e-097a-4281-b444-8c1d3e327eb4 404 (Not Found)

这是我的代码: getUserMedia_simple_audio_test

我做错了吗?还是只有getUserMedia现在可以在相机上使用?

Did I do something wrong? Or only getUserMedia can work for camera now ?

推荐答案

当前在Google Chrome中不可用.请参见问题112367 .

It is currently not available in Google Chrome. See Issue 112367.

您可以在演示中看到它,它总是会提示错误

You can see in the demo, it will always throw an error saying

获取blob:http%3A//whatever.it.is/b0058260-9579-419b-b409-18024ef7c6da 404(未找到)

GET blob:http%3A//whatever.it.is/b0058260-9579-419b-b409-18024ef7c6da 404 (Not Found)

而且您也无法在

{
    video: true,
    audio: true
}

这篇关于HTML5的用于录音的getUserMedia现在可以正常工作了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆