[whatwg] VIDEO Timeupdate event frequency.

Eric Carlson eric.carlson at apple.com
Fri Sep 10 20:23:49 PDT 2010


On Sep 10, 2010, at 8:06 PM, Biju wrote:

> On Fri, Sep 10, 2010 at 7:05 AM, Silvia Pfeiffer
> <silviapfeiffer1 at gmail.com> wrote:
>> Incidentally: What use case did you have in mind, Biju ?
> 
> I was thinking about applications like
> https://developer.mozilla.org/samples/video/chroma-key/index.xhtml
> ( https://developer.mozilla.org/En/Manipulating_video_using_canvas )
> 
> Now it is using setTimeout so if processor is fast it will be
> processing same frame more than on time. Hence wasting system
> resource, which may affect other running process.
> 
  Perhaps, but it only burns cycles on those pages instead of burning cycles on *every* page that uses a <video> element.

> If we use timeupdate event we may be missing some frames as timeupdate
> event is only happen every 200ms or 250ms, ie 4 or 5 frames per
> second.
> 

  Even in a browser that fires 'timeupdate' every frame, you *will* miss frames on a heavily loaded machine because the event is fired asynchronously.

> And we know there are videos which a have more than 5 frames per second.
> 

  So use a timer if you know that you want update more frequently.

eric




More information about the whatwg mailing list