[whatwg] Issue when Video currentTime used for seeking.
Biju Gm@il
bijumaillist at gmail.com
Tue Nov 11 21:36:06 PST 2008
I see a problem while using video_element.currentTime instead of
video_element.start
ie, recent firefox nightly build removed video_element.start
before that we could do following to make a movie with new URL start
from 10th second frame
video_element.src="http://www.double.co.nz/video_test/ascannerdarkly480.ogg";
video_element.start=10;
video_element.play();
Now to achieve same effect I tried
video_element.src="http://www.double.co.nz/video_test/ascannerdarkly480.ogg";
video_element.currentTime=10;
video_element.play();
This gives a problem.
ie, I can not set .currentTime immediately after .src changed
it throughs error (may be it is waiting to load metadata)
So can we have a method .seek() or .skip() or something.
Syntax:-
.seek(secondsToSeek, isAbosolute, toKeyFrame)
Parameters:-
secondsToSeek - optional, positive/negative floating point value to
indicate seconds from current frame. Default 5 sec or a user set
value.
isAbosolute - optional, boolean, default false. if true indicate
"secondsToSeek" is from the start instead of from current frame.
toKeyFrame - optional, boolean, default false. if true indicates goto
the nearest keyframe of the value provided in secondsToSeek.
this is to improve performance while avoiding bug
https://bugzilla.mozilla.org/show_bug.cgi?id=463358
Returns:-
.seek() will return the time to which it is seek-ed to.
so if seeking is true
.currentTime - will give current position till where the video is
already seek-ed
.seek(0) - will give currently being seek-ed position.
With out this extra method it will lot more Javascript code to archive the same.
Cheers
Biju
More information about the whatwg
mailing list