[mediacapture-fromelement] <canvas>.captureStream() framerate parameter is too restrictive

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

== <canvas>.captureStream() framerate parameter is too restrictive ==
Some `<canvas>` elements produce new content in bursts, i.e. the 
content might not change at all and then change at a high rate, e.g. 
the demo in [1]. 

[`captureStream()`](https://w3c.github.io/mediacapture-fromelement/#widl-HTMLCanvasElement-captureStream-MediaStream-double-frameRate)
 supports either a constant, fixed frame rate or a user-defined one 
via `requestFrame()`. There is no support for producing a minimum 
frame rate, nor a frame rate between a minimum and a maximum, and 
either would be interesting to support e.g. recording of the captured 
Media Stream, or its delivery to a PeerConnection.

`captureStream()` has an optional parameter `frameRate` that can be 
used to specify a capture frame rate, overriding manual frame rate 
control; this parameter forces the said `frameRate`, hence ignoring 
any frame bursts. 

I propose considering supporting a `minFrameRate` and/or a 
`maxFrameRate` that would allow for the captured MediaStream to follow
 the `<canvas>` frame production while honouring the constraints.




[1] 
https://webrtc.github.io/samples/src/content/capture/canvas-record/

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

Received on Saturday, 16 July 2016 19:20:07 UTC