w3c / mediacapture-fromelement

API to create a MediaStream from Media Element
https://w3c.github.io/mediacapture-fromelement
Other
21 stars 15 forks source link

Should RequestFrame() take a timestamp argument? #97

Open alvestrand opened 2 years ago

alvestrand commented 2 years ago

Once a frame is generated with RequestFrame(), it is going to be sent out on a MediaStreamTrack, which is eventually consumed by some destination that cares about the relative timing of the frames - so that it can play back evenly at 30 fps, for instance.

RequestFrame() will (I think) generate something that has the timestamp of when reading from the canvas completes; this can be an uneven cadence when processing for generating the canvas is different for different frames.

Should RequestFrame() take a timestamp, so that the application can control what cadence the frames appear to arrive in?