Skip to content

Commit

Permalink
Add RTPTransceiver.SetSender
Browse files Browse the repository at this point in the history
This non-standard API allows us to re-use existing transceivers.
The WebRTC API causes SDP bloat right now since it doesn't allow
the re-use of existing media sections.
  • Loading branch information
OrlandoCo authored and tarrencev committed Nov 4, 2020
1 parent 78f7c97 commit 5104499
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rtptransceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ func (t *RTPTransceiver) Sender() *RTPSender {
return nil
}

// SetSender sets the RTPSender and Track to current transceiver
func (t *RTPTransceiver) SetSender(s *RTPSender, track *Track) error {
t.setSender(s)
return t.setSendingTrack(track)
}

func (t *RTPTransceiver) setSender(s *RTPSender) {
t.sender.Store(s)
}
Expand Down

0 comments on commit 5104499

Please sign in to comment.