[Bug 14851] <video> Add seek() function for non-exact (fast) seeking

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14851

--- Comment #5 from Ian 'Hixie' Hickson <ian@hixie.ch> 2012-04-30 22:54:25 UTC ---
Surely you need three arguments to do what is described in comment 1: a
reference time, a flag saying whether to be precise or fast, and most
importantly, a target time. Presumably, the reference time only matters if
you're not being precise.

   media.seek(targetTime, {
     referenceTime: media.currentTime,
     mode: 'fast', // or 'precise'
   });

Also presumably:

   media.currentTime = targetTime;

...assumes the 'fast' mode with a reference time equal to the previous
currentTime.

Alternatively:

   media.currentTime = targetTime; // fast; relative to previous currentTime
   media.seekFast(targetTime, referenceTime);
   media.seekPrecise(targetTime);

Then again, why would you ever want the reference time to be something
different than the current time? Maybe we should just always assume that the
currentTime is the reference time, and then we only need to add:

   media.preciseSeek(targetTime);

...since assigning to currentTime already handles the fast version.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 30 April 2012 22:54:28 UTC