Repository navigation
Add RemoteTrackPublication.setFecProtection - #1334
Draft
cloudwebrtc wants to merge 2 commits into
Draft
cloudwebrtc wants to merge 2 commits into
cloudwebrtc wants to merge 2 commits into
Conversation
Request FlexFEC repair packets for a subscribed video track through the new UpdateTrackSettings.fec field (protocol v1.55.0). The requested protection is kept on the publication and repeated with every settings update, since the server replaces the other fields on each update, and sent again when a new track is attached.
Contributor
|
This PR bumps
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds subscriber-side FlexFEC control: a subscriber can ask the SFU for FlexFEC repair packets on a subscribed video track, matching
RemoteTrackPublication::set_fec_protectionin the Rust SDK (livekit/rust-sdks#1668).UpdateTrackSettings.fec(FECProtectionwith a mode and a level).FecProtection,FecProtectionModeandFecProtectionLevel, with presetsFecProtection.disabled,FecProtection.adaptive,FecProtection.fixed(level)andFecProtection.minimum(level).RemoteTrackPublication.setFecProtection(protection)and thefecProtectiongetter.UnsupportedError, matching theInvalidRequestthe FFI SDKs return (Add an FFI request to set subscriber FEC protection rust-sdks#1765).UpdateTrackSettings. The server replaces the other fields on each update but keeps the previous protection whenfecis omitted.fecis omitted, so the requests the SDK sends are unchanged.Receiving FlexFEC needs no client option: libwebrtc always offers flexfec-03 as a receive codec. The publisher side (
enableFlexFec, per-sender protection) comes in a follow-up, after flutter-webrtc/flutter-webrtc#2304 is released.The server only sends repair packets when downstream FlexFEC is enabled on it (livekit/livekit#5195); otherwise the request is ignored.
Testing
test/publication/remote_track_publication_test.dart:disabledis sent explicitlyfecis omitted until requestedUnsupportedErrorflutter test(all pass),flutter analyze,dart format,import_sorter.