mediacapture-extensions icon indicating copy to clipboard operation
mediacapture-extensions copied to clipboard

MediaStreamTrack.stop() should be async

Open sonntag-philipp opened this issue 3 years ago • 4 comments

Hello there,

I'm currently working with the mediacapture api in different browsers. While working on the MediaStreamTracks, I've noticed that the stop method doesn't provide a way to get notified when the track is actually stopped by the underlying user agent.

This can cause issues in platforms, where a camera can only be opened once by the browser api.

My proposal for a solution would be to make the .stop() method async by returning a promise. The promise should be resolved when the user agent made sure, that the media track is stopped.

The described method in the RFC.

sonntag-philipp avatar Aug 30 '21 10:08 sonntag-philipp