mediacapture-image
mediacapture-image copied to clipboard
grabFrame and muted streams
The current Chromium implementation will reject grabFrame
for a muted stream, here's the relevant line. 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
.