Skip to content

Commit b40f599

Browse files
do-hyung-kimSean-Der
authored andcommitted
Add RTPReceiver.RTPTransceiver
Returns the RTPTransceiver currently associated with this RTPReceiver
1 parent c23eeb1 commit b40f599

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rtpreceiver.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ func (r *RTPReceiver) Tracks() []*TrackRemote {
126126
return tracks
127127
}
128128

129+
// RTPTransceiver returns the RTPTransceiver this
130+
// RTPReceiver belongs too, or nil if none
131+
func (r *RTPReceiver) RTPTransceiver() *RTPTransceiver {
132+
r.mu.Lock()
133+
defer r.mu.Unlock()
134+
135+
return r.tr
136+
}
137+
129138
// configureReceive initialize the track
130139
func (r *RTPReceiver) configureReceive(parameters RTPReceiveParameters) {
131140
r.mu.Lock()

0 commit comments

Comments
 (0)