[Webkit-unassigned] [Bug 157539] New: Media Source Extensions - SourceBuffer "mode" support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 10 15:15:16 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=157539
Bug ID: 157539
Summary: Media Source Extensions - SourceBuffer "mode" support
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Macintosh
OS: OS X 10.11
Status: NEW
Severity: Normal
Priority: P2
Component: Media Elements
Assignee: webkit-unassigned at lists.webkit.org
Reporter: johnsfreemusic at gmail.com
Created attachment 278535
--> https://bugs.webkit.org/attachment.cgi?id=278535&action=review
Test files and screenshots.
https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/mode
https://w3c.github.io/media-source/#idl-def-AppendMode
When playing a MIME that would default to "segments" (eg AAC-LC, 'audio/mp4; codecs="mp4a.40.2"') changing the mode to "sequence" does not have the intended effect.
I can buffer a 4 minute AAC-LC file just fine if I do not touch the mode attribute; if I change it to "sequence" before buffering any data then somehow only about a half second gets buffered (according to the SourceBuffer itself). I would expect the entire file to be buffered exactly the same as if it was in "segments" mode (for a single song).
Note that the difference in behavior comes from buffering two files. Say I buffer two AAC-LC songs, one is 4 minutes and the second is 3 minutes. Also assume I do not change timestampOffset.
- In sequence mode the data will "overlap" and the total amount buffered will be 4 minutes. The first 3 minutes will be the second song, the last minute will be the last minute of the first song.
- In segments mode the data will not overlap and the total amount buffered will be 7 minutes. The first 4 minutes are the first song, the last 3 minutes are the second song.
This works as intended on Chrome (50) and FireFox.
Why is this useful?
For developers who are migrating audio formats and who's code is built around the "sequence" mode. Note that MP3/MPEG always acts as if it is in "sequence" mode. So if a developer then wants to switch to AAC playback the easiest thing to do on their end is make sure mode is always "sequence" rather then "segments". As this is not properly supported it is more work for developers to abstract this away in their JavaScript themselves if they wish to support Safari.
Attached is a zip with example code and some screenshots of the issue in Chrome, FireFox, and Safari (note it is working in Chrome + FF as stated before). The example screenshots used two audio files as described above, though you can test with just one file and still not get anything buffered.
Tried both Safari 9.1 11601.5.17.1 and Webkit Nightly on MacOS. Both do not work (see screenshot of Safari in the zip - its the same on both). The source buffer says there is a half second buffered when in segments mode despite giving over 3 minutes of audio data.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160510/7780f4a1/attachment.html>
More information about the webkit-unassigned
mailing list