Skip to content

Align screen-share simulcast default lower layer#1089

Merged
hiroshihorie merged 5 commits into
mainfrom
hiroshi/align-screenshare
Jun 1, 2026
Merged

Align screen-share simulcast default lower layer#1089
hiroshihorie merged 5 commits into
mainfrom
hiroshi/align-screenshare

Conversation

@hiroshihorie
Copy link
Copy Markdown
Member

@hiroshihorie hiroshihorie commented May 19, 2026

Summary

Align Flutter's generated default lower screen-share simulcast layer with the common SDK behavior.

This updates the default generated lower layer to:

  • use half resolution
  • keep the top layer's frame rate
  • use max(150kbps, topLayerBitrate / 4)
  • carry through explicit bitrate/network priorities

Also aligns the screenShareH720FPS5 and screenShareH1080FPS30 preset bitrates with the common SDK values.

Notes

This does not add the JS-only screen-share presets such as h360fps15, h720fps30, or original; that broader preset parity work should be handled separately.

Tests

  • dart format --set-exit-if-changed lib/src/types/video_parameters.dart lib/src/utils.dart test/utils_test.dart
  • flutter test test/utils_test.dart
  • flutter analyze --no-pub lib/src/types/video_parameters.dart lib/src/utils.dart test/utils_test.dart

@hiroshihorie hiroshihorie changed the title Hiroshi/align screenshare Align screen share defaults May 19, 2026
@hiroshihorie hiroshihorie marked this pull request as ready for review May 19, 2026 04:11
@hiroshihorie hiroshihorie requested a review from Copilot May 19, 2026 04:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns Flutter screen-share simulcast/preset defaults with other LiveKit SDKs (JS/Swift/Android): a single low layer derived from the top layer (preserving fps and priorities), and updated preset bitrates for screenShareH720FPS5 and screenShareH1080FPS30.

Changes:

  • Rewrote _computeDefaultScreenShareSimulcastParams to produce one lower layer at scale 2, inheriting the top layer's framerate and RTP/network priorities, with bitrate = top/scale².
  • Bumped screenShareH720FPS5 from 400 kbps→800 kbps and screenShareH1080FPS30 from 4 Mbps→5 Mbps.
  • Added unit tests for the new defaults and a .changes/ entry.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
lib/src/utils.dart Simplifies default screen-share simulcast to a single half-scale layer that inherits fps and bitrate/network priorities from the original encoding.
lib/src/types/video_parameters.dart Updates two screen-share preset bitrates to match cross-SDK values.
test/utils_test.dart Adds tests verifying preset bitrates and the default low-layer derivation behavior.
.changes/align-screenshare-simulcast-defaults Adds patch changelog entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hiroshihorie hiroshihorie changed the title Align screen share defaults Align screen-share simulcast default lower layer Jun 1, 2026
@hiroshihorie hiroshihorie merged commit 3488ba8 into main Jun 1, 2026
16 of 17 checks passed
@hiroshihorie hiroshihorie deleted the hiroshi/align-screenshare branch June 1, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants