- From: Martin Thomson <martin.thomson@gmail.com>
- Date: Tue, 11 Aug 2015 09:50:54 -0700
- To: "public-media-capture@w3.org" <public-media-capture@w3.org>
- Cc: pehrsons@gmail.com
As some of you might be aware, Firefox has an implementation of media capture from <video> and <audio> tags. We also have an implementation of capture from <canvas>, which you can test in nightly builds by enabling "canvas.capturestream.enabled" in about:config. Part of the reason that this is behind a pref is that we discovered that capturing from webGL canvas had some challenges, particularly when preserveDrawingBuffer is true. Based on feedback from that effort, and thanks to Andreas, I've created a pull request that specifies when capture happens more precisely. https://github.com/w3c/mediacapture-fromelement/pull/11 The idea here is that you only capture frames when the canvas is painted. The frame rate setting becomes a guide; the exact time of capture will usually be slightly after the frame rate setting hits. As a result, or at least once we have this correctly implemented [1], it should be possible to capture media from a canvas with close to zero performance impact. Of course, doing something with the captured stream could have performance consequences. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1161913
Received on Tuesday, 11 August 2015 16:51:23 UTC