File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -134,24 +134,24 @@ func (p *Peer[ID]) SubscribeTo(track *webrtc.TrackLocalStaticRTP) error {
134134func (p * Peer [ID ]) WriteRTCP (trackID string , packets []RTCPPacketType ) error {
135135 // Find the right track.
136136 receivers := p .peerConnection .GetReceivers ()
137- trackIndex := slices .IndexFunc (receivers , func (receiver * webrtc.RTPReceiver ) bool {
137+ receiverIndex := slices .IndexFunc (receivers , func (receiver * webrtc.RTPReceiver ) bool {
138138 return receiver .Track ().ID () == trackID
139139 })
140- if trackIndex == - 1 {
140+ if receiverIndex == - 1 {
141141 return ErrTrackNotFound
142142 }
143143
144- // The SSRC that we must use when sending the RTCP packet.
144+ // The ssrc that we must use when sending the RTCP packet.
145145 // Otherwise the peer won't understand where the packet comes from.
146- SSRC := uint32 (receivers [trackIndex ].Track ().SSRC ())
146+ ssrc := uint32 (receivers [receiverIndex ].Track ().SSRC ())
147147
148148 toSend := make ([]rtcp.Packet , len (packets ))
149149 for i , packet := range packets {
150150 switch packet {
151151 case PictureLossIndicator :
152- toSend [i ] = & rtcp.PictureLossIndication {MediaSSRC : SSRC }
152+ toSend [i ] = & rtcp.PictureLossIndication {MediaSSRC : ssrc }
153153 case FullIntraRequest :
154- toSend [i ] = & rtcp.FullIntraRequest {MediaSSRC : SSRC }
154+ toSend [i ] = & rtcp.FullIntraRequest {MediaSSRC : ssrc }
155155 }
156156 }
157157
You can’t perform that action at this time.
0 commit comments