[whatwg] What is the purpose of timeupdate?

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

-------------- 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