Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions peerconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ func (pc *PeerConnection) CreateOffer(options *OfferOptions) (SessionDescription
continue
}
pc.greaterMid++
err = t.setMid(strconv.Itoa(pc.greaterMid))
err = t.SetMid(strconv.Itoa(pc.greaterMid))
if err != nil {
return SessionDescription{}, err
}
Expand Down Expand Up @@ -1092,7 +1092,7 @@ func (pc *PeerConnection) SetRemoteDescription(desc SessionDescription) error {
}

if t.Mid() == "" {
if err := t.setMid(midValue); err != nil {
if err := t.SetMid(midValue); err != nil {
return err
}
}
Expand Down
4 changes: 2 additions & 2 deletions rtptransceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down