Skip to content

Use maintain-resolution as the default video degradation preference#1106

Merged
hiroshihorie merged 2 commits into
mainfrom
hiroshi/align-degradation-default
Jun 6, 2026
Merged

Use maintain-resolution as the default video degradation preference#1106
hiroshihorie merged 2 commits into
mainfrom
hiroshi/align-degradation-default

Conversation

@hiroshihorie

@hiroshihorie hiroshihorie commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Align Flutter default local-video degradation behavior with the Swift SDK.
  • Default unset VideoPublishOptions.degradationPreference to maintainResolution for camera and screen-share publishing.
  • Keep explicit degradation preferences overrideable by apps.

Context

Related to #1097, which explores preserving video quality through a live-streaming option. This PR takes the smaller SDK-default approach instead: use maintain-resolution by default, matching Swift, without adding a separate app-facing toggle for this behavior.

Testing

  • dart analyze
  • flutter test test/core/room_e2e_test.dart

@hiroshihorie hiroshihorie changed the title Hiroshi/align degradation default Use maintain-resolution as the default video degradation preference Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Caution

Breaking change detected without major changeset

dart-apitool detected the following breaking changes:

Preparing git repository: https://github.com/livekit/client-sdk-flutter
Using ref: main
Cloning git repository: https://github.com/livekit/client-sdk-flutter
Checking out ref: main
Successfully cloned to: /tmp/UBGGLH
Preparing package dependencies for git package https://github.com/livekit/client-sdk-flutter (forced Flutter)
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 85.0.0 (101.0.0 available)
  analyzer 7.7.1 (13.1.0 available)
  build 2.5.4 (4.0.6 available)
  build_config 1.1.2 (1.3.0 available)
  build_resolvers 2.5.4 (3.0.4 available)
  build_runner 2.5.4 (2.15.0 available)
  build_runner_core 9.1.2 (9.3.2 available)
  built_value 8.12.4 (8.12.6 available)
  code_assets 1.0.0 (1.2.1 available)
  dart_style 3.1.1 (3.1.9 available)
  dart_webrtc 1.8.0 (1.8.1 available)
  dbus 0.7.12 (0.7.14 available)
  device_info_plus 12.3.0 (13.1.0 available)
  device_info_plus_platform_interface 7.0.3 (8.1.0 available)
  flutter_webrtc 1.4.0 (1.4.1 available)
  hooks 1.0.2 (2.0.2 available)
  json_annotation 4.9.0 (4.12.0 available)
  json_serializable 6.9.5 (6.14.0 available)
  matcher 0.12.19 (0.12.20 available)
  meta 1.18.0 (1.18.3 available)
  mockito 5.4.6 (5.7.0 available)
  native_toolchain_c 0.17.6 (0.19.1 available)
  objective_c 9.3.0 (9.4.1 available)
  path_provider_android 2.2.22 (2.3.1 available)
  source_gen 2.0.0 (4.2.3 available)
  source_helper 1.3.7 (1.3.12 available)
  synchronized 3.4.0 (3.4.1 available)
  test_api 0.7.11 (0.7.12 available)
  vector_math 2.2.0 (2.4.0 available)
  vm_service 15.0.2 (15.2.0 available)
  win32 5.15.0 (6.3.0 available)
  win32_registry 2.1.0 (3.0.3 available)
  xml 6.6.1 (7.0.1 available)
Got dependencies!
33 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Resolving dependencies in `./example`...
Downloading packages...
Got dependencies in `./example`.
Plugin livekit_client does not have Swift Package Manager support for ios. Consider adding Swift Package Manager compatibility to your plugin. See https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for more information.
Plugin livekit_client does not have Swift Package Manager support for macos. Consider adding Swift Package Manager compatibility to your plugin. See https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for more information.
Preparing . (forced Flutter)
Copying sources from .
Preparing package dependencies for local package . (forced Flutter)
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 85.0.0 (101.0.0 available)
  analyzer 7.7.1 (13.1.0 available)
  build 2.5.4 (4.0.6 available)
  build_config 1.1.2 (1.3.0 available)
  build_resolvers 2.5.4 (3.0.4 available)
  build_runner 2.5.4 (2.15.0 available)
  build_runner_core 9.1.2 (9.3.2 available)
  built_value 8.12.4 (8.12.6 available)
  code_assets 1.0.0 (1.2.1 available)
  dart_style 3.1.1 (3.1.9 available)
  dart_webrtc 1.8.0 (1.8.1 available)
  dbus 0.7.12 (0.7.14 available)
  device_info_plus 12.3.0 (13.1.0 available)
  device_info_plus_platform_interface 7.0.3 (8.1.0 available)
  flutter_webrtc 1.4.0 (1.4.1 available)
  hooks 1.0.2 (2.0.2 available)
  json_annotation 4.9.0 (4.12.0 available)
  json_serializable 6.9.5 (6.14.0 available)
  matcher 0.12.19 (0.12.20 available)
  meta 1.18.0 (1.18.3 available)
  mockito 5.4.6 (5.7.0 available)
  native_toolchain_c 0.17.6 (0.19.1 available)
  objective_c 9.3.0 (9.4.1 available)
  path_provider_android 2.2.22 (2.3.1 available)
  source_gen 2.0.0 (4.2.3 available)
  source_helper 1.3.7 (1.3.12 available)
  synchronized 3.4.0 (3.4.1 available)
  test_api 0.7.11 (0.7.12 available)
  vector_math 2.2.0 (2.4.0 available)
  vm_service 15.0.2 (15.2.0 available)
  win32 5.15.0 (6.3.0 available)
  win32_registry 2.1.0 (3.0.3 available)
  xml 6.6.1 (7.0.1 available)
Got dependencies!
33 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Resolving dependencies in `./example`...
Downloading packages...
Got dependencies in `./example`.
Plugin livekit_client does not have Swift Package Manager support for ios. Consider adding Swift Package Manager compatibility to your plugin. See https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for more information.
Plugin livekit_client does not have Swift Package Manager support for macos. Consider adding Swift Package Manager compatibility to your plugin. See https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for more information.
Omitting pub get (package config already present)
Analyzing /tmp/UBGGLH
Omitting pub get (package config already present)
Analyzing .
Cleaning up
Cleaning up
Checking Package version
ignoring prerelease
-- Generating report using: Console Reporter --
BREAKING CHANGES
└─┬ Class LocalParticipant
  └── Method "getDefaultDegradationPreference" removed (CE10)
No non-breaking changes!
To learn more about the detected changes visit: https://github.com/bmw-tech/dart_apitool/blob/main/readme/change_codes.md
Version Check
New Version is too low!

Old version: "2.8.0"
New version: "2.8.0"
Needed version: "3.0.0"

Got "2.8.0" expected >= "3.0.0" (breaking changes)

If this is intentional, please add a changeset with major level in .changes/:

major type="changed" "Description of breaking change"

@hiroshihorie hiroshihorie marked this pull request as ready for review June 5, 2026 11:10

@cloudwebrtc cloudwebrtc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Flutter SDK’s default local-video degradation behavior to match the Swift SDK by defaulting to DegradationPreference.maintainResolution when apps do not explicitly set VideoPublishOptions.degradationPreference, for both camera and screen-share video publishing.

Changes:

  • Default unset VideoPublishOptions.degradationPreference to DegradationPreference.maintainResolution when publishing camera or screen-share video tracks.
  • Remove the prior resolution/source-based defaulting helper (getDefaultDegradationPreference) since the default is now unconditional.
  • Add a patch-level changeset documenting the behavior change.

Reviewed changes

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

File Description
lib/src/participant/local.dart Defaults local video publishing degradation preference to maintainResolution when unset and removes the previous conditional default helper.
.changes/video-degradation-default Adds a patch changeset entry describing the new default behavior.

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

@hiroshihorie hiroshihorie merged commit b6cc65d into main Jun 6, 2026
18 checks passed
@hiroshihorie hiroshihorie deleted the hiroshi/align-degradation-default branch June 6, 2026 07:45
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