Room recording event (#252)
* feat: Add room reocording reminder. * chore: comment for recording event.
This commit is contained in:
@@ -136,6 +136,23 @@ extension LKExampleExt on BuildContext {
|
||||
),
|
||||
);
|
||||
|
||||
Future<bool?> showRecordingStatusChangedDialog(bool isActiveRecording) =>
|
||||
showDialog<bool>(
|
||||
context: this,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Room recording reminder'),
|
||||
content: Text(isActiveRecording
|
||||
? 'Room recording is active.'
|
||||
: 'Room recording is stoped.'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx, true),
|
||||
child: const Text('OK'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Future<bool?> showSubscribePermissionDialog() => showDialog<bool>(
|
||||
context: this,
|
||||
builder: (ctx) => AlertDialog(
|
||||
|
||||
@@ -61,6 +61,9 @@ class _RoomPageState extends State<RoomPage> {
|
||||
WidgetsBindingCompatible.instance
|
||||
?.addPostFrameCallback((timeStamp) => Navigator.pop(context));
|
||||
})
|
||||
..on<RoomRecordingStatusChanged>((event) {
|
||||
context.showRecordingStatusChangedDialog(event.activeRecording);
|
||||
})
|
||||
..on<LocalTrackPublishedEvent>((_) => _sortParticipants())
|
||||
..on<LocalTrackUnpublishedEvent>((_) => _sortParticipants())
|
||||
..on<DataReceivedEvent>((event) {
|
||||
|
||||
Reference in New Issue
Block a user