This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22248 - Relationship between MediaStreamTrack and HTML5 VideoTrack / AudioTrack after MediaStream assignment
Summary: Relationship between MediaStreamTrack and HTML5 VideoTrack / AudioTrack after...
Status: RESOLVED FIXED
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: Media Capture and Streams (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: public-media-capture@w3.org
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-03 15:23 UTC by Dominique Hazael-Massieux
Modified: 2013-10-17 11:33 UTC (History)
3 users (show)

See Also:


Attachments

Description Dominique Hazael-Massieux 2013-06-03 15:23:47 UTC
When a media is played in an <audio> or <video> element, that element gets assigned videoTracks and/or audioTracks attributes that list individual audio and video tracks.

The spec should define how these get filled when the media is coming from a MediaStream; presumably each MediaStreamTrack is mapped into the relevant audio/video track. Likewise, the relevant change, addtrack/removetrack events should probably be specified upon changes in the underlying MediaStream.

It feels that MediaStreamTrack, AudioTrack and VideoTrack should be more closely related interfaces at the WebIDL level, but it's not obvious to me what that relationship should be, and HTML doesn't define a relationship between AudioTrack and VideoTrack in the first place, so it might not matter in practice.
Comment 1 Stefan Hakansson LK 2013-09-27 13:42:55 UTC
I think that the latest version has been enhanced. Perhaps there should be some more info added, and there should be some text on what happens when tracks are removed (there is text about added tracks, but not removed ones).
Comment 2 Adam Bergkvist 2013-09-30 07:22:08 UTC
I think media element tracks and MediaStream tracks were the same interface in a very early version of the spec, but they diverged.
Comment 4 Stefan Hakansson LK 2013-10-08 12:07:48 UTC
(In reply to Adam Bergkvist from comment #3)
> Proposed change:
> https://github.com/fluffy/webrtc-w3c/commit/
> e9393c5ffa1fbe4d6f64825b16a65df664abfcba

Nice improvement. But there is a reference to "to the index of the first VideoTrack" (line 1966). That would presumable be the index in the html5 videoTrackList. But the order in which the MediaStream-videoTrack's are sorted into the html5 videoTrackList is random IIUC - I think that should be stated somewhere (if it not already is).
Comment 5 Adam Bergkvist 2013-10-08 12:10:49 UTC
Yes; the MediaStreamTrack objects in the MediaStream have no order so the translation to the media element track lists are random. We can add a note about that.
Comment 6 Adam Bergkvist 2013-10-08 12:37:52 UTC
Added text that when order is mentioned, it's the VideoTrackList that is referred to.

Added text that talks about the translation from an unordered set to a ordered list.

https://github.com/fluffy/webrtc-w3c/commit/8c3d0ad0700af97df5c6a6afdb76a6457c406252
Comment 7 Adam Bergkvist 2013-10-17 11:33:18 UTC
Fixed in Editor's draft v20131017