mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Make setMid of Transceiver public
in some case like session migration from one sfu node to another, we need manual set mid of transceiver instead of auto generate, to make mid consistent between to sfu node.
This commit is contained in:
@@ -115,8 +115,8 @@ func (t *RTPTransceiver) Receiver() *RTPReceiver {
|
||||
return nil
|
||||
}
|
||||
|
||||
// setMid sets the RTPTransceiver's mid. If it was already set, will return an error.
|
||||
func (t *RTPTransceiver) setMid(mid string) error {
|
||||
// SetMid sets the RTPTransceiver's mid. If it was already set, will return an error.
|
||||
func (t *RTPTransceiver) SetMid(mid string) error {
|
||||
if currentMid := t.Mid(); currentMid != "" {
|
||||
return fmt.Errorf("%w: %s to %s", errRTPTransceiverCannotChangeMid, currentMid, mid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user