Skip to content

Commit

Permalink
Add RTPReceiver.RTPTransceiver
Browse files Browse the repository at this point in the history
Returns the RTPTransceiver currently associated with this RTPReceiver
  • Loading branch information
do-hyung-kim authored and Sean-Der committed Aug 2, 2023
1 parent c23eeb1 commit b40f599
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rtpreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ func (r *RTPReceiver) Tracks() []*TrackRemote {
return tracks
}

// RTPTransceiver returns the RTPTransceiver this
// RTPReceiver belongs too, or nil if none
func (r *RTPReceiver) RTPTransceiver() *RTPTransceiver {
r.mu.Lock()
defer r.mu.Unlock()

return r.tr
}

// configureReceive initialize the track
func (r *RTPReceiver) configureReceive(parameters RTPReceiveParameters) {
r.mu.Lock()
Expand Down

0 comments on commit b40f599

Please sign in to comment.