Reputation: 594
I am using stream.stop() which is working fine in firefox but giving error in chrome that 'stream.stop() is undefined'.
In firefox however it is working it is also showing a warning that use MediaStreamTrack.stop() instead.
Which while using not working on safari/chrome both
I have tried MeadiaStream.stop() as well.
Upvotes: 1
Views: 4590
Reputation: 594
I have used
mediaStream.getAudioTracks()[0].stop();
to stop audio tracks and
mediaStream.getVideoTracks()[0].stop();
to stop video tracks
Upvotes: 2