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