W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2021

Re: [webrtc-pc] How reuse transceiver (#2639)

From: henbos via GitHub <sysbot+gh@w3.org>
Date: Thu, 25 Mar 2021 08:50:54 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-806475071-1616662253-sysbot+gh@w3.org>
`transceiver.stop()` will irreversible stop the transceiver so that it cannot be reused.

`transceiver.direction = "inactive"` or `"recvonly"` (which is also what happens when you do pc.removeTrack(sender)) on the sender side is reversible.

You can reuse transceivers with...

transceiver.direction = "sendonly" or "sendrecv"
await transceiver.sender.replaceTrack(newTrack);
/* perform O/A */

GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2639#issuecomment-806475071 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 25 March 2021 08:52:41 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:53 UTC