kbumsik / opus-media-recorder

MediaRecorder polyfill for Opus recording using WebAssembly
http://kbumsik.io/opus-media-recorder/
Other
308 stars 39 forks source link

MediaRecorder.stop() doesn't clear the recording icon in the tab #27

Closed evgeny-nadymov closed 4 years ago

evgeny-nadymov commented 4 years ago

Please add this line to MediaRecorder.stop() method in order to fix the issue.

this.stream.getAudioTracks().forEach(track => track.stop());

kbumsik commented 4 years ago

@evgeny-nadymov Hi, according to the W3C MediaRecorder.stop() spec, it doesn't touch the stream when the method is called. It makes sense to me because there can be multiple stream processors attached to the recording stream at a time. So stopping the track will interrupt other stream processors.

I believe you need to do it manually in the onstop event handler.

I might be wrong with the spec, so please tell me if the browser's native (other than opus-media-recorder) MediaRecorder.stop() clears the recording icons. Then I will fix the behavior.

evgeny-nadymov commented 4 years ago

Sorry, this is not a default behavior for the native recorder either.