[webrtc-pc] Should we require a reference from RTPSender to RTCPeerConnection?

alvestrand has just created a new issue for https://github.com/w3c/webrtc-pc:

== Should we require a reference from RTPSender to RTCPeerConnection? ==
One of the design objectives of the "non-PC" model of WebRTC was that we should be able to work without a PeerConnection if we wanted to. So I'm leery of things that require references to the PC.

It seems that we've added such a requirement to RTPSender by this statement in the description of replaceTrack:

"4. If connection's [[IsClosed]] slot is true, return a promise rejected with a newly created InvalidStateError and abort these steps."

For cleanliness, I'd prefer to keep all the pointers going the other way, which can be achieved by either depending on the "stopped" slot of the transceiver (already checked in step 5) or defining that the procedure "Stop sending media with sender" (referenced from the "close" method of PC) leaves a state marker in a sender's internal slot that can be tested instead.

The last approach has the advantage that senders don't have to know about transceivers either, which is a Good Thing (if we're not using SDP, transceivers are a liability not a feature).


Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1712 using your GitHub account

Received on Wednesday, 3 January 2018 21:35:44 UTC