Subscription permission API (#68)

* signal

* request

* implement

* rename event

* ref

* adjustments based on review

* override subscribed

* move events emit

* fix subscription state

* minor change

* update example for permissions demo

* format & subscriptionState as computed property

* prepare macos build

* unsubscribed event when subscription not allowed
This commit is contained in:
Hiroshi Horie
2022-01-10 23:48:44 +07:00
committed by GitHub
parent 9a37129504
commit aef1fd8804
12 changed files with 259 additions and 24 deletions
+19
View File
@@ -135,4 +135,23 @@ extension LKExampleExt on BuildContext {
],
),
);
Future<bool?> showSubscribePermissionDialog() => showDialog<bool>(
context: this,
builder: (ctx) => AlertDialog(
title: const Text('Allow subscription'),
content: const Text(
'Allow all participants to subscribe tracks published by local participant?'),
actions: [
TextButton(
onPressed: () => Navigator.pop(ctx, false),
child: const Text('NO'),
),
TextButton(
onPressed: () => Navigator.pop(ctx, true),
child: const Text('YES'),
),
],
),
);
}