|
@@ -170,6 +170,19 @@ export default {
|
|
|
this.switchbtn = true;
|
|
|
} else {
|
|
|
this.switchbtn = false;
|
|
|
+ const videoTrack = this.localStream_.getVideoTrack();
|
|
|
+ if (videoTrack) {
|
|
|
+ this.localStream_.removeTrack(videoTrack).then(() => {
|
|
|
+ console.log('remove video call success');
|
|
|
+ // 关闭摄像头
|
|
|
+ videoTrack.stop();
|
|
|
+ this.client_.unpublish(this.localStream_).then(() => {
|
|
|
+ // 取消发布本地流成功
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.iscamera = false;
|
|
|
+ this.typevalue = 'warning';
|
|
|
}
|
|
|
}
|
|
|
},
|