English 中文(简体)
如何选择 html5 中的用户媒体输入?
原标题:how to chose user media input in html5?

Im 正在撰写软件,通过 html5 和 js 和 js 向用户发送实况流,我遇到了麻烦。我在服务器上有2个网络摄像头和3个音频输入, 我如何选择何时会调用“用户 Media (.) ” 的媒体设备? 现在我使用铬, 但是如果任何浏览器都能找到解决方案, 将会更好 。

问题回答

http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-MediaStreamconstraints' rel=“nofollow”>当前草案 (13.August),因此无法指定一个特定的录音设备 。

User agents are encouraged to default to using the user s primary or system default camera and/or microphone (when possible) to generate the media stream. User agents may allow users to use any media source, including pre-recorded media files.

GetUser Media ()- 方法只允许通过< a href=> http://dev.w3. org/2011/webrtc/editor/getusermedia.html#idl-def- MediaStreamconstraints> rel=“nofollow” > MediaStreamconstraints 具体说明媒体来源是视频还是音频来源:

interface NavigatorUserMedia {
    void getUserMedia (MediaStreamConstraints? constraints, NavigatorUserMediaSuccessCallback successCallback, optional NavigatorUserMediaErrorCallback? errorCallback);
};

dictionary MediaStreamConstraints {
    (boolean or MediaTrackConstraints) video = false;;
    (boolean or MediaTrackConstraints) audio = false;;
};


上一篇:
下一篇:


相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签