Organize events (#13)
* move internal events & remove unused events * `TrackUnpublishedEvent` for local tracks * update example since we have local track unpublish events * use flutter_webrtc 0.6.9
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// added
|
||||
import 'package:flutter_webrtc/flutter_webrtc.dart' as rtc;
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
import '../events.dart';
|
||||
|
||||
@internal
|
||||
abstract class EngineIceStateUpdatedEvent with EngineEvent {
|
||||
final rtc.RTCIceConnectionState iceState;
|
||||
final bool isPrimary;
|
||||
const EngineIceStateUpdatedEvent({
|
||||
required this.iceState,
|
||||
required this.isPrimary,
|
||||
});
|
||||
}
|
||||
|
||||
@internal
|
||||
class EngineSubscriberIceStateUpdatedEvent extends EngineIceStateUpdatedEvent {
|
||||
const EngineSubscriberIceStateUpdatedEvent({
|
||||
required rtc.RTCIceConnectionState state,
|
||||
required bool isPrimary,
|
||||
}) : super(
|
||||
iceState: state,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
}
|
||||
|
||||
@internal
|
||||
class EnginePublisherIceStateUpdatedEvent extends EngineIceStateUpdatedEvent {
|
||||
const EnginePublisherIceStateUpdatedEvent({
|
||||
required rtc.RTCIceConnectionState state,
|
||||
required bool isPrimary,
|
||||
}) : super(
|
||||
iceState: state,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user