pull/127/merge
Martin Stcknbrkr 2024-06-14 10:15:01 +00:00 committed by GitHub
commit bd442d205d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 6 deletions

View File

@ -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