Re: still image on <video> (was: width='' and height='' on <video>)

On Oct 10, 2007, at 2:25 AM, Håkon Wium Lie wrote:

> Also sprach Henri Sivonen:
>> The <video> element currently lacks width and height attributes on
>> the grounds that:
>>  1) They'd be presentational.
>>  2) YouTube and the like put all videos in the same box.
>>  3) Different dimensions are called for different media, so the
>> <div><style scoped media='...'> video { width: ...; height: ...; } </
>> style><style scoped media='...'> video { width: ...; height: ...; }  
>> </
>> style><video>...</video></div> would encourage media-independence
>> while <video width='...' height='...'>...</video> would not.
>> And, yet, for *practical* purposes, authors seem to *expect* to have
>> width and height attributes at their disposal. (Based on expectations
>> voiced on IRC.) I suggest adding width and height attributes to  
>> <video>.
> I support this.
> While on the subject of pragmatic attributes, I would also like to
> propose another attribute -- still -- to point to an image that is
> shown until the video itself is played. The current specification
> indicates that the first frame of the video should be used for this.

Most video formats have the ability to specify a poster frame, which  
is the frame that should be displayed before the video plays. The spec  
should require the poster frame when available, not the first frame,  
if it doesn't already. Given the ability to embed a poster frame in  
the media directly, I'm not sure it is a huge win to have a way to add  
one in the markup. But if so...

> That is, they don't instantiate the <video> element until the user has
> pressed play. A simple attribute would address their needs:
>   <video src="foo.ogg" still="foo.jpg">
> Other names for the attribute could be "img" or "index". about posterframe="" to match the familiar video terminology.

>> From a performance perspective, it seems simpler to fetch a small
> still image of fixed length rater than fetching a part of the video
> file and hoping that a full frame is included.
>> From an authoring perspective, it seems simpler to use the attribute
> rather than editing the video file (e.g., by inserting the desired
> still image in the beginning of the file).
> I don't think the proposed attribute add any new accessibility issues
> as the still image -- one must assume -- is taken from within the  
> video.
> An alternative approach is to specify a time -- say, "3.5s" -- into
> the video from where the still should be fetched.

I could buy the argument for an explicit poster frame image but  
specifying a time like this definitely goes overboard in duplicating  
the ability of video formats themselves to specify a poster frame.  
Even fairly simple video editing software will let you set one, and  
with a time offset you have to load part of the video file anyway,  
removing much of the benefit. Maybe in Ogg it's hard to specify a  
poster frame, but it's pretty easy with MPEG-4 at least.


Received on Wednesday, 10 October 2007 16:57:25 UTC