mirror of https://github.com/OpenVidu/openvidu.git
Merge 75cb15ee12
into dc759dffd4
commit
bd442d205d
|
@ -728,12 +728,17 @@ export class Stream {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.mediaStream) {
|
if (this.mediaStream) {
|
||||||
this.mediaStream.getAudioTracks().forEach((track) => {
|
const isSenderAndCustomTrack: boolean = !!this.outboundStreamOpts &&
|
||||||
track.stop();
|
this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack;
|
||||||
});
|
|
||||||
this.mediaStream.getVideoTracks().forEach((track) => {
|
if (!isSenderAndCustomTrack) {
|
||||||
track.stop();
|
this.mediaStream.getAudioTracks().forEach((track) => {
|
||||||
});
|
track.stop();
|
||||||
|
});
|
||||||
|
this.mediaStream.getVideoTracks().forEach((track) => {
|
||||||
|
track.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
delete this.mediaStream;
|
delete this.mediaStream;
|
||||||
}
|
}
|
||||||
// If subscribeToRemote local MediaStream must be stopped
|
// If subscribeToRemote local MediaStream must be stopped
|
||||||
|
|
Loading…
Reference in New Issue