W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

[whatwg] What is the purpose of timeupdate?

From: Andrew Scherkus <scherkus@chromium.org>
Date: Fri, 6 Nov 2009 16:51:18 -0800
Message-ID: <eb35a2a80911061651xa96776dmd27378eac2ee068c@mail.gmail.com>
On Fri, Nov 6, 2009 at 4:37 PM, Robert O'Callahan <robert at ocallahan.org>wrote:

> On Sat, Nov 7, 2009 at 11:52 AM, Simon Pieters <simonp at opera.com> wrote:
>
>> What if you have a video with say one frame per second? Unless I'm
>> mistaken Firefox will still fire timeupdate once per frame. (The spec says
>> you have to fire at least every 250ms.)
>>
>
> Hmm. Why would you want timeupdate to fire more often than once per frame?


If you tie progress bar animation to timeupdate, the position will update in
larger steps depending on the framerate of the video.  i.e., a 10 second
clip at 1fps will animate in 10 large steps.

If your video subsystem returns a wall clock or some continuously increasing
time source, the 250ms update will at least give you a smoother animating
progress bar.  i.e., a 10 second clip at 1fps will animate in 40 smaller
steps.

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091106/7005b228/attachment.htm>
Received on Friday, 6 November 2009 16:51:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC