W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2013

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

From: Ami Fischman <fischman@chromium.org>
Date: Thu, 12 Dec 2013 13:05:34 -0800
Message-ID: <CAHuR8a8tHPdQ7xHvMPWkU2v3R7PYhYyQJssgPJv5U=ntDPUqnw@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg@whatwg.org
Thanks Ian.  My reading of
http://html5.org/tools/web-apps-tracker?from=8346&to=8347 is that a simple
video that never changes size will never see the new resize event.  Is that
intentional?
(I ask b/c e.g. durationchange _is_ fired right before metadataloaded; I'd
expect resize & durationchange to act similarly in terms of whether they
fire on initial load)
Related, it's strange to me that

At this point, resize<http://www.whatwg.org/specs/web-apps/current-work/#event-media-resize>
events
can start firing.

but readyState is still HAVE_NOTHING, which is precluded by
http://www.whatwg.org/specs/web-apps/current-work/#event-media-resize's
Preconditions.

Would it make sense to make resize fire right before metadataloaded fires
and remove its Preconditions (both mimicking durationchange)?

Cheers,
-a

On Thu, Dec 12, 2013 at 12:04 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Thu, 12 Dec 2013, Ami Fischman wrote:
> >
> > Today the <video> tag exposes video{Width,Height} attributes that allow
> > the page to discover the resolution of the playing media once
> > metadataloaded has fired.  However there is no way for the page to find
> > out that the media resolution has changed mid-stream (short of polling
> > the tag constantly, which is obviously unappealing).
> >
> > Examples where mid-stream resolution change can happen include:
> > - WebRTC up/down-scaling a video stream at the source to adhere to
> > available bandwidth or other requirements
> > - MSE shifting between quality levels of source material
> > - Static/VOD/classic video files that change resolution mid-stream b/c of
> > different source material being concatenated together.
> >
> > One way to enable this would be to add a "metadatachange" event to the
> > list of media elements events (
> >
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#event-definitions
> > ).
> >
> > (this has come up recently in a public-webrtc
> > thread<
> http://lists.w3.org/Archives/Public/public-webrtc/2013Dec/0040.html>,
> > and previously in private discussions)
>
> Seems reasonable. Done. (I used the 'resize' event since it is well
> established as the appropriate event to use when dimensions change.)
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>
Received on Thursday, 12 December 2013 21:05:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC