Re: [webrtc-pc] RTPRtcSender: provided properties to get related MediaStreamTrackId and media type

Hello @fluffy,
first of all thanks for your interesting question.

Regarding _mstId_ attr, it could be easily implemented following [1]:
`
         If a MediaStreamTrack is attached to the transceiver's RtpSender,
         the "a=msid" lines MUST use that track's ID.  If no
         MediaStreamTrack is attached, a valid ID MUST be generated, in
         the same way that the implementation generates IDs for local
         tracks.
`

We have already implemented it in the next way:
When an RtpSender is created [1]:
- If track is null, just generate a mstID
- Otherwise, the track.id will be forever attached even if replaceTrack() is called.

In relation to _kind_ attr:
When RtpSender is created from addTransceiver:
- if a track is provided, _kind_ will be the track.kind.
- Otherwise, kind is provided when addTransceiver is called, so it will be set to _kind_

When RtpSender is created from addTrack,  _kind_ will just be the track.kind.

Refs
[1] https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-5.2.1
[2] https://w3c.github.io/webrtc-pc/#dfn-create-an-rtcrtpsender


-- 
GitHub Notification of comment by mparis
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/pull/1698#issuecomment-353068393 using your GitHub account

Received on Wednesday, 20 December 2017 13:52:17 UTC