EngineConnectionStateUpdatedEvent instead of individual events

This commit is contained in:
Hiroshi Horie
2022-03-04 20:10:28 +09:00
parent 21591e46e3
commit 99460dd436
5 changed files with 108 additions and 109 deletions
+16 -20
View File
@@ -124,6 +124,22 @@ class SignalConnectionStateUpdatedEvent extends ConnectionStateUpdatedEvent
);
}
@internal
class EngineConnectionStateUpdatedEvent extends ConnectionStateUpdatedEvent
with EngineEvent {
const EngineConnectionStateUpdatedEvent({
required ConnectionState newState,
required ConnectionState oldState,
required bool didReconnect,
DisconnectReason? disconnectReason,
}) : super(
newState: newState,
oldState: oldState,
didReconnect: didReconnect,
disconnectReason: disconnectReason,
);
}
@internal
class SignalOfferEvent with SignalEvent, InternalEvent {
final rtc.RTCSessionDescription sd;
@@ -270,26 +286,6 @@ class SignalTokenUpdatedEvent with SignalEvent, InternalEvent {
// Engine events
// ----------------------------------------------------------------------
@internal
class EngineConnectedEvent with EngineEvent, InternalEvent {
const EngineConnectedEvent();
}
@internal
class EngineDisconnectedEvent with EngineEvent, InternalEvent {
const EngineDisconnectedEvent();
}
@internal
class EngineReconnectingEvent with EngineEvent, InternalEvent {
const EngineReconnectingEvent();
}
@internal
class EngineReconnectedEvent with EngineEvent, InternalEvent {
const EngineReconnectedEvent();
}
@internal
class EngineTrackAddedEvent with EngineEvent, InternalEvent {
final rtc.MediaStreamTrack track;