[Bug 18920] addSourceBuffer parameter type should be optional

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

Aaron Colwell <acolwell@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |acolwell@chromium.org

--- Comment #1 from Aaron Colwell <acolwell@chromium.org> 2012-09-19 19:59:14 UTC ---
(In reply to comment #0)
> In the current spec the initialization of the sourceBuffer requires the
> developer to specify the exact codec. For example:
> 
> mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
> mediaSource.addSourceBuffer('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
> 
> As a developer, it will make the API much more feasible and easier to use.
> 
> Scenario:
> A website has a library of various videos in different codecs (as users upload
> the videos). The video is fetch using XHR and appended with MSE.
> 
> Determining the mime type can be made by reading the XHR response, which must
> contain the real mime type and not just the generic octet stream (requirement
> for the webserver). Knowing the correct codec is even harder in the js level.
> In ISO-BMFF there are plenty of variations and the developer needs a js parser
> to detect which codec is used.
> 
> Auto detection of the initialization segment by the browser would make the API
> much more accessible and developer friendly.

Yes this was done intentionally. The media engine needs to know what the format
of the bytestream is to properly parse it. The assumption here is that the
application knows what type of content it is trying to append because it needs
this information to properly identify where init/media segments are anyways.
The application should use some sort of manifest that indicates where the
segment boundaries are and include the mimetypes of the streams so that
SourceBuffers can be created properly. 

You could do lots of format parsing in JavaScript, but it makes more sense to
have the backend do this for you and store it in a manifest.

-- 
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 Wednesday, 19 September 2012 19:59:15 UTC