[Bug 17082] Move Media Source methods into a separate object

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

--- Comment #7 from Aaron Colwell <acolwell@chromium.org> 2012-06-18 18:32:48 UTC ---
(In reply to comment #6)
> (In reply to comment #0)
> > This question has come up several times when I talk to people about the Media
> > Source Extensions so I think it deserves some discussion.
> > 
> > Should the Media Source methods & attributes be in a separate object instead of
> > added to the HTMLMediaElement?
> 
> I support it for clear architecture and inferface reason, but I have some
> concerns that we have to explicitly to contruct mediasource for each time
> usage.

Why are you concerned about the explicit object construction? Are you
suggesting that the objects get created implicitly by using a special URL or
something like that? The current API requires that you set the src attribute to
sourceMediaSourceURL. I figured that creating a MediaSource object is only
slightly more work.

> > 3. Will this prevent declarative syntax to enable Media Source and reuse of the
> > <source> fallback mechanism?
> 
> Do you mean we may selectively create event handler for MediaSource when using
> a seperate object? And I think MediaSource way has no way to prepare
> alternative track using <source>, right?

No. I was trying to determine if an object oriented interface would prevent
declarative enabling of the API. For example:

<video>
  <source src="x-media-source:asdf" type="video/webm; codecs=\"vp8, vorbis\""
/>
  <source src="http://test.com/myvideo.mp4" type="video/mp4" />
</video>

The idea here is that for UAs that support the Media Source API, it would pick
the first source, but for UAs that don't they would pick the second source.
This may be a moot point since some initial experimentation with the
x-media-source: scheme with current browsers show that they signal an error
immediately if they encounter an URL scheme they don't recognize. If this is
the general behavior then <source> can't be used to allow graceful fallback for
browsers that don't support this API.

-- 
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 Monday, 18 June 2012 18:32:52 UTC