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 ffad387
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

Check warning on line 135 in rtpreceiver.go

View check run for this annotation

Codecov / codecov/patch

rtpreceiver.go#L131-L135

Added lines #L131 - L135 were not covered by tests
}

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

0 comments on commit ffad387

Please sign in to comment.