w3c / webrtc-pc

WebRTC 1.0 API
https://w3c.github.io/webrtc-pc/
Other
437 stars 115 forks source link

[[associated MediaStreams]] internal slot for RTCRtpSender is not used #1237

Closed soareschen closed 7 years ago

soareschen commented 7 years ago

The only time the [[associated MediaStreams]] and [[send encodings]] internal slots are referenced in the spec is when setting the value. There is no mention of when these fields are read and how they are being used.

aboba commented 7 years ago

The [[associated MediaStreams]] internal slot does not appear to be used.

However, the [[send encodings]] internal slot is used in both setParameters and getParameters:

In setParameters: "Let N be the number of RTCRtpEncodingParameters stored in sender's internal [[send encodings]] slot.... If parameters.encodings.length is different from N ..."

In getParameters: "encodings is set to the value of the [[send encodings]] internal slot."

soareschen commented 7 years ago

Yes, just saw the usage of [[send encodings]] was added to the 20170605 draft after this issue was raised.

aboba commented 7 years ago

@jan-ivar Any idea where this internal slot should be used?

jan-ivar commented 7 years ago

@aboba The [[associated MediaStreams]] is used to create the MSIDs in the SDP.

See the final steps to create an offer:

Section 5.2.1 says: "For each MediaStream that was associated with the transceiver when it was created via addTrack or addTransceiver, an "a=msid" line, as specified in [I-D.ietf-mmusic-msid]"

That seems to refer to the same thing. We should probably make that more explicit if we can.

jan-ivar commented 7 years ago

Nevermind that there's no way to associate a MediaStream with a transceiver using addTransceiver.

stefhak commented 7 years ago

@jan-ivar can you do a PR?

adam-be commented 7 years ago

As currently specified [[AssociatedMediaStreams]] is part of the information bundle that's used to create the SDP (as @jan-ivar points out above). I don't think we should start listing all the pieces of that bundle in step 3 of the algorithm. I've made a PR that adds some information about [[AssociatedMediaStreams]] and that it's used in the SDP generation process.

jan-ivar commented 7 years ago

Thanks @adam-be! I've been swamped.