Create android & web plugins (#15)
* create android & web plugins * apply `flutter format .`
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
@@ -0,0 +1,50 @@
|
||||
group 'io.livekit.plugin'
|
||||
version '1.0-SNAPSHOT'
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
@@ -0,0 +1 @@
|
||||
rootProject.name = 'livekit'
|
||||
@@ -0,0 +1,3 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.livekit.plugin">
|
||||
</manifest>
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.livekit.plugin
|
||||
|
||||
import androidx.annotation.NonNull
|
||||
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||
import io.flutter.plugin.common.MethodChannel.Result
|
||||
|
||||
/** LiveKitPlugin */
|
||||
class LiveKitPlugin: FlutterPlugin, MethodCallHandler {
|
||||
/// The MethodChannel that will the communication between Flutter and native Android
|
||||
///
|
||||
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
||||
/// when the Flutter Engine is detached from the Activity
|
||||
private lateinit var channel : MethodChannel
|
||||
|
||||
override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
|
||||
channel = MethodChannel(flutterPluginBinding.binaryMessenger, "livekit_client")
|
||||
channel.setMethodCallHandler(this)
|
||||
}
|
||||
|
||||
override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
|
||||
// no-op for now
|
||||
result.notImplemented()
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
channel.setMethodCallHandler(null)
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,8 @@ extension LKExampleExt on BuildContext {
|
||||
context: this,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('UnPublish'),
|
||||
content: const Text('Would you like to un-publish your Camera & Mic ?'),
|
||||
content:
|
||||
const Text('Would you like to un-publish your Camera & Mic ?'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx, false),
|
||||
@@ -92,7 +93,8 @@ extension LKExampleExt on BuildContext {
|
||||
context: this,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Send data'),
|
||||
content: const Text('This will send a sample data to all participants in the room'),
|
||||
content: const Text(
|
||||
'This will send a sample data to all participants in the room'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx, false),
|
||||
|
||||
@@ -65,7 +65,8 @@ class _ConnectPageState extends State<ConnectPage> {
|
||||
// Save for next time
|
||||
await _writePrefs();
|
||||
|
||||
print('Connecting with url: ${_uriCtrl.text}, token: ${_tokenCtrl.text}...');
|
||||
print(
|
||||
'Connecting with url: ${_uriCtrl.text}, token: ${_tokenCtrl.text}...');
|
||||
|
||||
final room = await LiveKitClient.connect(
|
||||
_uriCtrl.text,
|
||||
@@ -113,7 +114,8 @@ class _ConnectPageState extends State<ConnectPage> {
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardColor,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: Theme.of(context).colorScheme.secondary),
|
||||
border:
|
||||
Border.all(color: Theme.of(context).colorScheme.secondary),
|
||||
),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 320,
|
||||
|
||||
@@ -50,7 +50,8 @@ class _RoomPageState extends State<RoomPage> {
|
||||
|
||||
void _setUpListeners() => _listener
|
||||
..on<RoomDisconnectedEvent>((_) async {
|
||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) => Navigator.pop(context));
|
||||
WidgetsBinding.instance
|
||||
?.addPostFrameCallback((timeStamp) => Navigator.pop(context));
|
||||
})
|
||||
..on<DataReceivedEvent>((event) {
|
||||
String decoded = 'Failed to decode';
|
||||
@@ -120,7 +121,8 @@ class _RoomPageState extends State<RoomPage> {
|
||||
}
|
||||
|
||||
// joinedAt
|
||||
return a.joinedAt.millisecondsSinceEpoch - b.joinedAt.millisecondsSinceEpoch;
|
||||
return a.joinedAt.millisecondsSinceEpoch -
|
||||
b.joinedAt.millisecondsSinceEpoch;
|
||||
});
|
||||
|
||||
if (participants.length > 1) {
|
||||
@@ -138,8 +140,9 @@ class _RoomPageState extends State<RoomPage> {
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child:
|
||||
participants.isNotEmpty ? ParticipantWidget(participants.first) : Container()),
|
||||
child: participants.isNotEmpty
|
||||
? ParticipantWidget(participants.first)
|
||||
: Container()),
|
||||
SizedBox(
|
||||
height: 100,
|
||||
child: ListView.builder(
|
||||
@@ -149,7 +152,8 @@ class _RoomPageState extends State<RoomPage> {
|
||||
width: 100,
|
||||
height: 100,
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: ParticipantWidget(participants[index + 1], quality: VideoQuality.LOW),
|
||||
child: ParticipantWidget(participants[index + 1],
|
||||
quality: VideoQuality.LOW),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -32,7 +32,8 @@ class LiveKitTheme {
|
||||
foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
|
||||
// backgroundColor: MaterialStateProperty.all<Color>(accentColor),
|
||||
backgroundColor: MaterialStateProperty.resolveWith((states) {
|
||||
if (states.contains(MaterialState.disabled)) return accentColor.withOpacity(0.5);
|
||||
if (states.contains(MaterialState.disabled))
|
||||
return accentColor.withOpacity(0.5);
|
||||
return accentColor;
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -89,7 +89,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
|
||||
void _toggleCamera() async {
|
||||
//
|
||||
final track = participant.videoTracks.firstOrNull?.track as LocalVideoTrack?;
|
||||
final track =
|
||||
participant.videoTracks.firstOrNull?.track as LocalVideoTrack?;
|
||||
if (track == null) return;
|
||||
|
||||
try {
|
||||
@@ -113,7 +114,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
}
|
||||
|
||||
try {
|
||||
final screenTrack = await LocalVideoTrack.createScreenTrack(); // Defaults to camera
|
||||
final screenTrack =
|
||||
await LocalVideoTrack.createScreenTrack(); // Defaults to camera
|
||||
await widget.room.localParticipant.publishVideoTrack(
|
||||
screenTrack,
|
||||
);
|
||||
@@ -177,7 +179,9 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
icon: const Icon(EvaIcons.videoOff),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(position == CameraPosition.back ? EvaIcons.camera : EvaIcons.person),
|
||||
icon: Icon(position == CameraPosition.back
|
||||
? EvaIcons.camera
|
||||
: EvaIcons.person),
|
||||
onPressed: () => _toggleCamera(),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -50,7 +50,8 @@ class _ParticipantWidgetState extends State<ParticipantWidget> {
|
||||
// register for change so Flutter will re-build the widget upon change
|
||||
void _onParticipantChanged() {
|
||||
//
|
||||
final firstAudio = widget.participant.audioTracks.firstWhereOrNull((pub) => pub.subscribed);
|
||||
final firstAudio = widget.participant.audioTracks
|
||||
.firstWhereOrNull((pub) => pub.subscribed);
|
||||
final firstVideo = widget.participant.videoTracks
|
||||
.firstWhereOrNull((pub) => !pub.isScreenShare && pub.subscribed);
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import 'dart:async';
|
||||
// In order to *not* need this ignore, consider extracting the "web" version
|
||||
// of your plugin as a separate package, instead of inlining it in the same
|
||||
// package as the core of your plugin.
|
||||
// ignore: avoid_web_libraries_in_flutter
|
||||
// import 'dart:html' as html show window;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
|
||||
/// A web implementation of the Livekit plugin.
|
||||
class LiveKitWebPlugin {
|
||||
static void registerWith(Registrar registrar) {
|
||||
final MethodChannel channel = MethodChannel(
|
||||
'livekit_client',
|
||||
const StandardMethodCodec(),
|
||||
registrar,
|
||||
);
|
||||
|
||||
final pluginInstance = LiveKitWebPlugin();
|
||||
channel.setMethodCallHandler(pluginInstance.handleMethodCall);
|
||||
}
|
||||
|
||||
/// Handles method calls over the MethodChannel of this plugin.
|
||||
/// Note: Check the "federated" architecture for a new way of doing this:
|
||||
/// https://flutter.dev/go/federated-plugins
|
||||
Future<dynamic> handleMethodCall(MethodCall call) async {
|
||||
// no-op for now
|
||||
throw PlatformException(
|
||||
code: 'Unimplemented',
|
||||
details: 'livekit for web doesn\'t implement \'${call.method}\'',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,8 @@ class ConnectException extends LiveKitException {
|
||||
}
|
||||
|
||||
class UnexpectedStateException extends LiveKitException {
|
||||
UnexpectedStateException([String msg = 'Unexpected connection state']) : super._(msg);
|
||||
UnexpectedStateException([String msg = 'Unexpected connection state'])
|
||||
: super._(msg);
|
||||
}
|
||||
|
||||
class TrackCreateException extends LiveKitException {
|
||||
@@ -19,7 +20,8 @@ class TrackCreateException extends LiveKitException {
|
||||
}
|
||||
|
||||
class TrackPublishException extends LiveKitException {
|
||||
TrackPublishException([String msg = 'Failed to publish track']) : super._(msg);
|
||||
TrackPublishException([String msg = 'Failed to publish track'])
|
||||
: super._(msg);
|
||||
}
|
||||
|
||||
class DataPublishException extends LiveKitException {
|
||||
|
||||
@@ -28,7 +28,8 @@ extension ICEServerExt on lk_rtc.ICEServer {
|
||||
}
|
||||
|
||||
extension IterableExt<E> on Iterable<E> {
|
||||
E? elementAtOrNull(int index) => (index >= 0 && index < length) ? elementAt(index) : null;
|
||||
E? elementAtOrNull(int index) =>
|
||||
(index >= 0 && index < length) ? elementAt(index) : null;
|
||||
}
|
||||
|
||||
extension ObjectExt on Object {
|
||||
|
||||
@@ -26,5 +26,6 @@ class TrackPublishOptions {
|
||||
});
|
||||
|
||||
@override
|
||||
String toString() => '${runtimeType}(videoEncoding: ${videoEncoding}, simulcast: ${simulcast})';
|
||||
String toString() =>
|
||||
'${runtimeType}(videoEncoding: ${videoEncoding}, simulcast: ${simulcast})';
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ class LocalParticipant extends Participant {
|
||||
|
||||
/// publish an audio track to the room
|
||||
Future<TrackPublication> publishAudioTrack(LocalAudioTrack track) async {
|
||||
if (audioTracks.any((e) => e.track?.mediaStreamTrack.id == track.mediaStreamTrack.id)) {
|
||||
if (audioTracks.any(
|
||||
(e) => e.track?.mediaStreamTrack.id == track.mediaStreamTrack.id)) {
|
||||
throw TrackPublishException('track already exists');
|
||||
}
|
||||
|
||||
@@ -82,7 +83,8 @@ class LocalParticipant extends Participant {
|
||||
LocalVideoTrack track, {
|
||||
TrackPublishOptions? options,
|
||||
}) async {
|
||||
if (videoTracks.any((e) => e.track?.mediaStreamTrack.id == track.mediaStreamTrack.id)) {
|
||||
if (videoTracks.any(
|
||||
(e) => e.track?.mediaStreamTrack.id == track.mediaStreamTrack.id)) {
|
||||
throw TrackPublishException('track already exists');
|
||||
}
|
||||
|
||||
@@ -117,7 +119,8 @@ class LocalParticipant extends Participant {
|
||||
}
|
||||
}
|
||||
|
||||
logger.fine('Compute encodings with resolution: ${width}x${height}, options: ${options}');
|
||||
logger.fine(
|
||||
'Compute encodings with resolution: ${width}x${height}, options: ${options}');
|
||||
|
||||
final encodings = Utils.computeVideoEncodings(
|
||||
width: width,
|
||||
|
||||
@@ -20,7 +20,8 @@ import 'remote_participant.dart';
|
||||
|
||||
/// Base for [RemoteParticipant] and [LocalParticipant],
|
||||
/// can not be instantiated directly.
|
||||
abstract class Participant extends DisposableChangeNotifier with EventsEmittable<ParticipantEvent> {
|
||||
abstract class Participant extends DisposableChangeNotifier
|
||||
with EventsEmittable<ParticipantEvent> {
|
||||
/// map of track sid => published track
|
||||
final trackPublications = <String, TrackPublication>{};
|
||||
|
||||
@@ -49,7 +50,8 @@ abstract class Participant extends DisposableChangeNotifier with EventsEmittable
|
||||
DateTime get joinedAt {
|
||||
final pi = _participantInfo;
|
||||
if (pi != null) {
|
||||
return DateTime.fromMillisecondsSinceEpoch(pi.joinedAt.toInt() * 1000, isUtc: true);
|
||||
return DateTime.fromMillisecondsSinceEpoch(pi.joinedAt.toInt() * 1000,
|
||||
isUtc: true);
|
||||
}
|
||||
return DateTime.now();
|
||||
}
|
||||
@@ -160,9 +162,11 @@ abstract class Participant extends DisposableChangeNotifier with EventsEmittable
|
||||
|
||||
// Convenience extension
|
||||
extension ParticipantExt on Participant {
|
||||
List<TrackPublication> get videoTracks =>
|
||||
trackPublications.values.where((e) => e.kind == lk_models.TrackType.VIDEO).toList();
|
||||
List<TrackPublication> get videoTracks => trackPublications.values
|
||||
.where((e) => e.kind == lk_models.TrackType.VIDEO)
|
||||
.toList();
|
||||
|
||||
List<TrackPublication> get audioTracks =>
|
||||
trackPublications.values.where((e) => e.kind == lk_models.TrackType.AUDIO).toList();
|
||||
List<TrackPublication> get audioTracks => trackPublications.values
|
||||
.where((e) => e.kind == lk_models.TrackType.AUDIO)
|
||||
.toList();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,8 @@ class RemoteParticipant extends Participant {
|
||||
logger.fine('addSubscribedMediaTrack() pub is null, will wait...');
|
||||
// Wait for the metadata to arrive
|
||||
final event = await events.waitFor<TrackPublishedEvent>(
|
||||
filter: (event) => event.participant == this && event.publication.sid == trackSid,
|
||||
filter: (event) =>
|
||||
event.participant == this && event.publication.sid == trackSid,
|
||||
duration: Timeouts.publish,
|
||||
onTimeout: () => throw TrackSubscriptionExceptionEvent(
|
||||
participant: this,
|
||||
@@ -78,7 +79,8 @@ class RemoteParticipant extends Participant {
|
||||
}
|
||||
|
||||
// Check if track type is supported, throw if not.
|
||||
if (![lk_models.TrackType.AUDIO, lk_models.TrackType.VIDEO].contains(pub.kind)) {
|
||||
if (![lk_models.TrackType.AUDIO, lk_models.TrackType.VIDEO]
|
||||
.contains(pub.kind)) {
|
||||
throw TrackSubscriptionExceptionEvent(
|
||||
participant: this,
|
||||
sid: trackSid,
|
||||
@@ -145,7 +147,8 @@ class RemoteParticipant extends Participant {
|
||||
|
||||
// unpublish any track that is not in the info
|
||||
final validSids = info.tracks.map((e) => e.sid);
|
||||
final removeSids = trackPublications.keys.where((e) => !validSids.contains(e)).toSet();
|
||||
final removeSids =
|
||||
trackPublications.keys.where((e) => !validSids.contains(e)).toSet();
|
||||
for (final sid in removeSids) {
|
||||
await unpublishTrack(sid, notify: true);
|
||||
}
|
||||
|
||||
@@ -16,28 +16,58 @@ export 'livekit_models.pbenum.dart';
|
||||
|
||||
class Room extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Room',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'Room',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'sid')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'name')
|
||||
..a<$core.int>(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'emptyTimeout',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'emptyTimeout',
|
||||
$pb.PbFieldType.OU3)
|
||||
..a<$core.int>(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'maxParticipants',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'maxParticipants',
|
||||
$pb.PbFieldType.OU3)
|
||||
..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'creationTime')
|
||||
..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'turnPassword')
|
||||
..aInt64(
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'creationTime')
|
||||
..aOS(
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'turnPassword')
|
||||
..pc<Codec>(
|
||||
7,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'enabledCodecs',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'enabledCodecs',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: Codec.create)
|
||||
..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata')
|
||||
..aOS(
|
||||
8,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'metadata')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
Room._() : super();
|
||||
@@ -81,7 +111,8 @@ class Room extends $pb.GeneratedMessage {
|
||||
factory Room.fromBuffer($core.List<$core.int> i,
|
||||
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(i, r);
|
||||
factory Room.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
factory Room.fromJson($core.String i,
|
||||
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(i, r);
|
||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
@@ -99,7 +130,8 @@ class Room extends $pb.GeneratedMessage {
|
||||
Room createEmptyInstance() => create();
|
||||
static $pb.PbList<Room> createRepeated() => $pb.PbList<Room>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static Room getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Room>(create);
|
||||
static Room getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Room>(create);
|
||||
static Room? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -192,12 +224,24 @@ class Room extends $pb.GeneratedMessage {
|
||||
|
||||
class Codec extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Codec',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'Codec',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mime')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fmtpLine')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'mime')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'fmtpLine')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
Codec._() : super();
|
||||
@@ -217,7 +261,8 @@ class Codec extends $pb.GeneratedMessage {
|
||||
factory Codec.fromBuffer($core.List<$core.int> i,
|
||||
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromBuffer(i, r);
|
||||
factory Codec.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
factory Codec.fromJson($core.String i,
|
||||
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||
create()..mergeFromJson(i, r);
|
||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
@@ -266,27 +311,55 @@ class Codec extends $pb.GeneratedMessage {
|
||||
|
||||
class ParticipantInfo extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ParticipantInfo',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'ParticipantInfo',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'identity')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'sid')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'identity')
|
||||
..e<ParticipantInfo_State>(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'state',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'state',
|
||||
$pb.PbFieldType.OE,
|
||||
defaultOrMaker: ParticipantInfo_State.JOINING,
|
||||
valueOf: ParticipantInfo_State.valueOf,
|
||||
enumValues: ParticipantInfo_State.values)
|
||||
..pc<TrackInfo>(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'tracks',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'tracks',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: TrackInfo.create)
|
||||
..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata')
|
||||
..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'joinedAt')
|
||||
..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hidden')
|
||||
..aOS(
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'metadata')
|
||||
..aInt64(
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'joinedAt')
|
||||
..aOB(
|
||||
7,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'hidden')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
ParticipantInfo._() : super();
|
||||
@@ -343,10 +416,11 @@ class ParticipantInfo extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ParticipantInfo create() => ParticipantInfo._();
|
||||
ParticipantInfo createEmptyInstance() => create();
|
||||
static $pb.PbList<ParticipantInfo> createRepeated() => $pb.PbList<ParticipantInfo>();
|
||||
static $pb.PbList<ParticipantInfo> createRepeated() =>
|
||||
$pb.PbList<ParticipantInfo>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ParticipantInfo getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ParticipantInfo>(create);
|
||||
static ParticipantInfo getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<ParticipantInfo>(create);
|
||||
static ParticipantInfo? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -427,21 +501,55 @@ class ParticipantInfo extends $pb.GeneratedMessage {
|
||||
|
||||
class TrackInfo extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TrackInfo',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'TrackInfo',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
||||
..e<TrackType>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type',
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'sid')
|
||||
..e<TrackType>(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'type',
|
||||
$pb.PbFieldType.OE,
|
||||
defaultOrMaker: TrackType.AUDIO, valueOf: TrackType.valueOf, enumValues: TrackType.values)
|
||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
..aOB(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'muted')
|
||||
..a<$core.int>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'width',
|
||||
defaultOrMaker: TrackType.AUDIO,
|
||||
valueOf: TrackType.valueOf,
|
||||
enumValues: TrackType.values)
|
||||
..aOS(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'name')
|
||||
..aOB(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'muted')
|
||||
..a<$core.int>(
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'width',
|
||||
$pb.PbFieldType.OU3)
|
||||
..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height',
|
||||
..a<$core.int>(
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'height',
|
||||
$pb.PbFieldType.OU3)
|
||||
..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'simulcast')
|
||||
..aOB(
|
||||
7,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'simulcast')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
TrackInfo._() : super();
|
||||
@@ -598,23 +706,35 @@ class DataPacket extends $pb.GeneratedMessage {
|
||||
0: DataPacket_Value.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DataPacket',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'DataPacket',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..oo(0, [2, 3])
|
||||
..e<DataPacket_Kind>(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'kind',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'kind',
|
||||
$pb.PbFieldType.OE,
|
||||
defaultOrMaker: DataPacket_Kind.RELIABLE,
|
||||
valueOf: DataPacket_Kind.valueOf,
|
||||
enumValues: DataPacket_Kind.values)
|
||||
..aOM<UserPacket>(
|
||||
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'user',
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'user',
|
||||
subBuilder: UserPacket.create)
|
||||
..aOM<ActiveSpeakerUpdate>(
|
||||
3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'speaker',
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'speaker',
|
||||
subBuilder: ActiveSpeakerUpdate.create)
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@@ -658,8 +778,8 @@ class DataPacket extends $pb.GeneratedMessage {
|
||||
DataPacket createEmptyInstance() => create();
|
||||
static $pb.PbList<DataPacket> createRepeated() => $pb.PbList<DataPacket>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static DataPacket getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DataPacket>(create);
|
||||
static DataPacket getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<DataPacket>(create);
|
||||
static DataPacket? _defaultInstance;
|
||||
|
||||
DataPacket_Value whichValue() => _DataPacket_ValueByTag[$_whichOneof(0)]!;
|
||||
@@ -708,13 +828,19 @@ class DataPacket extends $pb.GeneratedMessage {
|
||||
|
||||
class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ActiveSpeakerUpdate',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'ActiveSpeakerUpdate',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..pc<SpeakerInfo>(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'speakers',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'speakers',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: SpeakerInfo.create)
|
||||
..hasRequiredFields = false;
|
||||
@@ -749,10 +875,11 @@ class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ActiveSpeakerUpdate create() => ActiveSpeakerUpdate._();
|
||||
ActiveSpeakerUpdate createEmptyInstance() => create();
|
||||
static $pb.PbList<ActiveSpeakerUpdate> createRepeated() => $pb.PbList<ActiveSpeakerUpdate>();
|
||||
static $pb.PbList<ActiveSpeakerUpdate> createRepeated() =>
|
||||
$pb.PbList<ActiveSpeakerUpdate>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ActiveSpeakerUpdate getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ActiveSpeakerUpdate>(create);
|
||||
static ActiveSpeakerUpdate getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<ActiveSpeakerUpdate>(create);
|
||||
static ActiveSpeakerUpdate? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -761,16 +888,30 @@ class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
||||
|
||||
class SpeakerInfo extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SpeakerInfo',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'SpeakerInfo',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'sid')
|
||||
..a<$core.double>(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'level',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'level',
|
||||
$pb.PbFieldType.OF)
|
||||
..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'active')
|
||||
..aOB(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'active')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
SpeakerInfo._() : super();
|
||||
@@ -813,8 +954,8 @@ class SpeakerInfo extends $pb.GeneratedMessage {
|
||||
SpeakerInfo createEmptyInstance() => create();
|
||||
static $pb.PbList<SpeakerInfo> createRepeated() => $pb.PbList<SpeakerInfo>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SpeakerInfo getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SpeakerInfo>(create);
|
||||
static SpeakerInfo getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SpeakerInfo>(create);
|
||||
static SpeakerInfo? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -856,16 +997,30 @@ class SpeakerInfo extends $pb.GeneratedMessage {
|
||||
|
||||
class UserPacket extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UserPacket',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'UserPacket',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'participantSid')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'participantSid')
|
||||
..a<$core.List<$core.int>>(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payload',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'payload',
|
||||
$pb.PbFieldType.OY)
|
||||
..pPS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'destinationSids')
|
||||
..pPS(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'destinationSids')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
UserPacket._() : super();
|
||||
@@ -908,8 +1063,8 @@ class UserPacket extends $pb.GeneratedMessage {
|
||||
UserPacket createEmptyInstance() => create();
|
||||
static $pb.PbList<UserPacket> createRepeated() => $pb.PbList<UserPacket>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UserPacket getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UserPacket>(create);
|
||||
static UserPacket getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<UserPacket>(create);
|
||||
static UserPacket? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -942,14 +1097,34 @@ class UserPacket extends $pb.GeneratedMessage {
|
||||
|
||||
class RecordingResult extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RecordingResult',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'RecordingResult',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'error')
|
||||
..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'duration')
|
||||
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'location')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'id')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'error')
|
||||
..aInt64(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'duration')
|
||||
..aOS(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'location')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
RecordingResult._() : super();
|
||||
@@ -994,10 +1169,11 @@ class RecordingResult extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RecordingResult create() => RecordingResult._();
|
||||
RecordingResult createEmptyInstance() => create();
|
||||
static $pb.PbList<RecordingResult> createRepeated() => $pb.PbList<RecordingResult>();
|
||||
static $pb.PbList<RecordingResult> createRepeated() =>
|
||||
$pb.PbList<RecordingResult>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RecordingResult getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RecordingResult>(create);
|
||||
static RecordingResult getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<RecordingResult>(create);
|
||||
static RecordingResult? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
|
||||
@@ -10,12 +10,21 @@ import 'dart:core' as $core;
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
class TrackType extends $pb.ProtobufEnum {
|
||||
static const TrackType AUDIO =
|
||||
TrackType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AUDIO');
|
||||
static const TrackType VIDEO =
|
||||
TrackType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIDEO');
|
||||
static const TrackType DATA =
|
||||
TrackType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA');
|
||||
static const TrackType AUDIO = TrackType._(
|
||||
0,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'AUDIO');
|
||||
static const TrackType VIDEO = TrackType._(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'VIDEO');
|
||||
static const TrackType DATA = TrackType._(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'DATA');
|
||||
|
||||
static const $core.List<TrackType> values = <TrackType>[
|
||||
AUDIO,
|
||||
@@ -23,7 +32,8 @@ class TrackType extends $pb.ProtobufEnum {
|
||||
DATA,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, TrackType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static final $core.Map<$core.int, TrackType> _byValue =
|
||||
$pb.ProtobufEnum.initByValue(values);
|
||||
static TrackType? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const TrackType._($core.int v, $core.String n) : super(v, n);
|
||||
@@ -31,15 +41,28 @@ class TrackType extends $pb.ProtobufEnum {
|
||||
|
||||
class ParticipantInfo_State extends $pb.ProtobufEnum {
|
||||
static const ParticipantInfo_State JOINING = ParticipantInfo_State._(
|
||||
0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'JOINING');
|
||||
0,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'JOINING');
|
||||
static const ParticipantInfo_State JOINED = ParticipantInfo_State._(
|
||||
1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'JOINED');
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'JOINED');
|
||||
static const ParticipantInfo_State ACTIVE = ParticipantInfo_State._(
|
||||
2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ACTIVE');
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'ACTIVE');
|
||||
static const ParticipantInfo_State DISCONNECTED = ParticipantInfo_State._(
|
||||
3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DISCONNECTED');
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'DISCONNECTED');
|
||||
|
||||
static const $core.List<ParticipantInfo_State> values = <ParticipantInfo_State>[
|
||||
static const $core.List<ParticipantInfo_State> values =
|
||||
<ParticipantInfo_State>[
|
||||
JOINING,
|
||||
JOINED,
|
||||
ACTIVE,
|
||||
@@ -55,9 +78,15 @@ class ParticipantInfo_State extends $pb.ProtobufEnum {
|
||||
|
||||
class DataPacket_Kind extends $pb.ProtobufEnum {
|
||||
static const DataPacket_Kind RELIABLE = DataPacket_Kind._(
|
||||
0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RELIABLE');
|
||||
0,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'RELIABLE');
|
||||
static const DataPacket_Kind LOSSY = DataPacket_Kind._(
|
||||
1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'LOSSY');
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'LOSSY');
|
||||
|
||||
static const $core.List<DataPacket_Kind> values = <DataPacket_Kind>[
|
||||
RELIABLE,
|
||||
|
||||
@@ -20,8 +20,8 @@ const TrackType$json = const {
|
||||
};
|
||||
|
||||
/// Descriptor for `TrackType`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||
final $typed_data.Uint8List trackTypeDescriptor =
|
||||
$convert.base64Decode('CglUcmFja1R5cGUSCQoFQVVESU8QABIJCgVWSURFTxABEggKBERBVEEQAg==');
|
||||
final $typed_data.Uint8List trackTypeDescriptor = $convert.base64Decode(
|
||||
'CglUcmFja1R5cGUSCQoFQVVESU8QABIJCgVWSURFTxABEggKBERBVEEQAg==');
|
||||
@$core.Deprecated('Use roomDescriptor instead')
|
||||
const Room$json = const {
|
||||
'1': 'Room',
|
||||
@@ -29,7 +29,13 @@ const Room$json = const {
|
||||
const {'1': 'sid', '3': 1, '4': 1, '5': 9, '10': 'sid'},
|
||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||
const {'1': 'empty_timeout', '3': 3, '4': 1, '5': 13, '10': 'emptyTimeout'},
|
||||
const {'1': 'max_participants', '3': 4, '4': 1, '5': 13, '10': 'maxParticipants'},
|
||||
const {
|
||||
'1': 'max_participants',
|
||||
'3': 4,
|
||||
'4': 1,
|
||||
'5': 13,
|
||||
'10': 'maxParticipants'
|
||||
},
|
||||
const {'1': 'creation_time', '3': 5, '4': 1, '5': 3, '10': 'creationTime'},
|
||||
const {'1': 'turn_password', '3': 6, '4': 1, '5': 9, '10': 'turnPassword'},
|
||||
const {
|
||||
@@ -57,8 +63,8 @@ const Codec$json = const {
|
||||
};
|
||||
|
||||
/// Descriptor for `Codec`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List codecDescriptor = $convert
|
||||
.base64Decode('CgVDb2RlYxISCgRtaW1lGAEgASgJUgRtaW1lEhsKCWZtdHBfbGluZRgCIAEoCVIIZm10cExpbmU=');
|
||||
final $typed_data.Uint8List codecDescriptor = $convert.base64Decode(
|
||||
'CgVDb2RlYxISCgRtaW1lGAEgASgJUgRtaW1lEhsKCWZtdHBfbGluZRgCIAEoCVIIZm10cExpbmU=');
|
||||
@$core.Deprecated('Use participantInfoDescriptor instead')
|
||||
const ParticipantInfo$json = const {
|
||||
'1': 'ParticipantInfo',
|
||||
@@ -73,7 +79,14 @@ const ParticipantInfo$json = const {
|
||||
'6': '.livekit.ParticipantInfo.State',
|
||||
'10': 'state'
|
||||
},
|
||||
const {'1': 'tracks', '3': 4, '4': 3, '5': 11, '6': '.livekit.TrackInfo', '10': 'tracks'},
|
||||
const {
|
||||
'1': 'tracks',
|
||||
'3': 4,
|
||||
'4': 3,
|
||||
'5': 11,
|
||||
'6': '.livekit.TrackInfo',
|
||||
'10': 'tracks'
|
||||
},
|
||||
const {'1': 'metadata', '3': 5, '4': 1, '5': 9, '10': 'metadata'},
|
||||
const {'1': 'joined_at', '3': 6, '4': 1, '5': 3, '10': 'joinedAt'},
|
||||
const {'1': 'hidden', '3': 7, '4': 1, '5': 8, '10': 'hidden'},
|
||||
@@ -100,7 +113,14 @@ const TrackInfo$json = const {
|
||||
'1': 'TrackInfo',
|
||||
'2': const [
|
||||
const {'1': 'sid', '3': 1, '4': 1, '5': 9, '10': 'sid'},
|
||||
const {'1': 'type', '3': 2, '4': 1, '5': 14, '6': '.livekit.TrackType', '10': 'type'},
|
||||
const {
|
||||
'1': 'type',
|
||||
'3': 2,
|
||||
'4': 1,
|
||||
'5': 14,
|
||||
'6': '.livekit.TrackType',
|
||||
'10': 'type'
|
||||
},
|
||||
const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
|
||||
const {'1': 'muted', '3': 4, '4': 1, '5': 8, '10': 'muted'},
|
||||
const {'1': 'width', '3': 5, '4': 1, '5': 13, '10': 'width'},
|
||||
@@ -116,8 +136,23 @@ final $typed_data.Uint8List trackInfoDescriptor = $convert.base64Decode(
|
||||
const DataPacket$json = const {
|
||||
'1': 'DataPacket',
|
||||
'2': const [
|
||||
const {'1': 'kind', '3': 1, '4': 1, '5': 14, '6': '.livekit.DataPacket.Kind', '10': 'kind'},
|
||||
const {'1': 'user', '3': 2, '4': 1, '5': 11, '6': '.livekit.UserPacket', '9': 0, '10': 'user'},
|
||||
const {
|
||||
'1': 'kind',
|
||||
'3': 1,
|
||||
'4': 1,
|
||||
'5': 14,
|
||||
'6': '.livekit.DataPacket.Kind',
|
||||
'10': 'kind'
|
||||
},
|
||||
const {
|
||||
'1': 'user',
|
||||
'3': 2,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.livekit.UserPacket',
|
||||
'9': 0,
|
||||
'10': 'user'
|
||||
},
|
||||
const {
|
||||
'1': 'speaker',
|
||||
'3': 3,
|
||||
@@ -150,7 +185,14 @@ final $typed_data.Uint8List dataPacketDescriptor = $convert.base64Decode(
|
||||
const ActiveSpeakerUpdate$json = const {
|
||||
'1': 'ActiveSpeakerUpdate',
|
||||
'2': const [
|
||||
const {'1': 'speakers', '3': 1, '4': 3, '5': 11, '6': '.livekit.SpeakerInfo', '10': 'speakers'},
|
||||
const {
|
||||
'1': 'speakers',
|
||||
'3': 1,
|
||||
'4': 3,
|
||||
'5': 11,
|
||||
'6': '.livekit.SpeakerInfo',
|
||||
'10': 'speakers'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -174,9 +216,21 @@ final $typed_data.Uint8List speakerInfoDescriptor = $convert.base64Decode(
|
||||
const UserPacket$json = const {
|
||||
'1': 'UserPacket',
|
||||
'2': const [
|
||||
const {'1': 'participant_sid', '3': 1, '4': 1, '5': 9, '10': 'participantSid'},
|
||||
const {
|
||||
'1': 'participant_sid',
|
||||
'3': 1,
|
||||
'4': 1,
|
||||
'5': 9,
|
||||
'10': 'participantSid'
|
||||
},
|
||||
const {'1': 'payload', '3': 2, '4': 1, '5': 12, '10': 'payload'},
|
||||
const {'1': 'destination_sids', '3': 3, '4': 3, '5': 9, '10': 'destinationSids'},
|
||||
const {
|
||||
'1': 'destination_sids',
|
||||
'3': 3,
|
||||
'4': 3,
|
||||
'5': 9,
|
||||
'10': 'destinationSids'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
+388
-133
@@ -30,7 +30,8 @@ enum SignalRequest_Message {
|
||||
}
|
||||
|
||||
class SignalRequest extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, SignalRequest_Message> _SignalRequest_MessageByTag = {
|
||||
static const $core.Map<$core.int, SignalRequest_Message>
|
||||
_SignalRequest_MessageByTag = {
|
||||
1: SignalRequest_Message.offer,
|
||||
2: SignalRequest_Message.answer,
|
||||
3: SignalRequest_Message.trickle,
|
||||
@@ -43,37 +44,68 @@ class SignalRequest extends $pb.GeneratedMessage {
|
||||
0: SignalRequest_Message.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignalRequest',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'SignalRequest',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
..aOM<SessionDescription>(
|
||||
1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'offer',
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'offer',
|
||||
subBuilder: SessionDescription.create)
|
||||
..aOM<SessionDescription>(
|
||||
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'answer',
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'answer',
|
||||
subBuilder: SessionDescription.create)
|
||||
..aOM<TrickleRequest>(
|
||||
3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trickle',
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trickle',
|
||||
subBuilder: TrickleRequest.create)
|
||||
..aOM<AddTrackRequest>(
|
||||
4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addTrack',
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'addTrack',
|
||||
subBuilder: AddTrackRequest.create)
|
||||
..aOM<MuteTrackRequest>(
|
||||
5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mute',
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'mute',
|
||||
subBuilder: MuteTrackRequest.create)
|
||||
..aOM<UpdateSubscription>(
|
||||
6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subscription',
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'subscription',
|
||||
subBuilder: UpdateSubscription.create)
|
||||
..aOM<UpdateTrackSettings>(
|
||||
7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackSetting',
|
||||
7,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trackSetting',
|
||||
subBuilder: UpdateTrackSettings.create)
|
||||
..aOM<LeaveRequest>(
|
||||
8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'leave',
|
||||
8,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'leave',
|
||||
subBuilder: LeaveRequest.create)
|
||||
..aOM<SetSimulcastLayers>(
|
||||
9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'simulcast',
|
||||
9,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'simulcast',
|
||||
subBuilder: SetSimulcastLayers.create)
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@@ -139,13 +171,15 @@ class SignalRequest extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignalRequest create() => SignalRequest._();
|
||||
SignalRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<SignalRequest> createRepeated() => $pb.PbList<SignalRequest>();
|
||||
static $pb.PbList<SignalRequest> createRepeated() =>
|
||||
$pb.PbList<SignalRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignalRequest getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignalRequest>(create);
|
||||
static SignalRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SignalRequest>(create);
|
||||
static SignalRequest? _defaultInstance;
|
||||
|
||||
SignalRequest_Message whichMessage() => _SignalRequest_MessageByTag[$_whichOneof(0)]!;
|
||||
SignalRequest_Message whichMessage() =>
|
||||
_SignalRequest_MessageByTag[$_whichOneof(0)]!;
|
||||
void clearMessage() => clearField($_whichOneof(0));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -290,7 +324,8 @@ enum SignalResponse_Message {
|
||||
}
|
||||
|
||||
class SignalResponse extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, SignalResponse_Message> _SignalResponse_MessageByTag = {
|
||||
static const $core.Map<$core.int, SignalResponse_Message>
|
||||
_SignalResponse_MessageByTag = {
|
||||
1: SignalResponse_Message.join,
|
||||
2: SignalResponse_Message.answer,
|
||||
3: SignalResponse_Message.offer,
|
||||
@@ -304,40 +339,74 @@ class SignalResponse extends $pb.GeneratedMessage {
|
||||
0: SignalResponse_Message.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignalResponse',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'SignalResponse',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..oo(0, [1, 2, 3, 4, 5, 6, 8, 9, 10, 11])
|
||||
..aOM<JoinResponse>(
|
||||
1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'join',
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'join',
|
||||
subBuilder: JoinResponse.create)
|
||||
..aOM<SessionDescription>(
|
||||
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'answer',
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'answer',
|
||||
subBuilder: SessionDescription.create)
|
||||
..aOM<SessionDescription>(
|
||||
3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'offer',
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'offer',
|
||||
subBuilder: SessionDescription.create)
|
||||
..aOM<TrickleRequest>(
|
||||
4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trickle',
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trickle',
|
||||
subBuilder: TrickleRequest.create)
|
||||
..aOM<ParticipantUpdate>(
|
||||
5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'update',
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'update',
|
||||
subBuilder: ParticipantUpdate.create)
|
||||
..aOM<TrackPublishedResponse>(
|
||||
6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackPublished',
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trackPublished',
|
||||
subBuilder: TrackPublishedResponse.create)
|
||||
..aOM<LeaveRequest>(
|
||||
8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'leave',
|
||||
8,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'leave',
|
||||
subBuilder: LeaveRequest.create)
|
||||
..aOM<MuteTrackRequest>(
|
||||
9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mute',
|
||||
9,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'mute',
|
||||
subBuilder: MuteTrackRequest.create)
|
||||
..aOM<SpeakersChanged>(
|
||||
10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'speakersChanged',
|
||||
10,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'speakersChanged',
|
||||
subBuilder: SpeakersChanged.create)
|
||||
..aOM<RoomUpdate>(
|
||||
11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'roomUpdate',
|
||||
11,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'roomUpdate',
|
||||
subBuilder: RoomUpdate.create)
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@@ -407,13 +476,15 @@ class SignalResponse extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignalResponse create() => SignalResponse._();
|
||||
SignalResponse createEmptyInstance() => create();
|
||||
static $pb.PbList<SignalResponse> createRepeated() => $pb.PbList<SignalResponse>();
|
||||
static $pb.PbList<SignalResponse> createRepeated() =>
|
||||
$pb.PbList<SignalResponse>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignalResponse getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignalResponse>(create);
|
||||
static SignalResponse getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SignalResponse>(create);
|
||||
static SignalResponse? _defaultInstance;
|
||||
|
||||
SignalResponse_Message whichMessage() => _SignalResponse_MessageByTag[$_whichOneof(0)]!;
|
||||
SignalResponse_Message whichMessage() =>
|
||||
_SignalResponse_MessageByTag[$_whichOneof(0)]!;
|
||||
void clearMessage() => clearField($_whichOneof(0));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -559,24 +630,50 @@ class SignalResponse extends $pb.GeneratedMessage {
|
||||
|
||||
class AddTrackRequest extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AddTrackRequest',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'AddTrackRequest',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cid')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'cid')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'name')
|
||||
..e<$0.TrackType>(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'type',
|
||||
$pb.PbFieldType.OE,
|
||||
defaultOrMaker: $0.TrackType.AUDIO,
|
||||
valueOf: $0.TrackType.valueOf,
|
||||
enumValues: $0.TrackType.values)
|
||||
..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'width',
|
||||
..a<$core.int>(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'width',
|
||||
$pb.PbFieldType.OU3)
|
||||
..a<$core.int>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height',
|
||||
..a<$core.int>(
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'height',
|
||||
$pb.PbFieldType.OU3)
|
||||
..aOB(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'muted')
|
||||
..aOB(
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'muted')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
AddTrackRequest._() : super();
|
||||
@@ -629,10 +726,11 @@ class AddTrackRequest extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static AddTrackRequest create() => AddTrackRequest._();
|
||||
AddTrackRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<AddTrackRequest> createRepeated() => $pb.PbList<AddTrackRequest>();
|
||||
static $pb.PbList<AddTrackRequest> createRepeated() =>
|
||||
$pb.PbList<AddTrackRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static AddTrackRequest getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<AddTrackRequest>(create);
|
||||
static AddTrackRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<AddTrackRequest>(create);
|
||||
static AddTrackRequest? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -710,15 +808,25 @@ class AddTrackRequest extends $pb.GeneratedMessage {
|
||||
|
||||
class TrickleRequest extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TrickleRequest',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'TrickleRequest',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'candidateInit',
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'candidateInit',
|
||||
protoName: 'candidateInit')
|
||||
..e<SignalTarget>(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'target',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'target',
|
||||
$pb.PbFieldType.OE,
|
||||
defaultOrMaker: SignalTarget.PUBLISHER,
|
||||
valueOf: SignalTarget.valueOf,
|
||||
@@ -759,10 +867,11 @@ class TrickleRequest extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TrickleRequest create() => TrickleRequest._();
|
||||
TrickleRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<TrickleRequest> createRepeated() => $pb.PbList<TrickleRequest>();
|
||||
static $pb.PbList<TrickleRequest> createRepeated() =>
|
||||
$pb.PbList<TrickleRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TrickleRequest getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TrickleRequest>(create);
|
||||
static TrickleRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<TrickleRequest>(create);
|
||||
static TrickleRequest? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -792,12 +901,24 @@ class TrickleRequest extends $pb.GeneratedMessage {
|
||||
|
||||
class MuteTrackRequest extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'MuteTrackRequest',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'MuteTrackRequest',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
||||
..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'muted')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'sid')
|
||||
..aOB(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'muted')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
MuteTrackRequest._() : super();
|
||||
@@ -834,10 +955,11 @@ class MuteTrackRequest extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static MuteTrackRequest create() => MuteTrackRequest._();
|
||||
MuteTrackRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<MuteTrackRequest> createRepeated() => $pb.PbList<MuteTrackRequest>();
|
||||
static $pb.PbList<MuteTrackRequest> createRepeated() =>
|
||||
$pb.PbList<MuteTrackRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static MuteTrackRequest getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<MuteTrackRequest>(create);
|
||||
static MuteTrackRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<MuteTrackRequest>(create);
|
||||
static MuteTrackRequest? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -867,14 +989,24 @@ class MuteTrackRequest extends $pb.GeneratedMessage {
|
||||
|
||||
class SetSimulcastLayers extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SetSimulcastLayers',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'SetSimulcastLayers',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackSid')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trackSid')
|
||||
..pc<VideoQuality>(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'layers',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'layers',
|
||||
$pb.PbFieldType.PE,
|
||||
valueOf: VideoQuality.valueOf,
|
||||
enumValues: VideoQuality.values)
|
||||
@@ -914,10 +1046,11 @@ class SetSimulcastLayers extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SetSimulcastLayers create() => SetSimulcastLayers._();
|
||||
SetSimulcastLayers createEmptyInstance() => create();
|
||||
static $pb.PbList<SetSimulcastLayers> createRepeated() => $pb.PbList<SetSimulcastLayers>();
|
||||
static $pb.PbList<SetSimulcastLayers> createRepeated() =>
|
||||
$pb.PbList<SetSimulcastLayers>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SetSimulcastLayers getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SetSimulcastLayers>(create);
|
||||
static SetSimulcastLayers getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SetSimulcastLayers>(create);
|
||||
static SetSimulcastLayers? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -938,28 +1071,50 @@ class SetSimulcastLayers extends $pb.GeneratedMessage {
|
||||
|
||||
class JoinResponse extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'JoinResponse',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'JoinResponse',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOM<$0.Room>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'room',
|
||||
..aOM<$0.Room>(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'room',
|
||||
subBuilder: $0.Room.create)
|
||||
..aOM<$0.ParticipantInfo>(
|
||||
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'participant',
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'participant',
|
||||
subBuilder: $0.ParticipantInfo.create)
|
||||
..pc<$0.ParticipantInfo>(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'otherParticipants',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'otherParticipants',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: $0.ParticipantInfo.create)
|
||||
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'serverVersion')
|
||||
..aOS(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'serverVersion')
|
||||
..pc<ICEServer>(
|
||||
5,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'iceServers',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'iceServers',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: ICEServer.create)
|
||||
..aOB(
|
||||
6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subscriberPrimary')
|
||||
6,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'subscriberPrimary')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
JoinResponse._() : super();
|
||||
@@ -1012,10 +1167,11 @@ class JoinResponse extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static JoinResponse create() => JoinResponse._();
|
||||
JoinResponse createEmptyInstance() => create();
|
||||
static $pb.PbList<JoinResponse> createRepeated() => $pb.PbList<JoinResponse>();
|
||||
static $pb.PbList<JoinResponse> createRepeated() =>
|
||||
$pb.PbList<JoinResponse>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static JoinResponse getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<JoinResponse>(create);
|
||||
static JoinResponse getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<JoinResponse>(create);
|
||||
static JoinResponse? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1083,11 +1239,20 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
||||
? ''
|
||||
: 'TrackPublishedResponse',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cid')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'cid')
|
||||
..aOM<$0.TrackInfo>(
|
||||
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'track',
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'track',
|
||||
subBuilder: $0.TrackInfo.create)
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@@ -1114,11 +1279,13 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
TrackPublishedResponse clone() => TrackPublishedResponse()..mergeFromMessage(this);
|
||||
TrackPublishedResponse clone() =>
|
||||
TrackPublishedResponse()..mergeFromMessage(this);
|
||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
TrackPublishedResponse copyWith(void Function(TrackPublishedResponse) updates) =>
|
||||
TrackPublishedResponse copyWith(
|
||||
void Function(TrackPublishedResponse) updates) =>
|
||||
super.copyWith((message) => updates(message as TrackPublishedResponse))
|
||||
as TrackPublishedResponse; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@@ -1128,8 +1295,8 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
||||
static $pb.PbList<TrackPublishedResponse> createRepeated() =>
|
||||
$pb.PbList<TrackPublishedResponse>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TrackPublishedResponse getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TrackPublishedResponse>(create);
|
||||
static TrackPublishedResponse getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<TrackPublishedResponse>(create);
|
||||
static TrackPublishedResponse? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1161,12 +1328,24 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
||||
|
||||
class SessionDescription extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SessionDescription',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'SessionDescription',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdp')
|
||||
..aOS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'type')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'sdp')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
SessionDescription._() : super();
|
||||
@@ -1203,10 +1382,11 @@ class SessionDescription extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SessionDescription create() => SessionDescription._();
|
||||
SessionDescription createEmptyInstance() => create();
|
||||
static $pb.PbList<SessionDescription> createRepeated() => $pb.PbList<SessionDescription>();
|
||||
static $pb.PbList<SessionDescription> createRepeated() =>
|
||||
$pb.PbList<SessionDescription>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SessionDescription getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SessionDescription>(create);
|
||||
static SessionDescription getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SessionDescription>(create);
|
||||
static SessionDescription? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1236,13 +1416,19 @@ class SessionDescription extends $pb.GeneratedMessage {
|
||||
|
||||
class ParticipantUpdate extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ParticipantUpdate',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'ParticipantUpdate',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..pc<$0.ParticipantInfo>(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'participants',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'participants',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: $0.ParticipantInfo.create)
|
||||
..hasRequiredFields = false;
|
||||
@@ -1277,10 +1463,11 @@ class ParticipantUpdate extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ParticipantUpdate create() => ParticipantUpdate._();
|
||||
ParticipantUpdate createEmptyInstance() => create();
|
||||
static $pb.PbList<ParticipantUpdate> createRepeated() => $pb.PbList<ParticipantUpdate>();
|
||||
static $pb.PbList<ParticipantUpdate> createRepeated() =>
|
||||
$pb.PbList<ParticipantUpdate>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ParticipantUpdate getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ParticipantUpdate>(create);
|
||||
static ParticipantUpdate getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<ParticipantUpdate>(create);
|
||||
static ParticipantUpdate? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1289,12 +1476,24 @@ class ParticipantUpdate extends $pb.GeneratedMessage {
|
||||
|
||||
class UpdateSubscription extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateSubscription',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'UpdateSubscription',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackSids')
|
||||
..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subscribe')
|
||||
..pPS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trackSids')
|
||||
..aOB(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'subscribe')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
UpdateSubscription._() : super();
|
||||
@@ -1331,10 +1530,11 @@ class UpdateSubscription extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateSubscription create() => UpdateSubscription._();
|
||||
UpdateSubscription createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateSubscription> createRepeated() => $pb.PbList<UpdateSubscription>();
|
||||
static $pb.PbList<UpdateSubscription> createRepeated() =>
|
||||
$pb.PbList<UpdateSubscription>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateSubscription getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateSubscription>(create);
|
||||
static UpdateSubscription getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<UpdateSubscription>(create);
|
||||
static UpdateSubscription? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1355,15 +1555,29 @@ class UpdateSubscription extends $pb.GeneratedMessage {
|
||||
|
||||
class UpdateTrackSettings extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateTrackSettings',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'UpdateTrackSettings',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackSids')
|
||||
..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'disabled')
|
||||
..pPS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'trackSids')
|
||||
..aOB(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'disabled')
|
||||
..e<VideoQuality>(
|
||||
4,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'quality',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'quality',
|
||||
$pb.PbFieldType.OE,
|
||||
defaultOrMaker: VideoQuality.LOW,
|
||||
valueOf: VideoQuality.valueOf,
|
||||
@@ -1408,10 +1622,11 @@ class UpdateTrackSettings extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateTrackSettings create() => UpdateTrackSettings._();
|
||||
UpdateTrackSettings createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateTrackSettings> createRepeated() => $pb.PbList<UpdateTrackSettings>();
|
||||
static $pb.PbList<UpdateTrackSettings> createRepeated() =>
|
||||
$pb.PbList<UpdateTrackSettings>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateTrackSettings getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateTrackSettings>(create);
|
||||
static UpdateTrackSettings getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<UpdateTrackSettings>(create);
|
||||
static UpdateTrackSettings? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1444,11 +1659,19 @@ class UpdateTrackSettings extends $pb.GeneratedMessage {
|
||||
|
||||
class LeaveRequest extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LeaveRequest',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'LeaveRequest',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'canReconnect')
|
||||
..aOB(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'canReconnect')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
LeaveRequest._() : super();
|
||||
@@ -1481,10 +1704,11 @@ class LeaveRequest extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static LeaveRequest create() => LeaveRequest._();
|
||||
LeaveRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<LeaveRequest> createRepeated() => $pb.PbList<LeaveRequest>();
|
||||
static $pb.PbList<LeaveRequest> createRepeated() =>
|
||||
$pb.PbList<LeaveRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static LeaveRequest getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<LeaveRequest>(create);
|
||||
static LeaveRequest getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<LeaveRequest>(create);
|
||||
static LeaveRequest? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1502,13 +1726,29 @@ class LeaveRequest extends $pb.GeneratedMessage {
|
||||
|
||||
class ICEServer extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ICEServer',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'ICEServer',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'urls')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'username')
|
||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'credential')
|
||||
..pPS(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'urls')
|
||||
..aOS(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'username')
|
||||
..aOS(
|
||||
3,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'credential')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
ICEServer._() : super();
|
||||
@@ -1585,13 +1825,19 @@ class ICEServer extends $pb.GeneratedMessage {
|
||||
|
||||
class SpeakersChanged extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SpeakersChanged',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'SpeakersChanged',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..pc<$0.SpeakerInfo>(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'speakers',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'speakers',
|
||||
$pb.PbFieldType.PM,
|
||||
subBuilder: $0.SpeakerInfo.create)
|
||||
..hasRequiredFields = false;
|
||||
@@ -1626,10 +1872,11 @@ class SpeakersChanged extends $pb.GeneratedMessage {
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SpeakersChanged create() => SpeakersChanged._();
|
||||
SpeakersChanged createEmptyInstance() => create();
|
||||
static $pb.PbList<SpeakersChanged> createRepeated() => $pb.PbList<SpeakersChanged>();
|
||||
static $pb.PbList<SpeakersChanged> createRepeated() =>
|
||||
$pb.PbList<SpeakersChanged>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SpeakersChanged getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SpeakersChanged>(create);
|
||||
static SpeakersChanged getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<SpeakersChanged>(create);
|
||||
static SpeakersChanged? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@@ -1638,11 +1885,19 @@ class SpeakersChanged extends $pb.GeneratedMessage {
|
||||
|
||||
class RoomUpdate extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RoomUpdate',
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'RoomUpdate',
|
||||
package: const $pb.PackageName(
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
||||
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||
? ''
|
||||
: 'livekit'),
|
||||
createEmptyInstance: create)
|
||||
..aOM<$0.Room>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'room',
|
||||
..aOM<$0.Room>(
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||
? ''
|
||||
: 'room',
|
||||
subBuilder: $0.Room.create)
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@@ -1678,8 +1933,8 @@ class RoomUpdate extends $pb.GeneratedMessage {
|
||||
RoomUpdate createEmptyInstance() => create();
|
||||
static $pb.PbList<RoomUpdate> createRepeated() => $pb.PbList<RoomUpdate>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RoomUpdate getDefault() =>
|
||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RoomUpdate>(create);
|
||||
static RoomUpdate getDefault() => _defaultInstance ??=
|
||||
$pb.GeneratedMessage.$_defaultFor<RoomUpdate>(create);
|
||||
static RoomUpdate? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
|
||||
@@ -11,28 +11,44 @@ import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
class SignalTarget extends $pb.ProtobufEnum {
|
||||
static const SignalTarget PUBLISHER = SignalTarget._(
|
||||
0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PUBLISHER');
|
||||
0,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'PUBLISHER');
|
||||
static const SignalTarget SUBSCRIBER = SignalTarget._(
|
||||
1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SUBSCRIBER');
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'SUBSCRIBER');
|
||||
|
||||
static const $core.List<SignalTarget> values = <SignalTarget>[
|
||||
PUBLISHER,
|
||||
SUBSCRIBER,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, SignalTarget> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static final $core.Map<$core.int, SignalTarget> _byValue =
|
||||
$pb.ProtobufEnum.initByValue(values);
|
||||
static SignalTarget? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const SignalTarget._($core.int v, $core.String n) : super(v, n);
|
||||
}
|
||||
|
||||
class VideoQuality extends $pb.ProtobufEnum {
|
||||
static const VideoQuality LOW =
|
||||
VideoQuality._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'LOW');
|
||||
static const VideoQuality LOW = VideoQuality._(
|
||||
0,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'LOW');
|
||||
static const VideoQuality MEDIUM = VideoQuality._(
|
||||
1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'MEDIUM');
|
||||
static const VideoQuality HIGH =
|
||||
VideoQuality._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'HIGH');
|
||||
1,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'MEDIUM');
|
||||
static const VideoQuality HIGH = VideoQuality._(
|
||||
2,
|
||||
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||
? ''
|
||||
: 'HIGH');
|
||||
|
||||
static const $core.List<VideoQuality> values = <VideoQuality>[
|
||||
LOW,
|
||||
@@ -40,7 +56,8 @@ class VideoQuality extends $pb.ProtobufEnum {
|
||||
HIGH,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, VideoQuality> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static final $core.Map<$core.int, VideoQuality> _byValue =
|
||||
$pb.ProtobufEnum.initByValue(values);
|
||||
static VideoQuality? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const VideoQuality._($core.int v, $core.String n) : super(v, n);
|
||||
|
||||
@@ -19,8 +19,8 @@ const SignalTarget$json = const {
|
||||
};
|
||||
|
||||
/// Descriptor for `SignalTarget`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||
final $typed_data.Uint8List signalTargetDescriptor =
|
||||
$convert.base64Decode('CgxTaWduYWxUYXJnZXQSDQoJUFVCTElTSEVSEAASDgoKU1VCU0NSSUJFUhAB');
|
||||
final $typed_data.Uint8List signalTargetDescriptor = $convert.base64Decode(
|
||||
'CgxTaWduYWxUYXJnZXQSDQoJUFVCTElTSEVSEAASDgoKU1VCU0NSSUJFUhAB');
|
||||
@$core.Deprecated('Use videoQualityDescriptor instead')
|
||||
const VideoQuality$json = const {
|
||||
'1': 'VideoQuality',
|
||||
@@ -32,8 +32,8 @@ const VideoQuality$json = const {
|
||||
};
|
||||
|
||||
/// Descriptor for `VideoQuality`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||
final $typed_data.Uint8List videoQualityDescriptor =
|
||||
$convert.base64Decode('CgxWaWRlb1F1YWxpdHkSBwoDTE9XEAASCgoGTUVESVVNEAESCAoESElHSBAC');
|
||||
final $typed_data.Uint8List videoQualityDescriptor = $convert.base64Decode(
|
||||
'CgxWaWRlb1F1YWxpdHkSBwoDTE9XEAASCgoGTUVESVVNEAESCAoESElHSBAC');
|
||||
@$core.Deprecated('Use signalRequestDescriptor instead')
|
||||
const SignalRequest$json = const {
|
||||
'1': 'SignalRequest',
|
||||
@@ -237,7 +237,14 @@ const AddTrackRequest$json = const {
|
||||
'2': const [
|
||||
const {'1': 'cid', '3': 1, '4': 1, '5': 9, '10': 'cid'},
|
||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||
const {'1': 'type', '3': 3, '4': 1, '5': 14, '6': '.livekit.TrackType', '10': 'type'},
|
||||
const {
|
||||
'1': 'type',
|
||||
'3': 3,
|
||||
'4': 1,
|
||||
'5': 14,
|
||||
'6': '.livekit.TrackType',
|
||||
'10': 'type'
|
||||
},
|
||||
const {'1': 'width', '3': 4, '4': 1, '5': 13, '10': 'width'},
|
||||
const {'1': 'height', '3': 5, '4': 1, '5': 13, '10': 'height'},
|
||||
const {'1': 'muted', '3': 6, '4': 1, '5': 8, '10': 'muted'},
|
||||
@@ -252,7 +259,14 @@ const TrickleRequest$json = const {
|
||||
'1': 'TrickleRequest',
|
||||
'2': const [
|
||||
const {'1': 'candidateInit', '3': 1, '4': 1, '5': 9, '10': 'candidateInit'},
|
||||
const {'1': 'target', '3': 2, '4': 1, '5': 14, '6': '.livekit.SignalTarget', '10': 'target'},
|
||||
const {
|
||||
'1': 'target',
|
||||
'3': 2,
|
||||
'4': 1,
|
||||
'5': 14,
|
||||
'6': '.livekit.SignalTarget',
|
||||
'10': 'target'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -276,7 +290,14 @@ const SetSimulcastLayers$json = const {
|
||||
'1': 'SetSimulcastLayers',
|
||||
'2': const [
|
||||
const {'1': 'track_sid', '3': 1, '4': 1, '5': 9, '10': 'trackSid'},
|
||||
const {'1': 'layers', '3': 2, '4': 3, '5': 14, '6': '.livekit.VideoQuality', '10': 'layers'},
|
||||
const {
|
||||
'1': 'layers',
|
||||
'3': 2,
|
||||
'4': 3,
|
||||
'5': 14,
|
||||
'6': '.livekit.VideoQuality',
|
||||
'10': 'layers'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -287,7 +308,14 @@ final $typed_data.Uint8List setSimulcastLayersDescriptor = $convert.base64Decode
|
||||
const JoinResponse$json = const {
|
||||
'1': 'JoinResponse',
|
||||
'2': const [
|
||||
const {'1': 'room', '3': 1, '4': 1, '5': 11, '6': '.livekit.Room', '10': 'room'},
|
||||
const {
|
||||
'1': 'room',
|
||||
'3': 1,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.livekit.Room',
|
||||
'10': 'room'
|
||||
},
|
||||
const {
|
||||
'1': 'participant',
|
||||
'3': 2,
|
||||
@@ -304,7 +332,13 @@ const JoinResponse$json = const {
|
||||
'6': '.livekit.ParticipantInfo',
|
||||
'10': 'otherParticipants'
|
||||
},
|
||||
const {'1': 'server_version', '3': 4, '4': 1, '5': 9, '10': 'serverVersion'},
|
||||
const {
|
||||
'1': 'server_version',
|
||||
'3': 4,
|
||||
'4': 1,
|
||||
'5': 9,
|
||||
'10': 'serverVersion'
|
||||
},
|
||||
const {
|
||||
'1': 'ice_servers',
|
||||
'3': 5,
|
||||
@@ -313,7 +347,13 @@ const JoinResponse$json = const {
|
||||
'6': '.livekit.ICEServer',
|
||||
'10': 'iceServers'
|
||||
},
|
||||
const {'1': 'subscriber_primary', '3': 6, '4': 1, '5': 8, '10': 'subscriberPrimary'},
|
||||
const {
|
||||
'1': 'subscriber_primary',
|
||||
'3': 6,
|
||||
'4': 1,
|
||||
'5': 8,
|
||||
'10': 'subscriberPrimary'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -325,13 +365,21 @@ const TrackPublishedResponse$json = const {
|
||||
'1': 'TrackPublishedResponse',
|
||||
'2': const [
|
||||
const {'1': 'cid', '3': 1, '4': 1, '5': 9, '10': 'cid'},
|
||||
const {'1': 'track', '3': 2, '4': 1, '5': 11, '6': '.livekit.TrackInfo', '10': 'track'},
|
||||
const {
|
||||
'1': 'track',
|
||||
'3': 2,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.livekit.TrackInfo',
|
||||
'10': 'track'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `TrackPublishedResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List trackPublishedResponseDescriptor = $convert.base64Decode(
|
||||
'ChZUcmFja1B1Ymxpc2hlZFJlc3BvbnNlEhAKA2NpZBgBIAEoCVIDY2lkEigKBXRyYWNrGAIgASgLMhIubGl2ZWtpdC5UcmFja0luZm9SBXRyYWNr');
|
||||
final $typed_data.Uint8List trackPublishedResponseDescriptor =
|
||||
$convert.base64Decode(
|
||||
'ChZUcmFja1B1Ymxpc2hlZFJlc3BvbnNlEhAKA2NpZBgBIAEoCVIDY2lkEigKBXRyYWNrGAIgASgLMhIubGl2ZWtpdC5UcmFja0luZm9SBXRyYWNr');
|
||||
@$core.Deprecated('Use sessionDescriptionDescriptor instead')
|
||||
const SessionDescription$json = const {
|
||||
'1': 'SessionDescription',
|
||||
@@ -380,7 +428,14 @@ const UpdateTrackSettings$json = const {
|
||||
'2': const [
|
||||
const {'1': 'track_sids', '3': 1, '4': 3, '5': 9, '10': 'trackSids'},
|
||||
const {'1': 'disabled', '3': 3, '4': 1, '5': 8, '10': 'disabled'},
|
||||
const {'1': 'quality', '3': 4, '4': 1, '5': 14, '6': '.livekit.VideoQuality', '10': 'quality'},
|
||||
const {
|
||||
'1': 'quality',
|
||||
'3': 4,
|
||||
'4': 1,
|
||||
'5': 14,
|
||||
'6': '.livekit.VideoQuality',
|
||||
'10': 'quality'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -396,8 +451,8 @@ const LeaveRequest$json = const {
|
||||
};
|
||||
|
||||
/// Descriptor for `LeaveRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List leaveRequestDescriptor =
|
||||
$convert.base64Decode('CgxMZWF2ZVJlcXVlc3QSIwoNY2FuX3JlY29ubmVjdBgBIAEoCFIMY2FuUmVjb25uZWN0');
|
||||
final $typed_data.Uint8List leaveRequestDescriptor = $convert.base64Decode(
|
||||
'CgxMZWF2ZVJlcXVlc3QSIwoNY2FuX3JlY29ubmVjdBgBIAEoCFIMY2FuUmVjb25uZWN0');
|
||||
@$core.Deprecated('Use iCEServerDescriptor instead')
|
||||
const ICEServer$json = const {
|
||||
'1': 'ICEServer',
|
||||
@@ -415,7 +470,14 @@ final $typed_data.Uint8List iCEServerDescriptor = $convert.base64Decode(
|
||||
const SpeakersChanged$json = const {
|
||||
'1': 'SpeakersChanged',
|
||||
'2': const [
|
||||
const {'1': 'speakers', '3': 1, '4': 3, '5': 11, '6': '.livekit.SpeakerInfo', '10': 'speakers'},
|
||||
const {
|
||||
'1': 'speakers',
|
||||
'3': 1,
|
||||
'4': 3,
|
||||
'5': 11,
|
||||
'6': '.livekit.SpeakerInfo',
|
||||
'10': 'speakers'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -426,10 +488,17 @@ final $typed_data.Uint8List speakersChangedDescriptor = $convert.base64Decode(
|
||||
const RoomUpdate$json = const {
|
||||
'1': 'RoomUpdate',
|
||||
'2': const [
|
||||
const {'1': 'room', '3': 1, '4': 1, '5': 11, '6': '.livekit.Room', '10': 'room'},
|
||||
const {
|
||||
'1': 'room',
|
||||
'3': 1,
|
||||
'4': 1,
|
||||
'5': 11,
|
||||
'6': '.livekit.Room',
|
||||
'10': 'room'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `RoomUpdate`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List roomUpdateDescriptor =
|
||||
$convert.base64Decode('CgpSb29tVXBkYXRlEiEKBHJvb20YASABKAsyDS5saXZla2l0LlJvb21SBHJvb20=');
|
||||
final $typed_data.Uint8List roomUpdateDescriptor = $convert.base64Decode(
|
||||
'CgpSb29tVXBkYXRlEiEKBHJvb20YASABKAsyDS5saXZla2l0LlJvb21SBHJvb20=');
|
||||
|
||||
+14
-7
@@ -121,7 +121,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
||||
options: options,
|
||||
);
|
||||
|
||||
logger.fine('Connected to LiveKit server, version: ${joinResponse.serverVersion}');
|
||||
logger.fine(
|
||||
'Connected to LiveKit server, version: ${joinResponse.serverVersion}');
|
||||
|
||||
// create Room first to listen to events
|
||||
room = Room._(
|
||||
@@ -165,10 +166,12 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
||||
events.emit(const RoomReconnectingEvent());
|
||||
})
|
||||
..on<EngineDisconnectedEvent>((event) => _handleClose())
|
||||
..on<SignalParticipantUpdateEvent>((event) => _onParticipantUpdateEvent(event.participants))
|
||||
..on<SignalParticipantUpdateEvent>(
|
||||
(event) => _onParticipantUpdateEvent(event.participants))
|
||||
..on<EngineActiveSpeakersUpdateEvent>(
|
||||
(event) => _onEngineActiveSpeakersUpdateEvent(event.speakers))
|
||||
..on<SignalSpeakersChangedEvent>((event) => _onSignalSpeakersChangedEvent(event.speakers))
|
||||
..on<SignalSpeakersChangedEvent>(
|
||||
(event) => _onSignalSpeakersChangedEvent(event.speakers))
|
||||
..on<EngineDataPacketReceivedEvent>(_onDataMessageEvent)
|
||||
..on<EngineRemoteMuteChangedEvent>((event) async {
|
||||
final track = localParticipant.trackPublications[event.sid];
|
||||
@@ -196,7 +199,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
||||
[participant.roomEvents, participant.events].emit(event);
|
||||
} catch (exception) {
|
||||
// We don't want to pass up any exception so catch everything here.
|
||||
logger.warning('Unknown exception on addSubscribedMediaTrack() ${exception}');
|
||||
logger.warning(
|
||||
'Unknown exception on addSubscribedMediaTrack() ${exception}');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -212,7 +216,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
||||
await engine.reconnect();
|
||||
}
|
||||
|
||||
RemoteParticipant _getOrCreateRemoteParticipant(String sid, lk_models.ParticipantInfo? info) {
|
||||
RemoteParticipant _getOrCreateRemoteParticipant(
|
||||
String sid, lk_models.ParticipantInfo? info) {
|
||||
RemoteParticipant? participant = _participants[sid];
|
||||
if (participant != null) {
|
||||
return participant;
|
||||
@@ -267,7 +272,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onParticipantUpdateEvent(List<lk_models.ParticipantInfo> updates) async {
|
||||
Future<void> _onParticipantUpdateEvent(
|
||||
List<lk_models.ParticipantInfo> updates) async {
|
||||
// trigger change notifier only if list of participants membership is changed
|
||||
var hasChanged = false;
|
||||
for (final info in updates) {
|
||||
@@ -326,7 +332,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
||||
|
||||
// from data channel
|
||||
// updates are sent only when there's a change to speaker ordering
|
||||
void _onEngineActiveSpeakersUpdateEvent(List<lk_models.SpeakerInfo> speakers) {
|
||||
void _onEngineActiveSpeakersUpdateEvent(
|
||||
List<lk_models.SpeakerInfo> speakers) {
|
||||
List<Participant> activeSpeakers = [];
|
||||
|
||||
// localParticipant & remote participants
|
||||
|
||||
+40
-23
@@ -74,7 +74,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
}) : signalClient = signalClient ?? SignalClient() {
|
||||
if (kDebugMode) {
|
||||
// log all EngineEvents
|
||||
events.listen((event) => logger.fine('[EngineEvent] $objectId ${event.runtimeType}'));
|
||||
events.listen((event) =>
|
||||
logger.fine('[EngineEvent] $objectId ${event.runtimeType}'));
|
||||
}
|
||||
|
||||
_setUpListeners();
|
||||
@@ -137,7 +138,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
TrackDimension? dimension,
|
||||
}) async {
|
||||
// send request to add track
|
||||
signalClient.sendAddTrack(cid: cid, name: name, type: kind, dimension: dimension);
|
||||
signalClient.sendAddTrack(
|
||||
cid: cid, name: name, type: kind, dimension: dimension);
|
||||
|
||||
// wait for response, or timeout
|
||||
final event = await _signalListener.waitFor<SignalLocalTrackPublishedEvent>(
|
||||
@@ -165,11 +167,13 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
// make sure we do have a data connection
|
||||
await _ensurePublisherConnected();
|
||||
|
||||
final dcMessage = rtc.RTCDataChannelMessage.fromBinary(packet.writeToBuffer());
|
||||
final dcMessage =
|
||||
rtc.RTCDataChannelMessage.fromBinary(packet.writeToBuffer());
|
||||
|
||||
if (packet.kind == lk_models.DataPacket_Kind.LOSSY && _lossyDC != null) {
|
||||
await _lossyDC?.send(dcMessage);
|
||||
} else if (packet.kind == lk_models.DataPacket_Kind.RELIABLE && _reliableDC != null) {
|
||||
} else if (packet.kind == lk_models.DataPacket_Kind.RELIABLE &&
|
||||
_reliableDC != null) {
|
||||
await _reliableDC?.send(dcMessage);
|
||||
}
|
||||
}
|
||||
@@ -231,7 +235,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
// await negotiate(iceRestart: true);
|
||||
if (_hasPublished) {
|
||||
logger.fine('reconnect: publisher.createAndSendOffer');
|
||||
await publisher!.createAndSendOffer(const RTCOfferOptions(iceRestart: true));
|
||||
await publisher!
|
||||
.createAndSendOffer(const RTCOfferOptions(iceRestart: true));
|
||||
}
|
||||
|
||||
if (!(primary?.pc.iceConnectionState?.isConnected() ?? false)) {
|
||||
@@ -263,9 +268,11 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
|
||||
RTCConfiguration? config;
|
||||
// use server-provided iceServers if not provided by user
|
||||
if ((rtcConfig?.iceServers?.isEmpty ?? true) && _providedIceServers.isNotEmpty) {
|
||||
if ((rtcConfig?.iceServers?.isEmpty ?? true) &&
|
||||
_providedIceServers.isNotEmpty) {
|
||||
final iceServers = _providedIceServers.map((e) => e.toSDKType()).toList();
|
||||
config = (rtcConfig ?? const RTCConfiguration()).copyWith(iceServers: iceServers);
|
||||
config = (rtcConfig ?? const RTCConfiguration())
|
||||
.copyWith(iceServers: iceServers);
|
||||
}
|
||||
|
||||
publisher = await PCTransport.create(config);
|
||||
@@ -297,16 +304,18 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
isPrimary: _subscriberPrimary,
|
||||
));
|
||||
|
||||
publisher?.pc.onIceConnectionState = (state) => events.emit(EnginePublisherIceStateUpdatedEvent(
|
||||
state: state,
|
||||
isPrimary: !_subscriberPrimary,
|
||||
));
|
||||
publisher?.pc.onIceConnectionState =
|
||||
(state) => events.emit(EnginePublisherIceStateUpdatedEvent(
|
||||
state: state,
|
||||
isPrimary: !_subscriberPrimary,
|
||||
));
|
||||
|
||||
events.on<EngineIceStateUpdatedEvent>((event) {
|
||||
// only listen to primary ice events
|
||||
if (!event.isPrimary) return;
|
||||
|
||||
if (event.iceState == rtc.RTCIceConnectionState.RTCIceConnectionStateConnected) {
|
||||
if (event.iceState ==
|
||||
rtc.RTCIceConnectionState.RTCIceConnectionStateConnected) {
|
||||
if (!_iceConnected) {
|
||||
_iceConnected = true;
|
||||
if (_connectionState == ConnectionState.reconnecting) {
|
||||
@@ -315,7 +324,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
events.emit(const EngineConnectedEvent());
|
||||
}
|
||||
}
|
||||
} else if (event.iceState == rtc.RTCIceConnectionState.RTCIceConnectionStateFailed) {
|
||||
} else if (event.iceState ==
|
||||
rtc.RTCIceConnectionState.RTCIceConnectionStateFailed) {
|
||||
// trigger reconnect sequence
|
||||
if (_iceConnected) {
|
||||
_iceConnected = false;
|
||||
@@ -345,7 +355,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
..binaryType = 'binary'
|
||||
..ordered = true
|
||||
..maxRetransmits = 0;
|
||||
_lossyDC = await publisher?.pc.createDataChannel(_lossyDCLabel, lossyInit);
|
||||
_lossyDC =
|
||||
await publisher?.pc.createDataChannel(_lossyDCLabel, lossyInit);
|
||||
_lossyDC?.onMessage = _onDCMessage;
|
||||
} catch (_) {
|
||||
logger.severe('[$objectId] createDataChannel() did throw $_');
|
||||
@@ -355,7 +366,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
final reliableInit = rtc.RTCDataChannelInit()
|
||||
..binaryType = 'binary'
|
||||
..ordered = true;
|
||||
_reliableDC = await publisher?.pc.createDataChannel(_reliableDCLabel, reliableInit);
|
||||
_reliableDC =
|
||||
await publisher?.pc.createDataChannel(_reliableDCLabel, reliableInit);
|
||||
_reliableDC?.onMessage = _onDCMessage;
|
||||
} catch (_) {
|
||||
logger.severe('[$objectId] createDataChannel() did throw $_');
|
||||
@@ -390,7 +402,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
final dp = lk_models.DataPacket.fromBuffer(message.binary);
|
||||
if (dp.whichValue() == lk_models.DataPacket_Value.speaker) {
|
||||
// Speaker packet
|
||||
events.emit(EngineActiveSpeakersUpdateEvent(speakers: dp.speaker.speakers));
|
||||
events
|
||||
.emit(EngineActiveSpeakersUpdateEvent(speakers: dp.speaker.speakers));
|
||||
} else if (dp.whichValue() == lk_models.DataPacket_Value.user) {
|
||||
// User packet
|
||||
events.emit(EngineDataPacketReceivedEvent(
|
||||
@@ -409,13 +422,15 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
logger.fine('[$objectId] Disconnected $reason');
|
||||
|
||||
if (_reconnectAttempts >= _maxReconnectAttempts) {
|
||||
logger.info('[$objectId] Could not connect after ${_reconnectAttempts} attempts, giving up');
|
||||
logger.info(
|
||||
'[$objectId] Could not connect after ${_reconnectAttempts} attempts, giving up');
|
||||
await close();
|
||||
events.emit(const EngineDisconnectedEvent());
|
||||
return;
|
||||
}
|
||||
|
||||
final delay = Duration(milliseconds: (_reconnectAttempts * _reconnectAttempts) * 300);
|
||||
final delay =
|
||||
Duration(milliseconds: (_reconnectAttempts * _reconnectAttempts) * 300);
|
||||
|
||||
// if this instance is disposed, we probably don't want to continue any more
|
||||
// so the whole block will be canceled from being executed
|
||||
@@ -483,7 +498,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
})
|
||||
..on<SignalTrickleEvent>((event) async {
|
||||
if (publisher == null || subscriber == null) {
|
||||
logger.warning('Received ${SignalTrickleEvent} but publisher or subscriber was null.');
|
||||
logger.warning(
|
||||
'Received ${SignalTrickleEvent} but publisher or subscriber was null.');
|
||||
return;
|
||||
}
|
||||
logger.fine('got ICE candidate from peer');
|
||||
@@ -501,8 +517,9 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
await close();
|
||||
events.emit(const EngineDisconnectedEvent());
|
||||
})
|
||||
..on<SignalMuteTrackEvent>((event) => events.emit(EngineRemoteMuteChangedEvent(
|
||||
sid: event.sid,
|
||||
muted: event.muted,
|
||||
)));
|
||||
..on<SignalMuteTrackEvent>(
|
||||
(event) => events.emit(EngineRemoteMuteChangedEvent(
|
||||
sid: event.sid,
|
||||
muted: event.muted,
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -76,7 +76,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
// Attempt Validation
|
||||
try {
|
||||
final validateResponse = await http.get(validateUri);
|
||||
if (validateResponse.statusCode != 200) throw ConnectException(validateResponse.body);
|
||||
if (validateResponse.statusCode != 200)
|
||||
throw ConnectException(validateResponse.body);
|
||||
throw ConnectException();
|
||||
} catch (error) {
|
||||
// Pass it up if it's already a `ConnectError`
|
||||
@@ -126,15 +127,19 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
// await close();
|
||||
// }
|
||||
|
||||
void sendOffer(rtc.RTCSessionDescription offer) => _sendRequest(lk_rtc.SignalRequest(
|
||||
void sendOffer(rtc.RTCSessionDescription offer) =>
|
||||
_sendRequest(lk_rtc.SignalRequest(
|
||||
offer: offer.toSDKType(),
|
||||
));
|
||||
|
||||
void sendAnswer(rtc.RTCSessionDescription answer) => _sendRequest(lk_rtc.SignalRequest(
|
||||
void sendAnswer(rtc.RTCSessionDescription answer) =>
|
||||
_sendRequest(lk_rtc.SignalRequest(
|
||||
answer: answer.toSDKType(),
|
||||
));
|
||||
|
||||
void sendIceCandidate(rtc.RTCIceCandidate candidate, lk_rtc.SignalTarget target) => _sendRequest(
|
||||
void sendIceCandidate(
|
||||
rtc.RTCIceCandidate candidate, lk_rtc.SignalTarget target) =>
|
||||
_sendRequest(
|
||||
lk_rtc.SignalRequest(
|
||||
trickle: lk_rtc.TrickleRequest(
|
||||
candidateInit: candidate.toJson(),
|
||||
@@ -143,7 +148,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
),
|
||||
);
|
||||
|
||||
void sendMuteTrack(String trackSid, bool muted) => _sendRequest(lk_rtc.SignalRequest(
|
||||
void sendMuteTrack(String trackSid, bool muted) =>
|
||||
_sendRequest(lk_rtc.SignalRequest(
|
||||
mute: lk_rtc.MuteTrackRequest(
|
||||
sid: trackSid,
|
||||
muted: muted,
|
||||
@@ -180,7 +186,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
subscription: subscription,
|
||||
));
|
||||
|
||||
void sendSetSimulcastLayers(String trackSid, List<lk_rtc.VideoQuality> layers) =>
|
||||
void sendSetSimulcastLayers(
|
||||
String trackSid, List<lk_rtc.VideoQuality> layers) =>
|
||||
_sendRequest(lk_rtc.SignalRequest(
|
||||
simulcast: lk_rtc.SetSimulcastLayers(
|
||||
trackSid: trackSid,
|
||||
@@ -194,7 +201,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
|
||||
void _sendRequest(lk_rtc.SignalRequest req) {
|
||||
if (_ws == null || isDisposed) {
|
||||
logger.warning('[$objectId] Could not send message, not connected or already disposed');
|
||||
logger.warning(
|
||||
'[$objectId] Could not send message, not connected or already disposed');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -226,7 +234,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
));
|
||||
break;
|
||||
case lk_rtc.SignalResponse_Message.update:
|
||||
events.emit(SignalParticipantUpdateEvent(participants: msg.update.participants));
|
||||
events.emit(SignalParticipantUpdateEvent(
|
||||
participants: msg.update.participants));
|
||||
break;
|
||||
case lk_rtc.SignalResponse_Message.trackPublished:
|
||||
events.emit(SignalLocalTrackPublishedEvent(
|
||||
@@ -235,7 +244,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
||||
));
|
||||
break;
|
||||
case lk_rtc.SignalResponse_Message.speakersChanged:
|
||||
events.emit(SignalSpeakersChangedEvent(speakers: msg.speakersChanged.speakers));
|
||||
events.emit(
|
||||
SignalSpeakersChangedEvent(speakers: msg.speakersChanged.speakers));
|
||||
break;
|
||||
case lk_rtc.SignalResponse_Message.leave:
|
||||
events.emit(SignalLeaveEvent(canReconnect: msg.leave.canReconnect));
|
||||
|
||||
@@ -22,7 +22,8 @@ mixin _Disposer {
|
||||
logger.fine('[${objectId}] dispose()');
|
||||
_isDisposed = true;
|
||||
if (_disposeFuncs.isNotEmpty) {
|
||||
logger.fine('[$objectId] running ${_disposeFuncs.length} dispose funcs...');
|
||||
logger.fine(
|
||||
'[$objectId] running ${_disposeFuncs.length} dispose funcs...');
|
||||
// call dispose funcs in reverse order
|
||||
for (final _func in _disposeFuncs.reversed) {
|
||||
await _func();
|
||||
|
||||
@@ -87,11 +87,13 @@ class NativeAudioConfiguration {
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap() => <String, dynamic>{
|
||||
if (appleAudioCategory != null) 'appleAudioCategory': appleAudioCategory!.toStringValue(),
|
||||
if (appleAudioCategory != null)
|
||||
'appleAudioCategory': appleAudioCategory!.toStringValue(),
|
||||
if (appleAudioCategoryOptions != null)
|
||||
'appleAudioCategoryOptions':
|
||||
appleAudioCategoryOptions!.map((e) => e.toStringValue()).toList(),
|
||||
if (appleAudioMode != null) 'appleAudioMode': appleAudioMode!.toStringValue(),
|
||||
if (appleAudioMode != null)
|
||||
'appleAudioMode': appleAudioMode!.toStringValue(),
|
||||
};
|
||||
|
||||
NativeAudioConfiguration copyWith({
|
||||
@@ -101,14 +103,16 @@ class NativeAudioConfiguration {
|
||||
}) =>
|
||||
NativeAudioConfiguration(
|
||||
appleAudioCategory: appleAudioCategory ?? this.appleAudioCategory,
|
||||
appleAudioCategoryOptions: appleAudioCategoryOptions ?? this.appleAudioCategoryOptions,
|
||||
appleAudioCategoryOptions:
|
||||
appleAudioCategoryOptions ?? this.appleAudioCategoryOptions,
|
||||
appleAudioMode: appleAudioMode ?? this.appleAudioMode,
|
||||
);
|
||||
}
|
||||
|
||||
const _lkMethodChannel = MethodChannel('livekit_client');
|
||||
|
||||
Future<bool> configureNativeAudio(NativeAudioConfiguration configuration) async {
|
||||
Future<bool> configureNativeAudio(
|
||||
NativeAudioConfiguration configuration) async {
|
||||
try {
|
||||
final result = await _lkMethodChannel.invokeMethod<bool>(
|
||||
'configureNativeAudio',
|
||||
|
||||
@@ -37,7 +37,8 @@ class LiveKitWebSocketIO implements LiveKitWebSocket {
|
||||
void send(List<int> data) {
|
||||
// 0 CONNECTING, 1 OPEN, 2 CLOSING, 3 CLOSED
|
||||
if (_ws.readyState != 1) {
|
||||
logger.fine('[$objectId] Tried to send data (readyState: ${_ws.readyState})');
|
||||
logger.fine(
|
||||
'[$objectId] Tried to send data (readyState: ${_ws.readyState})');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,10 @@ class LiveKitWebSocketWeb implements LiveKitWebSocket {
|
||||
]) async {
|
||||
final completer = Completer<LiveKitWebSocketWeb>();
|
||||
final ws = html.WebSocket(uri.toString());
|
||||
ws.onOpen.listen((_) => completer.complete(LiveKitWebSocketWeb._(ws, options)));
|
||||
ws.onError.listen((_) => completer.completeError(WebSocketException.connect()));
|
||||
ws.onOpen
|
||||
.listen((_) => completer.complete(LiveKitWebSocketWeb._(ws, options)));
|
||||
ws.onError
|
||||
.listen((_) => completer.completeError(WebSocketException.connect()));
|
||||
return completer.future;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ enum AudioTrackState {
|
||||
localAndRemote,
|
||||
}
|
||||
|
||||
typedef ConfigureNativeAudioFunc = Future<NativeAudioConfiguration> Function(AudioTrackState state);
|
||||
typedef ConfigureNativeAudioFunc = Future<NativeAudioConfiguration> Function(
|
||||
AudioTrackState state);
|
||||
|
||||
class AudioTrack extends Track {
|
||||
// it's possible to set custom function here to customize audio session configuration
|
||||
@@ -102,11 +103,13 @@ class AudioTrack extends Track {
|
||||
NativeAudioConfiguration? config;
|
||||
if (!kIsWeb && Platform.isIOS) {
|
||||
// Only iOS for now...
|
||||
config = await nativeAudioConfigurationForAudioTrackState.call(audioTrackState);
|
||||
config = await nativeAudioConfigurationForAudioTrackState
|
||||
.call(audioTrackState);
|
||||
}
|
||||
|
||||
if (config != null) {
|
||||
logger.fine('[$runtimeType] configuring for ${audioTrackState} using ${config}...');
|
||||
logger.fine(
|
||||
'[$runtimeType] configuring for ${audioTrackState} using ${config}...');
|
||||
try {
|
||||
await configureNativeAudio(config);
|
||||
} catch (error) {
|
||||
@@ -129,7 +132,8 @@ class AudioTrack extends Track {
|
||||
}
|
||||
}
|
||||
|
||||
Future<NativeAudioConfiguration> defaultNativeAudioConfigurationFunc(AudioTrackState state) async {
|
||||
Future<NativeAudioConfiguration> defaultNativeAudioConfigurationFunc(
|
||||
AudioTrackState state) async {
|
||||
//
|
||||
if (state == AudioTrackState.remoteOnly) {
|
||||
return NativeAudioConfiguration(
|
||||
|
||||
@@ -14,9 +14,11 @@ class LocalAudioTrack extends AudioTrack {
|
||||
) : super(name, track, stream);
|
||||
|
||||
/// Creates a new audio track from the default audio input device.
|
||||
static Future<LocalAudioTrack> create([LocalAudioTrackOptions? options]) async {
|
||||
static Future<LocalAudioTrack> create(
|
||||
[LocalAudioTrackOptions? options]) async {
|
||||
// TODO: have back up incase the options fail
|
||||
final stream = await rtc.navigator.mediaDevices.getUserMedia(<String, dynamic>{
|
||||
final stream =
|
||||
await rtc.navigator.mediaDevices.getUserMedia(<String, dynamic>{
|
||||
// 'audio': <String, dynamic>{
|
||||
// 'echoCancellation': true,
|
||||
// 'noiseSuppression': true,
|
||||
|
||||
@@ -28,7 +28,8 @@ class CameraTrackOptions extends LocalVideoTrackOptions {
|
||||
@override
|
||||
Map<String, dynamic> toMediaConstraintsMap() => <String, dynamic>{
|
||||
...super.toMediaConstraintsMap(),
|
||||
'facingMode': cameraPosition == CameraPosition.front ? 'user' : 'environment',
|
||||
'facingMode':
|
||||
cameraPosition == CameraPosition.front ? 'user' : 'environment',
|
||||
};
|
||||
|
||||
// Returns new options with updated properties
|
||||
@@ -70,7 +71,8 @@ class VideoEncoding {
|
||||
});
|
||||
|
||||
@override
|
||||
String toString() => '${runtimeType}(maxFramerate: ${maxFramerate}, maxBitrate: ${maxBitrate})';
|
||||
String toString() =>
|
||||
'${runtimeType}(maxFramerate: ${maxFramerate}, maxBitrate: ${maxBitrate})';
|
||||
}
|
||||
|
||||
extension VideoEncodingExt on VideoEncoding {
|
||||
|
||||
@@ -33,7 +33,8 @@ abstract class Track extends DisposableChangeNotifier {
|
||||
this.mediaStreamTrack,
|
||||
);
|
||||
|
||||
bool get muted => mediaStreamTrack.muted == null ? false : mediaStreamTrack.muted!;
|
||||
bool get muted =>
|
||||
mediaStreamTrack.muted == null ? false : mediaStreamTrack.muted!;
|
||||
|
||||
rtc.RTCRtpMediaType get mediaType {
|
||||
switch (kind) {
|
||||
|
||||
@@ -29,7 +29,8 @@ abstract class TrackPublication extends Disposable {
|
||||
}
|
||||
|
||||
/// True when the track is published with name [Track.screenShareName].
|
||||
bool get isScreenShare => kind == lk_models.TrackType.VIDEO && name == Track.screenShareName;
|
||||
bool get isScreenShare =>
|
||||
kind == lk_models.TrackType.VIDEO && name == Track.screenShareName;
|
||||
|
||||
void updateFromInfo(lk_models.TrackInfo info) {
|
||||
muted = info.muted;
|
||||
@@ -45,5 +46,6 @@ abstract class TrackPublication extends Disposable {
|
||||
int get hashCode => sid.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => other is TrackPublication && sid == other.sid;
|
||||
bool operator ==(Object other) =>
|
||||
other is TrackPublication && sid == other.sid;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,8 @@ class PCTransport extends Disposable {
|
||||
restartingIce = true;
|
||||
}
|
||||
|
||||
if (pc.signalingState == rtc.RTCSignalingState.RTCSignalingStateHaveLocalOffer) {
|
||||
if (pc.signalingState ==
|
||||
rtc.RTCSignalingState.RTCSignalingStateHaveLocalOffer) {
|
||||
// we're waiting for the peer to accept our offer, so we'll just wait
|
||||
// the only exception to this is when ICE restart is needed
|
||||
final currentSD = await getRemoteDescription();
|
||||
|
||||
+4
-2
@@ -72,8 +72,10 @@ class RTCConfiguration {
|
||||
// only supports unified plan
|
||||
'sdpSemantics': 'unified-plan',
|
||||
if (iceServersMap.isNotEmpty) 'iceServers': iceServersMap,
|
||||
if (iceCandidatePoolSize != null) 'iceCandidatePoolSize': iceCandidatePoolSize,
|
||||
if (iceTransportPolicy != null) 'iceTransportPolicy': iceTransportPolicy!.toStringValue(),
|
||||
if (iceCandidatePoolSize != null)
|
||||
'iceCandidatePoolSize': iceCandidatePoolSize,
|
||||
if (iceTransportPolicy != null)
|
||||
'iceTransportPolicy': iceTransportPolicy!.toStringValue(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -34,7 +34,8 @@ class Utils {
|
||||
path: validate ? 'validate' : 'rtc',
|
||||
queryParameters: <String, String>{
|
||||
'access_token': token,
|
||||
if (options != null) 'auto_subscribe': options.autoSubscribe ? '1' : '0',
|
||||
if (options != null)
|
||||
'auto_subscribe': options.autoSubscribe ? '1' : '0',
|
||||
if (reconnect) 'reconnect': '1',
|
||||
'protocol': protocol.toStringValue(),
|
||||
'sdk': 'flutter',
|
||||
@@ -77,7 +78,9 @@ class Utils {
|
||||
|
||||
VideoEncoding? videoEncoding = options.videoEncoding;
|
||||
|
||||
if ((videoEncoding == null && !options.simulcast) || width == null || height == null) {
|
||||
if ((videoEncoding == null && !options.simulcast) ||
|
||||
width == null ||
|
||||
height == null) {
|
||||
// don't set encoding when we are not simulcasting and user isn't restricting
|
||||
// encoding parameters
|
||||
return null;
|
||||
|
||||
@@ -95,6 +95,11 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_webrtc:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -116,6 +121,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.3"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -9,12 +9,15 @@ environment:
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
flutter_web_plugins:
|
||||
sdk: flutter
|
||||
flutter:
|
||||
sdk: flutter
|
||||
async: ^2.8.1
|
||||
collection: ^1.15.0
|
||||
fixnum: ^1.0.0
|
||||
meta: ^1.7.0
|
||||
|
||||
http: ^0.13.3
|
||||
logging: ^1.0.2
|
||||
uuid: ^3.0.4
|
||||
@@ -32,3 +35,9 @@ flutter:
|
||||
platforms:
|
||||
ios:
|
||||
pluginClass: LiveKitPlugin
|
||||
android:
|
||||
package: io.livekit.plugin
|
||||
pluginClass: LiveKitPlugin
|
||||
web:
|
||||
pluginClass: LiveKitWebPlugin
|
||||
fileName: livekit_client_web.dart
|
||||
|
||||
Reference in New Issue
Block a user