Support disable dynacast. (#1314)
Added a flag to throttle dynacast messages to the publisher. Added a helper method to check if a client supports setting `active` field in RTP sender encoding. This can be used to disable dynacast based on some other feature flag/config settings.
This commit is contained in:
@@ -77,3 +77,7 @@ func (c ClientInfo) SupportsICETCP() bool {
|
|||||||
// most SDKs support ICE/TCP
|
// most SDKs support ICE/TCP
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c ClientInfo) SupportsChangeRTPSenderEncodingActive() bool {
|
||||||
|
return !c.isFirefox()
|
||||||
|
}
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ type ParticipantParams struct {
|
|||||||
ReconnectOnPublicationError bool
|
ReconnectOnPublicationError bool
|
||||||
ReconnectOnSubscriptionError bool
|
ReconnectOnSubscriptionError bool
|
||||||
VersionGenerator utils2.TimedVersionGenerator
|
VersionGenerator utils2.TimedVersionGenerator
|
||||||
|
DisableDynacast bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type ParticipantImpl struct {
|
type ParticipantImpl struct {
|
||||||
@@ -1475,6 +1476,10 @@ func (p *ParticipantImpl) onStreamStateChange(update *sfu.StreamStateUpdate) err
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *ParticipantImpl) onSubscribedMaxQualityChange(trackID livekit.TrackID, subscribedQualities []*livekit.SubscribedCodec, maxSubscribedQualites []types.SubscribedCodecQuality) error {
|
func (p *ParticipantImpl) onSubscribedMaxQualityChange(trackID livekit.TrackID, subscribedQualities []*livekit.SubscribedCodec, maxSubscribedQualites []types.SubscribedCodecQuality) error {
|
||||||
|
if p.params.DisableDynacast {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if len(subscribedQualities) == 0 {
|
if len(subscribedQualities) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user