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,
|
context: this,
|
||||||
builder: (ctx) => AlertDialog(
|
builder: (ctx) => AlertDialog(
|
||||||
title: const Text('UnPublish'),
|
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: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(ctx, false),
|
onPressed: () => Navigator.pop(ctx, false),
|
||||||
@@ -92,7 +93,8 @@ extension LKExampleExt on BuildContext {
|
|||||||
context: this,
|
context: this,
|
||||||
builder: (ctx) => AlertDialog(
|
builder: (ctx) => AlertDialog(
|
||||||
title: const Text('Send data'),
|
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: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(ctx, false),
|
onPressed: () => Navigator.pop(ctx, false),
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ class _ConnectPageState extends State<ConnectPage> {
|
|||||||
// Save for next time
|
// Save for next time
|
||||||
await _writePrefs();
|
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(
|
final room = await LiveKitClient.connect(
|
||||||
_uriCtrl.text,
|
_uriCtrl.text,
|
||||||
@@ -113,7 +114,8 @@ class _ConnectPageState extends State<ConnectPage> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(8),
|
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(
|
constraints: const BoxConstraints(
|
||||||
maxWidth: 320,
|
maxWidth: 320,
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ class _RoomPageState extends State<RoomPage> {
|
|||||||
|
|
||||||
void _setUpListeners() => _listener
|
void _setUpListeners() => _listener
|
||||||
..on<RoomDisconnectedEvent>((_) async {
|
..on<RoomDisconnectedEvent>((_) async {
|
||||||
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) => Navigator.pop(context));
|
WidgetsBinding.instance
|
||||||
|
?.addPostFrameCallback((timeStamp) => Navigator.pop(context));
|
||||||
})
|
})
|
||||||
..on<DataReceivedEvent>((event) {
|
..on<DataReceivedEvent>((event) {
|
||||||
String decoded = 'Failed to decode';
|
String decoded = 'Failed to decode';
|
||||||
@@ -120,7 +121,8 @@ class _RoomPageState extends State<RoomPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// joinedAt
|
// joinedAt
|
||||||
return a.joinedAt.millisecondsSinceEpoch - b.joinedAt.millisecondsSinceEpoch;
|
return a.joinedAt.millisecondsSinceEpoch -
|
||||||
|
b.joinedAt.millisecondsSinceEpoch;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (participants.length > 1) {
|
if (participants.length > 1) {
|
||||||
@@ -138,8 +140,9 @@ class _RoomPageState extends State<RoomPage> {
|
|||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child:
|
child: participants.isNotEmpty
|
||||||
participants.isNotEmpty ? ParticipantWidget(participants.first) : Container()),
|
? ParticipantWidget(participants.first)
|
||||||
|
: Container()),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
@@ -149,7 +152,8 @@ class _RoomPageState extends State<RoomPage> {
|
|||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
padding: const EdgeInsets.all(2),
|
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),
|
foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
|
||||||
// backgroundColor: MaterialStateProperty.all<Color>(accentColor),
|
// backgroundColor: MaterialStateProperty.all<Color>(accentColor),
|
||||||
backgroundColor: MaterialStateProperty.resolveWith((states) {
|
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;
|
return accentColor;
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
|||||||
|
|
||||||
void _toggleCamera() async {
|
void _toggleCamera() async {
|
||||||
//
|
//
|
||||||
final track = participant.videoTracks.firstOrNull?.track as LocalVideoTrack?;
|
final track =
|
||||||
|
participant.videoTracks.firstOrNull?.track as LocalVideoTrack?;
|
||||||
if (track == null) return;
|
if (track == null) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -113,7 +114,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final screenTrack = await LocalVideoTrack.createScreenTrack(); // Defaults to camera
|
final screenTrack =
|
||||||
|
await LocalVideoTrack.createScreenTrack(); // Defaults to camera
|
||||||
await widget.room.localParticipant.publishVideoTrack(
|
await widget.room.localParticipant.publishVideoTrack(
|
||||||
screenTrack,
|
screenTrack,
|
||||||
);
|
);
|
||||||
@@ -177,7 +179,9 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
|||||||
icon: const Icon(EvaIcons.videoOff),
|
icon: const Icon(EvaIcons.videoOff),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(position == CameraPosition.back ? EvaIcons.camera : EvaIcons.person),
|
icon: Icon(position == CameraPosition.back
|
||||||
|
? EvaIcons.camera
|
||||||
|
: EvaIcons.person),
|
||||||
onPressed: () => _toggleCamera(),
|
onPressed: () => _toggleCamera(),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ class _ParticipantWidgetState extends State<ParticipantWidget> {
|
|||||||
// register for change so Flutter will re-build the widget upon change
|
// register for change so Flutter will re-build the widget upon change
|
||||||
void _onParticipantChanged() {
|
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
|
final firstVideo = widget.participant.videoTracks
|
||||||
.firstWhereOrNull((pub) => !pub.isScreenShare && pub.subscribed);
|
.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 {
|
class UnexpectedStateException extends LiveKitException {
|
||||||
UnexpectedStateException([String msg = 'Unexpected connection state']) : super._(msg);
|
UnexpectedStateException([String msg = 'Unexpected connection state'])
|
||||||
|
: super._(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
class TrackCreateException extends LiveKitException {
|
class TrackCreateException extends LiveKitException {
|
||||||
@@ -19,7 +20,8 @@ class TrackCreateException extends LiveKitException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class TrackPublishException 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 {
|
class DataPublishException extends LiveKitException {
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ extension ICEServerExt on lk_rtc.ICEServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension IterableExt<E> on Iterable<E> {
|
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 {
|
extension ObjectExt on Object {
|
||||||
|
|||||||
@@ -26,5 +26,6 @@ class TrackPublishOptions {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@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
|
/// publish an audio track to the room
|
||||||
Future<TrackPublication> publishAudioTrack(LocalAudioTrack track) async {
|
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');
|
throw TrackPublishException('track already exists');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +83,8 @@ class LocalParticipant extends Participant {
|
|||||||
LocalVideoTrack track, {
|
LocalVideoTrack track, {
|
||||||
TrackPublishOptions? options,
|
TrackPublishOptions? options,
|
||||||
}) async {
|
}) 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');
|
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(
|
final encodings = Utils.computeVideoEncodings(
|
||||||
width: width,
|
width: width,
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ import 'remote_participant.dart';
|
|||||||
|
|
||||||
/// Base for [RemoteParticipant] and [LocalParticipant],
|
/// Base for [RemoteParticipant] and [LocalParticipant],
|
||||||
/// can not be instantiated directly.
|
/// 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
|
/// map of track sid => published track
|
||||||
final trackPublications = <String, TrackPublication>{};
|
final trackPublications = <String, TrackPublication>{};
|
||||||
|
|
||||||
@@ -49,7 +50,8 @@ abstract class Participant extends DisposableChangeNotifier with EventsEmittable
|
|||||||
DateTime get joinedAt {
|
DateTime get joinedAt {
|
||||||
final pi = _participantInfo;
|
final pi = _participantInfo;
|
||||||
if (pi != null) {
|
if (pi != null) {
|
||||||
return DateTime.fromMillisecondsSinceEpoch(pi.joinedAt.toInt() * 1000, isUtc: true);
|
return DateTime.fromMillisecondsSinceEpoch(pi.joinedAt.toInt() * 1000,
|
||||||
|
isUtc: true);
|
||||||
}
|
}
|
||||||
return DateTime.now();
|
return DateTime.now();
|
||||||
}
|
}
|
||||||
@@ -160,9 +162,11 @@ abstract class Participant extends DisposableChangeNotifier with EventsEmittable
|
|||||||
|
|
||||||
// Convenience extension
|
// Convenience extension
|
||||||
extension ParticipantExt on Participant {
|
extension ParticipantExt on Participant {
|
||||||
List<TrackPublication> get videoTracks =>
|
List<TrackPublication> get videoTracks => trackPublications.values
|
||||||
trackPublications.values.where((e) => e.kind == lk_models.TrackType.VIDEO).toList();
|
.where((e) => e.kind == lk_models.TrackType.VIDEO)
|
||||||
|
.toList();
|
||||||
|
|
||||||
List<TrackPublication> get audioTracks =>
|
List<TrackPublication> get audioTracks => trackPublications.values
|
||||||
trackPublications.values.where((e) => e.kind == lk_models.TrackType.AUDIO).toList();
|
.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...');
|
logger.fine('addSubscribedMediaTrack() pub is null, will wait...');
|
||||||
// Wait for the metadata to arrive
|
// Wait for the metadata to arrive
|
||||||
final event = await events.waitFor<TrackPublishedEvent>(
|
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,
|
duration: Timeouts.publish,
|
||||||
onTimeout: () => throw TrackSubscriptionExceptionEvent(
|
onTimeout: () => throw TrackSubscriptionExceptionEvent(
|
||||||
participant: this,
|
participant: this,
|
||||||
@@ -78,7 +79,8 @@ class RemoteParticipant extends Participant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if track type is supported, throw if not.
|
// 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(
|
throw TrackSubscriptionExceptionEvent(
|
||||||
participant: this,
|
participant: this,
|
||||||
sid: trackSid,
|
sid: trackSid,
|
||||||
@@ -145,7 +147,8 @@ class RemoteParticipant extends Participant {
|
|||||||
|
|
||||||
// unpublish any track that is not in the info
|
// unpublish any track that is not in the info
|
||||||
final validSids = info.tracks.map((e) => e.sid);
|
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) {
|
for (final sid in removeSids) {
|
||||||
await unpublishTrack(sid, notify: true);
|
await unpublishTrack(sid, notify: true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,28 +16,58 @@ export 'livekit_models.pbenum.dart';
|
|||||||
|
|
||||||
class Room extends $pb.GeneratedMessage {
|
class Room extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
..aOS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'sid')
|
||||||
|
..aOS(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'name')
|
||||||
..a<$core.int>(
|
..a<$core.int>(
|
||||||
3,
|
3,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'emptyTimeout',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'emptyTimeout',
|
||||||
$pb.PbFieldType.OU3)
|
$pb.PbFieldType.OU3)
|
||||||
..a<$core.int>(
|
..a<$core.int>(
|
||||||
4,
|
4,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'maxParticipants',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'maxParticipants',
|
||||||
$pb.PbFieldType.OU3)
|
$pb.PbFieldType.OU3)
|
||||||
..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'creationTime')
|
..aInt64(
|
||||||
..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'turnPassword')
|
5,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'creationTime')
|
||||||
|
..aOS(
|
||||||
|
6,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'turnPassword')
|
||||||
..pc<Codec>(
|
..pc<Codec>(
|
||||||
7,
|
7,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'enabledCodecs',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'enabledCodecs',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: Codec.create)
|
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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
Room._() : super();
|
Room._() : super();
|
||||||
@@ -81,7 +111,8 @@ class Room extends $pb.GeneratedMessage {
|
|||||||
factory Room.fromBuffer($core.List<$core.int> i,
|
factory Room.fromBuffer($core.List<$core.int> i,
|
||||||
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
create()..mergeFromBuffer(i, r);
|
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);
|
create()..mergeFromJson(i, r);
|
||||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||||
@@ -99,7 +130,8 @@ class Room extends $pb.GeneratedMessage {
|
|||||||
Room createEmptyInstance() => create();
|
Room createEmptyInstance() => create();
|
||||||
static $pb.PbList<Room> createRepeated() => $pb.PbList<Room>();
|
static $pb.PbList<Room> createRepeated() => $pb.PbList<Room>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$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;
|
static Room? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -192,12 +224,24 @@ class Room extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class Codec extends $pb.GeneratedMessage {
|
class Codec extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mime')
|
..aOS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fmtpLine')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'mime')
|
||||||
|
..aOS(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'fmtpLine')
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
Codec._() : super();
|
Codec._() : super();
|
||||||
@@ -217,7 +261,8 @@ class Codec extends $pb.GeneratedMessage {
|
|||||||
factory Codec.fromBuffer($core.List<$core.int> i,
|
factory Codec.fromBuffer($core.List<$core.int> i,
|
||||||
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
create()..mergeFromBuffer(i, r);
|
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);
|
create()..mergeFromJson(i, r);
|
||||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||||
@@ -266,27 +311,55 @@ class Codec extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class ParticipantInfo extends $pb.GeneratedMessage {
|
class ParticipantInfo extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
..aOS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'identity')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'sid')
|
||||||
|
..aOS(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'identity')
|
||||||
..e<ParticipantInfo_State>(
|
..e<ParticipantInfo_State>(
|
||||||
3,
|
3,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'state',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'state',
|
||||||
$pb.PbFieldType.OE,
|
$pb.PbFieldType.OE,
|
||||||
defaultOrMaker: ParticipantInfo_State.JOINING,
|
defaultOrMaker: ParticipantInfo_State.JOINING,
|
||||||
valueOf: ParticipantInfo_State.valueOf,
|
valueOf: ParticipantInfo_State.valueOf,
|
||||||
enumValues: ParticipantInfo_State.values)
|
enumValues: ParticipantInfo_State.values)
|
||||||
..pc<TrackInfo>(
|
..pc<TrackInfo>(
|
||||||
4,
|
4,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'tracks',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'tracks',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: TrackInfo.create)
|
subBuilder: TrackInfo.create)
|
||||||
..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata')
|
..aOS(
|
||||||
..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'joinedAt')
|
5,
|
||||||
..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hidden')
|
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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
ParticipantInfo._() : super();
|
ParticipantInfo._() : super();
|
||||||
@@ -343,10 +416,11 @@ class ParticipantInfo extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static ParticipantInfo create() => ParticipantInfo._();
|
static ParticipantInfo create() => ParticipantInfo._();
|
||||||
ParticipantInfo createEmptyInstance() => create();
|
ParticipantInfo createEmptyInstance() => create();
|
||||||
static $pb.PbList<ParticipantInfo> createRepeated() => $pb.PbList<ParticipantInfo>();
|
static $pb.PbList<ParticipantInfo> createRepeated() =>
|
||||||
|
$pb.PbList<ParticipantInfo>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static ParticipantInfo getDefault() =>
|
static ParticipantInfo getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ParticipantInfo>(create);
|
$pb.GeneratedMessage.$_defaultFor<ParticipantInfo>(create);
|
||||||
static ParticipantInfo? _defaultInstance;
|
static ParticipantInfo? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -427,21 +501,55 @@ class ParticipantInfo extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class TrackInfo extends $pb.GeneratedMessage {
|
class TrackInfo extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
..aOS(
|
||||||
..e<TrackType>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type',
|
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,
|
$pb.PbFieldType.OE,
|
||||||
defaultOrMaker: TrackType.AUDIO, valueOf: TrackType.valueOf, enumValues: TrackType.values)
|
defaultOrMaker: TrackType.AUDIO,
|
||||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
valueOf: TrackType.valueOf,
|
||||||
..aOB(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'muted')
|
enumValues: TrackType.values)
|
||||||
..a<$core.int>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'width',
|
..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)
|
$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)
|
$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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
TrackInfo._() : super();
|
TrackInfo._() : super();
|
||||||
@@ -598,23 +706,35 @@ class DataPacket extends $pb.GeneratedMessage {
|
|||||||
0: DataPacket_Value.notSet
|
0: DataPacket_Value.notSet
|
||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..oo(0, [2, 3])
|
..oo(0, [2, 3])
|
||||||
..e<DataPacket_Kind>(
|
..e<DataPacket_Kind>(
|
||||||
1,
|
1,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'kind',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'kind',
|
||||||
$pb.PbFieldType.OE,
|
$pb.PbFieldType.OE,
|
||||||
defaultOrMaker: DataPacket_Kind.RELIABLE,
|
defaultOrMaker: DataPacket_Kind.RELIABLE,
|
||||||
valueOf: DataPacket_Kind.valueOf,
|
valueOf: DataPacket_Kind.valueOf,
|
||||||
enumValues: DataPacket_Kind.values)
|
enumValues: DataPacket_Kind.values)
|
||||||
..aOM<UserPacket>(
|
..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)
|
subBuilder: UserPacket.create)
|
||||||
..aOM<ActiveSpeakerUpdate>(
|
..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)
|
subBuilder: ActiveSpeakerUpdate.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@@ -658,8 +778,8 @@ class DataPacket extends $pb.GeneratedMessage {
|
|||||||
DataPacket createEmptyInstance() => create();
|
DataPacket createEmptyInstance() => create();
|
||||||
static $pb.PbList<DataPacket> createRepeated() => $pb.PbList<DataPacket>();
|
static $pb.PbList<DataPacket> createRepeated() => $pb.PbList<DataPacket>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static DataPacket getDefault() =>
|
static DataPacket getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DataPacket>(create);
|
$pb.GeneratedMessage.$_defaultFor<DataPacket>(create);
|
||||||
static DataPacket? _defaultInstance;
|
static DataPacket? _defaultInstance;
|
||||||
|
|
||||||
DataPacket_Value whichValue() => _DataPacket_ValueByTag[$_whichOneof(0)]!;
|
DataPacket_Value whichValue() => _DataPacket_ValueByTag[$_whichOneof(0)]!;
|
||||||
@@ -708,13 +828,19 @@ class DataPacket extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..pc<SpeakerInfo>(
|
..pc<SpeakerInfo>(
|
||||||
1,
|
1,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'speakers',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'speakers',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: SpeakerInfo.create)
|
subBuilder: SpeakerInfo.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
@@ -749,10 +875,11 @@ class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static ActiveSpeakerUpdate create() => ActiveSpeakerUpdate._();
|
static ActiveSpeakerUpdate create() => ActiveSpeakerUpdate._();
|
||||||
ActiveSpeakerUpdate createEmptyInstance() => create();
|
ActiveSpeakerUpdate createEmptyInstance() => create();
|
||||||
static $pb.PbList<ActiveSpeakerUpdate> createRepeated() => $pb.PbList<ActiveSpeakerUpdate>();
|
static $pb.PbList<ActiveSpeakerUpdate> createRepeated() =>
|
||||||
|
$pb.PbList<ActiveSpeakerUpdate>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static ActiveSpeakerUpdate getDefault() =>
|
static ActiveSpeakerUpdate getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ActiveSpeakerUpdate>(create);
|
$pb.GeneratedMessage.$_defaultFor<ActiveSpeakerUpdate>(create);
|
||||||
static ActiveSpeakerUpdate? _defaultInstance;
|
static ActiveSpeakerUpdate? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -761,16 +888,30 @@ class ActiveSpeakerUpdate extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class SpeakerInfo extends $pb.GeneratedMessage {
|
class SpeakerInfo extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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>(
|
..a<$core.double>(
|
||||||
2,
|
2,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'level',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'level',
|
||||||
$pb.PbFieldType.OF)
|
$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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
SpeakerInfo._() : super();
|
SpeakerInfo._() : super();
|
||||||
@@ -813,8 +954,8 @@ class SpeakerInfo extends $pb.GeneratedMessage {
|
|||||||
SpeakerInfo createEmptyInstance() => create();
|
SpeakerInfo createEmptyInstance() => create();
|
||||||
static $pb.PbList<SpeakerInfo> createRepeated() => $pb.PbList<SpeakerInfo>();
|
static $pb.PbList<SpeakerInfo> createRepeated() => $pb.PbList<SpeakerInfo>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SpeakerInfo getDefault() =>
|
static SpeakerInfo getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SpeakerInfo>(create);
|
$pb.GeneratedMessage.$_defaultFor<SpeakerInfo>(create);
|
||||||
static SpeakerInfo? _defaultInstance;
|
static SpeakerInfo? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -856,16 +997,30 @@ class SpeakerInfo extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class UserPacket extends $pb.GeneratedMessage {
|
class UserPacket extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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>>(
|
..a<$core.List<$core.int>>(
|
||||||
2,
|
2,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payload',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'payload',
|
||||||
$pb.PbFieldType.OY)
|
$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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
UserPacket._() : super();
|
UserPacket._() : super();
|
||||||
@@ -908,8 +1063,8 @@ class UserPacket extends $pb.GeneratedMessage {
|
|||||||
UserPacket createEmptyInstance() => create();
|
UserPacket createEmptyInstance() => create();
|
||||||
static $pb.PbList<UserPacket> createRepeated() => $pb.PbList<UserPacket>();
|
static $pb.PbList<UserPacket> createRepeated() => $pb.PbList<UserPacket>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static UserPacket getDefault() =>
|
static UserPacket getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UserPacket>(create);
|
$pb.GeneratedMessage.$_defaultFor<UserPacket>(create);
|
||||||
static UserPacket? _defaultInstance;
|
static UserPacket? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -942,14 +1097,34 @@ class UserPacket extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class RecordingResult extends $pb.GeneratedMessage {
|
class RecordingResult extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
|
..aOS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'error')
|
1,
|
||||||
..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'duration')
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'location')
|
? ''
|
||||||
|
: '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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
RecordingResult._() : super();
|
RecordingResult._() : super();
|
||||||
@@ -994,10 +1169,11 @@ class RecordingResult extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static RecordingResult create() => RecordingResult._();
|
static RecordingResult create() => RecordingResult._();
|
||||||
RecordingResult createEmptyInstance() => create();
|
RecordingResult createEmptyInstance() => create();
|
||||||
static $pb.PbList<RecordingResult> createRepeated() => $pb.PbList<RecordingResult>();
|
static $pb.PbList<RecordingResult> createRepeated() =>
|
||||||
|
$pb.PbList<RecordingResult>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static RecordingResult getDefault() =>
|
static RecordingResult getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RecordingResult>(create);
|
$pb.GeneratedMessage.$_defaultFor<RecordingResult>(create);
|
||||||
static RecordingResult? _defaultInstance;
|
static RecordingResult? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
|
|||||||
@@ -10,12 +10,21 @@ import 'dart:core' as $core;
|
|||||||
import 'package:protobuf/protobuf.dart' as $pb;
|
import 'package:protobuf/protobuf.dart' as $pb;
|
||||||
|
|
||||||
class TrackType extends $pb.ProtobufEnum {
|
class TrackType extends $pb.ProtobufEnum {
|
||||||
static const TrackType AUDIO =
|
static const TrackType AUDIO = TrackType._(
|
||||||
TrackType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AUDIO');
|
0,
|
||||||
static const TrackType VIDEO =
|
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||||
TrackType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIDEO');
|
? ''
|
||||||
static const TrackType DATA =
|
: 'AUDIO');
|
||||||
TrackType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA');
|
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>[
|
static const $core.List<TrackType> values = <TrackType>[
|
||||||
AUDIO,
|
AUDIO,
|
||||||
@@ -23,7 +32,8 @@ class TrackType extends $pb.ProtobufEnum {
|
|||||||
DATA,
|
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];
|
static TrackType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
const TrackType._($core.int v, $core.String n) : super(v, n);
|
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 {
|
class ParticipantInfo_State extends $pb.ProtobufEnum {
|
||||||
static const ParticipantInfo_State JOINING = ParticipantInfo_State._(
|
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._(
|
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._(
|
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._(
|
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,
|
JOINING,
|
||||||
JOINED,
|
JOINED,
|
||||||
ACTIVE,
|
ACTIVE,
|
||||||
@@ -55,9 +78,15 @@ class ParticipantInfo_State extends $pb.ProtobufEnum {
|
|||||||
|
|
||||||
class DataPacket_Kind extends $pb.ProtobufEnum {
|
class DataPacket_Kind extends $pb.ProtobufEnum {
|
||||||
static const DataPacket_Kind RELIABLE = DataPacket_Kind._(
|
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._(
|
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>[
|
static const $core.List<DataPacket_Kind> values = <DataPacket_Kind>[
|
||||||
RELIABLE,
|
RELIABLE,
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ const TrackType$json = const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `TrackType`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
/// Descriptor for `TrackType`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||||
final $typed_data.Uint8List trackTypeDescriptor =
|
final $typed_data.Uint8List trackTypeDescriptor = $convert.base64Decode(
|
||||||
$convert.base64Decode('CglUcmFja1R5cGUSCQoFQVVESU8QABIJCgVWSURFTxABEggKBERBVEEQAg==');
|
'CglUcmFja1R5cGUSCQoFQVVESU8QABIJCgVWSURFTxABEggKBERBVEEQAg==');
|
||||||
@$core.Deprecated('Use roomDescriptor instead')
|
@$core.Deprecated('Use roomDescriptor instead')
|
||||||
const Room$json = const {
|
const Room$json = const {
|
||||||
'1': 'Room',
|
'1': 'Room',
|
||||||
@@ -29,7 +29,13 @@ const Room$json = const {
|
|||||||
const {'1': 'sid', '3': 1, '4': 1, '5': 9, '10': 'sid'},
|
const {'1': 'sid', '3': 1, '4': 1, '5': 9, '10': 'sid'},
|
||||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
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': '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': 'creation_time', '3': 5, '4': 1, '5': 3, '10': 'creationTime'},
|
||||||
const {'1': 'turn_password', '3': 6, '4': 1, '5': 9, '10': 'turnPassword'},
|
const {'1': 'turn_password', '3': 6, '4': 1, '5': 9, '10': 'turnPassword'},
|
||||||
const {
|
const {
|
||||||
@@ -57,8 +63,8 @@ const Codec$json = const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `Codec`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `Codec`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List codecDescriptor = $convert
|
final $typed_data.Uint8List codecDescriptor = $convert.base64Decode(
|
||||||
.base64Decode('CgVDb2RlYxISCgRtaW1lGAEgASgJUgRtaW1lEhsKCWZtdHBfbGluZRgCIAEoCVIIZm10cExpbmU=');
|
'CgVDb2RlYxISCgRtaW1lGAEgASgJUgRtaW1lEhsKCWZtdHBfbGluZRgCIAEoCVIIZm10cExpbmU=');
|
||||||
@$core.Deprecated('Use participantInfoDescriptor instead')
|
@$core.Deprecated('Use participantInfoDescriptor instead')
|
||||||
const ParticipantInfo$json = const {
|
const ParticipantInfo$json = const {
|
||||||
'1': 'ParticipantInfo',
|
'1': 'ParticipantInfo',
|
||||||
@@ -73,7 +79,14 @@ const ParticipantInfo$json = const {
|
|||||||
'6': '.livekit.ParticipantInfo.State',
|
'6': '.livekit.ParticipantInfo.State',
|
||||||
'10': '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': 'metadata', '3': 5, '4': 1, '5': 9, '10': 'metadata'},
|
||||||
const {'1': 'joined_at', '3': 6, '4': 1, '5': 3, '10': 'joinedAt'},
|
const {'1': 'joined_at', '3': 6, '4': 1, '5': 3, '10': 'joinedAt'},
|
||||||
const {'1': 'hidden', '3': 7, '4': 1, '5': 8, '10': 'hidden'},
|
const {'1': 'hidden', '3': 7, '4': 1, '5': 8, '10': 'hidden'},
|
||||||
@@ -100,7 +113,14 @@ const TrackInfo$json = const {
|
|||||||
'1': 'TrackInfo',
|
'1': 'TrackInfo',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'sid', '3': 1, '4': 1, '5': 9, '10': 'sid'},
|
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': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
|
||||||
const {'1': 'muted', '3': 4, '4': 1, '5': 8, '10': 'muted'},
|
const {'1': 'muted', '3': 4, '4': 1, '5': 8, '10': 'muted'},
|
||||||
const {'1': 'width', '3': 5, '4': 1, '5': 13, '10': 'width'},
|
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 {
|
const DataPacket$json = const {
|
||||||
'1': 'DataPacket',
|
'1': 'DataPacket',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'kind', '3': 1, '4': 1, '5': 14, '6': '.livekit.DataPacket.Kind', '10': 'kind'},
|
const {
|
||||||
const {'1': 'user', '3': 2, '4': 1, '5': 11, '6': '.livekit.UserPacket', '9': 0, '10': 'user'},
|
'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 {
|
const {
|
||||||
'1': 'speaker',
|
'1': 'speaker',
|
||||||
'3': 3,
|
'3': 3,
|
||||||
@@ -150,7 +185,14 @@ final $typed_data.Uint8List dataPacketDescriptor = $convert.base64Decode(
|
|||||||
const ActiveSpeakerUpdate$json = const {
|
const ActiveSpeakerUpdate$json = const {
|
||||||
'1': 'ActiveSpeakerUpdate',
|
'1': 'ActiveSpeakerUpdate',
|
||||||
'2': const [
|
'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 {
|
const UserPacket$json = const {
|
||||||
'1': 'UserPacket',
|
'1': 'UserPacket',
|
||||||
'2': const [
|
'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': '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 {
|
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,
|
1: SignalRequest_Message.offer,
|
||||||
2: SignalRequest_Message.answer,
|
2: SignalRequest_Message.answer,
|
||||||
3: SignalRequest_Message.trickle,
|
3: SignalRequest_Message.trickle,
|
||||||
@@ -43,37 +44,68 @@ class SignalRequest extends $pb.GeneratedMessage {
|
|||||||
0: SignalRequest_Message.notSet
|
0: SignalRequest_Message.notSet
|
||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9])
|
..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||||
..aOM<SessionDescription>(
|
..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)
|
subBuilder: SessionDescription.create)
|
||||||
..aOM<SessionDescription>(
|
..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)
|
subBuilder: SessionDescription.create)
|
||||||
..aOM<TrickleRequest>(
|
..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)
|
subBuilder: TrickleRequest.create)
|
||||||
..aOM<AddTrackRequest>(
|
..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)
|
subBuilder: AddTrackRequest.create)
|
||||||
..aOM<MuteTrackRequest>(
|
..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)
|
subBuilder: MuteTrackRequest.create)
|
||||||
..aOM<UpdateSubscription>(
|
..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)
|
subBuilder: UpdateSubscription.create)
|
||||||
..aOM<UpdateTrackSettings>(
|
..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)
|
subBuilder: UpdateTrackSettings.create)
|
||||||
..aOM<LeaveRequest>(
|
..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)
|
subBuilder: LeaveRequest.create)
|
||||||
..aOM<SetSimulcastLayers>(
|
..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)
|
subBuilder: SetSimulcastLayers.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@@ -139,13 +171,15 @@ class SignalRequest extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SignalRequest create() => SignalRequest._();
|
static SignalRequest create() => SignalRequest._();
|
||||||
SignalRequest createEmptyInstance() => create();
|
SignalRequest createEmptyInstance() => create();
|
||||||
static $pb.PbList<SignalRequest> createRepeated() => $pb.PbList<SignalRequest>();
|
static $pb.PbList<SignalRequest> createRepeated() =>
|
||||||
|
$pb.PbList<SignalRequest>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SignalRequest getDefault() =>
|
static SignalRequest getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignalRequest>(create);
|
$pb.GeneratedMessage.$_defaultFor<SignalRequest>(create);
|
||||||
static SignalRequest? _defaultInstance;
|
static SignalRequest? _defaultInstance;
|
||||||
|
|
||||||
SignalRequest_Message whichMessage() => _SignalRequest_MessageByTag[$_whichOneof(0)]!;
|
SignalRequest_Message whichMessage() =>
|
||||||
|
_SignalRequest_MessageByTag[$_whichOneof(0)]!;
|
||||||
void clearMessage() => clearField($_whichOneof(0));
|
void clearMessage() => clearField($_whichOneof(0));
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -290,7 +324,8 @@ enum SignalResponse_Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SignalResponse extends $pb.GeneratedMessage {
|
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,
|
1: SignalResponse_Message.join,
|
||||||
2: SignalResponse_Message.answer,
|
2: SignalResponse_Message.answer,
|
||||||
3: SignalResponse_Message.offer,
|
3: SignalResponse_Message.offer,
|
||||||
@@ -304,40 +339,74 @@ class SignalResponse extends $pb.GeneratedMessage {
|
|||||||
0: SignalResponse_Message.notSet
|
0: SignalResponse_Message.notSet
|
||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..oo(0, [1, 2, 3, 4, 5, 6, 8, 9, 10, 11])
|
..oo(0, [1, 2, 3, 4, 5, 6, 8, 9, 10, 11])
|
||||||
..aOM<JoinResponse>(
|
..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)
|
subBuilder: JoinResponse.create)
|
||||||
..aOM<SessionDescription>(
|
..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)
|
subBuilder: SessionDescription.create)
|
||||||
..aOM<SessionDescription>(
|
..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)
|
subBuilder: SessionDescription.create)
|
||||||
..aOM<TrickleRequest>(
|
..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)
|
subBuilder: TrickleRequest.create)
|
||||||
..aOM<ParticipantUpdate>(
|
..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)
|
subBuilder: ParticipantUpdate.create)
|
||||||
..aOM<TrackPublishedResponse>(
|
..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)
|
subBuilder: TrackPublishedResponse.create)
|
||||||
..aOM<LeaveRequest>(
|
..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)
|
subBuilder: LeaveRequest.create)
|
||||||
..aOM<MuteTrackRequest>(
|
..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)
|
subBuilder: MuteTrackRequest.create)
|
||||||
..aOM<SpeakersChanged>(
|
..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)
|
subBuilder: SpeakersChanged.create)
|
||||||
..aOM<RoomUpdate>(
|
..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)
|
subBuilder: RoomUpdate.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@@ -407,13 +476,15 @@ class SignalResponse extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SignalResponse create() => SignalResponse._();
|
static SignalResponse create() => SignalResponse._();
|
||||||
SignalResponse createEmptyInstance() => create();
|
SignalResponse createEmptyInstance() => create();
|
||||||
static $pb.PbList<SignalResponse> createRepeated() => $pb.PbList<SignalResponse>();
|
static $pb.PbList<SignalResponse> createRepeated() =>
|
||||||
|
$pb.PbList<SignalResponse>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SignalResponse getDefault() =>
|
static SignalResponse getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignalResponse>(create);
|
$pb.GeneratedMessage.$_defaultFor<SignalResponse>(create);
|
||||||
static SignalResponse? _defaultInstance;
|
static SignalResponse? _defaultInstance;
|
||||||
|
|
||||||
SignalResponse_Message whichMessage() => _SignalResponse_MessageByTag[$_whichOneof(0)]!;
|
SignalResponse_Message whichMessage() =>
|
||||||
|
_SignalResponse_MessageByTag[$_whichOneof(0)]!;
|
||||||
void clearMessage() => clearField($_whichOneof(0));
|
void clearMessage() => clearField($_whichOneof(0));
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -559,24 +630,50 @@ class SignalResponse extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class AddTrackRequest extends $pb.GeneratedMessage {
|
class AddTrackRequest extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cid')
|
..aOS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'cid')
|
||||||
|
..aOS(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'name')
|
||||||
..e<$0.TrackType>(
|
..e<$0.TrackType>(
|
||||||
3,
|
3,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'type',
|
||||||
$pb.PbFieldType.OE,
|
$pb.PbFieldType.OE,
|
||||||
defaultOrMaker: $0.TrackType.AUDIO,
|
defaultOrMaker: $0.TrackType.AUDIO,
|
||||||
valueOf: $0.TrackType.valueOf,
|
valueOf: $0.TrackType.valueOf,
|
||||||
enumValues: $0.TrackType.values)
|
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)
|
$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)
|
$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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
AddTrackRequest._() : super();
|
AddTrackRequest._() : super();
|
||||||
@@ -629,10 +726,11 @@ class AddTrackRequest extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static AddTrackRequest create() => AddTrackRequest._();
|
static AddTrackRequest create() => AddTrackRequest._();
|
||||||
AddTrackRequest createEmptyInstance() => create();
|
AddTrackRequest createEmptyInstance() => create();
|
||||||
static $pb.PbList<AddTrackRequest> createRepeated() => $pb.PbList<AddTrackRequest>();
|
static $pb.PbList<AddTrackRequest> createRepeated() =>
|
||||||
|
$pb.PbList<AddTrackRequest>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static AddTrackRequest getDefault() =>
|
static AddTrackRequest getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<AddTrackRequest>(create);
|
$pb.GeneratedMessage.$_defaultFor<AddTrackRequest>(create);
|
||||||
static AddTrackRequest? _defaultInstance;
|
static AddTrackRequest? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -710,15 +808,25 @@ class AddTrackRequest extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class TrickleRequest extends $pb.GeneratedMessage {
|
class TrickleRequest extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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')
|
protoName: 'candidateInit')
|
||||||
..e<SignalTarget>(
|
..e<SignalTarget>(
|
||||||
2,
|
2,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'target',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'target',
|
||||||
$pb.PbFieldType.OE,
|
$pb.PbFieldType.OE,
|
||||||
defaultOrMaker: SignalTarget.PUBLISHER,
|
defaultOrMaker: SignalTarget.PUBLISHER,
|
||||||
valueOf: SignalTarget.valueOf,
|
valueOf: SignalTarget.valueOf,
|
||||||
@@ -759,10 +867,11 @@ class TrickleRequest extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static TrickleRequest create() => TrickleRequest._();
|
static TrickleRequest create() => TrickleRequest._();
|
||||||
TrickleRequest createEmptyInstance() => create();
|
TrickleRequest createEmptyInstance() => create();
|
||||||
static $pb.PbList<TrickleRequest> createRepeated() => $pb.PbList<TrickleRequest>();
|
static $pb.PbList<TrickleRequest> createRepeated() =>
|
||||||
|
$pb.PbList<TrickleRequest>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static TrickleRequest getDefault() =>
|
static TrickleRequest getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TrickleRequest>(create);
|
$pb.GeneratedMessage.$_defaultFor<TrickleRequest>(create);
|
||||||
static TrickleRequest? _defaultInstance;
|
static TrickleRequest? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -792,12 +901,24 @@ class TrickleRequest extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class MuteTrackRequest extends $pb.GeneratedMessage {
|
class MuteTrackRequest extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sid')
|
..aOS(
|
||||||
..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'muted')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'sid')
|
||||||
|
..aOB(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'muted')
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
MuteTrackRequest._() : super();
|
MuteTrackRequest._() : super();
|
||||||
@@ -834,10 +955,11 @@ class MuteTrackRequest extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static MuteTrackRequest create() => MuteTrackRequest._();
|
static MuteTrackRequest create() => MuteTrackRequest._();
|
||||||
MuteTrackRequest createEmptyInstance() => create();
|
MuteTrackRequest createEmptyInstance() => create();
|
||||||
static $pb.PbList<MuteTrackRequest> createRepeated() => $pb.PbList<MuteTrackRequest>();
|
static $pb.PbList<MuteTrackRequest> createRepeated() =>
|
||||||
|
$pb.PbList<MuteTrackRequest>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static MuteTrackRequest getDefault() =>
|
static MuteTrackRequest getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<MuteTrackRequest>(create);
|
$pb.GeneratedMessage.$_defaultFor<MuteTrackRequest>(create);
|
||||||
static MuteTrackRequest? _defaultInstance;
|
static MuteTrackRequest? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -867,14 +989,24 @@ class MuteTrackRequest extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class SetSimulcastLayers extends $pb.GeneratedMessage {
|
class SetSimulcastLayers extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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>(
|
..pc<VideoQuality>(
|
||||||
2,
|
2,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'layers',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'layers',
|
||||||
$pb.PbFieldType.PE,
|
$pb.PbFieldType.PE,
|
||||||
valueOf: VideoQuality.valueOf,
|
valueOf: VideoQuality.valueOf,
|
||||||
enumValues: VideoQuality.values)
|
enumValues: VideoQuality.values)
|
||||||
@@ -914,10 +1046,11 @@ class SetSimulcastLayers extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SetSimulcastLayers create() => SetSimulcastLayers._();
|
static SetSimulcastLayers create() => SetSimulcastLayers._();
|
||||||
SetSimulcastLayers createEmptyInstance() => create();
|
SetSimulcastLayers createEmptyInstance() => create();
|
||||||
static $pb.PbList<SetSimulcastLayers> createRepeated() => $pb.PbList<SetSimulcastLayers>();
|
static $pb.PbList<SetSimulcastLayers> createRepeated() =>
|
||||||
|
$pb.PbList<SetSimulcastLayers>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SetSimulcastLayers getDefault() =>
|
static SetSimulcastLayers getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SetSimulcastLayers>(create);
|
$pb.GeneratedMessage.$_defaultFor<SetSimulcastLayers>(create);
|
||||||
static SetSimulcastLayers? _defaultInstance;
|
static SetSimulcastLayers? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -938,28 +1071,50 @@ class SetSimulcastLayers extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class JoinResponse extends $pb.GeneratedMessage {
|
class JoinResponse extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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)
|
subBuilder: $0.Room.create)
|
||||||
..aOM<$0.ParticipantInfo>(
|
..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)
|
subBuilder: $0.ParticipantInfo.create)
|
||||||
..pc<$0.ParticipantInfo>(
|
..pc<$0.ParticipantInfo>(
|
||||||
3,
|
3,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'otherParticipants',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'otherParticipants',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: $0.ParticipantInfo.create)
|
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>(
|
..pc<ICEServer>(
|
||||||
5,
|
5,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'iceServers',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'iceServers',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: ICEServer.create)
|
subBuilder: ICEServer.create)
|
||||||
..aOB(
|
..aOB(
|
||||||
6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subscriberPrimary')
|
6,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'subscriberPrimary')
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
JoinResponse._() : super();
|
JoinResponse._() : super();
|
||||||
@@ -1012,10 +1167,11 @@ class JoinResponse extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static JoinResponse create() => JoinResponse._();
|
static JoinResponse create() => JoinResponse._();
|
||||||
JoinResponse createEmptyInstance() => create();
|
JoinResponse createEmptyInstance() => create();
|
||||||
static $pb.PbList<JoinResponse> createRepeated() => $pb.PbList<JoinResponse>();
|
static $pb.PbList<JoinResponse> createRepeated() =>
|
||||||
|
$pb.PbList<JoinResponse>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static JoinResponse getDefault() =>
|
static JoinResponse getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<JoinResponse>(create);
|
$pb.GeneratedMessage.$_defaultFor<JoinResponse>(create);
|
||||||
static JoinResponse? _defaultInstance;
|
static JoinResponse? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1083,11 +1239,20 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
|||||||
? ''
|
? ''
|
||||||
: 'TrackPublishedResponse',
|
: 'TrackPublishedResponse',
|
||||||
package: const $pb.PackageName(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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>(
|
..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)
|
subBuilder: $0.TrackInfo.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@@ -1114,11 +1279,13 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
|||||||
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||||
'Will be removed in next major version')
|
'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. '
|
@$core.Deprecated('Using this can add significant overhead to your binary. '
|
||||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||||
'Will be removed in next major version')
|
'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))
|
super.copyWith((message) => updates(message as TrackPublishedResponse))
|
||||||
as TrackPublishedResponse; // ignore: deprecated_member_use
|
as TrackPublishedResponse; // ignore: deprecated_member_use
|
||||||
$pb.BuilderInfo get info_ => _i;
|
$pb.BuilderInfo get info_ => _i;
|
||||||
@@ -1128,8 +1295,8 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
|||||||
static $pb.PbList<TrackPublishedResponse> createRepeated() =>
|
static $pb.PbList<TrackPublishedResponse> createRepeated() =>
|
||||||
$pb.PbList<TrackPublishedResponse>();
|
$pb.PbList<TrackPublishedResponse>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static TrackPublishedResponse getDefault() =>
|
static TrackPublishedResponse getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TrackPublishedResponse>(create);
|
$pb.GeneratedMessage.$_defaultFor<TrackPublishedResponse>(create);
|
||||||
static TrackPublishedResponse? _defaultInstance;
|
static TrackPublishedResponse? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1161,12 +1328,24 @@ class TrackPublishedResponse extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class SessionDescription extends $pb.GeneratedMessage {
|
class SessionDescription extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type')
|
..aOS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdp')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'type')
|
||||||
|
..aOS(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'sdp')
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
SessionDescription._() : super();
|
SessionDescription._() : super();
|
||||||
@@ -1203,10 +1382,11 @@ class SessionDescription extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SessionDescription create() => SessionDescription._();
|
static SessionDescription create() => SessionDescription._();
|
||||||
SessionDescription createEmptyInstance() => create();
|
SessionDescription createEmptyInstance() => create();
|
||||||
static $pb.PbList<SessionDescription> createRepeated() => $pb.PbList<SessionDescription>();
|
static $pb.PbList<SessionDescription> createRepeated() =>
|
||||||
|
$pb.PbList<SessionDescription>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SessionDescription getDefault() =>
|
static SessionDescription getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SessionDescription>(create);
|
$pb.GeneratedMessage.$_defaultFor<SessionDescription>(create);
|
||||||
static SessionDescription? _defaultInstance;
|
static SessionDescription? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1236,13 +1416,19 @@ class SessionDescription extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class ParticipantUpdate extends $pb.GeneratedMessage {
|
class ParticipantUpdate extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..pc<$0.ParticipantInfo>(
|
..pc<$0.ParticipantInfo>(
|
||||||
1,
|
1,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'participants',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'participants',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: $0.ParticipantInfo.create)
|
subBuilder: $0.ParticipantInfo.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
@@ -1277,10 +1463,11 @@ class ParticipantUpdate extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static ParticipantUpdate create() => ParticipantUpdate._();
|
static ParticipantUpdate create() => ParticipantUpdate._();
|
||||||
ParticipantUpdate createEmptyInstance() => create();
|
ParticipantUpdate createEmptyInstance() => create();
|
||||||
static $pb.PbList<ParticipantUpdate> createRepeated() => $pb.PbList<ParticipantUpdate>();
|
static $pb.PbList<ParticipantUpdate> createRepeated() =>
|
||||||
|
$pb.PbList<ParticipantUpdate>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static ParticipantUpdate getDefault() =>
|
static ParticipantUpdate getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ParticipantUpdate>(create);
|
$pb.GeneratedMessage.$_defaultFor<ParticipantUpdate>(create);
|
||||||
static ParticipantUpdate? _defaultInstance;
|
static ParticipantUpdate? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1289,12 +1476,24 @@ class ParticipantUpdate extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class UpdateSubscription extends $pb.GeneratedMessage {
|
class UpdateSubscription extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackSids')
|
..pPS(
|
||||||
..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subscribe')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'trackSids')
|
||||||
|
..aOB(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'subscribe')
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
UpdateSubscription._() : super();
|
UpdateSubscription._() : super();
|
||||||
@@ -1331,10 +1530,11 @@ class UpdateSubscription extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static UpdateSubscription create() => UpdateSubscription._();
|
static UpdateSubscription create() => UpdateSubscription._();
|
||||||
UpdateSubscription createEmptyInstance() => create();
|
UpdateSubscription createEmptyInstance() => create();
|
||||||
static $pb.PbList<UpdateSubscription> createRepeated() => $pb.PbList<UpdateSubscription>();
|
static $pb.PbList<UpdateSubscription> createRepeated() =>
|
||||||
|
$pb.PbList<UpdateSubscription>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static UpdateSubscription getDefault() =>
|
static UpdateSubscription getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateSubscription>(create);
|
$pb.GeneratedMessage.$_defaultFor<UpdateSubscription>(create);
|
||||||
static UpdateSubscription? _defaultInstance;
|
static UpdateSubscription? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1355,15 +1555,29 @@ class UpdateSubscription extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class UpdateTrackSettings extends $pb.GeneratedMessage {
|
class UpdateTrackSettings extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'trackSids')
|
..pPS(
|
||||||
..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'disabled')
|
1,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'trackSids')
|
||||||
|
..aOB(
|
||||||
|
3,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'disabled')
|
||||||
..e<VideoQuality>(
|
..e<VideoQuality>(
|
||||||
4,
|
4,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'quality',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'quality',
|
||||||
$pb.PbFieldType.OE,
|
$pb.PbFieldType.OE,
|
||||||
defaultOrMaker: VideoQuality.LOW,
|
defaultOrMaker: VideoQuality.LOW,
|
||||||
valueOf: VideoQuality.valueOf,
|
valueOf: VideoQuality.valueOf,
|
||||||
@@ -1408,10 +1622,11 @@ class UpdateTrackSettings extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static UpdateTrackSettings create() => UpdateTrackSettings._();
|
static UpdateTrackSettings create() => UpdateTrackSettings._();
|
||||||
UpdateTrackSettings createEmptyInstance() => create();
|
UpdateTrackSettings createEmptyInstance() => create();
|
||||||
static $pb.PbList<UpdateTrackSettings> createRepeated() => $pb.PbList<UpdateTrackSettings>();
|
static $pb.PbList<UpdateTrackSettings> createRepeated() =>
|
||||||
|
$pb.PbList<UpdateTrackSettings>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static UpdateTrackSettings getDefault() =>
|
static UpdateTrackSettings getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateTrackSettings>(create);
|
$pb.GeneratedMessage.$_defaultFor<UpdateTrackSettings>(create);
|
||||||
static UpdateTrackSettings? _defaultInstance;
|
static UpdateTrackSettings? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1444,11 +1659,19 @@ class UpdateTrackSettings extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class LeaveRequest extends $pb.GeneratedMessage {
|
class LeaveRequest extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
LeaveRequest._() : super();
|
LeaveRequest._() : super();
|
||||||
@@ -1481,10 +1704,11 @@ class LeaveRequest extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static LeaveRequest create() => LeaveRequest._();
|
static LeaveRequest create() => LeaveRequest._();
|
||||||
LeaveRequest createEmptyInstance() => create();
|
LeaveRequest createEmptyInstance() => create();
|
||||||
static $pb.PbList<LeaveRequest> createRepeated() => $pb.PbList<LeaveRequest>();
|
static $pb.PbList<LeaveRequest> createRepeated() =>
|
||||||
|
$pb.PbList<LeaveRequest>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static LeaveRequest getDefault() =>
|
static LeaveRequest getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<LeaveRequest>(create);
|
$pb.GeneratedMessage.$_defaultFor<LeaveRequest>(create);
|
||||||
static LeaveRequest? _defaultInstance;
|
static LeaveRequest? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1502,13 +1726,29 @@ class LeaveRequest extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class ICEServer extends $pb.GeneratedMessage {
|
class ICEServer extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'urls')
|
..pPS(
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'username')
|
1,
|
||||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'credential')
|
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;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
ICEServer._() : super();
|
ICEServer._() : super();
|
||||||
@@ -1585,13 +1825,19 @@ class ICEServer extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class SpeakersChanged extends $pb.GeneratedMessage {
|
class SpeakersChanged extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..pc<$0.SpeakerInfo>(
|
..pc<$0.SpeakerInfo>(
|
||||||
1,
|
1,
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'speakers',
|
const $core.bool.fromEnvironment('protobuf.omit_field_names')
|
||||||
|
? ''
|
||||||
|
: 'speakers',
|
||||||
$pb.PbFieldType.PM,
|
$pb.PbFieldType.PM,
|
||||||
subBuilder: $0.SpeakerInfo.create)
|
subBuilder: $0.SpeakerInfo.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
@@ -1626,10 +1872,11 @@ class SpeakersChanged extends $pb.GeneratedMessage {
|
|||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SpeakersChanged create() => SpeakersChanged._();
|
static SpeakersChanged create() => SpeakersChanged._();
|
||||||
SpeakersChanged createEmptyInstance() => create();
|
SpeakersChanged createEmptyInstance() => create();
|
||||||
static $pb.PbList<SpeakersChanged> createRepeated() => $pb.PbList<SpeakersChanged>();
|
static $pb.PbList<SpeakersChanged> createRepeated() =>
|
||||||
|
$pb.PbList<SpeakersChanged>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static SpeakersChanged getDefault() =>
|
static SpeakersChanged getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SpeakersChanged>(create);
|
$pb.GeneratedMessage.$_defaultFor<SpeakersChanged>(create);
|
||||||
static SpeakersChanged? _defaultInstance;
|
static SpeakersChanged? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@@ -1638,11 +1885,19 @@ class SpeakersChanged extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
class RoomUpdate extends $pb.GeneratedMessage {
|
class RoomUpdate extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
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(
|
package: const $pb.PackageName(
|
||||||
const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'livekit'),
|
const $core.bool.fromEnvironment('protobuf.omit_message_names')
|
||||||
|
? ''
|
||||||
|
: 'livekit'),
|
||||||
createEmptyInstance: create)
|
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)
|
subBuilder: $0.Room.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@@ -1678,8 +1933,8 @@ class RoomUpdate extends $pb.GeneratedMessage {
|
|||||||
RoomUpdate createEmptyInstance() => create();
|
RoomUpdate createEmptyInstance() => create();
|
||||||
static $pb.PbList<RoomUpdate> createRepeated() => $pb.PbList<RoomUpdate>();
|
static $pb.PbList<RoomUpdate> createRepeated() => $pb.PbList<RoomUpdate>();
|
||||||
@$core.pragma('dart2js:noInline')
|
@$core.pragma('dart2js:noInline')
|
||||||
static RoomUpdate getDefault() =>
|
static RoomUpdate getDefault() => _defaultInstance ??=
|
||||||
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RoomUpdate>(create);
|
$pb.GeneratedMessage.$_defaultFor<RoomUpdate>(create);
|
||||||
static RoomUpdate? _defaultInstance;
|
static RoomUpdate? _defaultInstance;
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
|
|||||||
@@ -11,28 +11,44 @@ import 'package:protobuf/protobuf.dart' as $pb;
|
|||||||
|
|
||||||
class SignalTarget extends $pb.ProtobufEnum {
|
class SignalTarget extends $pb.ProtobufEnum {
|
||||||
static const SignalTarget PUBLISHER = SignalTarget._(
|
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._(
|
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>[
|
static const $core.List<SignalTarget> values = <SignalTarget>[
|
||||||
PUBLISHER,
|
PUBLISHER,
|
||||||
SUBSCRIBER,
|
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];
|
static SignalTarget? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
const SignalTarget._($core.int v, $core.String n) : super(v, n);
|
const SignalTarget._($core.int v, $core.String n) : super(v, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
class VideoQuality extends $pb.ProtobufEnum {
|
class VideoQuality extends $pb.ProtobufEnum {
|
||||||
static const VideoQuality LOW =
|
static const VideoQuality LOW = VideoQuality._(
|
||||||
VideoQuality._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'LOW');
|
0,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||||
|
? ''
|
||||||
|
: 'LOW');
|
||||||
static const VideoQuality MEDIUM = VideoQuality._(
|
static const VideoQuality MEDIUM = VideoQuality._(
|
||||||
1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'MEDIUM');
|
1,
|
||||||
static const VideoQuality HIGH =
|
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||||
VideoQuality._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'HIGH');
|
? ''
|
||||||
|
: 'MEDIUM');
|
||||||
|
static const VideoQuality HIGH = VideoQuality._(
|
||||||
|
2,
|
||||||
|
const $core.bool.fromEnvironment('protobuf.omit_enum_names')
|
||||||
|
? ''
|
||||||
|
: 'HIGH');
|
||||||
|
|
||||||
static const $core.List<VideoQuality> values = <VideoQuality>[
|
static const $core.List<VideoQuality> values = <VideoQuality>[
|
||||||
LOW,
|
LOW,
|
||||||
@@ -40,7 +56,8 @@ class VideoQuality extends $pb.ProtobufEnum {
|
|||||||
HIGH,
|
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];
|
static VideoQuality? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
const VideoQuality._($core.int v, $core.String n) : super(v, n);
|
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`.
|
/// Descriptor for `SignalTarget`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||||
final $typed_data.Uint8List signalTargetDescriptor =
|
final $typed_data.Uint8List signalTargetDescriptor = $convert.base64Decode(
|
||||||
$convert.base64Decode('CgxTaWduYWxUYXJnZXQSDQoJUFVCTElTSEVSEAASDgoKU1VCU0NSSUJFUhAB');
|
'CgxTaWduYWxUYXJnZXQSDQoJUFVCTElTSEVSEAASDgoKU1VCU0NSSUJFUhAB');
|
||||||
@$core.Deprecated('Use videoQualityDescriptor instead')
|
@$core.Deprecated('Use videoQualityDescriptor instead')
|
||||||
const VideoQuality$json = const {
|
const VideoQuality$json = const {
|
||||||
'1': 'VideoQuality',
|
'1': 'VideoQuality',
|
||||||
@@ -32,8 +32,8 @@ const VideoQuality$json = const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `VideoQuality`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
/// Descriptor for `VideoQuality`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||||
final $typed_data.Uint8List videoQualityDescriptor =
|
final $typed_data.Uint8List videoQualityDescriptor = $convert.base64Decode(
|
||||||
$convert.base64Decode('CgxWaWRlb1F1YWxpdHkSBwoDTE9XEAASCgoGTUVESVVNEAESCAoESElHSBAC');
|
'CgxWaWRlb1F1YWxpdHkSBwoDTE9XEAASCgoGTUVESVVNEAESCAoESElHSBAC');
|
||||||
@$core.Deprecated('Use signalRequestDescriptor instead')
|
@$core.Deprecated('Use signalRequestDescriptor instead')
|
||||||
const SignalRequest$json = const {
|
const SignalRequest$json = const {
|
||||||
'1': 'SignalRequest',
|
'1': 'SignalRequest',
|
||||||
@@ -237,7 +237,14 @@ const AddTrackRequest$json = const {
|
|||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'cid', '3': 1, '4': 1, '5': 9, '10': 'cid'},
|
const {'1': 'cid', '3': 1, '4': 1, '5': 9, '10': 'cid'},
|
||||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
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': 'width', '3': 4, '4': 1, '5': 13, '10': 'width'},
|
||||||
const {'1': 'height', '3': 5, '4': 1, '5': 13, '10': 'height'},
|
const {'1': 'height', '3': 5, '4': 1, '5': 13, '10': 'height'},
|
||||||
const {'1': 'muted', '3': 6, '4': 1, '5': 8, '10': 'muted'},
|
const {'1': 'muted', '3': 6, '4': 1, '5': 8, '10': 'muted'},
|
||||||
@@ -252,7 +259,14 @@ const TrickleRequest$json = const {
|
|||||||
'1': 'TrickleRequest',
|
'1': 'TrickleRequest',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'candidateInit', '3': 1, '4': 1, '5': 9, '10': 'candidateInit'},
|
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',
|
'1': 'SetSimulcastLayers',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'track_sid', '3': 1, '4': 1, '5': 9, '10': 'trackSid'},
|
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 {
|
const JoinResponse$json = const {
|
||||||
'1': 'JoinResponse',
|
'1': 'JoinResponse',
|
||||||
'2': const [
|
'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 {
|
const {
|
||||||
'1': 'participant',
|
'1': 'participant',
|
||||||
'3': 2,
|
'3': 2,
|
||||||
@@ -304,7 +332,13 @@ const JoinResponse$json = const {
|
|||||||
'6': '.livekit.ParticipantInfo',
|
'6': '.livekit.ParticipantInfo',
|
||||||
'10': 'otherParticipants'
|
'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 {
|
const {
|
||||||
'1': 'ice_servers',
|
'1': 'ice_servers',
|
||||||
'3': 5,
|
'3': 5,
|
||||||
@@ -313,7 +347,13 @@ const JoinResponse$json = const {
|
|||||||
'6': '.livekit.ICEServer',
|
'6': '.livekit.ICEServer',
|
||||||
'10': 'iceServers'
|
'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',
|
'1': 'TrackPublishedResponse',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'cid', '3': 1, '4': 1, '5': 9, '10': 'cid'},
|
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`.
|
/// Descriptor for `TrackPublishedResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List trackPublishedResponseDescriptor = $convert.base64Decode(
|
final $typed_data.Uint8List trackPublishedResponseDescriptor =
|
||||||
'ChZUcmFja1B1Ymxpc2hlZFJlc3BvbnNlEhAKA2NpZBgBIAEoCVIDY2lkEigKBXRyYWNrGAIgASgLMhIubGl2ZWtpdC5UcmFja0luZm9SBXRyYWNr');
|
$convert.base64Decode(
|
||||||
|
'ChZUcmFja1B1Ymxpc2hlZFJlc3BvbnNlEhAKA2NpZBgBIAEoCVIDY2lkEigKBXRyYWNrGAIgASgLMhIubGl2ZWtpdC5UcmFja0luZm9SBXRyYWNr');
|
||||||
@$core.Deprecated('Use sessionDescriptionDescriptor instead')
|
@$core.Deprecated('Use sessionDescriptionDescriptor instead')
|
||||||
const SessionDescription$json = const {
|
const SessionDescription$json = const {
|
||||||
'1': 'SessionDescription',
|
'1': 'SessionDescription',
|
||||||
@@ -380,7 +428,14 @@ const UpdateTrackSettings$json = const {
|
|||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'track_sids', '3': 1, '4': 3, '5': 9, '10': 'trackSids'},
|
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': '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`.
|
/// Descriptor for `LeaveRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List leaveRequestDescriptor =
|
final $typed_data.Uint8List leaveRequestDescriptor = $convert.base64Decode(
|
||||||
$convert.base64Decode('CgxMZWF2ZVJlcXVlc3QSIwoNY2FuX3JlY29ubmVjdBgBIAEoCFIMY2FuUmVjb25uZWN0');
|
'CgxMZWF2ZVJlcXVlc3QSIwoNY2FuX3JlY29ubmVjdBgBIAEoCFIMY2FuUmVjb25uZWN0');
|
||||||
@$core.Deprecated('Use iCEServerDescriptor instead')
|
@$core.Deprecated('Use iCEServerDescriptor instead')
|
||||||
const ICEServer$json = const {
|
const ICEServer$json = const {
|
||||||
'1': 'ICEServer',
|
'1': 'ICEServer',
|
||||||
@@ -415,7 +470,14 @@ final $typed_data.Uint8List iCEServerDescriptor = $convert.base64Decode(
|
|||||||
const SpeakersChanged$json = const {
|
const SpeakersChanged$json = const {
|
||||||
'1': 'SpeakersChanged',
|
'1': 'SpeakersChanged',
|
||||||
'2': const [
|
'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 {
|
const RoomUpdate$json = const {
|
||||||
'1': 'RoomUpdate',
|
'1': 'RoomUpdate',
|
||||||
'2': const [
|
'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`.
|
/// Descriptor for `RoomUpdate`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List roomUpdateDescriptor =
|
final $typed_data.Uint8List roomUpdateDescriptor = $convert.base64Decode(
|
||||||
$convert.base64Decode('CgpSb29tVXBkYXRlEiEKBHJvb20YASABKAsyDS5saXZla2l0LlJvb21SBHJvb20=');
|
'CgpSb29tVXBkYXRlEiEKBHJvb20YASABKAsyDS5saXZla2l0LlJvb21SBHJvb20=');
|
||||||
|
|||||||
+14
-7
@@ -121,7 +121,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
|||||||
options: options,
|
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
|
// create Room first to listen to events
|
||||||
room = Room._(
|
room = Room._(
|
||||||
@@ -165,10 +166,12 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
|||||||
events.emit(const RoomReconnectingEvent());
|
events.emit(const RoomReconnectingEvent());
|
||||||
})
|
})
|
||||||
..on<EngineDisconnectedEvent>((event) => _handleClose())
|
..on<EngineDisconnectedEvent>((event) => _handleClose())
|
||||||
..on<SignalParticipantUpdateEvent>((event) => _onParticipantUpdateEvent(event.participants))
|
..on<SignalParticipantUpdateEvent>(
|
||||||
|
(event) => _onParticipantUpdateEvent(event.participants))
|
||||||
..on<EngineActiveSpeakersUpdateEvent>(
|
..on<EngineActiveSpeakersUpdateEvent>(
|
||||||
(event) => _onEngineActiveSpeakersUpdateEvent(event.speakers))
|
(event) => _onEngineActiveSpeakersUpdateEvent(event.speakers))
|
||||||
..on<SignalSpeakersChangedEvent>((event) => _onSignalSpeakersChangedEvent(event.speakers))
|
..on<SignalSpeakersChangedEvent>(
|
||||||
|
(event) => _onSignalSpeakersChangedEvent(event.speakers))
|
||||||
..on<EngineDataPacketReceivedEvent>(_onDataMessageEvent)
|
..on<EngineDataPacketReceivedEvent>(_onDataMessageEvent)
|
||||||
..on<EngineRemoteMuteChangedEvent>((event) async {
|
..on<EngineRemoteMuteChangedEvent>((event) async {
|
||||||
final track = localParticipant.trackPublications[event.sid];
|
final track = localParticipant.trackPublications[event.sid];
|
||||||
@@ -196,7 +199,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
|||||||
[participant.roomEvents, participant.events].emit(event);
|
[participant.roomEvents, participant.events].emit(event);
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
// We don't want to pass up any exception so catch everything here.
|
// 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();
|
await engine.reconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteParticipant _getOrCreateRemoteParticipant(String sid, lk_models.ParticipantInfo? info) {
|
RemoteParticipant _getOrCreateRemoteParticipant(
|
||||||
|
String sid, lk_models.ParticipantInfo? info) {
|
||||||
RemoteParticipant? participant = _participants[sid];
|
RemoteParticipant? participant = _participants[sid];
|
||||||
if (participant != null) {
|
if (participant != null) {
|
||||||
return participant;
|
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
|
// trigger change notifier only if list of participants membership is changed
|
||||||
var hasChanged = false;
|
var hasChanged = false;
|
||||||
for (final info in updates) {
|
for (final info in updates) {
|
||||||
@@ -326,7 +332,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
|
|||||||
|
|
||||||
// from data channel
|
// from data channel
|
||||||
// updates are sent only when there's a change to speaker ordering
|
// 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 = [];
|
List<Participant> activeSpeakers = [];
|
||||||
|
|
||||||
// localParticipant & remote participants
|
// localParticipant & remote participants
|
||||||
|
|||||||
+40
-23
@@ -74,7 +74,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
}) : signalClient = signalClient ?? SignalClient() {
|
}) : signalClient = signalClient ?? SignalClient() {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
// log all EngineEvents
|
// log all EngineEvents
|
||||||
events.listen((event) => logger.fine('[EngineEvent] $objectId ${event.runtimeType}'));
|
events.listen((event) =>
|
||||||
|
logger.fine('[EngineEvent] $objectId ${event.runtimeType}'));
|
||||||
}
|
}
|
||||||
|
|
||||||
_setUpListeners();
|
_setUpListeners();
|
||||||
@@ -137,7 +138,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
TrackDimension? dimension,
|
TrackDimension? dimension,
|
||||||
}) async {
|
}) async {
|
||||||
// send request to add track
|
// 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
|
// wait for response, or timeout
|
||||||
final event = await _signalListener.waitFor<SignalLocalTrackPublishedEvent>(
|
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
|
// make sure we do have a data connection
|
||||||
await _ensurePublisherConnected();
|
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) {
|
if (packet.kind == lk_models.DataPacket_Kind.LOSSY && _lossyDC != null) {
|
||||||
await _lossyDC?.send(dcMessage);
|
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);
|
await _reliableDC?.send(dcMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -231,7 +235,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
// await negotiate(iceRestart: true);
|
// await negotiate(iceRestart: true);
|
||||||
if (_hasPublished) {
|
if (_hasPublished) {
|
||||||
logger.fine('reconnect: publisher.createAndSendOffer');
|
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)) {
|
if (!(primary?.pc.iceConnectionState?.isConnected() ?? false)) {
|
||||||
@@ -263,9 +268,11 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
|
|
||||||
RTCConfiguration? config;
|
RTCConfiguration? config;
|
||||||
// use server-provided iceServers if not provided by user
|
// 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();
|
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);
|
publisher = await PCTransport.create(config);
|
||||||
@@ -297,16 +304,18 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
isPrimary: _subscriberPrimary,
|
isPrimary: _subscriberPrimary,
|
||||||
));
|
));
|
||||||
|
|
||||||
publisher?.pc.onIceConnectionState = (state) => events.emit(EnginePublisherIceStateUpdatedEvent(
|
publisher?.pc.onIceConnectionState =
|
||||||
state: state,
|
(state) => events.emit(EnginePublisherIceStateUpdatedEvent(
|
||||||
isPrimary: !_subscriberPrimary,
|
state: state,
|
||||||
));
|
isPrimary: !_subscriberPrimary,
|
||||||
|
));
|
||||||
|
|
||||||
events.on<EngineIceStateUpdatedEvent>((event) {
|
events.on<EngineIceStateUpdatedEvent>((event) {
|
||||||
// only listen to primary ice events
|
// only listen to primary ice events
|
||||||
if (!event.isPrimary) return;
|
if (!event.isPrimary) return;
|
||||||
|
|
||||||
if (event.iceState == rtc.RTCIceConnectionState.RTCIceConnectionStateConnected) {
|
if (event.iceState ==
|
||||||
|
rtc.RTCIceConnectionState.RTCIceConnectionStateConnected) {
|
||||||
if (!_iceConnected) {
|
if (!_iceConnected) {
|
||||||
_iceConnected = true;
|
_iceConnected = true;
|
||||||
if (_connectionState == ConnectionState.reconnecting) {
|
if (_connectionState == ConnectionState.reconnecting) {
|
||||||
@@ -315,7 +324,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
events.emit(const EngineConnectedEvent());
|
events.emit(const EngineConnectedEvent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (event.iceState == rtc.RTCIceConnectionState.RTCIceConnectionStateFailed) {
|
} else if (event.iceState ==
|
||||||
|
rtc.RTCIceConnectionState.RTCIceConnectionStateFailed) {
|
||||||
// trigger reconnect sequence
|
// trigger reconnect sequence
|
||||||
if (_iceConnected) {
|
if (_iceConnected) {
|
||||||
_iceConnected = false;
|
_iceConnected = false;
|
||||||
@@ -345,7 +355,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
..binaryType = 'binary'
|
..binaryType = 'binary'
|
||||||
..ordered = true
|
..ordered = true
|
||||||
..maxRetransmits = 0;
|
..maxRetransmits = 0;
|
||||||
_lossyDC = await publisher?.pc.createDataChannel(_lossyDCLabel, lossyInit);
|
_lossyDC =
|
||||||
|
await publisher?.pc.createDataChannel(_lossyDCLabel, lossyInit);
|
||||||
_lossyDC?.onMessage = _onDCMessage;
|
_lossyDC?.onMessage = _onDCMessage;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
logger.severe('[$objectId] createDataChannel() did throw $_');
|
logger.severe('[$objectId] createDataChannel() did throw $_');
|
||||||
@@ -355,7 +366,8 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
final reliableInit = rtc.RTCDataChannelInit()
|
final reliableInit = rtc.RTCDataChannelInit()
|
||||||
..binaryType = 'binary'
|
..binaryType = 'binary'
|
||||||
..ordered = true;
|
..ordered = true;
|
||||||
_reliableDC = await publisher?.pc.createDataChannel(_reliableDCLabel, reliableInit);
|
_reliableDC =
|
||||||
|
await publisher?.pc.createDataChannel(_reliableDCLabel, reliableInit);
|
||||||
_reliableDC?.onMessage = _onDCMessage;
|
_reliableDC?.onMessage = _onDCMessage;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
logger.severe('[$objectId] createDataChannel() did throw $_');
|
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);
|
final dp = lk_models.DataPacket.fromBuffer(message.binary);
|
||||||
if (dp.whichValue() == lk_models.DataPacket_Value.speaker) {
|
if (dp.whichValue() == lk_models.DataPacket_Value.speaker) {
|
||||||
// Speaker packet
|
// 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) {
|
} else if (dp.whichValue() == lk_models.DataPacket_Value.user) {
|
||||||
// User packet
|
// User packet
|
||||||
events.emit(EngineDataPacketReceivedEvent(
|
events.emit(EngineDataPacketReceivedEvent(
|
||||||
@@ -409,13 +422,15 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
logger.fine('[$objectId] Disconnected $reason');
|
logger.fine('[$objectId] Disconnected $reason');
|
||||||
|
|
||||||
if (_reconnectAttempts >= _maxReconnectAttempts) {
|
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();
|
await close();
|
||||||
events.emit(const EngineDisconnectedEvent());
|
events.emit(const EngineDisconnectedEvent());
|
||||||
return;
|
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
|
// if this instance is disposed, we probably don't want to continue any more
|
||||||
// so the whole block will be canceled from being executed
|
// 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 {
|
..on<SignalTrickleEvent>((event) async {
|
||||||
if (publisher == null || subscriber == null) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
logger.fine('got ICE candidate from peer');
|
logger.fine('got ICE candidate from peer');
|
||||||
@@ -501,8 +517,9 @@ class RTCEngine extends Disposable with EventsEmittable<EngineEvent> {
|
|||||||
await close();
|
await close();
|
||||||
events.emit(const EngineDisconnectedEvent());
|
events.emit(const EngineDisconnectedEvent());
|
||||||
})
|
})
|
||||||
..on<SignalMuteTrackEvent>((event) => events.emit(EngineRemoteMuteChangedEvent(
|
..on<SignalMuteTrackEvent>(
|
||||||
sid: event.sid,
|
(event) => events.emit(EngineRemoteMuteChangedEvent(
|
||||||
muted: event.muted,
|
sid: event.sid,
|
||||||
)));
|
muted: event.muted,
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
|||||||
// Attempt Validation
|
// Attempt Validation
|
||||||
try {
|
try {
|
||||||
final validateResponse = await http.get(validateUri);
|
final validateResponse = await http.get(validateUri);
|
||||||
if (validateResponse.statusCode != 200) throw ConnectException(validateResponse.body);
|
if (validateResponse.statusCode != 200)
|
||||||
|
throw ConnectException(validateResponse.body);
|
||||||
throw ConnectException();
|
throw ConnectException();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Pass it up if it's already a `ConnectError`
|
// Pass it up if it's already a `ConnectError`
|
||||||
@@ -126,15 +127,19 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
|||||||
// await close();
|
// await close();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
void sendOffer(rtc.RTCSessionDescription offer) => _sendRequest(lk_rtc.SignalRequest(
|
void sendOffer(rtc.RTCSessionDescription offer) =>
|
||||||
|
_sendRequest(lk_rtc.SignalRequest(
|
||||||
offer: offer.toSDKType(),
|
offer: offer.toSDKType(),
|
||||||
));
|
));
|
||||||
|
|
||||||
void sendAnswer(rtc.RTCSessionDescription answer) => _sendRequest(lk_rtc.SignalRequest(
|
void sendAnswer(rtc.RTCSessionDescription answer) =>
|
||||||
|
_sendRequest(lk_rtc.SignalRequest(
|
||||||
answer: answer.toSDKType(),
|
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(
|
lk_rtc.SignalRequest(
|
||||||
trickle: lk_rtc.TrickleRequest(
|
trickle: lk_rtc.TrickleRequest(
|
||||||
candidateInit: candidate.toJson(),
|
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(
|
mute: lk_rtc.MuteTrackRequest(
|
||||||
sid: trackSid,
|
sid: trackSid,
|
||||||
muted: muted,
|
muted: muted,
|
||||||
@@ -180,7 +186,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
|||||||
subscription: subscription,
|
subscription: subscription,
|
||||||
));
|
));
|
||||||
|
|
||||||
void sendSetSimulcastLayers(String trackSid, List<lk_rtc.VideoQuality> layers) =>
|
void sendSetSimulcastLayers(
|
||||||
|
String trackSid, List<lk_rtc.VideoQuality> layers) =>
|
||||||
_sendRequest(lk_rtc.SignalRequest(
|
_sendRequest(lk_rtc.SignalRequest(
|
||||||
simulcast: lk_rtc.SetSimulcastLayers(
|
simulcast: lk_rtc.SetSimulcastLayers(
|
||||||
trackSid: trackSid,
|
trackSid: trackSid,
|
||||||
@@ -194,7 +201,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
|||||||
|
|
||||||
void _sendRequest(lk_rtc.SignalRequest req) {
|
void _sendRequest(lk_rtc.SignalRequest req) {
|
||||||
if (_ws == null || isDisposed) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +234,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
|||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case lk_rtc.SignalResponse_Message.update:
|
case lk_rtc.SignalResponse_Message.update:
|
||||||
events.emit(SignalParticipantUpdateEvent(participants: msg.update.participants));
|
events.emit(SignalParticipantUpdateEvent(
|
||||||
|
participants: msg.update.participants));
|
||||||
break;
|
break;
|
||||||
case lk_rtc.SignalResponse_Message.trackPublished:
|
case lk_rtc.SignalResponse_Message.trackPublished:
|
||||||
events.emit(SignalLocalTrackPublishedEvent(
|
events.emit(SignalLocalTrackPublishedEvent(
|
||||||
@@ -235,7 +244,8 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
|
|||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case lk_rtc.SignalResponse_Message.speakersChanged:
|
case lk_rtc.SignalResponse_Message.speakersChanged:
|
||||||
events.emit(SignalSpeakersChangedEvent(speakers: msg.speakersChanged.speakers));
|
events.emit(
|
||||||
|
SignalSpeakersChangedEvent(speakers: msg.speakersChanged.speakers));
|
||||||
break;
|
break;
|
||||||
case lk_rtc.SignalResponse_Message.leave:
|
case lk_rtc.SignalResponse_Message.leave:
|
||||||
events.emit(SignalLeaveEvent(canReconnect: msg.leave.canReconnect));
|
events.emit(SignalLeaveEvent(canReconnect: msg.leave.canReconnect));
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ mixin _Disposer {
|
|||||||
logger.fine('[${objectId}] dispose()');
|
logger.fine('[${objectId}] dispose()');
|
||||||
_isDisposed = true;
|
_isDisposed = true;
|
||||||
if (_disposeFuncs.isNotEmpty) {
|
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
|
// call dispose funcs in reverse order
|
||||||
for (final _func in _disposeFuncs.reversed) {
|
for (final _func in _disposeFuncs.reversed) {
|
||||||
await _func();
|
await _func();
|
||||||
|
|||||||
@@ -87,11 +87,13 @@ class NativeAudioConfiguration {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Map<String, dynamic> toMap() => <String, dynamic>{
|
Map<String, dynamic> toMap() => <String, dynamic>{
|
||||||
if (appleAudioCategory != null) 'appleAudioCategory': appleAudioCategory!.toStringValue(),
|
if (appleAudioCategory != null)
|
||||||
|
'appleAudioCategory': appleAudioCategory!.toStringValue(),
|
||||||
if (appleAudioCategoryOptions != null)
|
if (appleAudioCategoryOptions != null)
|
||||||
'appleAudioCategoryOptions':
|
'appleAudioCategoryOptions':
|
||||||
appleAudioCategoryOptions!.map((e) => e.toStringValue()).toList(),
|
appleAudioCategoryOptions!.map((e) => e.toStringValue()).toList(),
|
||||||
if (appleAudioMode != null) 'appleAudioMode': appleAudioMode!.toStringValue(),
|
if (appleAudioMode != null)
|
||||||
|
'appleAudioMode': appleAudioMode!.toStringValue(),
|
||||||
};
|
};
|
||||||
|
|
||||||
NativeAudioConfiguration copyWith({
|
NativeAudioConfiguration copyWith({
|
||||||
@@ -101,14 +103,16 @@ class NativeAudioConfiguration {
|
|||||||
}) =>
|
}) =>
|
||||||
NativeAudioConfiguration(
|
NativeAudioConfiguration(
|
||||||
appleAudioCategory: appleAudioCategory ?? this.appleAudioCategory,
|
appleAudioCategory: appleAudioCategory ?? this.appleAudioCategory,
|
||||||
appleAudioCategoryOptions: appleAudioCategoryOptions ?? this.appleAudioCategoryOptions,
|
appleAudioCategoryOptions:
|
||||||
|
appleAudioCategoryOptions ?? this.appleAudioCategoryOptions,
|
||||||
appleAudioMode: appleAudioMode ?? this.appleAudioMode,
|
appleAudioMode: appleAudioMode ?? this.appleAudioMode,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const _lkMethodChannel = MethodChannel('livekit_client');
|
const _lkMethodChannel = MethodChannel('livekit_client');
|
||||||
|
|
||||||
Future<bool> configureNativeAudio(NativeAudioConfiguration configuration) async {
|
Future<bool> configureNativeAudio(
|
||||||
|
NativeAudioConfiguration configuration) async {
|
||||||
try {
|
try {
|
||||||
final result = await _lkMethodChannel.invokeMethod<bool>(
|
final result = await _lkMethodChannel.invokeMethod<bool>(
|
||||||
'configureNativeAudio',
|
'configureNativeAudio',
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ class LiveKitWebSocketIO implements LiveKitWebSocket {
|
|||||||
void send(List<int> data) {
|
void send(List<int> data) {
|
||||||
// 0 CONNECTING, 1 OPEN, 2 CLOSING, 3 CLOSED
|
// 0 CONNECTING, 1 OPEN, 2 CLOSING, 3 CLOSED
|
||||||
if (_ws.readyState != 1) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,10 @@ class LiveKitWebSocketWeb implements LiveKitWebSocket {
|
|||||||
]) async {
|
]) async {
|
||||||
final completer = Completer<LiveKitWebSocketWeb>();
|
final completer = Completer<LiveKitWebSocketWeb>();
|
||||||
final ws = html.WebSocket(uri.toString());
|
final ws = html.WebSocket(uri.toString());
|
||||||
ws.onOpen.listen((_) => completer.complete(LiveKitWebSocketWeb._(ws, options)));
|
ws.onOpen
|
||||||
ws.onError.listen((_) => completer.completeError(WebSocketException.connect()));
|
.listen((_) => completer.complete(LiveKitWebSocketWeb._(ws, options)));
|
||||||
|
ws.onError
|
||||||
|
.listen((_) => completer.completeError(WebSocketException.connect()));
|
||||||
return completer.future;
|
return completer.future;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ enum AudioTrackState {
|
|||||||
localAndRemote,
|
localAndRemote,
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef ConfigureNativeAudioFunc = Future<NativeAudioConfiguration> Function(AudioTrackState state);
|
typedef ConfigureNativeAudioFunc = Future<NativeAudioConfiguration> Function(
|
||||||
|
AudioTrackState state);
|
||||||
|
|
||||||
class AudioTrack extends Track {
|
class AudioTrack extends Track {
|
||||||
// it's possible to set custom function here to customize audio session configuration
|
// it's possible to set custom function here to customize audio session configuration
|
||||||
@@ -102,11 +103,13 @@ class AudioTrack extends Track {
|
|||||||
NativeAudioConfiguration? config;
|
NativeAudioConfiguration? config;
|
||||||
if (!kIsWeb && Platform.isIOS) {
|
if (!kIsWeb && Platform.isIOS) {
|
||||||
// Only iOS for now...
|
// Only iOS for now...
|
||||||
config = await nativeAudioConfigurationForAudioTrackState.call(audioTrackState);
|
config = await nativeAudioConfigurationForAudioTrackState
|
||||||
|
.call(audioTrackState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
logger.fine('[$runtimeType] configuring for ${audioTrackState} using ${config}...');
|
logger.fine(
|
||||||
|
'[$runtimeType] configuring for ${audioTrackState} using ${config}...');
|
||||||
try {
|
try {
|
||||||
await configureNativeAudio(config);
|
await configureNativeAudio(config);
|
||||||
} catch (error) {
|
} 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) {
|
if (state == AudioTrackState.remoteOnly) {
|
||||||
return NativeAudioConfiguration(
|
return NativeAudioConfiguration(
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ class LocalAudioTrack extends AudioTrack {
|
|||||||
) : super(name, track, stream);
|
) : super(name, track, stream);
|
||||||
|
|
||||||
/// Creates a new audio track from the default audio input device.
|
/// 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
|
// 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>{
|
// 'audio': <String, dynamic>{
|
||||||
// 'echoCancellation': true,
|
// 'echoCancellation': true,
|
||||||
// 'noiseSuppression': true,
|
// 'noiseSuppression': true,
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ class CameraTrackOptions extends LocalVideoTrackOptions {
|
|||||||
@override
|
@override
|
||||||
Map<String, dynamic> toMediaConstraintsMap() => <String, dynamic>{
|
Map<String, dynamic> toMediaConstraintsMap() => <String, dynamic>{
|
||||||
...super.toMediaConstraintsMap(),
|
...super.toMediaConstraintsMap(),
|
||||||
'facingMode': cameraPosition == CameraPosition.front ? 'user' : 'environment',
|
'facingMode':
|
||||||
|
cameraPosition == CameraPosition.front ? 'user' : 'environment',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns new options with updated properties
|
// Returns new options with updated properties
|
||||||
@@ -70,7 +71,8 @@ class VideoEncoding {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => '${runtimeType}(maxFramerate: ${maxFramerate}, maxBitrate: ${maxBitrate})';
|
String toString() =>
|
||||||
|
'${runtimeType}(maxFramerate: ${maxFramerate}, maxBitrate: ${maxBitrate})';
|
||||||
}
|
}
|
||||||
|
|
||||||
extension VideoEncodingExt on VideoEncoding {
|
extension VideoEncodingExt on VideoEncoding {
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ abstract class Track extends DisposableChangeNotifier {
|
|||||||
this.mediaStreamTrack,
|
this.mediaStreamTrack,
|
||||||
);
|
);
|
||||||
|
|
||||||
bool get muted => mediaStreamTrack.muted == null ? false : mediaStreamTrack.muted!;
|
bool get muted =>
|
||||||
|
mediaStreamTrack.muted == null ? false : mediaStreamTrack.muted!;
|
||||||
|
|
||||||
rtc.RTCRtpMediaType get mediaType {
|
rtc.RTCRtpMediaType get mediaType {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ abstract class TrackPublication extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// True when the track is published with name [Track.screenShareName].
|
/// 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) {
|
void updateFromInfo(lk_models.TrackInfo info) {
|
||||||
muted = info.muted;
|
muted = info.muted;
|
||||||
@@ -45,5 +46,6 @@ abstract class TrackPublication extends Disposable {
|
|||||||
int get hashCode => sid.hashCode;
|
int get hashCode => sid.hashCode;
|
||||||
|
|
||||||
@override
|
@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;
|
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
|
// 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
|
// the only exception to this is when ICE restart is needed
|
||||||
final currentSD = await getRemoteDescription();
|
final currentSD = await getRemoteDescription();
|
||||||
|
|||||||
+4
-2
@@ -72,8 +72,10 @@ class RTCConfiguration {
|
|||||||
// only supports unified plan
|
// only supports unified plan
|
||||||
'sdpSemantics': 'unified-plan',
|
'sdpSemantics': 'unified-plan',
|
||||||
if (iceServersMap.isNotEmpty) 'iceServers': iceServersMap,
|
if (iceServersMap.isNotEmpty) 'iceServers': iceServersMap,
|
||||||
if (iceCandidatePoolSize != null) 'iceCandidatePoolSize': iceCandidatePoolSize,
|
if (iceCandidatePoolSize != null)
|
||||||
if (iceTransportPolicy != null) 'iceTransportPolicy': iceTransportPolicy!.toStringValue(),
|
'iceCandidatePoolSize': iceCandidatePoolSize,
|
||||||
|
if (iceTransportPolicy != null)
|
||||||
|
'iceTransportPolicy': iceTransportPolicy!.toStringValue(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -34,7 +34,8 @@ class Utils {
|
|||||||
path: validate ? 'validate' : 'rtc',
|
path: validate ? 'validate' : 'rtc',
|
||||||
queryParameters: <String, String>{
|
queryParameters: <String, String>{
|
||||||
'access_token': token,
|
'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',
|
if (reconnect) 'reconnect': '1',
|
||||||
'protocol': protocol.toStringValue(),
|
'protocol': protocol.toStringValue(),
|
||||||
'sdk': 'flutter',
|
'sdk': 'flutter',
|
||||||
@@ -77,7 +78,9 @@ class Utils {
|
|||||||
|
|
||||||
VideoEncoding? videoEncoding = options.videoEncoding;
|
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
|
// don't set encoding when we are not simulcasting and user isn't restricting
|
||||||
// encoding parameters
|
// encoding parameters
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -95,6 +95,11 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
flutter_web_plugins:
|
||||||
|
dependency: "direct main"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
flutter_webrtc:
|
flutter_webrtc:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -116,6 +121,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0"
|
version: "4.0.0"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.3"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -9,12 +9,15 @@ environment:
|
|||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
flutter_web_plugins:
|
||||||
|
sdk: flutter
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
async: ^2.8.1
|
async: ^2.8.1
|
||||||
collection: ^1.15.0
|
collection: ^1.15.0
|
||||||
fixnum: ^1.0.0
|
fixnum: ^1.0.0
|
||||||
meta: ^1.7.0
|
meta: ^1.7.0
|
||||||
|
|
||||||
http: ^0.13.3
|
http: ^0.13.3
|
||||||
logging: ^1.0.2
|
logging: ^1.0.2
|
||||||
uuid: ^3.0.4
|
uuid: ^3.0.4
|
||||||
@@ -32,3 +35,9 @@ flutter:
|
|||||||
platforms:
|
platforms:
|
||||||
ios:
|
ios:
|
||||||
pluginClass: LiveKitPlugin
|
pluginClass: LiveKitPlugin
|
||||||
|
android:
|
||||||
|
package: io.livekit.plugin
|
||||||
|
pluginClass: LiveKitPlugin
|
||||||
|
web:
|
||||||
|
pluginClass: LiveKitWebPlugin
|
||||||
|
fileName: livekit_client_web.dart
|
||||||
|
|||||||
Reference in New Issue
Block a user