Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
211bfe9
fix: tighten VideoTrackRenderer Widget
holzgeist Jan 22, 2025
ff23d72
fix(web, firefox): backup old values before overwriting them
holzgeist Jul 8, 2025
591eaba
fix: copy processor
holzgeist Apr 2, 2025
64aba20
fix: properly handle processor updates
holzgeist Jul 3, 2025
7b7c583
fix: properly update processed streams
holzgeist Jul 16, 2025
d65a15d
Merge remote-tracking branch 'upstream/main' into feat-blurring
holzgeist Aug 4, 2025
19f3d05
fix: stop stream first, processor second
holzgeist Aug 21, 2025
4734a3b
Merge branch 'main' into feat-blurring
holzgeist Aug 26, 2025
e92daaa
chore: format files
holzgeist Aug 26, 2025
1cd7c2a
chore: update webrtc sdk to same version as flutter-webrtc
holzgeist Aug 26, 2025
1b0a286
chore: run import sorter
holzgeist Aug 26, 2025
8d86095
chore: fix analyzer issues
holzgeist Aug 26, 2025
8eb03d9
Merge branch 'main' into feat-blurring
cloudwebrtc Aug 28, 2025
5d24c85
chore: fix imports after merge from main
holzgeist Sep 1, 2025
3a74e8d
Merge remote-tracking branch 'upstream/main' into feat-blurring
holzgeist Sep 17, 2025
526f347
Merge tag 'v2.5.1' into feat-blurring
holzgeist Oct 14, 2025
a2b9154
Merge remote-tracking branch 'upstream/main' into feat-blurring
holzgeist Oct 14, 2025
f297b18
chore: reformat files
holzgeist Oct 14, 2025
5b6bf43
chore: run import sorter
holzgeist Oct 14, 2025
a46e292
Merge tag 'v2.5.2' into feat-blurring
holzgeist Oct 27, 2025
b647017
chore: reformat
holzgeist Oct 27, 2025
0f20487
chore: run import sorter
holzgeist Oct 27, 2025
76bafa4
fix: remove unused import
holzgeist Oct 27, 2025
ad56f16
Merge tag 'v2.5.3' into feat-blurring
holzgeist Nov 11, 2025
53f1c01
Merge branch 'main' into feat-blurring
hiroshihorie Dec 9, 2025
0c04eea
Merge remote-tracking branch 'upstream/main' into feat-blurring
holzgeist Jan 20, 2026
5fbcaad
ci: trigger
holzgeist Jan 22, 2026
7637399
Merge branch 'main' into feat-blurring
holzgeist Feb 2, 2026
2124273
Merge remote-tracking branch 'upstream/main' into feat-blurring
holzgeist Mar 17, 2026
f7b7b32
fix: merge error
holzgeist Mar 17, 2026
200df67
Merge branch 'main' into feat-blurring
holzgeist May 11, 2026
e06dc6a
Use maintain-resolution as the default video degradation preference (…
hiroshihorie Jun 6, 2026
04c164c
chore(android): support AGP 9 built-in Kotlin (#1102)
hiroshihorie Jun 11, 2026
69fbbfb
feat: add deployment field to agent dispatch (#1111)
xianshijing-lk Jun 17, 2026
d11065f
v2.8.1
hiroshihorie Jun 20, 2026
99f640e
Merge tag 'v2.8.1' into feat-blurring
holzgeist Jul 15, 2026
56f4ab9
chore: upgrade deps
holzgeist Jul 15, 2026
87e7ffa
chore: sync dependencies
holzgeist Jul 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.0
2.8.1
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 2.8.1

* Added: Add agent deployment targeting to token source options
* Fixed: Android plugin compatibility with AGP 9 built-in Kotlin
* Fixed: Use maintain-resolution as the default video degradation preference for local video publishing

## 2.8.0

* Added: Session API support for simpler E2EE setup
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Include this package to your `pubspec.yaml`
```yaml
---
dependencies:
livekit_client: ^2.8.0
livekit_client: ^2.8.1
```

### iOS
Expand Down
35 changes: 29 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = "io.livekit.plugin"
version = "1.0-SNAPSHOT"

buildscript {
ext.kotlin_version = "1.8.22"
ext.kotlin_version = "2.1.0"
repositories {
google()
mavenCentral()
Expand All @@ -22,7 +22,18 @@ allprojects {
}

apply plugin: "com.android.library"
apply plugin: "kotlin-android"

// AGP 9's built-in Kotlin compiles Kotlin itself and rejects the Kotlin Gradle
// Plugin. Apply KGP only when built-in Kotlin is NOT active: that means AGP < 9,
// or AGP 9 with android.builtInKotlin=false (the configuration Flutter currently
// ships by default while the ecosystem migrates).
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize(".")[0] as int
def builtInKotlinActive = agpMajor >= 9 &&
(!project.hasProperty("android.builtInKotlin") ||
Boolean.parseBoolean(project.property("android.builtInKotlin").toString()))
if (!builtInKotlinActive) {
apply plugin: "kotlin-android"
}

android {
if (project.android.hasProperty("namespace")) {
Expand All @@ -36,10 +47,6 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
Expand Down Expand Up @@ -68,3 +75,19 @@ android {
}
}
}

// Configure the Kotlin JVM target. The compilerOptions DSL requires KGP 1.9+ or
// AGP 9 built-in Kotlin; older Flutter app templates ship KGP 1.8.x, which only
// supports the legacy kotlinOptions DSL.
def kotlinExt = project.extensions.findByName("kotlin")
if (kotlinExt?.hasProperty("compilerOptions")) {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
}
}
} else {
android.kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
4 changes: 2 additions & 2 deletions ios/livekit_client.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'livekit_client'
s.version = '2.8.0'
s.version = '2.8.1'
s.summary = 'Open source platform for real-time audio and video.'
s.description = 'Open source platform for real-time audio and video.'
s.homepage = 'https://livekit.io/'
Expand All @@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.static_framework = true

s.dependency 'Flutter'
s.dependency 'WebRTC-SDK', '144.7559.01'
s.dependency 'WebRTC-SDK', '144.7559.09'
s.dependency 'flutter_webrtc'
end
2 changes: 1 addition & 1 deletion lib/src/livekit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'support/platform.dart' show lkPlatformIsMobile;
/// Main entry point to connect to a room.
/// {@category Room}
class LiveKitClient {
static const version = '2.8.0';
static const version = '2.8.1';

/// Initialize the WebRTC plugin. If this is not manually called, will be
/// initialized with default settings.
Expand Down
21 changes: 2 additions & 19 deletions lib/src/participant/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
}

if ([TrackSource.camera, TrackSource.screenShareVideo].contains(track.source)) {
final degradationPreference = publishOptions.degradationPreference ??
getDefaultDegradationPreference(
track,
);
final degradationPreference = publishOptions.degradationPreference ?? DegradationPreference.maintainResolution;
await track.setDegradationPreference(degradationPreference);
}

Expand Down Expand Up @@ -487,10 +484,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
}

if ([TrackSource.camera, TrackSource.screenShareVideo].contains(track.source)) {
final degradationPreference = publishOptions.degradationPreference ??
getDefaultDegradationPreference(
track,
);
final degradationPreference = publishOptions.degradationPreference ?? DegradationPreference.maintainResolution;
await track.setDegradationPreference(degradationPreference);
}

Expand Down Expand Up @@ -593,17 +587,6 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
await pub.dispose();
}

DegradationPreference getDefaultDegradationPreference(LocalVideoTrack track) {
// a few of reasons we have different default paths:
// 1. without this, Chrome seems to aggressively resize the SVC video stating `quality-limitation: bandwidth` even when BW isn't an issue
// 2. since we are overriding contentHint to motion (to workaround L1T3 publishing), it overrides the default degradationPreference to `balanced`
final VideoDimensions dimensions = track.currentOptions.params.dimensions;
if (track.source == TrackSource.screenShareVideo || dimensions.height >= 1080) {
return DegradationPreference.maintainResolution;
}
return DegradationPreference.balanced;
}

/// Convenience method to unpublish all tracks.
Future<void> unpublishAllTracks({bool notify = true, bool? stopOnUnpublish}) async {
final trackSids = trackPublications.keys.toSet();
Expand Down
4 changes: 4 additions & 0 deletions lib/src/token_source/room_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ class RoomAgentDispatch {
/// Metadata for the agent.
final String? metadata;

/// Optional deployment to target. Leave empty to target the production deployment.
final String? deployment;

const RoomAgentDispatch({
this.agentName,
this.metadata,
this.deployment,
});

factory RoomAgentDispatch.fromJson(Map<String, dynamic> json) => _$RoomAgentDispatchFromJson(json);
Expand Down
2 changes: 2 additions & 0 deletions lib/src/token_source/room_configuration.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions lib/src/token_source/token_source.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class TokenRequestOptions {
/// Metadata passed to the agent job.
final String? agentMetadata;

/// Optional deployment to target. Leave empty to target the production deployment.
final String? agentDeployment;

const TokenRequestOptions({
this.roomName,
this.participantName,
Expand All @@ -51,15 +54,16 @@ class TokenRequestOptions {
this.participantAttributes,
this.agentName,
this.agentMetadata,
this.agentDeployment,
});

factory TokenRequestOptions.fromJson(Map<String, dynamic> json) => _$TokenRequestOptionsFromJson(json);
Map<String, dynamic> toJson() => _$TokenRequestOptionsToJson(this);

/// Converts this options object to a wire-format request.
TokenSourceRequest toRequest() {
final List<RoomAgentDispatch>? agents = (agentName != null || agentMetadata != null)
? [RoomAgentDispatch(agentName: agentName, metadata: agentMetadata)]
final List<RoomAgentDispatch>? agents = (agentName != null || agentMetadata != null || agentDeployment != null)
? [RoomAgentDispatch(agentName: agentName, metadata: agentMetadata, deployment: agentDeployment)]
: null;

return TokenSourceRequest(
Expand All @@ -83,6 +87,7 @@ class TokenRequestOptions {
other.participantMetadata == participantMetadata &&
other.agentName == agentName &&
other.agentMetadata == agentMetadata &&
other.agentDeployment == agentDeployment &&
const MapEquality().equals(other.participantAttributes, participantAttributes);
}

Expand All @@ -95,6 +100,7 @@ class TokenRequestOptions {
participantMetadata,
agentName,
agentMetadata,
agentDeployment,
const MapEquality().hash(participantAttributes),
);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/src/token_source/token_source.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/src/track/local/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ abstract class LocalTrack extends Track {
await _processor!.init(processorOptions);

if (_processor?.processedTrack != null) {
setProcessedTrack(processor.processedTrack!);
await setProcessedTrack(processor.processedTrack!);
}

logger.fine('processor initialized');
Expand All @@ -379,6 +379,8 @@ abstract class LocalTrack extends Track {
// force re-setting of the mediaStreamTrack on the sender
//await this.setMediaStreamTrack(this._mediaStreamTrack, true);

await setProcessedTrack(null);

events.emit(TrackProcessorUpdateEvent(track: this));
}

Expand Down
23 changes: 20 additions & 3 deletions lib/src/track/track.dart
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,25 @@ abstract class Track extends DisposableChangeNotifier with EventsEmittable<Track
}

@internal
void setProcessedTrack(rtc.MediaStreamTrack track) {
_originalTrack = _mediaStreamTrack;
_mediaStreamTrack = track;
Future<void> setProcessedTrack(rtc.MediaStreamTrack? track) async {
if (track != null) {
// set processed track
_originalTrack = _mediaStreamTrack;
_mediaStreamTrack = track;
if (_originalTrack != null) {
await _mediaStream.removeTrack(_originalTrack!);
}
await _mediaStream.addTrack(track);
} else if (_originalTrack != null) {
// reset processed track
await _mediaStream.removeTrack(_mediaStreamTrack);
await _mediaStream.addTrack(_originalTrack!);
_mediaStreamTrack = _originalTrack!;
_originalTrack = null;
}
events.emit(TrackStreamUpdatedEvent(
track: this,
stream: _mediaStream,
));
}
}
4 changes: 2 additions & 2 deletions macos/livekit_client.podspec
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'livekit_client'
s.version = '2.8.0'
s.version = '2.8.1'
s.summary = 'Open source platform for real-time audio and video.'
s.description = 'Open source platform for real-time audio and video.'
s.homepage = 'https://livekit.io/'
Expand All @@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.static_framework = true

s.dependency 'FlutterMacOS'
s.dependency 'WebRTC-SDK', '144.7559.01'
s.dependency 'WebRTC-SDK', '144.7559.09'
s.dependency 'flutter_webrtc'
end
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
name: livekit_client
description: Flutter Client SDK for LiveKit. Build real-time video and audio
into your apps. Supports iOS, Android, and Web.
version: 2.8.0
version: 2.8.1
homepage: https://github.com/livekit/client-sdk-flutter

environment:
Expand Down Expand Up @@ -46,7 +46,7 @@ dependencies:
json_annotation: ^4.9.0

# Fix version to avoid version conflicts between WebRTC-SDK pods, which both this package and flutter_webrtc depend on.
flutter_webrtc: 1.4.0
flutter_webrtc: 1.5.2
dart_webrtc: ^1.8.0

dev_dependencies:
Expand Down
Loading