- For SVC codecs (VP9/AV1), keep all quality layers enabled and let the
SFU handle spatial layer selection, matching JS SDK behavior
- Pass per-codec `isSVC` through the layer publishing call chain instead
of using the track's primary codec, fixing multi-codec scenarios
- Set `track.codec` unconditionally (was gated by Firefox check)
- Rename `updatePublishingLayers` → `setPublishingLayers` to match JS
SDK
Emit RoomReconnectedEvent after signal resume. Fix _sendSyncState()
timing to run after WS reconnects instead of before. Add
RoomResumingEvent separate from RoomReconnectingEvent with shared
ReconnectingEvent base mixin.
forceSpeakerOutput replaced all category options with only
defaultToSpeaker, losing allowBluetooth/allowBluetoothA2DP/allowAirPlay.
Now adds defaultToSpeaker to the existing options instead.
- Call `AudioContext.resume()` after creation to ensure it's running
- Browsers (especially Safari) may create AudioContext in suspended
state, causing the AudioWorklet to silently never fire
This PR changes audio renderer events to send raw PCM bytes instead of
boxed sample arrays, which reduces codec overhead and GC pressure
between native and Flutter.
Fixes: https://github.com/livekit/client-sdk-flutter/issues/863
- Fix camera switching by comparing against the pre-update device id
when deciding to call switchCamera.
- Keep room options updated for future tracks while still allowing the
active track to change devices.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed an issue where switching the camera could fail; the app now
correctly detects and switches the active video input device.
* Added a changelog entry noting the patch that resolves camera
switching behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Changes:
- Add isClosed guards to write(), error(), and close() on
DataStreamController
- Fix fallthrough bug in handleStreamChunk where a chunk would still be
written after an encryption mismatch error
- Close stream controllers in validateParticipantHasNoActiveDataStreams
after sending the error, so readAll() consumers don't hang indefinitely
Closes#978
Snapshot collections with .toList() / List.of() before iterating,
preventing modification by concurrent async event handlers.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed potential concurrent modification exceptions that could occur
during async operations when iterating over participant data, event
listeners, and audio elements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed cache expiry behavior for region URL lookups by correcting
time-unit handling and extending the short cache interval.
* Corrected region validation during leave events so region data is
properly checked before being returned.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fix: use explicit imports to prevent missing meta annotations on some
Flutter versions
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Refactored import statements throughout the codebase from broad
imports with hide directives to explicit symbol declarations using show
clauses. This improves code clarity, reduces unnecessary symbol
exposure, and enhances maintainability.
* Consolidated imports to leverage specialized packages for improved
code organization.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for bridge and RTSP bridge participant types
* Added auto-subscribe option for data tracks in connection settings
* Enhanced video streaming with repair SSRC capability
* **Chores**
* Updated protobuf to version 1.44.0
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved publisher connection stability by centralizing connection
handling, adding a single awaited connection flow with automatic reset
on failure, and ensuring connections are cleared and retried after
restarts or when peer connection states become
closed/failed/disconnected. This reduces race conditions and improves
reliability for publishing and data sending paths.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Release**
* Version bumped to 2.6.2
* **New Features**
* Bitrate priority control APIs
* **Bug Fixes**
* Windows: stop camera after unpublishing video track
* Keep mute state in sync with server
* Fix example prejoin device dropdown handling
* **Chores**
* Mark LocalVideoTrack constructor as internal
* Update protobuf to v6.0.0
* Misc. packaging/documentation updates
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Updated the internal initialization structure of video track
components for improved code organization and maintainability.
Thir PR updates the LocalVideoTrack definition to carry an "@internal"
annotation and match the LocalAudioTrack version.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed mute state synchronization to ensure the client's local mute
status remains in sync with the server, preventing inconsistencies
during track publishing and codec operations.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Bitrate priority controls for audio and video encodings with preset
encoding profiles for common audio use cases.
* New priority levels (veryLow, low, medium, high) for bitrate and
network priority.
* Audio publish options now accept encoding presets instead of legacy
numeric bitrate fields.
* RTC configuration adds an option to enable DSCP for improved QoS.
* **Chores**
* Updated WebRTC-related package versions for compatibility.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
close#355
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Adjusted track mute behavior so the platform-specific condition now
targets only Firefox on web.
* Fixed Windows behavior to ensure the camera stops after a video track
is unpublished.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com>
Closes https://github.com/livekit/client-sdk-flutter/issues/962
### How does it fix that?
The methods `publishAudioTrack` and `publishVideoTrack` are called on
call reconnection here -
70d4d1f5fd/lib/src/participant/local.dart (L560-L570)
But inside the methods we're not passing the `muted` state from the old
tracks we have. It defaults to `false` because it's not set in protobuf:
70d4d1f5fd/lib/src/proto/livekit_rtc.pb.dart (L1153)
By passing it correctly, this PR fixes the bug in the linked issue.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed an issue where the muted state of audio and video tracks was not
being correctly propagated when publishing to the server.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
### Problem
While using the Flutter SDK with JS SDK and with E2EE enabled, the video
from Web can not be decrypted by the Flutter app.
## Summary
Enables end-to-end encryption (E2EE) for VP9 codec. Previously, E2EE was
skipped for all SVC codecs. This aligns the Flutter SDK with the JS SDK,
where E2EE works with VP9 codec.
## Changes
Removed `isSVCCodec()` and use `isAV1Codec()` to enable E2EE setup for
VP9 codec in `LocalTrackPublishedEvent` handler
Removed `isSVCCodec()` and use `isAV1Codec()` to enable E2EE setup for
VP9 codec in `TrackSubscribedEvent` handler
Is there any specific reason why E2EE is disabled for SVC codecs?
I tried VP9 with this patch and the VP9 video from Web can be decrypted
by Flutter app.