Screen share: in-place bitrate/degradation changes need the RTP sender the SDK does not expose #224

Open
opened 2026-11-12 05:53:22 +00:00 by charles · 0 comments
Owner

From Screen share 17 (#164).

VoiceCommand::UpdateScreenShareEncoding is meant to change the published share's encoding in place (resolution, frame rate, bitrate, degradation preference). LiveKitRoom::update_screen_encoding can only apply the frame rate (it paces the frames it passes to the encoder); the resolution follows the frames the capture delivers.

The bitrate ceiling, degradation preference, scalability mode and encoder backend are stored and take effect at the next publish, because livekit 0.10.1 does not expose the RTP sender of a local track: LocalVideoTrack::transceiver() is pub(crate) and Room::publisher_senders() is behind the test-only feature __lk-e2e-test. libwebrtc's RtpSender::set_parameters would do it.

Options: patch the SDK to expose set_parameters for a local video track (small), or have the core republish (break-before-make, a viewer gap of ~0.5 s) when those parameters change mid-share. Decide alongside #223 if the SDK gets patched anyway.

From Screen share 17 (#164). `VoiceCommand::UpdateScreenShareEncoding` is meant to change the published share's encoding in place (resolution, frame rate, bitrate, degradation preference). `LiveKitRoom::update_screen_encoding` can only apply the frame rate (it paces the frames it passes to the encoder); the resolution follows the frames the capture delivers. The bitrate ceiling, degradation preference, scalability mode and encoder backend are stored and take effect at the next publish, because `livekit` 0.10.1 does not expose the RTP sender of a local track: `LocalVideoTrack::transceiver()` is `pub(crate)` and `Room::publisher_senders()` is behind the test-only feature `__lk-e2e-test`. libwebrtc's `RtpSender::set_parameters` would do it. Options: patch the SDK to expose `set_parameters` for a local video track (small), or have the core republish (break-before-make, a viewer gap of ~0.5 s) when those parameters change mid-share. Decide alongside #223 if the SDK gets patched anyway.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#224
No description provided.