- From: Harald Alvestrand <harald@alvestrand.no>
- Date: Mon, 17 Dec 2012 13:22:40 +0100
- To: public-webrtc@w3.org
Changing subject line again.... I think the difference in the two is not so much how it is generated, but what its uniqueness guarantee is. I think the "id" is guaranteed to be unique across all tracks in some context (in a PC? In an UA? in a MediaStream? For tracks, that depends on what we decide happens to the "id" when a track is created from another track - I'd prefer a new "id", which lets them be UA-wide unique). The "label" is intended to be human readable, and is not guaranteed to be unique in any context. My take. On 12/17/2012 10:27 AM, Adam Bergkvist wrote: > On 2012-12-14 14:27, Dan Burnett wrote: >> >> On Dec 14, 2012, at 4:41 AM, Adam Bergkvist wrote: >> > >>> On 2012-12-13 14:59, Dan Burnett wrote: >>>> I agree that we decided to add "id". I don't agree with >>>> removing "label". My understanding from the f2f meeting was that >>>> we would end up with both MediaStream and MediaStreamTrack >>>> objects having both "id" (machine-generated) and "label" >>>> (human-generated) attributes. >>> >>> I remember us talking about the confusing regarding label meaning >>> something on MediaStream and something else on MediaStramTrack, but >>> I don't really recall the exact resolution. >>> >>> This edit was really a rename of what you refer to as the >>> "machine-generated" identifier from "label" to "id" to align with >>> MediaStreamTrack. We've never had a "human-generated" identifier on >>> MediaStream so it hasn't been removed. :) >>> >>> I'm not really convinced we need a human settable identifier on >>> MediaStream unless it's transported over a p2p connection (and we >>> have a use-case for that). If you want to assign a custom label to >>> a MediaStream on the local side you can simply add as many new >>> properties to it as you like (myStream.label = "Web Cam & headset >>> mic"; ). >> >> As long as MediaStream and MediaStreamTrack have the same (one or >> two) attributes, I'm happy. I don't see any more need for a >> human-generated label on a MediaStreamTrack than on a MediaStream, by >> your argument above, and yet I believe we are keeping label on >> MediaStreamTrack. They should be consistent. > > As Martin pointed out in an other mail, it may be the wording > "human-generated" that is part of the confusion here. Both label and > id are generated by the UA (on track), but one is nicer to read for a > humans (label: "USB Camera 1" comared to id: 124a1ea42ae4...) > > I don't have anything against a label on MediaStream-level, I just > don't know what it should say. A track represents one device, so in > that case the label can describe the device. A stream, on the other > hand, may represent everything from zero to n devices. What should the > label be there? Should it change if more tracks are added to the stream? > > In my reasoning above, I'm still talking about a label of the kind > that track has: UA generated, but human readable. Is that what you > mean as well or do you mean really human generated (i.e. not readonly)? > > Regarding consistency with one or two properties, I don't think we > need to have the same attributes describing streams and tracks since > they represent totally different things. A label attribute on both > levels may even be more confusing since they can't mean the same thing. > > /Adam >
Received on Monday, 17 December 2012 12:23:12 UTC