How to cancel getUserMedia indicator after recording
When you generate a new MediaStream
object from a getUserMedia
call, it contains a MediaStreamTrack
object.
Calling MediaStream.getAudioTracks()
should return a sequence that represents a snapshot of all the MediaStreamTrack
objects in the stream with the kind "audio"
. Same thing applies when calling MediaStream.getVideoTracks()
to retrieve video track objects.
According to the spec, it looks like you can revoke all given permissions to your app by calling MediaStreamTrack.stop()
on the audio track object.