MSE: Changing MediaSource::duration attribute, do not evict data

RESOLVED FIXED

Status

()

defect
P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

()

Attachments

(2 obsolete attachments)

Assignee

Description

4 years ago
When modifying MediaSource::duration attribute, if new duration is lesser than the existing one, we should be removing data from the attached source buffers.

Per spec:
duration change:
http://w3c.github.io/media-source/#duration-change-algorithm
"If the new duration is less than old duration, then run the range removal algorithm with new duration and old duration as the start and end of the removal range."

http://w3c.github.io/media-source/#sourcebuffer-coded-frame-removal

This is causing Youtube reference test #23 and #24 to fail
Assignee

Comment 1

4 years ago
in the attached test:
we can see:
4409: video.duration=4.986366
4410: sourceBuffer.buffered.length = 1
4411: sourceBuffer.buffered.start(0) = 0.0326
4412: sourceBuffer.buffered.end(0) = 10.005333
4412: mediaSource.duration = 4.9863665

Should be:
4409: video.duration=4.986366
4410: sourceBuffer.buffered.length = 1
4411: sourceBuffer.buffered.start(0) = 0.0326
4412: sourceBuffer.buffered.end(0) = 5.0189665
4412: mediaSource.duration = 4.9863665

Comment 2

4 years ago
Where are these attached tests?
Assignee

Comment 3

4 years ago
see the URL field.

Going to make them into mochitest
Assignee

Comment 4

4 years ago
Addendum:
4409: video.duration=4.986366
4410: sourceBuffer.buffered.length = 1
4411: sourceBuffer.buffered.start(0) = 0.0326
4412: sourceBuffer.buffered.end(0) = 10.005333
4412: mediaSource.duration = 4.9863665

should be:
4305: * sourceBuffer.updatestart
4305: * sourceBuffer.update
4305: * sourceBuffer.updateend
4409: video.duration=4.986366
4410: sourceBuffer.buffered.length = 1
4411: sourceBuffer.buffered.start(0) = 0.0326
4412: sourceBuffer.buffered.end(0) = 5.0189665
4412: mediaSource.duration = 4.9863665

event updatestart/update/updateend must be fired
Assignee

Updated

4 years ago
Assignee: nobody → jyavenard
Assignee

Updated

4 years ago
Depends on: 1096089
Assignee

Updated

4 years ago
Depends on: 1120079
Assignee

Updated

4 years ago
Depends on: 1124050
Assignee

Comment 5

4 years ago
Initial incomplete implementation. Works with youtube, resolution change are now instantaneous
Assignee

Comment 6

4 years ago
Initial incomplete implementation. Works with youtube, resolution change are now instantaneous
Assignee

Updated

4 years ago
Attachment #8552820 - Attachment is obsolete: true
Assignee

Updated

4 years ago
Attachment #8552821 - Attachment is obsolete: true
Assignee

Comment 7

4 years ago
Fixed by bug 1130826
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.