Re: [whatwg] Reporting mid-stream resolution change on <video>

On Thu, 12 Dec 2013, Ami Fischman wrote:
> On Thu, Dec 12, 2013 at 2:56 PM, Ian Hickson <ian@hixie.ch> wrote:
> >
> > I suppose we could fire resize on initial load as well. I guess it 
> > depends on what code that uses this looks like. Is the initial size 
> > change the same kind of code as resizing, or is it different code? 
> > (e.g. will one set up elements to frame the video while the other just 
> > changes their size?)
> 
> Yes, I think that the first size event and subsequent ones are similar 
> enough that the initial size info should be fired when metadataloaded 
> fires.
> 
> Example use-cases:
>
> - a chat service wants to display an "HD" emblem on video feeds above 
> some threshold (and removed it if/when they fall below the threshold).  
> You want to show/hide the emblem from the first point at which you have 
> size information, and each time that information changes.
>
> - an on-screen display (OSD) for feed resolution; needs to be updated on 
> resize as well as initial size information.
> 
> In fact I am failing to think of examples where only not-first resize 
> information would be needed.

Ok. Done. (The initial one fires just after the 'durationchange' event and 
just before the 'loadedmetadata' event.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 17 December 2013 22:14:37 UTC