mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修改为捕捉摄像头
This commit is contained in:
parent
5f0aeaa32a
commit
09add8d351
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user