mirror of
https://github.com/livekit/livekit.git
synced 2026-05-24 10:15:28 +00:00
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
|
||||
return true
|
||||
}
|
||||
|
||||
func (c ClientInfo) SupportsChangeRTPSenderEncodingActive() bool {
|
||||
return !c.isFirefox()
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@ type ParticipantParams struct {
|
||||
ReconnectOnPublicationError bool
|
||||
ReconnectOnSubscriptionError bool
|
||||
VersionGenerator utils2.TimedVersionGenerator
|
||||
DisableDynacast bool
|
||||
}
|
||||
|
||||
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 {
|
||||
if p.params.DisableDynacast {
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(subscribedQualities) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user