Host Actions & Permissions
Based on your peer preset permissions you can perform certain host actions in RealtimeKit's Flutter SDK. As you follow through this page, you'll know what the host actions are and how to implement it based on permissions.
Permissions
Permissions are set in the Developer Portal. Based on the permissions set, you can perform certain host actions. To access permissions, use meeting.permissions
method. The permissions are as follows:
Media Permissions
Media permissions (audio, video, and screenshare) can be accessed using meeting.permissions.media
.
- Audio and screenshare permissions are of type
MediaPermission
. - Video permissions are of type
VideoPermissions
.
MediaPermission
is an enum with three possible values:
MediaPermission.allowed
: The user is allowed to access the media.MediaPermission.canRequest
: The user can request access to the media. Example: In a webinar, a user who is off-stage may request to come on stage.MediaPermission.notAllowed
: The user is not allowed to access the media.
VideoPermissions
includes three properties:
permission
: AMediaPermission
that represents the video permission.frameRate
: Anint
representing the video frame rate.quality
: AString
representing the video quality.
// To get audio permission
final MediaPermission audioPermission = meeting.permissions.media.audio;
// To get video permissions
final VideoPermissions videoPermission = meeting.permissions.media.video;
// To get screenshare permission
final MediaPermission screensharePermission = meeting.permissions.media.screenshare;
Chat Permissions
Chat permissions are represented by ChatPermissions
, which contains two properties:
canSendText
: Abool
that indicates whether the user can send text messages in chat.canSendFiles
: Abool
that indicates whether the user can send images or files in chat.
final ChatPermissions chatPermissions = meeting.permissions.chat;
Host Permissions
Host permissions are represented by HostPermissions
, which contains the following properties:
canAcceptRequests
: Abool
indicating whether the user can accept requests to join the room.canAcceptStageRequests
: Abool
indicating whether the user can accept requests to join the stage.canMuteAudio
: Abool
indicating whether the user can mute other participants' audio.canMuteVideo
: Abool
indicating whether the user can disable other participants' video.canKickParticipant
: Abool
indicating whether the user can remove participants from the room.canPinParticipant
: Abool
indicating whether the user can pin participants in the room.canTriggerRecording
: Abool
indicating whether the user can start or stop recording.
final HostPermissions hostPermissions = meeting.permissions.host;
Poll Permissions
Poll permissions are represented by PollPermissions
, which contains three properties:
canCreate
: Abool
indicating whether the user can create polls.canVote
: Abool
indicating whether the user can vote in polls.canView
: Abool
indicating whether the user can view polls.
final PollPermissions pollPermissions = meeting.permissions.poll;
Plugin Permissions
Plugin permissions are represented by PluginPermissions
, which contains two properties:
canLaunch
: Abool
indicating whether the user can launch plugins in the meeting room.canClose
: Abool
indicating whether the user can close plugins in the meeting room.
final PluginPermissions pluginPermissions = meeting.permissions.plugin;
Livestream Permissions
Livestream permissions are represented by LivestreamPermissions
, which contains the following property:
canLivestream
: Abool
indicating whether the user can start or stop a livestream.
final LivestreamPermissions livestreamPermissions = meeting.permissions.livestream;
Miscellaneous Permissions
Miscellaneous permissions are represented by MiscellaneousPermissions
, which contains the following properties:
canEditDisplayName
: Abool
indicating whether the user can edit their display name.canSpotLight
: Abool
indicating whether the user can spotlight a participant.