Subscriber as primary (#8)

* Update protos

* Signal client

* Improve transport

* First implementation

* Fix publish

* Update `PCTransport` for debounce negotiation

* debounce func

* reconnect & events

* Update debounce func

* engine events

* make sure events don't emit after dispose

* prefix flutter_webrtc

* Cleaner `iceServers` update

* don't mutate user provided params

* fix tests

* event manager

* Fix: `Room.onDisconnected` gets fired multiple times

* data publish in example

* cleaner logic

* safer events

* un-prefix with LK

* organize imports

* Clean up

* remove `Tuple`

* `EventsEmitter` can now be directly listened to

`EventsEmitter` extends `EventsListenable`
This commit is contained in:
Hiroshi Horie
2021-09-18 00:10:16 +09:00
committed by GitHub
parent 50f56c5e1e
commit f4bd82a919
36 changed files with 1334 additions and 588 deletions
+18
View File
@@ -935,6 +935,8 @@ class JoinResponse extends $pb.GeneratedMessage {
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'iceServers',
$pb.PbFieldType.PM,
subBuilder: ICEServer.create)
..aOB(
6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subscriberPrimary')
..hasRequiredFields = false;
JoinResponse._() : super();
@@ -944,6 +946,7 @@ class JoinResponse extends $pb.GeneratedMessage {
$core.Iterable<$0.ParticipantInfo>? otherParticipants,
$core.String? serverVersion,
$core.Iterable<ICEServer>? iceServers,
$core.bool? subscriberPrimary,
}) {
final _result = create();
if (room != null) {
@@ -961,6 +964,9 @@ class JoinResponse extends $pb.GeneratedMessage {
if (iceServers != null) {
_result.iceServers.addAll(iceServers);
}
if (subscriberPrimary != null) {
_result.subscriberPrimary = subscriberPrimary;
}
return _result;
}
factory JoinResponse.fromBuffer($core.List<$core.int> i,
@@ -1034,6 +1040,18 @@ class JoinResponse extends $pb.GeneratedMessage {
@$pb.TagNumber(5)
$core.List<ICEServer> get iceServers => $_getList(4);
@$pb.TagNumber(6)
$core.bool get subscriberPrimary => $_getBF(5);
@$pb.TagNumber(6)
set subscriberPrimary($core.bool v) {
$_setBool(5, v);
}
@$pb.TagNumber(6)
$core.bool hasSubscriberPrimary() => $_has(5);
@$pb.TagNumber(6)
void clearSubscriberPrimary() => clearField(6);
}
class TrackPublishedResponse extends $pb.GeneratedMessage {
+2 -1
View File
@@ -304,12 +304,13 @@ const JoinResponse$json = const {
'6': '.livekit.ICEServer',
'10': 'iceServers'
},
const {'1': 'subscriber_primary', '3': 6, '4': 1, '5': 8, '10': 'subscriberPrimary'},
],
};
/// Descriptor for `JoinResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List joinResponseDescriptor = $convert.base64Decode(
'CgxKb2luUmVzcG9uc2USIQoEcm9vbRgBIAEoCzINLmxpdmVraXQuUm9vbVIEcm9vbRI6CgtwYXJ0aWNpcGFudBgCIAEoCzIYLmxpdmVraXQuUGFydGljaXBhbnRJbmZvUgtwYXJ0aWNpcGFudBJHChJvdGhlcl9wYXJ0aWNpcGFudHMYAyADKAsyGC5saXZla2l0LlBhcnRpY2lwYW50SW5mb1IRb3RoZXJQYXJ0aWNpcGFudHMSJQoOc2VydmVyX3ZlcnNpb24YBCABKAlSDXNlcnZlclZlcnNpb24SMwoLaWNlX3NlcnZlcnMYBSADKAsyEi5saXZla2l0LklDRVNlcnZlclIKaWNlU2VydmVycw==');
'CgxKb2luUmVzcG9uc2USIQoEcm9vbRgBIAEoCzINLmxpdmVraXQuUm9vbVIEcm9vbRI6CgtwYXJ0aWNpcGFudBgCIAEoCzIYLmxpdmVraXQuUGFydGljaXBhbnRJbmZvUgtwYXJ0aWNpcGFudBJHChJvdGhlcl9wYXJ0aWNpcGFudHMYAyADKAsyGC5saXZla2l0LlBhcnRpY2lwYW50SW5mb1IRb3RoZXJQYXJ0aWNpcGFudHMSJQoOc2VydmVyX3ZlcnNpb24YBCABKAlSDXNlcnZlclZlcnNpb24SMwoLaWNlX3NlcnZlcnMYBSADKAsyEi5saXZla2l0LklDRVNlcnZlclIKaWNlU2VydmVycxItChJzdWJzY3JpYmVyX3ByaW1hcnkYBiABKAhSEXN1YnNjcmliZXJQcmltYXJ5');
@$core.Deprecated('Use trackPublishedResponseDescriptor instead')
const TrackPublishedResponse$json = const {
'1': 'TrackPublishedResponse',