Re: maxHeight and maxWidth

On 13/02/16 09:08, Randell Jesup wrote:
> On 2/12/2016 6:12 PM, Peter Thatcher wrote:
>> On Fri, Feb 12, 2016 at 2:45 PM, Adam Roach <
>> <>> wrote:
>>     On 2/12/16 16:10, Peter Thatcher wrote:
>>>     ​ But seeing that code does give me an idea for something even
>>>     better; add an event to a video track: onresolutionchanged.
>>>     Then, whenever the video track's resolution changes, the
>>>     Javascript can reset the scale:
> I'll note: onresolutionchanged is actually quite useful regardless of
> this conversation, and answers lots of questions we have to answer today
> with "attach it to a hidden <video> or <canvas> element and poll the
> video size there" (ugh)

If polling is what you're doing, I guess the reason for involving a 
video element is that getSettings is not yet implemented (there the 
width and height is available).

The (WhatWG flavor at least) video element also has the resize event 
which sounds like what you'd want to use to avoid polling if there is no 
event on the track that can be used.

I agree that a resolutionchanged/resize event could be quite useful in 
certain situations, but can't overconstrained solve some of the cases? 
Put a mandatory constraint on height 90; if this is not met there will 
be an event fired.

Received on Saturday, 13 February 2016 16:07:54 UTC