Closed
Bug 503802
Opened 15 years ago
Closed 15 years ago
Media element playback time should be in range [startTime,startTime+duration]
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 498253
People
(Reporter: cpearce, Unassigned)
References
()
Details
In void nsOggDecodeStateMachine::Seek(float aTime) we assert:
mSeekTime = aTime + mPlaybackStartTime;
float duration = static_cast<float>(mDuration) / 1000.0;
NS_ASSERTION(mSeekTime >= 0 && mSeekTime <= duration,
"Can only seek in range [0,duration]");
That's wrong. mSeekTime is in range [mPlaybackStartTime, mPlaybackStartTime+duration], so the assertion should be:
NS_ASSERTION(mSeekTime >= mPlaybackStartTime &&
mSeekTime <= (mPlaybackStartTime + duration),
"Can only seek in range [start,end]");
We should probably assert that the passed in time (aTime) is in range [0,duration], at least until we update the start time to match the current spec, which exposes HTMLMediaElement.currentTime to be in the range [HTMLMediaElement.startTime, startTime+duration_of_all_concatenated_segments] rather than [0,duration] as we currently implement.
See: http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-currenttime
Reporter | ||
Comment 1•15 years ago
|
||
Ok, the new Ogg decoder backend implemented the assertion as my comment 1, but we're still not matching the spec. We still start playback at time 0, and end it at time |duration|. Playback should start at time HTMLMediaElement.startTime, and finish at |startTime+duration|.
Summary: nsOggDecodeStateMachine::Seek(float) assertion incorrect → Media element playback time should be in range [startTime,startTime+duration]
Reporter | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Playback should start at time
> HTMLMediaElement.startTime, and finish at |startTime+duration|.
This is bug 498253.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•