PSA: transceiver.stop() behavior changes

155 views
Skip to first unread message

Harald Alvestrand

unread,
Aug 6, 2020, 5:56:51 AM8/6/20
to discuss...@googlegroups.com

We are in the process of implementing transceiver.stop() as per specification on the Javascript interface.


If you don’t use transceiver.stop() at the C++ / Java / Swift interface, you can stop reading now.


This will lead to some changes at the WebRTC C++ interface; these will be introduced in a phased manner. The end goal is that transceiver.stop() should be identical on the C++ and Javascript interfaces.


Phase 1: Adding new functionality

We will be adding some new functions to the transceiver API:

  • StopStandard() - this will be the standards compliant stop() function.

  • StopInternal() - this will be functionally equivalent (except as noted) to today’s Stop() function

  • stopping() - will query the internal state of the transceiver. Returns true if stopping or stopped.

  • SetDirectionWithError - like SetDirection(), but returns an RTCError, since the function can fail.


Stop() will be marked RTC_DEPRECATED.


There will be some behavior changes - in particular, the transceiver will be disassociated from its PeerConnection as soon as setLocalDescription or setRemoteDescription(answer SDP with rejected transceiver) is called; previously, it would remain in the PeerConnection’s transceiver list with a null MID value.


The timing of the OnRemoveTrack observer callback has also changed.


Phase 2: Removing old names

SetDirection() and Stop() will be removed.


Phase 3: Renaming to permanent names

The names SetDirection() and Stop() will be reintroduced, as equivalents to StopStandard() and SetDirectionWithError().


StopStandard() and SetDirectionWithError() will be marked RTC_DEPRECATED.


Phase 4: Removing interim names

StopStandard() and SetDirectionWithError() will be removed.



Harald Alvestrand

unread,
Aug 10, 2020, 5:39:27 AM8/10/20
to discuss...@googlegroups.com
I forgot to mention - in phase 4, StopInternal() will be removed from the public API too. At this time, all callers should have verified that their application works with the standard Stop().

Harald Alvestrand

unread,
Aug 12, 2020, 8:38:20 AM8/12/20
to discuss...@googlegroups.com
Phase 1 has now landed.


On Thu, Aug 6, 2020 at 11:56 AM Harald Alvestrand <h...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages