mirror of
https://github.com/pion/webrtc.git
synced 2025-10-28 09:41:35 +08:00
Only send PLIs for video tracks in examples
This commit is contained in:
committed by
Sean DuBois
parent
ddb9219c84
commit
d54f7870eb
@@ -119,8 +119,10 @@ func main() { // nolint:gocognit
|
||||
// If just switched to this track, send PLI to get picture refresh
|
||||
if !isCurrTrack {
|
||||
isCurrTrack = true
|
||||
if writeErr := peerConnection.WriteRTCP([]rtcp.Packet{&rtcp.PictureLossIndication{MediaSSRC: uint32(track.SSRC())}}); writeErr != nil {
|
||||
fmt.Println(writeErr)
|
||||
if track.Kind() == webrtc.RTPCodecTypeVideo {
|
||||
if writeErr := peerConnection.WriteRTCP([]rtcp.Packet{&rtcp.PictureLossIndication{MediaSSRC: uint32(track.SSRC())}}); writeErr != nil {
|
||||
fmt.Println(writeErr)
|
||||
}
|
||||
}
|
||||
}
|
||||
packets <- rtp
|
||||
|
||||
Reference in New Issue
Block a user