[mediacapture-image] grabFrame and muted streams (#213)

dsanders11 has just created a new issue for https://github.com/w3c/mediacapture-image:

== grabFrame and muted streams ==
The current Chromium implementation will reject `grabFrame` for a muted stream, [here's the relevant line](https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/imagecapture/image_capture.cc?l=43). The spec currently says nothing about rejecting on a muted stream.

This behavior is problematic as a stream created from a canvas will constantly toggle `mute` and `unmute` as new content is drawn. This means to use `grabFrame` effectively on a stream from a canvas, you'd need to call it inside the `onunmute` handler for the track, which overly complicates the code. There's ongoing discussion in #212 regarding whether `grabFrame` should be for the 'current frame' or the 'next frame', and I think this is another example of a sharp edge created by that behavior being 'next frame'. If `grabFrame` was clarified in the spec to grab the current frame, then the spec could enforce that a muted track should not cause a rejection of `grabFrame`.

Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/213 using your GitHub account

Received on Thursday, 18 July 2019 09:58:11 UTC