update ZLMRTCClient.js (#3596)

for issue https://github.com/ZLMediaKit/ZLMRTCClient.js/issues/14
This commit is contained in:
xiongguangjie 2024-06-09 10:43:57 +08:00 committed by GitHub
parent 15bc4c8767
commit 6df0e2ee8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 8 deletions

View File

@ -15,8 +15,8 @@ var ZLMRTCClient = (function (exports) {
CAPTURE_STREAM_FAILED: 'CAPTURE_STREAM_FAILED'
};
const VERSION$1 = '1.0.1';
const BUILD_DATE = 'Mon Mar 27 2023 19:11:59 GMT+0800 (China Standard Time)';
const VERSION$1 = '1.0.2';
const BUILD_DATE = 'Mon Jun 03 2024 23:12:40 GMT+0800 (China Standard Time)';
// Copyright (C) <2018> Intel Corporation
//
@ -8024,7 +8024,6 @@ var ZLMRTCClient = (function (exports) {
}
*/
}
_onIceCandidate(event) {
if (event.candidate) {
log(this.TAG, 'Remote ICE candidate: \n ' + event.candidate.candidate);
@ -8169,6 +8168,7 @@ var ZLMRTCClient = (function (exports) {
let videoConstraints = new VideoTrackConstraints(VideoSourceInfo.CAMERA);
videoConstraints.resolution = new Resolution(quickScan[i].width, quickScan[i].height);
MediaStreamFactory.createMediaStream(new StreamConstraints(false, videoConstraints)).then(stream => {
stream.getVideoTracks().forEach(track => track.stop());
resolutions.push(quickScan[i]);
ok++;
if (ok + err == quickScan.length) {
@ -8191,6 +8191,7 @@ var ZLMRTCClient = (function (exports) {
let videoConstraints = new VideoTrackConstraints(VideoSourceInfo.CAMERA);
videoConstraints.resolution = new Resolution(w, h);
MediaStreamFactory.createMediaStream(new StreamConstraints(false, videoConstraints)).then(stream => {
stream.getVideoTracks().forEach(track => track.stop());
resolve();
}).catch(e => {
reject(e);

File diff suppressed because one or more lines are too long

View File

@ -15,8 +15,8 @@ var ZLMRTCClient = (function (exports) {
CAPTURE_STREAM_FAILED: 'CAPTURE_STREAM_FAILED'
};
const VERSION$1 = '1.0.1';
const BUILD_DATE = 'Mon Mar 27 2023 19:11:59 GMT+0800 (China Standard Time)';
const VERSION$1 = '1.0.2';
const BUILD_DATE = 'Mon Jun 03 2024 23:12:40 GMT+0800 (China Standard Time)';
// Copyright (C) <2018> Intel Corporation
//
@ -8024,7 +8024,6 @@ var ZLMRTCClient = (function (exports) {
}
*/
}
_onIceCandidate(event) {
if (event.candidate) {
log(this.TAG, 'Remote ICE candidate: \n ' + event.candidate.candidate);
@ -8169,6 +8168,7 @@ var ZLMRTCClient = (function (exports) {
let videoConstraints = new VideoTrackConstraints(VideoSourceInfo.CAMERA);
videoConstraints.resolution = new Resolution(quickScan[i].width, quickScan[i].height);
MediaStreamFactory.createMediaStream(new StreamConstraints(false, videoConstraints)).then(stream => {
stream.getVideoTracks().forEach(track => track.stop());
resolutions.push(quickScan[i]);
ok++;
if (ok + err == quickScan.length) {
@ -8191,6 +8191,7 @@ var ZLMRTCClient = (function (exports) {
let videoConstraints = new VideoTrackConstraints(VideoSourceInfo.CAMERA);
videoConstraints.resolution = new Resolution(w, h);
MediaStreamFactory.createMediaStream(new StreamConstraints(false, videoConstraints)).then(stream => {
stream.getVideoTracks().forEach(track => track.stop());
resolve();
}).catch(e => {
reject(e);

File diff suppressed because one or more lines are too long