W3C home > Mailing lists > Public > public-media-capture@w3.org > August 2015

Canvas capture update

From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 11 Aug 2015 09:50:54 -0700
Message-ID: <CABkgnnX-bzLNWeXm9xJ1XvVBWv-yQvHdhBR4izqPiztfE=2TBg@mail.gmail.com>
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.


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:33 UTC