Access Control Methods
Other App Access Control Methods for meeting use-case
Name | Type | |
---|---|---|
kickPeer(peerId: string) | Function | Kick a peer with a specific peerId |
changePeerRole(peerRole: IRoleEnum) | Function | Change the role of the peer |
changePeerControls(peerControl: IControlEnum)) | Function | Grant or revoke a peer's permissions |
Example
meeting_screen.dart
import 'package:flutter/material.dart';
import 'package:huddle01_flutter_client/huddle_client.dart';
class MeetingScreen extends StatefulWidget {
...
}
class _MeetingScreenState extends State<MeetingScreen> {
late HuddleClient huddleClient;
@override
void initState() {
...
}
@override
Widget build(BuildContext context) {
return Column(
children:[
ElevatedButton(
onPressed:(){
String kickPeerId = 12345;
huddleClient.kickPeer(kickPeerId);
},
child: const Text("Kick Peer"),
),
ElevatedButton(
onPressed:(){
// change peer role
final peerRole = 'listener';
huddleClient.changePeerRole(peerRole);
},
child: const Text("Change Peer Role"),
),
ElevatedButton(
onPressed:(){
// change peer controls
final peerControl = 'disableSounds';
huddleClient.changePeerControls(peerControl);
},
child: const Text("Change Peer Controls"),
),
]
);
}
}