Commit 09add8d3 by xiongziliang

修改为捕捉摄像头

parent 5f0aeaa3
...@@ -7307,8 +7307,9 @@ var ZLMRTCClient = (function (exports) { ...@@ -7307,8 +7307,9 @@ var ZLMRTCClient = (function (exports) {
} }
start() { start() {
let audioConstraints = new AudioTrackConstraints(AudioSourceInfo.SCREENCAST); //todo 此处修改捕获桌面或摄像头
let videoConstraints = new VideoTrackConstraints(VideoSourceInfo.SCREENCAST); let audioConstraints = new AudioTrackConstraints(AudioSourceInfo.MIC);
let videoConstraints = new VideoTrackConstraints(VideoSourceInfo.CAMERA);
MediaStreamFactory.createMediaStream(new StreamConstraints(audioConstraints, videoConstraints)).then(stream => { MediaStreamFactory.createMediaStream(new StreamConstraints(audioConstraints, videoConstraints)).then(stream => {
this._localStream = stream; this._localStream = stream;
this.dispatch(Events$1.WEBRTC_ON_LOCAL_STREAM, stream); this.dispatch(Events$1.WEBRTC_ON_LOCAL_STREAM, stream);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论