Server-driven connection quality detection (#167)
This commit is contained in:
@@ -19,7 +19,8 @@ type SubscribedTrack struct {
|
||||
publisherIdentity string
|
||||
subMuted utils.AtomicFlag
|
||||
pubMuted utils.AtomicFlag
|
||||
debouncer func(func())
|
||||
|
||||
debouncer func(func())
|
||||
}
|
||||
|
||||
func NewSubscribedTrack(publisherIdentity string, dt *sfu.DownTrack) *SubscribedTrack {
|
||||
@@ -42,6 +43,10 @@ func (t *SubscribedTrack) DownTrack() *sfu.DownTrack {
|
||||
return t.dt
|
||||
}
|
||||
|
||||
func (t *SubscribedTrack) SubscribeLossPercentage() uint32 {
|
||||
return FixedPointToPercent(t.DownTrack().CurrentMaxLossFraction())
|
||||
}
|
||||
|
||||
// has subscriber indicated it wants to mute this track
|
||||
func (t *SubscribedTrack) IsMuted() bool {
|
||||
return t.subMuted.Get()
|
||||
|
||||
Reference in New Issue
Block a user