W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2012

Re: [whatwg] Why does CanvasRenderingContext2D.drawImage not draw a video's poster?

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Wed, 18 Jul 2012 08:06:45 +0200
Message-ID: <CAHp8n2=G4hPt7P0ERC_A3k6VwRwQd9+MFDTLcwC1um0MAYifdA@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Mark Callow <callow_mark@hicorp.co.jp>
On Wed, Jul 18, 2012 at 6:57 AM, Charles Pritchard <chuck@jumis.com> wrote:
> On Jul 17, 2012, at 9:04 PM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
>
>> On 18/07/2012 00:17, Silvia Pfeiffer wrote:
>>> I think this is simply an idea that hasn't been raised before. I like
>>> it. Though even then sometimes there may be nothing when there is no
>>> explicit poster and preload is set to none.
>> The language gives me the impression that drawing nothing was a
>> deliberate choice, in particular because later on it says:
>
>
> We don't have events based on poster, so we don't know whether or not it's been loaded. Poster is meant for the video implementation. We use other events to know if video is playing.
>
> So as a coder, I can just do an attribute check to see if poster exists, then load it into an image tag. It's a normal part of working with Canvas. We always follow onload events.

IIUC, that still excludes the case where there is no @poster attribute
set on video, @autoplay is set to none, and the browsers load the
first frame as the poster. It would make sense in this case to hand
that poster to the canvas. And it would make it easier if the
explicitly set @poster attribute would be used, too, so you don't have
to do that by hand.

Silvia.
Received on Wednesday, 18 July 2012 06:07:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT