Switch to new event system (#9)
* `SignalEvents` and `synchronized` mode for `EventsListenable` * cascade syntax * clean up * `RoomEvents` * `ParticipantEvents` * all events implemented * make it compile with M1 macs * dispose logic * cleaner connect logic * ask to publish * fix initial EngineTrackAddedEvent glitch * fix unpublishTrack bug * clean up * better events docs * organize event types * clean up * cleaner wait logic * wait for event instead of using Completer * notifyListeners
This commit is contained in:
+34
-4
@@ -1,18 +1,37 @@
|
||||
//
|
||||
// LiveKit
|
||||
//
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'extensions.dart';
|
||||
|
||||
typedef CancelListenFunc = Function();
|
||||
|
||||
enum ProtocolVersion {
|
||||
protocol2,
|
||||
protocol3,
|
||||
}
|
||||
|
||||
enum ConnectionState {
|
||||
disconnected,
|
||||
connected,
|
||||
reconnecting,
|
||||
}
|
||||
|
||||
enum Reliability {
|
||||
reliable,
|
||||
lossy,
|
||||
}
|
||||
|
||||
enum CloseReason {
|
||||
network,
|
||||
// ...
|
||||
}
|
||||
|
||||
enum TrackSubscribeFailReason {
|
||||
invalidServerResponse,
|
||||
notTrackMetadataFound,
|
||||
unsupportedTrackType,
|
||||
// ...
|
||||
}
|
||||
|
||||
enum RTCIceTransportPolicy {
|
||||
all,
|
||||
relay,
|
||||
@@ -89,3 +108,14 @@ class RTCIceServer {
|
||||
if (credential?.isNotEmpty ?? false) 'credential': credential,
|
||||
};
|
||||
}
|
||||
|
||||
@immutable
|
||||
class TrackDimension {
|
||||
final int width;
|
||||
final int height;
|
||||
|
||||
const TrackDimension(
|
||||
this.width,
|
||||
this.height,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user