diff --git a/Makefile b/Makefile index 5a378d6b..aaf517c8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PROTO_DIR="../protocol" +PROTO_DIR="../protocol/protobufs" proto: @{ \ @@ -6,7 +6,7 @@ proto: then \ protoc --dart_out=lib/src/proto -I$(PROTO_DIR) $(PROTO_DIR)/livekit_rtc.proto $(PROTO_DIR)/livekit_models.proto; \ else \ - echo "../protocol is not found. github.com/livekit/protocol must be checked out"; \ + echo "../protocol/protobufs is not found. github.com/livekit/protocol must be checked out"; \ fi \ } diff --git a/lib/src/core/engine.dart b/lib/src/core/engine.dart index f4e459db..f51b3175 100644 --- a/lib/src/core/engine.dart +++ b/lib/src/core/engine.dart @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// ignore_for_file: deprecated_member_use_from_same_package + import 'dart:async'; import 'package:flutter/foundation.dart'; @@ -829,6 +831,7 @@ class Engine extends Disposable with EventsEmittable { void sendSyncState({ required lk_rtc.UpdateSubscription subscription, required Iterable? publishTracks, + required List trackSidsDisabled, }) async { final previousAnswer = (await subscriber?.pc.getLocalDescription())?.toPBType(); @@ -837,6 +840,7 @@ class Engine extends Disposable with EventsEmittable { subscription: subscription, publishTracks: publishTracks, dataChannelInfo: dataChannelInfo(), + trackSidsDisabled: trackSidsDisabled, ); } diff --git a/lib/src/core/room.dart b/lib/src/core/room.dart index f159bd85..ff1dd364 100644 --- a/lib/src/core/room.dart +++ b/lib/src/core/room.dart @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// ignore_for_file: deprecated_member_use_from_same_package + import 'dart:async'; import 'package:flutter/foundation.dart'; @@ -707,15 +709,29 @@ class Room extends DisposableChangeNotifier with EventsEmittable { } Future _sendSyncState() async { - final sendUnSub = connectOptions.autoSubscribe; - final participantTracks = - remoteParticipants.values.map((e) => e.participantTracks()); + final autoSubscribe = connectOptions.autoSubscribe; + + final trackSids = []; + final trackSidsDisabled = []; + + for (var participant in remoteParticipants.values) { + for (var track in participant.trackPublications.values) { + if (track.subscribed != autoSubscribe) { + trackSids.add(track.sid); + } + if (!track.enabled) { + trackSidsDisabled.add(track.sid); + } + } + } + engine.sendSyncState( subscription: lk_rtc.UpdateSubscription( - participantTracks: participantTracks, - trackSids: participantTracks.map((e) => e.trackSids).flattened, - subscribe: !sendUnSub, + participantTracks: [], + trackSids: trackSids, + subscribe: !autoSubscribe, ), + trackSidsDisabled: trackSidsDisabled, publishTracks: localParticipant?.publishedTracksInfo(), ); } diff --git a/lib/src/core/signal_client.dart b/lib/src/core/signal_client.dart index f66b7828..3d9e67dc 100644 --- a/lib/src/core/signal_client.dart +++ b/lib/src/core/signal_client.dart @@ -530,6 +530,7 @@ extension SignalClientRequests on SignalClient { required lk_rtc.UpdateSubscription subscription, required Iterable? publishTracks, required Iterable? dataChannelInfo, + required List trackSidsDisabled, }) => _sendRequest(lk_rtc.SignalRequest( syncState: lk_rtc.SyncState( @@ -537,6 +538,7 @@ extension SignalClientRequests on SignalClient { subscription: subscription, publishTracks: publishTracks, dataChannels: dataChannelInfo, + trackSidsDisabled: trackSidsDisabled, ), )); diff --git a/lib/src/participant/local.dart b/lib/src/participant/local.dart index 8453e504..88648f9a 100644 --- a/lib/src/participant/local.dart +++ b/lib/src/participant/local.dart @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// ignore_for_file: deprecated_member_use_from_same_package + import 'package:flutter/foundation.dart'; import 'package:flutter_webrtc/flutter_webrtc.dart' as rtc; diff --git a/lib/src/proto/livekit_models.pb.dart b/lib/src/proto/livekit_models.pb.dart index 3d2ecb06..3278dde0 100644 --- a/lib/src/proto/livekit_models.pb.dart +++ b/lib/src/proto/livekit_models.pb.dart @@ -32,6 +32,8 @@ class Room extends $pb.GeneratedMessage { $core.int? numParticipants, $core.bool? activeRecording, $core.int? numPublishers, + TimedVersion? version, + $core.int? departureTimeout, }) { final $result = create(); if (sid != null) { @@ -67,6 +69,12 @@ class Room extends $pb.GeneratedMessage { if (numPublishers != null) { $result.numPublishers = numPublishers; } + if (version != null) { + $result.version = version; + } + if (departureTimeout != null) { + $result.departureTimeout = departureTimeout; + } return $result; } Room._() : super(); @@ -97,6 +105,10 @@ class Room extends $pb.GeneratedMessage { ..aOB(10, _omitFieldNames ? '' : 'activeRecording') ..a<$core.int>( 11, _omitFieldNames ? '' : 'numPublishers', $pb.PbFieldType.OU3) + ..aOM(13, _omitFieldNames ? '' : 'version', + subBuilder: TimedVersion.create) + ..a<$core.int>( + 14, _omitFieldNames ? '' : 'departureTimeout', $pb.PbFieldType.OU3) ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -242,6 +254,32 @@ class Room extends $pb.GeneratedMessage { $core.bool hasNumPublishers() => $_has(10); @$pb.TagNumber(11) void clearNumPublishers() => clearField(11); + + @$pb.TagNumber(13) + TimedVersion get version => $_getN(11); + @$pb.TagNumber(13) + set version(TimedVersion v) { + setField(13, v); + } + + @$pb.TagNumber(13) + $core.bool hasVersion() => $_has(11); + @$pb.TagNumber(13) + void clearVersion() => clearField(13); + @$pb.TagNumber(13) + TimedVersion ensureVersion() => $_ensure(11); + + @$pb.TagNumber(14) + $core.int get departureTimeout => $_getIZ(12); + @$pb.TagNumber(14) + set departureTimeout($core.int v) { + $_setUnsignedInt32(12, v); + } + + @$pb.TagNumber(14) + $core.bool hasDepartureTimeout() => $_has(12); + @$pb.TagNumber(14) + void clearDepartureTimeout() => clearField(14); } class Codec extends $pb.GeneratedMessage { @@ -1483,25 +1521,39 @@ class VideoLayer extends $pb.GeneratedMessage { void clearSsrc() => clearField(5); } -enum DataPacket_Value { user, speaker, notSet } +enum DataPacket_Value { user, speaker, sipDtmf, notSet } /// new DataPacket API class DataPacket extends $pb.GeneratedMessage { factory DataPacket({ - DataPacket_Kind? kind, + @$core.Deprecated('This field is deprecated.') DataPacket_Kind? kind, UserPacket? user, - ActiveSpeakerUpdate? speaker, + @$core.Deprecated('This field is deprecated.') ActiveSpeakerUpdate? speaker, + $core.String? participantIdentity, + $core.Iterable<$core.String>? destinationIdentities, + SipDTMF? sipDtmf, }) { final $result = create(); if (kind != null) { + // ignore: deprecated_member_use_from_same_package $result.kind = kind; } if (user != null) { $result.user = user; } if (speaker != null) { + // ignore: deprecated_member_use_from_same_package $result.speaker = speaker; } + if (participantIdentity != null) { + $result.participantIdentity = participantIdentity; + } + if (destinationIdentities != null) { + $result.destinationIdentities.addAll(destinationIdentities); + } + if (sipDtmf != null) { + $result.sipDtmf = sipDtmf; + } return $result; } DataPacket._() : super(); @@ -1515,13 +1567,14 @@ class DataPacket extends $pb.GeneratedMessage { static const $core.Map<$core.int, DataPacket_Value> _DataPacket_ValueByTag = { 2: DataPacket_Value.user, 3: DataPacket_Value.speaker, + 6: DataPacket_Value.sipDtmf, 0: DataPacket_Value.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'DataPacket', package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'), createEmptyInstance: create) - ..oo(0, [2, 3]) + ..oo(0, [2, 3, 6]) ..e(1, _omitFieldNames ? '' : 'kind', $pb.PbFieldType.OE, defaultOrMaker: DataPacket_Kind.RELIABLE, valueOf: DataPacket_Kind.valueOf, @@ -1530,6 +1583,10 @@ class DataPacket extends $pb.GeneratedMessage { subBuilder: UserPacket.create) ..aOM(3, _omitFieldNames ? '' : 'speaker', subBuilder: ActiveSpeakerUpdate.create) + ..aOS(4, _omitFieldNames ? '' : 'participantIdentity') + ..pPS(5, _omitFieldNames ? '' : 'destinationIdentities') + ..aOM(6, _omitFieldNames ? '' : 'sipDtmf', + subBuilder: SipDTMF.create) ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -1556,15 +1613,19 @@ class DataPacket extends $pb.GeneratedMessage { DataPacket_Value whichValue() => _DataPacket_ValueByTag[$_whichOneof(0)]!; void clearValue() => clearField($_whichOneof(0)); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) DataPacket_Kind get kind => $_getN(0); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) set kind(DataPacket_Kind v) { setField(1, v); } + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) $core.bool hasKind() => $_has(0); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) void clearKind() => clearField(1); @@ -1582,19 +1643,55 @@ class DataPacket extends $pb.GeneratedMessage { @$pb.TagNumber(2) UserPacket ensureUser() => $_ensure(1); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) ActiveSpeakerUpdate get speaker => $_getN(2); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) set speaker(ActiveSpeakerUpdate v) { setField(3, v); } + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) $core.bool hasSpeaker() => $_has(2); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) void clearSpeaker() => clearField(3); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) ActiveSpeakerUpdate ensureSpeaker() => $_ensure(2); + + /// participant identity of user that sent the message + @$pb.TagNumber(4) + $core.String get participantIdentity => $_getSZ(3); + @$pb.TagNumber(4) + set participantIdentity($core.String v) { + $_setString(3, v); + } + + @$pb.TagNumber(4) + $core.bool hasParticipantIdentity() => $_has(3); + @$pb.TagNumber(4) + void clearParticipantIdentity() => clearField(4); + + /// identities of participants who will receive the message (sent to all by default) + @$pb.TagNumber(5) + $core.List<$core.String> get destinationIdentities => $_getList(4); + + @$pb.TagNumber(6) + SipDTMF get sipDtmf => $_getN(5); + @$pb.TagNumber(6) + set sipDtmf(SipDTMF v) { + setField(6, v); + } + + @$pb.TagNumber(6) + $core.bool hasSipDtmf() => $_has(5); + @$pb.TagNumber(6) + void clearSipDtmf() => clearField(6); + @$pb.TagNumber(6) + SipDTMF ensureSipDtmf() => $_ensure(5); } class ActiveSpeakerUpdate extends $pb.GeneratedMessage { @@ -1748,30 +1845,37 @@ class SpeakerInfo extends $pb.GeneratedMessage { class UserPacket extends $pb.GeneratedMessage { factory UserPacket({ - $core.String? participantSid, + @$core.Deprecated('This field is deprecated.') $core.String? participantSid, $core.List<$core.int>? payload, + @$core.Deprecated('This field is deprecated.') $core.Iterable<$core.String>? destinationSids, $core.String? topic, + @$core.Deprecated('This field is deprecated.') $core.String? participantIdentity, + @$core.Deprecated('This field is deprecated.') $core.Iterable<$core.String>? destinationIdentities, }) { final $result = create(); if (participantSid != null) { + // ignore: deprecated_member_use_from_same_package $result.participantSid = participantSid; } if (payload != null) { $result.payload = payload; } if (destinationSids != null) { + // ignore: deprecated_member_use_from_same_package $result.destinationSids.addAll(destinationSids); } if (topic != null) { $result.topic = topic; } if (participantIdentity != null) { + // ignore: deprecated_member_use_from_same_package $result.participantIdentity = participantIdentity; } if (destinationIdentities != null) { + // ignore: deprecated_member_use_from_same_package $result.destinationIdentities.addAll(destinationIdentities); } return $result; @@ -1819,15 +1923,19 @@ class UserPacket extends $pb.GeneratedMessage { static UserPacket? _defaultInstance; /// participant ID of user that sent the message + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) $core.String get participantSid => $_getSZ(0); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) set participantSid($core.String v) { $_setString(0, v); } + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) $core.bool hasParticipantSid() => $_has(0); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(1) void clearParticipantSid() => clearField(1); @@ -1845,6 +1953,7 @@ class UserPacket extends $pb.GeneratedMessage { void clearPayload() => clearField(2); /// the ID of the participants who will receive the message (sent to all by default) + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(3) $core.List<$core.String> get destinationSids => $_getList(2); @@ -1861,23 +1970,104 @@ class UserPacket extends $pb.GeneratedMessage { @$pb.TagNumber(4) void clearTopic() => clearField(4); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(5) $core.String get participantIdentity => $_getSZ(4); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(5) set participantIdentity($core.String v) { $_setString(4, v); } + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(5) $core.bool hasParticipantIdentity() => $_has(4); + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(5) void clearParticipantIdentity() => clearField(5); /// identities of participants who will receive the message (sent to all by default) + @$core.Deprecated('This field is deprecated.') @$pb.TagNumber(6) $core.List<$core.String> get destinationIdentities => $_getList(5); } +class SipDTMF extends $pb.GeneratedMessage { + factory SipDTMF({ + $core.int? code, + $core.String? digit, + }) { + final $result = create(); + if (code != null) { + $result.code = code; + } + if (digit != null) { + $result.digit = digit; + } + return $result; + } + SipDTMF._() : super(); + factory SipDTMF.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory SipDTMF.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SipDTMF', + package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'), + createEmptyInstance: create) + ..a<$core.int>(3, _omitFieldNames ? '' : 'code', $pb.PbFieldType.OU3) + ..aOS(4, _omitFieldNames ? '' : 'digit') + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SipDTMF clone() => SipDTMF()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SipDTMF copyWith(void Function(SipDTMF) updates) => + super.copyWith((message) => updates(message as SipDTMF)) as SipDTMF; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SipDTMF create() => SipDTMF._(); + SipDTMF createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SipDTMF getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SipDTMF? _defaultInstance; + + @$pb.TagNumber(3) + $core.int get code => $_getIZ(0); + @$pb.TagNumber(3) + set code($core.int v) { + $_setUnsignedInt32(0, v); + } + + @$pb.TagNumber(3) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(3) + void clearCode() => clearField(3); + + @$pb.TagNumber(4) + $core.String get digit => $_getSZ(1); + @$pb.TagNumber(4) + set digit($core.String v) { + $_setString(1, v); + } + + @$pb.TagNumber(4) + $core.bool hasDigit() => $_has(1); + @$pb.TagNumber(4) + void clearDigit() => clearField(4); +} + class ParticipantTracks extends $pb.GeneratedMessage { factory ParticipantTracks({ $core.String? participantSid, @@ -2843,6 +3033,7 @@ class RTPStats extends $pb.GeneratedMessage { $fixnum.Int64? headerBytesPadding, RTPDrift? packetDrift, RTPDrift? reportDrift, + RTPDrift? rebasedReportDrift, }) { final $result = create(); if (startTime != null) { @@ -2974,6 +3165,9 @@ class RTPStats extends $pb.GeneratedMessage { if (reportDrift != null) { $result.reportDrift = reportDrift; } + if (rebasedReportDrift != null) { + $result.rebasedReportDrift = rebasedReportDrift; + } return $result; } RTPStats._() : super(); @@ -3069,6 +3263,8 @@ class RTPStats extends $pb.GeneratedMessage { subBuilder: RTPDrift.create) ..aOM(45, _omitFieldNames ? '' : 'reportDrift', subBuilder: RTPDrift.create) + ..aOM(46, _omitFieldNames ? '' : 'rebasedReportDrift', + subBuilder: RTPDrift.create) ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -3614,6 +3810,20 @@ class RTPStats extends $pb.GeneratedMessage { void clearReportDrift() => clearField(45); @$pb.TagNumber(45) RTPDrift ensureReportDrift() => $_ensure(42); + + @$pb.TagNumber(46) + RTPDrift get rebasedReportDrift => $_getN(43); + @$pb.TagNumber(46) + set rebasedReportDrift(RTPDrift v) { + setField(46, v); + } + + @$pb.TagNumber(46) + $core.bool hasRebasedReportDrift() => $_has(43); + @$pb.TagNumber(46) + void clearRebasedReportDrift() => clearField(46); + @$pb.TagNumber(46) + RTPDrift ensureRebasedReportDrift() => $_ensure(43); } class TimedVersion extends $pb.GeneratedMessage { diff --git a/lib/src/proto/livekit_models.pbenum.dart b/lib/src/proto/livekit_models.pbenum.dart index 38afa24c..23ea2ca0 100644 --- a/lib/src/proto/livekit_models.pbenum.dart +++ b/lib/src/proto/livekit_models.pbenum.dart @@ -207,6 +207,10 @@ class DisconnectReason extends $pb.ProtobufEnum { DisconnectReason._(6, _omitEnumNames ? '' : 'STATE_MISMATCH'); static const DisconnectReason JOIN_FAILURE = DisconnectReason._(7, _omitEnumNames ? '' : 'JOIN_FAILURE'); + static const DisconnectReason MIGRATION = + DisconnectReason._(8, _omitEnumNames ? '' : 'MIGRATION'); + static const DisconnectReason SIGNAL_CLOSE = + DisconnectReason._(9, _omitEnumNames ? '' : 'SIGNAL_CLOSE'); static const $core.List values = [ UNKNOWN_REASON, @@ -217,6 +221,8 @@ class DisconnectReason extends $pb.ProtobufEnum { ROOM_DELETED, STATE_MISMATCH, JOIN_FAILURE, + MIGRATION, + SIGNAL_CLOSE, ]; static final $core.Map<$core.int, DisconnectReason> _byValue = @@ -274,6 +280,37 @@ class SubscriptionError extends $pb.ProtobufEnum { const SubscriptionError._($core.int v, $core.String n) : super(v, n); } +class AudioTrackFeature extends $pb.ProtobufEnum { + static const AudioTrackFeature TF_STEREO = + AudioTrackFeature._(0, _omitEnumNames ? '' : 'TF_STEREO'); + static const AudioTrackFeature TF_NO_DTX = + AudioTrackFeature._(1, _omitEnumNames ? '' : 'TF_NO_DTX'); + static const AudioTrackFeature TF_AUTO_GAIN_CONTROL = + AudioTrackFeature._(2, _omitEnumNames ? '' : 'TF_AUTO_GAIN_CONTROL'); + static const AudioTrackFeature TF_ECHO_CANCELLATION = + AudioTrackFeature._(3, _omitEnumNames ? '' : 'TF_ECHO_CANCELLATION'); + static const AudioTrackFeature TF_NOISE_SUPPRESSION = + AudioTrackFeature._(4, _omitEnumNames ? '' : 'TF_NOISE_SUPPRESSION'); + static const AudioTrackFeature TF_ENHANCED_NOISE_CANCELLATION = + AudioTrackFeature._( + 5, _omitEnumNames ? '' : 'TF_ENHANCED_NOISE_CANCELLATION'); + + static const $core.List values = [ + TF_STEREO, + TF_NO_DTX, + TF_AUTO_GAIN_CONTROL, + TF_ECHO_CANCELLATION, + TF_NOISE_SUPPRESSION, + TF_ENHANCED_NOISE_CANCELLATION, + ]; + + static final $core.Map<$core.int, AudioTrackFeature> _byValue = + $pb.ProtobufEnum.initByValue(values); + static AudioTrackFeature? valueOf($core.int value) => _byValue[value]; + + const AudioTrackFeature._($core.int v, $core.String n) : super(v, n); +} + class ParticipantInfo_State extends $pb.ProtobufEnum { static const ParticipantInfo_State JOINING = ParticipantInfo_State._(0, _omitEnumNames ? '' : 'JOINING'); diff --git a/lib/src/proto/livekit_models.pbjson.dart b/lib/src/proto/livekit_models.pbjson.dart index 5a6ad70f..60968227 100644 --- a/lib/src/proto/livekit_models.pbjson.dart +++ b/lib/src/proto/livekit_models.pbjson.dart @@ -146,6 +146,8 @@ const DisconnectReason$json = { {'1': 'ROOM_DELETED', '2': 5}, {'1': 'STATE_MISMATCH', '2': 6}, {'1': 'JOIN_FAILURE', '2': 7}, + {'1': 'MIGRATION', '2': 8}, + {'1': 'SIGNAL_CLOSE', '2': 9}, ], }; @@ -154,7 +156,7 @@ final $typed_data.Uint8List disconnectReasonDescriptor = $convert.base64Decode( 'ChBEaXNjb25uZWN0UmVhc29uEhIKDlVOS05PV05fUkVBU09OEAASFAoQQ0xJRU5UX0lOSVRJQV' 'RFRBABEhYKEkRVUExJQ0FURV9JREVOVElUWRACEhMKD1NFUlZFUl9TSFVURE9XThADEhcKE1BB' 'UlRJQ0lQQU5UX1JFTU9WRUQQBBIQCgxST09NX0RFTEVURUQQBRISCg5TVEFURV9NSVNNQVRDSB' - 'AGEhAKDEpPSU5fRkFJTFVSRRAH'); + 'AGEhAKDEpPSU5fRkFJTFVSRRAHEg0KCU1JR1JBVElPThAIEhAKDFNJR05BTF9DTE9TRRAJ'); @$core.Deprecated('Use reconnectReasonDescriptor instead') const ReconnectReason$json = { @@ -189,6 +191,25 @@ final $typed_data.Uint8List subscriptionErrorDescriptor = $convert.base64Decode( 'ChFTdWJzY3JpcHRpb25FcnJvchIOCgpTRV9VTktOT1dOEAASGAoUU0VfQ09ERUNfVU5TVVBQT1' 'JURUQQARIVChFTRV9UUkFDS19OT1RGT1VORBAC'); +@$core.Deprecated('Use audioTrackFeatureDescriptor instead') +const AudioTrackFeature$json = { + '1': 'AudioTrackFeature', + '2': [ + {'1': 'TF_STEREO', '2': 0}, + {'1': 'TF_NO_DTX', '2': 1}, + {'1': 'TF_AUTO_GAIN_CONTROL', '2': 2}, + {'1': 'TF_ECHO_CANCELLATION', '2': 3}, + {'1': 'TF_NOISE_SUPPRESSION', '2': 4}, + {'1': 'TF_ENHANCED_NOISE_CANCELLATION', '2': 5}, + ], +}; + +/// Descriptor for `AudioTrackFeature`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List audioTrackFeatureDescriptor = $convert.base64Decode( + 'ChFBdWRpb1RyYWNrRmVhdHVyZRINCglURl9TVEVSRU8QABINCglURl9OT19EVFgQARIYChRURl' + '9BVVRPX0dBSU5fQ09OVFJPTBACEhgKFFRGX0VDSE9fQ0FOQ0VMTEFUSU9OEAMSGAoUVEZfTk9J' + 'U0VfU1VQUFJFU1NJT04QBBIiCh5URl9FTkhBTkNFRF9OT0lTRV9DQU5DRUxMQVRJT04QBQ=='); + @$core.Deprecated('Use roomDescriptor instead') const Room$json = { '1': 'Room', @@ -196,6 +217,13 @@ const Room$json = { {'1': 'sid', '3': 1, '4': 1, '5': 9, '10': 'sid'}, {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'empty_timeout', '3': 3, '4': 1, '5': 13, '10': 'emptyTimeout'}, + { + '1': 'departure_timeout', + '3': 14, + '4': 1, + '5': 13, + '10': 'departureTimeout' + }, {'1': 'max_participants', '3': 4, '4': 1, '5': 13, '10': 'maxParticipants'}, {'1': 'creation_time', '3': 5, '4': 1, '5': 3, '10': 'creationTime'}, {'1': 'turn_password', '3': 6, '4': 1, '5': 9, '10': 'turnPassword'}, @@ -211,19 +239,29 @@ const Room$json = { {'1': 'num_participants', '3': 9, '4': 1, '5': 13, '10': 'numParticipants'}, {'1': 'num_publishers', '3': 11, '4': 1, '5': 13, '10': 'numPublishers'}, {'1': 'active_recording', '3': 10, '4': 1, '5': 8, '10': 'activeRecording'}, + { + '1': 'version', + '3': 13, + '4': 1, + '5': 11, + '6': '.livekit.TimedVersion', + '10': 'version' + }, ], }; /// Descriptor for `Room`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List roomDescriptor = $convert.base64Decode( 'CgRSb29tEhAKA3NpZBgBIAEoCVIDc2lkEhIKBG5hbWUYAiABKAlSBG5hbWUSIwoNZW1wdHlfdG' - 'ltZW91dBgDIAEoDVIMZW1wdHlUaW1lb3V0EikKEG1heF9wYXJ0aWNpcGFudHMYBCABKA1SD21h' - 'eFBhcnRpY2lwYW50cxIjCg1jcmVhdGlvbl90aW1lGAUgASgDUgxjcmVhdGlvblRpbWUSIwoNdH' - 'Vybl9wYXNzd29yZBgGIAEoCVIMdHVyblBhc3N3b3JkEjUKDmVuYWJsZWRfY29kZWNzGAcgAygL' - 'Mg4ubGl2ZWtpdC5Db2RlY1INZW5hYmxlZENvZGVjcxIaCghtZXRhZGF0YRgIIAEoCVIIbWV0YW' - 'RhdGESKQoQbnVtX3BhcnRpY2lwYW50cxgJIAEoDVIPbnVtUGFydGljaXBhbnRzEiUKDm51bV9w' - 'dWJsaXNoZXJzGAsgASgNUg1udW1QdWJsaXNoZXJzEikKEGFjdGl2ZV9yZWNvcmRpbmcYCiABKA' - 'hSD2FjdGl2ZVJlY29yZGluZw=='); + 'ltZW91dBgDIAEoDVIMZW1wdHlUaW1lb3V0EisKEWRlcGFydHVyZV90aW1lb3V0GA4gASgNUhBk' + 'ZXBhcnR1cmVUaW1lb3V0EikKEG1heF9wYXJ0aWNpcGFudHMYBCABKA1SD21heFBhcnRpY2lwYW' + '50cxIjCg1jcmVhdGlvbl90aW1lGAUgASgDUgxjcmVhdGlvblRpbWUSIwoNdHVybl9wYXNzd29y' + 'ZBgGIAEoCVIMdHVyblBhc3N3b3JkEjUKDmVuYWJsZWRfY29kZWNzGAcgAygLMg4ubGl2ZWtpdC' + '5Db2RlY1INZW5hYmxlZENvZGVjcxIaCghtZXRhZGF0YRgIIAEoCVIIbWV0YWRhdGESKQoQbnVt' + 'X3BhcnRpY2lwYW50cxgJIAEoDVIPbnVtUGFydGljaXBhbnRzEiUKDm51bV9wdWJsaXNoZXJzGA' + 'sgASgNUg1udW1QdWJsaXNoZXJzEikKEGFjdGl2ZV9yZWNvcmRpbmcYCiABKAhSD2FjdGl2ZVJl' + 'Y29yZGluZxIvCgd2ZXJzaW9uGA0gASgLMhUubGl2ZWtpdC5UaW1lZFZlcnNpb25SB3ZlcnNpb2' + '4='); @$core.Deprecated('Use codecDescriptor instead') const Codec$json = { @@ -536,7 +574,22 @@ const DataPacket$json = { '4': 1, '5': 14, '6': '.livekit.DataPacket.Kind', - '10': 'kind' + '8': {'3': true}, + '10': 'kind', + }, + { + '1': 'participant_identity', + '3': 4, + '4': 1, + '5': 9, + '10': 'participantIdentity' + }, + { + '1': 'destination_identities', + '3': 5, + '4': 3, + '5': 9, + '10': 'destinationIdentities' }, { '1': 'user', @@ -553,8 +606,18 @@ const DataPacket$json = { '4': 1, '5': 11, '6': '.livekit.ActiveSpeakerUpdate', + '8': {'3': true}, + '9': 0, + '10': 'speaker', + }, + { + '1': 'sip_dtmf', + '3': 6, + '4': 1, + '5': 11, + '6': '.livekit.SipDTMF', '9': 0, - '10': 'speaker' + '10': 'sipDtmf' }, ], '4': [DataPacket_Kind$json], @@ -574,10 +637,13 @@ const DataPacket_Kind$json = { /// Descriptor for `DataPacket`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List dataPacketDescriptor = $convert.base64Decode( - 'CgpEYXRhUGFja2V0EiwKBGtpbmQYASABKA4yGC5saXZla2l0LkRhdGFQYWNrZXQuS2luZFIEa2' - 'luZBIpCgR1c2VyGAIgASgLMhMubGl2ZWtpdC5Vc2VyUGFja2V0SABSBHVzZXISOAoHc3BlYWtl' - 'chgDIAEoCzIcLmxpdmVraXQuQWN0aXZlU3BlYWtlclVwZGF0ZUgAUgdzcGVha2VyIh8KBEtpbm' - 'QSDAoIUkVMSUFCTEUQABIJCgVMT1NTWRABQgcKBXZhbHVl'); + 'CgpEYXRhUGFja2V0EjAKBGtpbmQYASABKA4yGC5saXZla2l0LkRhdGFQYWNrZXQuS2luZEICGA' + 'FSBGtpbmQSMQoUcGFydGljaXBhbnRfaWRlbnRpdHkYBCABKAlSE3BhcnRpY2lwYW50SWRlbnRp' + 'dHkSNQoWZGVzdGluYXRpb25faWRlbnRpdGllcxgFIAMoCVIVZGVzdGluYXRpb25JZGVudGl0aW' + 'VzEikKBHVzZXIYAiABKAsyEy5saXZla2l0LlVzZXJQYWNrZXRIAFIEdXNlchI8CgdzcGVha2Vy' + 'GAMgASgLMhwubGl2ZWtpdC5BY3RpdmVTcGVha2VyVXBkYXRlQgIYAUgAUgdzcGVha2VyEi0KCH' + 'NpcF9kdG1mGAYgASgLMhAubGl2ZWtpdC5TaXBEVE1GSABSB3NpcER0bWYiHwoES2luZBIMCghS' + 'RUxJQUJMRRAAEgkKBUxPU1NZEAFCBwoFdmFsdWU='); @$core.Deprecated('Use activeSpeakerUpdateDescriptor instead') const ActiveSpeakerUpdate$json = { @@ -618,22 +684,38 @@ final $typed_data.Uint8List speakerInfoDescriptor = $convert.base64Decode( const UserPacket$json = { '1': 'UserPacket', '2': [ - {'1': 'participant_sid', '3': 1, '4': 1, '5': 9, '10': 'participantSid'}, + { + '1': 'participant_sid', + '3': 1, + '4': 1, + '5': 9, + '8': {'3': true}, + '10': 'participantSid', + }, { '1': 'participant_identity', '3': 5, '4': 1, '5': 9, - '10': 'participantIdentity' + '8': {'3': true}, + '10': 'participantIdentity', }, {'1': 'payload', '3': 2, '4': 1, '5': 12, '10': 'payload'}, - {'1': 'destination_sids', '3': 3, '4': 3, '5': 9, '10': 'destinationSids'}, + { + '1': 'destination_sids', + '3': 3, + '4': 3, + '5': 9, + '8': {'3': true}, + '10': 'destinationSids', + }, { '1': 'destination_identities', '3': 6, '4': 3, '5': 9, - '10': 'destinationIdentities' + '8': {'3': true}, + '10': 'destinationIdentities', }, {'1': 'topic', '3': 4, '4': 1, '5': 9, '9': 0, '10': 'topic', '17': true}, ], @@ -644,11 +726,25 @@ const UserPacket$json = { /// Descriptor for `UserPacket`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List userPacketDescriptor = $convert.base64Decode( - 'CgpVc2VyUGFja2V0EicKD3BhcnRpY2lwYW50X3NpZBgBIAEoCVIOcGFydGljaXBhbnRTaWQSMQ' - 'oUcGFydGljaXBhbnRfaWRlbnRpdHkYBSABKAlSE3BhcnRpY2lwYW50SWRlbnRpdHkSGAoHcGF5' - 'bG9hZBgCIAEoDFIHcGF5bG9hZBIpChBkZXN0aW5hdGlvbl9zaWRzGAMgAygJUg9kZXN0aW5hdG' - 'lvblNpZHMSNQoWZGVzdGluYXRpb25faWRlbnRpdGllcxgGIAMoCVIVZGVzdGluYXRpb25JZGVu' - 'dGl0aWVzEhkKBXRvcGljGAQgASgJSABSBXRvcGljiAEBQggKBl90b3BpYw=='); + 'CgpVc2VyUGFja2V0EisKD3BhcnRpY2lwYW50X3NpZBgBIAEoCUICGAFSDnBhcnRpY2lwYW50U2' + 'lkEjUKFHBhcnRpY2lwYW50X2lkZW50aXR5GAUgASgJQgIYAVITcGFydGljaXBhbnRJZGVudGl0' + 'eRIYCgdwYXlsb2FkGAIgASgMUgdwYXlsb2FkEi0KEGRlc3RpbmF0aW9uX3NpZHMYAyADKAlCAh' + 'gBUg9kZXN0aW5hdGlvblNpZHMSOQoWZGVzdGluYXRpb25faWRlbnRpdGllcxgGIAMoCUICGAFS' + 'FWRlc3RpbmF0aW9uSWRlbnRpdGllcxIZCgV0b3BpYxgEIAEoCUgAUgV0b3BpY4gBAUIICgZfdG' + '9waWM='); + +@$core.Deprecated('Use sipDTMFDescriptor instead') +const SipDTMF$json = { + '1': 'SipDTMF', + '2': [ + {'1': 'code', '3': 3, '4': 1, '5': 13, '10': 'code'}, + {'1': 'digit', '3': 4, '4': 1, '5': 9, '10': 'digit'}, + ], +}; + +/// Descriptor for `SipDTMF`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sipDTMFDescriptor = $convert.base64Decode( + 'CgdTaXBEVE1GEhIKBGNvZGUYAyABKA1SBGNvZGUSFAoFZGlnaXQYBCABKAlSBWRpZ2l0'); @$core.Deprecated('Use participantTracksDescriptor instead') const ParticipantTracks$json = { @@ -1058,6 +1154,14 @@ const RTPStats$json = { '6': '.livekit.RTPDrift', '10': 'reportDrift' }, + { + '1': 'rebased_report_drift', + '3': 46, + '4': 1, + '5': 11, + '6': '.livekit.RTPDrift', + '10': 'rebasedReportDrift' + }, ], '3': [RTPStats_GapHistogramEntry$json], }; @@ -1106,8 +1210,9 @@ final $typed_data.Uint8List rTPStatsDescriptor = $convert.base64Decode( '9ja19wbGkYJCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUhBsYXN0TGF5ZXJMb2Nr' 'UGxpEjQKDHBhY2tldF9kcmlmdBgsIAEoCzIRLmxpdmVraXQuUlRQRHJpZnRSC3BhY2tldERyaW' 'Z0EjQKDHJlcG9ydF9kcmlmdBgtIAEoCzIRLmxpdmVraXQuUlRQRHJpZnRSC3JlcG9ydERyaWZ0' - 'Gj8KEUdhcEhpc3RvZ3JhbUVudHJ5EhAKA2tleRgBIAEoBVIDa2V5EhQKBXZhbHVlGAIgASgNUg' - 'V2YWx1ZToCOAE='); + 'EkMKFHJlYmFzZWRfcmVwb3J0X2RyaWZ0GC4gASgLMhEubGl2ZWtpdC5SVFBEcmlmdFIScmViYX' + 'NlZFJlcG9ydERyaWZ0Gj8KEUdhcEhpc3RvZ3JhbUVudHJ5EhAKA2tleRgBIAEoBVIDa2V5EhQK' + 'BXZhbHVlGAIgASgNUgV2YWx1ZToCOAE='); @$core.Deprecated('Use timedVersionDescriptor instead') const TimedVersion$json = { diff --git a/lib/src/proto/livekit_rtc.pb.dart b/lib/src/proto/livekit_rtc.pb.dart index e35cec95..f93d8fa8 100644 --- a/lib/src/proto/livekit_rtc.pb.dart +++ b/lib/src/proto/livekit_rtc.pb.dart @@ -36,6 +36,8 @@ enum SignalRequest_Message { ping, updateMetadata, pingReq, + updateAudioTrack, + updateVideoTrack, notSet } @@ -56,6 +58,8 @@ class SignalRequest extends $pb.GeneratedMessage { $fixnum.Int64? ping, UpdateParticipantMetadata? updateMetadata, Ping? pingReq, + UpdateLocalAudioTrack? updateAudioTrack, + UpdateLocalVideoTrack? updateVideoTrack, }) { final $result = create(); if (offer != null) { @@ -103,6 +107,12 @@ class SignalRequest extends $pb.GeneratedMessage { if (pingReq != null) { $result.pingReq = pingReq; } + if (updateAudioTrack != null) { + $result.updateAudioTrack = updateAudioTrack; + } + if (updateVideoTrack != null) { + $result.updateVideoTrack = updateVideoTrack; + } return $result; } SignalRequest._() : super(); @@ -130,13 +140,15 @@ class SignalRequest extends $pb.GeneratedMessage { 14: SignalRequest_Message.ping, 15: SignalRequest_Message.updateMetadata, 16: SignalRequest_Message.pingReq, + 17: SignalRequest_Message.updateAudioTrack, + 18: SignalRequest_Message.updateVideoTrack, 0: SignalRequest_Message.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'SignalRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'), createEmptyInstance: create) - ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16]) + ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18]) ..aOM(1, _omitFieldNames ? '' : 'offer', subBuilder: SessionDescription.create) ..aOM(2, _omitFieldNames ? '' : 'answer', @@ -167,6 +179,10 @@ class SignalRequest extends $pb.GeneratedMessage { 15, _omitFieldNames ? '' : 'updateMetadata', subBuilder: UpdateParticipantMetadata.create) ..aOM(16, _omitFieldNames ? '' : 'pingReq', subBuilder: Ping.create) + ..aOM(17, _omitFieldNames ? '' : 'updateAudioTrack', + subBuilder: UpdateLocalAudioTrack.create) + ..aOM(18, _omitFieldNames ? '' : 'updateVideoTrack', + subBuilder: UpdateLocalVideoTrack.create) ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -415,6 +431,36 @@ class SignalRequest extends $pb.GeneratedMessage { void clearPingReq() => clearField(16); @$pb.TagNumber(16) Ping ensurePingReq() => $_ensure(14); + + /// Update local audio track settings + @$pb.TagNumber(17) + UpdateLocalAudioTrack get updateAudioTrack => $_getN(15); + @$pb.TagNumber(17) + set updateAudioTrack(UpdateLocalAudioTrack v) { + setField(17, v); + } + + @$pb.TagNumber(17) + $core.bool hasUpdateAudioTrack() => $_has(15); + @$pb.TagNumber(17) + void clearUpdateAudioTrack() => clearField(17); + @$pb.TagNumber(17) + UpdateLocalAudioTrack ensureUpdateAudioTrack() => $_ensure(15); + + /// Update local video track settings + @$pb.TagNumber(18) + UpdateLocalVideoTrack get updateVideoTrack => $_getN(16); + @$pb.TagNumber(18) + set updateVideoTrack(UpdateLocalVideoTrack v) { + setField(18, v); + } + + @$pb.TagNumber(18) + $core.bool hasUpdateVideoTrack() => $_has(16); + @$pb.TagNumber(18) + void clearUpdateVideoTrack() => clearField(18); + @$pb.TagNumber(18) + UpdateLocalVideoTrack ensureUpdateVideoTrack() => $_ensure(16); } enum SignalResponse_Message { @@ -2364,10 +2410,184 @@ class UpdateTrackSettings extends $pb.GeneratedMessage { void clearPriority() => clearField(8); } +class UpdateLocalAudioTrack extends $pb.GeneratedMessage { + factory UpdateLocalAudioTrack({ + $core.String? trackSid, + $core.Iterable<$1.AudioTrackFeature>? features, + }) { + final $result = create(); + if (trackSid != null) { + $result.trackSid = trackSid; + } + if (features != null) { + $result.features.addAll(features); + } + return $result; + } + UpdateLocalAudioTrack._() : super(); + factory UpdateLocalAudioTrack.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory UpdateLocalAudioTrack.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UpdateLocalAudioTrack', + package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'trackSid') + ..pc<$1.AudioTrackFeature>( + 2, _omitFieldNames ? '' : 'features', $pb.PbFieldType.KE, + valueOf: $1.AudioTrackFeature.valueOf, + enumValues: $1.AudioTrackFeature.values, + defaultEnumValue: $1.AudioTrackFeature.TF_STEREO) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateLocalAudioTrack clone() => + UpdateLocalAudioTrack()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateLocalAudioTrack copyWith( + void Function(UpdateLocalAudioTrack) updates) => + super.copyWith((message) => updates(message as UpdateLocalAudioTrack)) + as UpdateLocalAudioTrack; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateLocalAudioTrack create() => UpdateLocalAudioTrack._(); + UpdateLocalAudioTrack createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateLocalAudioTrack getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static UpdateLocalAudioTrack? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get trackSid => $_getSZ(0); + @$pb.TagNumber(1) + set trackSid($core.String v) { + $_setString(0, v); + } + + @$pb.TagNumber(1) + $core.bool hasTrackSid() => $_has(0); + @$pb.TagNumber(1) + void clearTrackSid() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$1.AudioTrackFeature> get features => $_getList(1); +} + +class UpdateLocalVideoTrack extends $pb.GeneratedMessage { + factory UpdateLocalVideoTrack({ + $core.String? trackSid, + $core.int? width, + $core.int? height, + }) { + final $result = create(); + if (trackSid != null) { + $result.trackSid = trackSid; + } + if (width != null) { + $result.width = width; + } + if (height != null) { + $result.height = height; + } + return $result; + } + UpdateLocalVideoTrack._() : super(); + factory UpdateLocalVideoTrack.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory UpdateLocalVideoTrack.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UpdateLocalVideoTrack', + package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'trackSid') + ..a<$core.int>(2, _omitFieldNames ? '' : 'width', $pb.PbFieldType.OU3) + ..a<$core.int>(3, _omitFieldNames ? '' : 'height', $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateLocalVideoTrack clone() => + UpdateLocalVideoTrack()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateLocalVideoTrack copyWith( + void Function(UpdateLocalVideoTrack) updates) => + super.copyWith((message) => updates(message as UpdateLocalVideoTrack)) + as UpdateLocalVideoTrack; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateLocalVideoTrack create() => UpdateLocalVideoTrack._(); + UpdateLocalVideoTrack createEmptyInstance() => create(); + static $pb.PbList createRepeated() => + $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateLocalVideoTrack getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static UpdateLocalVideoTrack? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get trackSid => $_getSZ(0); + @$pb.TagNumber(1) + set trackSid($core.String v) { + $_setString(0, v); + } + + @$pb.TagNumber(1) + $core.bool hasTrackSid() => $_has(0); + @$pb.TagNumber(1) + void clearTrackSid() => clearField(1); + + @$pb.TagNumber(2) + $core.int get width => $_getIZ(1); + @$pb.TagNumber(2) + set width($core.int v) { + $_setUnsignedInt32(1, v); + } + + @$pb.TagNumber(2) + $core.bool hasWidth() => $_has(1); + @$pb.TagNumber(2) + void clearWidth() => clearField(2); + + @$pb.TagNumber(3) + $core.int get height => $_getIZ(2); + @$pb.TagNumber(3) + set height($core.int v) { + $_setUnsignedInt32(2, v); + } + + @$pb.TagNumber(3) + $core.bool hasHeight() => $_has(2); + @$pb.TagNumber(3) + void clearHeight() => clearField(3); +} + class LeaveRequest extends $pb.GeneratedMessage { factory LeaveRequest({ $core.bool? canReconnect, $1.DisconnectReason? reason, + LeaveRequest_Action? action, + RegionSettings? regions, }) { final $result = create(); if (canReconnect != null) { @@ -2376,6 +2596,12 @@ class LeaveRequest extends $pb.GeneratedMessage { if (reason != null) { $result.reason = reason; } + if (action != null) { + $result.action = action; + } + if (regions != null) { + $result.regions = regions; + } return $result; } LeaveRequest._() : super(); @@ -2396,6 +2622,13 @@ class LeaveRequest extends $pb.GeneratedMessage { defaultOrMaker: $1.DisconnectReason.UNKNOWN_REASON, valueOf: $1.DisconnectReason.valueOf, enumValues: $1.DisconnectReason.values) + ..e( + 3, _omitFieldNames ? '' : 'action', $pb.PbFieldType.OE, + defaultOrMaker: LeaveRequest_Action.DISCONNECT, + valueOf: LeaveRequest_Action.valueOf, + enumValues: LeaveRequest_Action.values) + ..aOM(4, _omitFieldNames ? '' : 'regions', + subBuilder: RegionSettings.create) ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -2423,6 +2656,7 @@ class LeaveRequest extends $pb.GeneratedMessage { /// sent when server initiates the disconnect due to server-restart /// indicates clients should attempt full-reconnect sequence + /// NOTE: `can_reconnect` obsoleted by `action` starting in protocol version 13 @$pb.TagNumber(1) $core.bool get canReconnect => $_getBF(0); @$pb.TagNumber(1) @@ -2446,6 +2680,32 @@ class LeaveRequest extends $pb.GeneratedMessage { $core.bool hasReason() => $_has(1); @$pb.TagNumber(2) void clearReason() => clearField(2); + + @$pb.TagNumber(3) + LeaveRequest_Action get action => $_getN(2); + @$pb.TagNumber(3) + set action(LeaveRequest_Action v) { + setField(3, v); + } + + @$pb.TagNumber(3) + $core.bool hasAction() => $_has(2); + @$pb.TagNumber(3) + void clearAction() => clearField(3); + + @$pb.TagNumber(4) + RegionSettings get regions => $_getN(3); + @$pb.TagNumber(4) + set regions(RegionSettings v) { + setField(4, v); + } + + @$pb.TagNumber(4) + $core.bool hasRegions() => $_has(3); + @$pb.TagNumber(4) + void clearRegions() => clearField(4); + @$pb.TagNumber(4) + RegionSettings ensureRegions() => $_ensure(3); } /// message to indicate published video track dimensions are changing @@ -3626,6 +3886,7 @@ class SyncState extends $pb.GeneratedMessage { $core.Iterable? publishTracks, $core.Iterable? dataChannels, SessionDescription? offer, + $core.Iterable<$core.String>? trackSidsDisabled, }) { final $result = create(); if (answer != null) { @@ -3643,6 +3904,9 @@ class SyncState extends $pb.GeneratedMessage { if (offer != null) { $result.offer = offer; } + if (trackSidsDisabled != null) { + $result.trackSidsDisabled.addAll(trackSidsDisabled); + } return $result; } SyncState._() : super(); @@ -3669,6 +3933,7 @@ class SyncState extends $pb.GeneratedMessage { subBuilder: DataChannelInfo.create) ..aOM(5, _omitFieldNames ? '' : 'offer', subBuilder: SessionDescription.create) + ..pPS(6, _omitFieldNames ? '' : 'trackSidsDisabled') ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -3741,6 +4006,9 @@ class SyncState extends $pb.GeneratedMessage { void clearOffer() => clearField(5); @$pb.TagNumber(5) SessionDescription ensureOffer() => $_ensure(4); + + @$pb.TagNumber(6) + $core.List<$core.String> get trackSidsDisabled => $_getList(5); } class DataChannelInfo extends $pb.GeneratedMessage { @@ -3848,6 +4116,8 @@ enum SimulateScenario_Scenario { serverLeave, switchCandidateProtocol, subscriberBandwidth, + disconnectSignalOnResume, + disconnectSignalOnResumeNoMessages, notSet } @@ -3859,6 +4129,8 @@ class SimulateScenario extends $pb.GeneratedMessage { $core.bool? serverLeave, CandidateProtocol? switchCandidateProtocol, $fixnum.Int64? subscriberBandwidth, + $core.bool? disconnectSignalOnResume, + $core.bool? disconnectSignalOnResumeNoMessages, }) { final $result = create(); if (speakerUpdate != null) { @@ -3879,6 +4151,13 @@ class SimulateScenario extends $pb.GeneratedMessage { if (subscriberBandwidth != null) { $result.subscriberBandwidth = subscriberBandwidth; } + if (disconnectSignalOnResume != null) { + $result.disconnectSignalOnResume = disconnectSignalOnResume; + } + if (disconnectSignalOnResumeNoMessages != null) { + $result.disconnectSignalOnResumeNoMessages = + disconnectSignalOnResumeNoMessages; + } return $result; } SimulateScenario._() : super(); @@ -3897,13 +4176,15 @@ class SimulateScenario extends $pb.GeneratedMessage { 4: SimulateScenario_Scenario.serverLeave, 5: SimulateScenario_Scenario.switchCandidateProtocol, 6: SimulateScenario_Scenario.subscriberBandwidth, + 7: SimulateScenario_Scenario.disconnectSignalOnResume, + 8: SimulateScenario_Scenario.disconnectSignalOnResumeNoMessages, 0: SimulateScenario_Scenario.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'SimulateScenario', package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'), createEmptyInstance: create) - ..oo(0, [1, 2, 3, 4, 5, 6]) + ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8]) ..a<$core.int>( 1, _omitFieldNames ? '' : 'speakerUpdate', $pb.PbFieldType.O3) ..aOB(2, _omitFieldNames ? '' : 'nodeFailure') @@ -3915,6 +4196,8 @@ class SimulateScenario extends $pb.GeneratedMessage { valueOf: CandidateProtocol.valueOf, enumValues: CandidateProtocol.values) ..aInt64(6, _omitFieldNames ? '' : 'subscriberBandwidth') + ..aOB(7, _omitFieldNames ? '' : 'disconnectSignalOnResume') + ..aOB(8, _omitFieldNames ? '' : 'disconnectSignalOnResumeNoMessages') ..hasRequiredFields = false; @$core.Deprecated('Using this can add significant overhead to your binary. ' @@ -4022,6 +4305,32 @@ class SimulateScenario extends $pb.GeneratedMessage { $core.bool hasSubscriberBandwidth() => $_has(5); @$pb.TagNumber(6) void clearSubscriberBandwidth() => clearField(6); + + /// disconnect signal on resume + @$pb.TagNumber(7) + $core.bool get disconnectSignalOnResume => $_getBF(6); + @$pb.TagNumber(7) + set disconnectSignalOnResume($core.bool v) { + $_setBool(6, v); + } + + @$pb.TagNumber(7) + $core.bool hasDisconnectSignalOnResume() => $_has(6); + @$pb.TagNumber(7) + void clearDisconnectSignalOnResume() => clearField(7); + + /// disconnect signal on resume before sending any messages from server + @$pb.TagNumber(8) + $core.bool get disconnectSignalOnResumeNoMessages => $_getBF(7); + @$pb.TagNumber(8) + set disconnectSignalOnResumeNoMessages($core.bool v) { + $_setBool(7, v); + } + + @$pb.TagNumber(8) + $core.bool hasDisconnectSignalOnResumeNoMessages() => $_has(7); + @$pb.TagNumber(8) + void clearDisconnectSignalOnResumeNoMessages() => clearField(8); } class Ping extends $pb.GeneratedMessage { diff --git a/lib/src/proto/livekit_rtc.pbenum.dart b/lib/src/proto/livekit_rtc.pbenum.dart index 691acb38..f970e468 100644 --- a/lib/src/proto/livekit_rtc.pbenum.dart +++ b/lib/src/proto/livekit_rtc.pbenum.dart @@ -70,4 +70,26 @@ class CandidateProtocol extends $pb.ProtobufEnum { const CandidateProtocol._($core.int v, $core.String n) : super(v, n); } +/// indicates action clients should take on receiving this message +class LeaveRequest_Action extends $pb.ProtobufEnum { + static const LeaveRequest_Action DISCONNECT = + LeaveRequest_Action._(0, _omitEnumNames ? '' : 'DISCONNECT'); + static const LeaveRequest_Action RESUME = + LeaveRequest_Action._(1, _omitEnumNames ? '' : 'RESUME'); + static const LeaveRequest_Action RECONNECT = + LeaveRequest_Action._(2, _omitEnumNames ? '' : 'RECONNECT'); + + static const $core.List values = [ + DISCONNECT, + RESUME, + RECONNECT, + ]; + + static final $core.Map<$core.int, LeaveRequest_Action> _byValue = + $pb.ProtobufEnum.initByValue(values); + static LeaveRequest_Action? valueOf($core.int value) => _byValue[value]; + + const LeaveRequest_Action._($core.int v, $core.String n) : super(v, n); +} + const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/proto/livekit_rtc.pbjson.dart b/lib/src/proto/livekit_rtc.pbjson.dart index 0588bf4e..e9aaa948 100644 --- a/lib/src/proto/livekit_rtc.pbjson.dart +++ b/lib/src/proto/livekit_rtc.pbjson.dart @@ -184,6 +184,24 @@ const SignalRequest$json = { '9': 0, '10': 'pingReq' }, + { + '1': 'update_audio_track', + '3': 17, + '4': 1, + '5': 11, + '6': '.livekit.UpdateLocalAudioTrack', + '9': 0, + '10': 'updateAudioTrack' + }, + { + '1': 'update_video_track', + '3': 18, + '4': 1, + '5': 11, + '6': '.livekit.UpdateLocalVideoTrack', + '9': 0, + '10': 'updateVideoTrack' + }, ], '8': [ {'1': 'message'}, @@ -207,8 +225,10 @@ final $typed_data.Uint8List signalRequestDescriptor = $convert.base64Decode( 'UglzeW5jU3RhdGUSNwoIc2ltdWxhdGUYDSABKAsyGS5saXZla2l0LlNpbXVsYXRlU2NlbmFyaW' '9IAFIIc2ltdWxhdGUSFAoEcGluZxgOIAEoA0gAUgRwaW5nEk0KD3VwZGF0ZV9tZXRhZGF0YRgP' 'IAEoCzIiLmxpdmVraXQuVXBkYXRlUGFydGljaXBhbnRNZXRhZGF0YUgAUg51cGRhdGVNZXRhZG' - 'F0YRIqCghwaW5nX3JlcRgQIAEoCzINLmxpdmVraXQuUGluZ0gAUgdwaW5nUmVxQgkKB21lc3Nh' - 'Z2U='); + 'F0YRIqCghwaW5nX3JlcRgQIAEoCzINLmxpdmVraXQuUGluZ0gAUgdwaW5nUmVxEk4KEnVwZGF0' + 'ZV9hdWRpb190cmFjaxgRIAEoCzIeLmxpdmVraXQuVXBkYXRlTG9jYWxBdWRpb1RyYWNrSABSEH' + 'VwZGF0ZUF1ZGlvVHJhY2sSTgoSdXBkYXRlX3ZpZGVvX3RyYWNrGBIgASgLMh4ubGl2ZWtpdC5V' + 'cGRhdGVMb2NhbFZpZGVvVHJhY2tIAFIQdXBkYXRlVmlkZW9UcmFja0IJCgdtZXNzYWdl'); @$core.Deprecated('Use signalResponseDescriptor instead') const SignalResponse$json = { @@ -763,6 +783,42 @@ final $typed_data.Uint8List updateTrackSettingsDescriptor = $convert.base64Decod 'ZW9RdWFsaXR5UgdxdWFsaXR5EhQKBXdpZHRoGAUgASgNUgV3aWR0aBIWCgZoZWlnaHQYBiABKA' '1SBmhlaWdodBIQCgNmcHMYByABKA1SA2ZwcxIaCghwcmlvcml0eRgIIAEoDVIIcHJpb3JpdHk='); +@$core.Deprecated('Use updateLocalAudioTrackDescriptor instead') +const UpdateLocalAudioTrack$json = { + '1': 'UpdateLocalAudioTrack', + '2': [ + {'1': 'track_sid', '3': 1, '4': 1, '5': 9, '10': 'trackSid'}, + { + '1': 'features', + '3': 2, + '4': 3, + '5': 14, + '6': '.livekit.AudioTrackFeature', + '10': 'features' + }, + ], +}; + +/// Descriptor for `UpdateLocalAudioTrack`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateLocalAudioTrackDescriptor = $convert.base64Decode( + 'ChVVcGRhdGVMb2NhbEF1ZGlvVHJhY2sSGwoJdHJhY2tfc2lkGAEgASgJUgh0cmFja1NpZBI2Cg' + 'hmZWF0dXJlcxgCIAMoDjIaLmxpdmVraXQuQXVkaW9UcmFja0ZlYXR1cmVSCGZlYXR1cmVz'); + +@$core.Deprecated('Use updateLocalVideoTrackDescriptor instead') +const UpdateLocalVideoTrack$json = { + '1': 'UpdateLocalVideoTrack', + '2': [ + {'1': 'track_sid', '3': 1, '4': 1, '5': 9, '10': 'trackSid'}, + {'1': 'width', '3': 2, '4': 1, '5': 13, '10': 'width'}, + {'1': 'height', '3': 3, '4': 1, '5': 13, '10': 'height'}, + ], +}; + +/// Descriptor for `UpdateLocalVideoTrack`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateLocalVideoTrackDescriptor = $convert.base64Decode( + 'ChVVcGRhdGVMb2NhbFZpZGVvVHJhY2sSGwoJdHJhY2tfc2lkGAEgASgJUgh0cmFja1NpZBIUCg' + 'V3aWR0aBgCIAEoDVIFd2lkdGgSFgoGaGVpZ2h0GAMgASgNUgZoZWlnaHQ='); + @$core.Deprecated('Use leaveRequestDescriptor instead') const LeaveRequest$json = { '1': 'LeaveRequest', @@ -776,13 +832,43 @@ const LeaveRequest$json = { '6': '.livekit.DisconnectReason', '10': 'reason' }, + { + '1': 'action', + '3': 3, + '4': 1, + '5': 14, + '6': '.livekit.LeaveRequest.Action', + '10': 'action' + }, + { + '1': 'regions', + '3': 4, + '4': 1, + '5': 11, + '6': '.livekit.RegionSettings', + '10': 'regions' + }, + ], + '4': [LeaveRequest_Action$json], +}; + +@$core.Deprecated('Use leaveRequestDescriptor instead') +const LeaveRequest_Action$json = { + '1': 'Action', + '2': [ + {'1': 'DISCONNECT', '2': 0}, + {'1': 'RESUME', '2': 1}, + {'1': 'RECONNECT', '2': 2}, ], }; /// Descriptor for `LeaveRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List leaveRequestDescriptor = $convert.base64Decode( 'CgxMZWF2ZVJlcXVlc3QSIwoNY2FuX3JlY29ubmVjdBgBIAEoCFIMY2FuUmVjb25uZWN0EjEKBn' - 'JlYXNvbhgCIAEoDjIZLmxpdmVraXQuRGlzY29ubmVjdFJlYXNvblIGcmVhc29u'); + 'JlYXNvbhgCIAEoDjIZLmxpdmVraXQuRGlzY29ubmVjdFJlYXNvblIGcmVhc29uEjQKBmFjdGlv' + 'bhgDIAEoDjIcLmxpdmVraXQuTGVhdmVSZXF1ZXN0LkFjdGlvblIGYWN0aW9uEjEKB3JlZ2lvbn' + 'MYBCABKAsyFy5saXZla2l0LlJlZ2lvblNldHRpbmdzUgdyZWdpb25zIjMKBkFjdGlvbhIOCgpE' + 'SVNDT05ORUNUEAASCgoGUkVTVU1FEAESDQoJUkVDT05ORUNUEAI='); @$core.Deprecated('Use updateVideoLayersDescriptor instead') const UpdateVideoLayers$json = { @@ -1134,6 +1220,13 @@ const SyncState$json = { '6': '.livekit.SessionDescription', '10': 'offer' }, + { + '1': 'track_sids_disabled', + '3': 6, + '4': 3, + '5': 9, + '10': 'trackSidsDisabled' + }, ], }; @@ -1144,7 +1237,8 @@ final $typed_data.Uint8List syncStateDescriptor = $convert.base64Decode( 'dGlvblIMc3Vic2NyaXB0aW9uEkYKDnB1Ymxpc2hfdHJhY2tzGAMgAygLMh8ubGl2ZWtpdC5Ucm' 'Fja1B1Ymxpc2hlZFJlc3BvbnNlUg1wdWJsaXNoVHJhY2tzEj0KDWRhdGFfY2hhbm5lbHMYBCAD' 'KAsyGC5saXZla2l0LkRhdGFDaGFubmVsSW5mb1IMZGF0YUNoYW5uZWxzEjEKBW9mZmVyGAUgAS' - 'gLMhsubGl2ZWtpdC5TZXNzaW9uRGVzY3JpcHRpb25SBW9mZmVy'); + 'gLMhsubGl2ZWtpdC5TZXNzaW9uRGVzY3JpcHRpb25SBW9mZmVyEi4KE3RyYWNrX3NpZHNfZGlz' + 'YWJsZWQYBiADKAlSEXRyYWNrU2lkc0Rpc2FibGVk'); @$core.Deprecated('Use dataChannelInfoDescriptor instead') const DataChannelInfo$json = { @@ -1200,6 +1294,22 @@ const SimulateScenario$json = { '9': 0, '10': 'subscriberBandwidth' }, + { + '1': 'disconnect_signal_on_resume', + '3': 7, + '4': 1, + '5': 8, + '9': 0, + '10': 'disconnectSignalOnResume' + }, + { + '1': 'disconnect_signal_on_resume_no_messages', + '3': 8, + '4': 1, + '5': 8, + '9': 0, + '10': 'disconnectSignalOnResumeNoMessages' + }, ], '8': [ {'1': 'scenario'}, @@ -1213,7 +1323,10 @@ final $typed_data.Uint8List simulateScenarioDescriptor = $convert.base64Decode( 'IAEoCEgAUgltaWdyYXRpb24SIwoMc2VydmVyX2xlYXZlGAQgASgISABSC3NlcnZlckxlYXZlEl' 'gKGXN3aXRjaF9jYW5kaWRhdGVfcHJvdG9jb2wYBSABKA4yGi5saXZla2l0LkNhbmRpZGF0ZVBy' 'b3RvY29sSABSF3N3aXRjaENhbmRpZGF0ZVByb3RvY29sEjMKFHN1YnNjcmliZXJfYmFuZHdpZH' - 'RoGAYgASgDSABSE3N1YnNjcmliZXJCYW5kd2lkdGhCCgoIc2NlbmFyaW8='); + 'RoGAYgASgDSABSE3N1YnNjcmliZXJCYW5kd2lkdGgSPwobZGlzY29ubmVjdF9zaWduYWxfb25f' + 'cmVzdW1lGAcgASgISABSGGRpc2Nvbm5lY3RTaWduYWxPblJlc3VtZRJVCidkaXNjb25uZWN0X3' + 'NpZ25hbF9vbl9yZXN1bWVfbm9fbWVzc2FnZXMYCCABKAhIAFIiZGlzY29ubmVjdFNpZ25hbE9u' + 'UmVzdW1lTm9NZXNzYWdlc0IKCghzY2VuYXJpbw=='); @$core.Deprecated('Use pingDescriptor instead') const Ping$json = {