[whatwg] What is the purpose of timeupdate?

Justin Dolske dolske at mozilla.com
Sat Nov 7 19:21:35 PST 2009


On 11/7/09 3:21 PM, Jonas Sicking wrote:

> When timeupdate was added, the stated goal was actually as a battery
> saving feature for for example mobile devices. The idea was that the
> implementation could scale back how often it fired the event in order
> to save battery.
>
> Now that we have implementation experience, is timeupdate fulfilling
> this goal? If not, is it fulfilling any other goals making it worth
> keeping?

FWIW, I felt that having Firefox's default video controls update their 
state for every frame was excessive (and could lead to competing for the 
CPU with the video itself). So, the controls basically ignore timeupdate 
events that occur within .333 seconds of the last timeupdate position... 
Which leads to having a bit of complication to deal with edge cases like 
having the video end less than .333 seconds after the last timeupdate 
event (otherwise the UI might look like stuck shortly before the end of 
the video).

At least for my needs, having an event fire at ~3 Hz (and when special 
things happen, like a seek or the video ending) would be somewhat 
simpler and more efficient.

Justin



More information about the whatwg mailing list