- From: Harald Alvestrand <harald@alvestrand.no>
- Date: Fri, 01 Feb 2013 10:12:47 +0100
- To: public-media-capture@w3.org
- Message-ID: <510B870F.6090408@alvestrand.no>
On 01/31/2013 08:07 PM, LiLi (Z) wrote:
>
> I guess you meant to add an attribute to the HTMLMediaElement interface:
>
> interface *HTMLMediaElement* : HTMLElement
> <http://www.w3.org/TR/html5/dom.html#htmlelement> {
>
> ...
>
> readonly attributeMediaStream <http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist> mediaStream;
>
> };
>
> Given that this part has reached CR, I'm not sure how easy it is to
> propose new changes.
>
> On the other hand, we can do something like this if the above is not
> possible:
>
> interfaceMediaStreamTrackList {
> readonly attributeunsigned long length <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-length>;
> |*MediaStreamTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> item <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-item-MediaStreamTrack-unsigned-long-index> (unsigned long index);
> void add <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track> (|*MediaStreamTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> track);
> void add <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track> (|*AudioTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> track);
> void add <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-add-void-MediaStreamTrack-track> (|*VideoTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> track);
> void remove <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-remove-void-MediaStreamTrack-track> (|*MediaStreamTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> track);
> void remove <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-remove-void-MediaStreamTrack-track> (|*AudioTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> track);
> void remove <http://www.w3.org/TR/mediacapture-streams/#widl-MediaStreamTrackList-remove-void-MediaStreamTrack-track> (|*VideoTrack*| <http://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack> track);
If searching for the most elegant API: Wouldn't it be more succint to
define a constructor MediaStream(HTMLMediaElement)?
Not sure if that's a good idea, though - people who know the
HTMLMediaElement better should speak up.
MediaStreamTrackList is gone, btw.
Received on Friday, 1 February 2013 09:13:17 UTC