diff --git a/client.go b/client.go index 76a329c..84eb049 100644 --- a/client.go +++ b/client.go @@ -616,6 +616,14 @@ func rtcpDownListener(g *group, conn *downConnection, track *downTrack, s *webrt uint64(ms), ) case *rtcp.ReceiverReport: + for _, r := range p.Reports { + if r.SSRC == track.track.SSRC() { + atomic.StoreUint32( + &track.loss, + uint32(r.FractionLost), + ) + } + } case *rtcp.TransportLayerNack: sendRecovery(p, track) default: diff --git a/group.go b/group.go index f1b4326..fcfe359 100644 --- a/group.go +++ b/group.go @@ -75,6 +75,7 @@ type downTrack struct { remote *upTrack isMuted uint32 maxBitrate *timeStampedBitrate + loss uint32 } func (t *downTrack) muted() bool {