methods
library
Properties
initialValuesState
→ Map <String , dynamic >
This function returns a fresh map of initial values for the state in the application.
It creates new instances of all arrays and objects to prevent state leakage between meetings.
It includes various properties related to the meeting room, participants, recording, audio/video settings, and more.
no setter
Functions
assignParticipantToBreakoutRoom (MediasfuParameters parameters , {required String name , int ? room , String newParticipantAction = 'autoAssignNewRoom' })
→ Future <HeadlessActionResult >
breakoutRoomUpdated (BreakoutRoomUpdatedOptions options )
→ Future <void >
Handles breakout room updates based on the received data and parameters.
checkLimitsAndMakeRequest ({required String apiUserName , required String apiToken , required String link , required String userName , required PreJoinPageParameters parameters , bool validate = true })
→ Future <void >
checkLimitsAndMakeRequest
clickAudio (ClickAudioOptions options )
→ Future <void >
Toggles audio for a user, either enabling or disabling the microphone.
clickScreenShare (ClickScreenShareOptions options )
→ Future <void >
Handles the action for the screen button, including starting and stopping screen sharing.
clickVideo (ClickVideoOptions options )
→ Future <void >
Toggles the video stream on or off based on the user's input and checks required permissions and constraints.
confirmRecording (ConfirmRecordingOptions options )
→ Future <void >
Confirms the recording based on the provided parameters.
confirmStillHere (MediasfuParameters parameters )
→ HeadlessActionResult
connectIps (ConnectIpsOptions options )
→ Future <List >
Connects to multiple remote IPs to manage socket connections for media consumption.
connectLocalIps (ConnectLocalIpsOptions options )
→ Future <void >
Connects to a local socket and manages socket events for media consumption.
createRoomOnMediaSFU (CreateMediaSFUOptions options )
→ Future <CreateJoinRoomResult >
createRoomOnMediaSFU
createRoomPoll (MediasfuParameters parameters , {required String question , required List <String > options , String type = 'custom' })
→ Future <HeadlessActionResult >
createViewerSession ({required ViewerSessionProvider provider , required String roomName , String ? displayName , Duration pollInterval = const Duration(seconds: 5) , Duration heartbeatInterval = const Duration(seconds: 30) , void onChange (ViewerSessionSnapshot )? })
→ ViewerSessionHandle
disableParticipantVideo (ModerationParameters parameters , {String id = '' , String name = '' })
→ Future <HeadlessActionResult >
endRoomPoll (MediasfuParameters parameters , {required String pollId })
→ Future <HeadlessActionResult >
flipCamera (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
formatNumber (FormatNumberOptions options )
→ Future <String ? >
Formats a given number into a human-readable string representation with suffixes (K, M, B).
generateRandomMessages (GenerateRandomMessagesOptions options )
→ List <Message >
Generates random messages for a chat application based on specified options.
generateRandomParticipants (GenerateRandomParticipantsOptions options )
→ List <Participant >
Generates a list of random participants for a meeting based on specified options.
generateRandomPolls (GenerateRandomPollsOptions options )
→ List <Poll >
Generates a list of random polls for testing.
generateRandomRequestList (GenerateRandomRequestListOptions options )
→ List <Request >
Generates a list of random requests for participants, excluding the host and co-host.
generateRandomWaitingRoomList ()
→ List <WaitingRoomParticipant >
Generates a random list of participants for a waiting room.
getAudioGridComponents (MediaStreamsParameters parameters )
→ List <Widget >
Prepared audio renderers. Render every entry; slicing this list makes
off-page participants inaudible while they remain in the room.
getBreakoutState (MediasfuParameters parameters )
→ BreakoutState
getCaptureLimits (MediasfuParameters parameters , {ProducerKind kind = ProducerKind.video })
→ CaptureLimits
Returns the camera capture ceiling published by the room.
getChatMessages (MediasfuParameters parameters , {String scope = 'all' , String withPerson = '' })
→ List <ChatMessage >
getCurrentParams (MediasfuParameters parameters )
→ MediasfuParameters
Purely reads the latest Flutter parameter snapshot.
getFocusModeState (MediasfuParameters parameters )
→ FocusModeState
getLocalAudioStream (MediaStreamsParameters parameters )
→ MediaStream ?
The live local microphone stream, or null while audio is off.
getLocalVideoStream (MediaStreamsParameters parameters )
→ MediaStream ?
The local camera, or null when it is off.
getMediaDevicesList (String kind )
→ Future <List <MediaDeviceInfo > >
Retrieves a filtered list of media devices based on the specified kind.
getMediaPermissions (MediaPermissionsParameters parameters )
→ MediaPermissions
getModerationPermissions (ModerationParameters parameters )
→ ModerationPermissions
getParticipantMedia (GetParticipantMediaOptions options )
→ Future <MediaStream ? >
Retrieves the media stream of a participant by ID or name.
getPendingApprovals (MediasfuParameters parameters )
→ PendingApprovals
getPollState (MediasfuParameters parameters )
→ PollState
getPresenceCheck (MediasfuParameters parameters )
→ PresenceCheck
getRecordingCapabilities (MediasfuParameters parameters )
→ RecordingCapabilities
getRecordingNotice (MediasfuParameters parameters )
→ RecordingNoticeState
getRecordingState (MediasfuParameters parameters )
→ RecordingState
getRemoteAudioStreams (MediaStreamsParameters parameters )
→ List <ResolvedMedia >
Remote audio producers, de-duplicated by producer id.
getRemoteVideoStreams (MediaStreamsParameters parameters )
→ List <ResolvedMedia >
Remote cameras, de-duplicated by producer id and free of the self marker.
getRoomHost (ParticipantStateParameters parameters )
→ Participant ?
Who the room considers the host, or null.
getRoomReadiness (RoomReadinessParameters parameters )
→ RoomReadiness
Judge whether the room can carry media.
getScreenShareStream (MediaStreamsParameters parameters )
→ ScreenShareState
The active screen share, local or remote.
getSessionTimer (MediasfuParameters parameters )
→ SessionTimer
getTranslationState (MediasfuParameters parameters )
→ TranslationState
getVirtualBackgroundState (MediasfuParameters parameters )
→ VirtualBackgroundState
getWhiteboardState (MediasfuParameters parameters )
→ WhiteboardState
handleCreatePoll (HandleCreatePollOptions options )
→ Future <void >
Handles the creation of a poll by emitting a "createPoll" event with the provided details.
Shows an alert based on the success or failure of the operation.
handleEndPoll (HandleEndPollOptions options )
→ Future <void >
Handles ending a poll by emitting an "endPoll" event through the provided socket.
Displays an alert based on the success or failure of the operation.
handleVotePoll (HandleVotePollOptions options )
→ Future <void >
Handles the voting process for a poll.
joinRoomOnMediaSFU (JoinMediaSFUOptions options )
→ Future <CreateJoinRoomResult >
joinRoomOnMediaSFU
launchBreakoutRooms (LaunchBreakoutRoomsOptions options )
→ void
Launches the breakout rooms by toggling the visibility of the breakout rooms modal.
launchCoHost (LaunchCoHostOptions options )
→ void
Toggles the visibility of the co-host modal.
launchConfigureWhiteboard (LaunchConfigureWhiteboardOptions options )
→ void
Toggles the visibility of the configure whiteboard modal.
launchConfirmExit (LaunchConfirmExitOptions options )
→ void
Toggles the visibility of the confirmation exit modal.
launchDisplaySettings (LaunchDisplaySettingsOptions options )
→ void
Toggles the visibility of the display settings modal.
launchMediaSettings (LaunchMediaSettingsOptions options )
→ Future <void >
Launches the media settings modal and updates the available audio and video input devices.
Toggles the visibility of the menu modal.
launchMessages (LaunchMessagesOptions options )
→ void
Toggles the visibility state of the messages modal.
launchParticipants (LaunchParticipantsOptions options )
→ void
Toggles the visibility of the participants modal.
launchPoll (LaunchPollOptions options )
→ void
Toggles the visibility of the poll modal based on the current state.
launchRecording (LaunchRecordingOptions options )
→ void
Launches the recording process based on various conditions and updates the UI accordingly.
launchRequests (LaunchRequestsOptions options )
→ void
Toggles the visibility state of the requests modal.
launchSettings (LaunchSettingsOptions options )
→ void
Toggles the visibility state of the settings modal.
launchWaiting (LaunchWaitingOptions options )
→ void
Launches the waiting modal and toggles its visibility state.
leaveRoom (RoomActionsParameters parameters , {bool ban = false , bool endRoomOnHostExit = true })
→ Future <HeadlessActionResult >
listParticipantMediaStates (ParticipantStateParameters parameters )
→ List <ParticipantMediaState >
The whole roster, ready to render.
muteEveryone (ModerationParameters parameters , {String kind = 'audio' })
→ Future <HeadlessActionResult >
muteParticipant (ModerationParameters parameters , {String id = '' , String name = '' })
→ Future <HeadlessActionResult >
pauseRoomRecording (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
pollUpdated (PollUpdatedOptions options )
→ Future <void >
Updates the poll state based on the provided options.
removeParticipant (ModerationParameters parameters , {String id = '' , String name = '' })
→ Future <HeadlessActionResult >
resolveParticipantMediaState (ParticipantStateParameters parameters , Participant participant )
→ ParticipantMediaState
One participant's media state.
respondToParticipantRequest (ModerationParameters parameters , {String requestId = '' , String name = '' , required bool approve })
→ Future <HeadlessActionResult >
respondToWaitingParticipant (ModerationParameters parameters , {String id = '' , String name = '' , required bool admit })
→ Future <HeadlessActionResult >
resumeRoomRecording (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
runMediaControl (RoomActionsParameters parameters , FutureOr <void > action () )
→ Future <HeadlessActionResult >
sendChatMessage (RoomActionsParameters parameters , String message , {List <String > receivers = const <String>[] , bool group = true })
→ Future <HeadlessActionResult >
setBreakoutRooms (MediasfuParameters parameters , List <List <BreakoutParticipant > > rooms , {String newParticipantAction = 'autoAssignNewRoom' })
→ Future <HeadlessActionResult >
setCoHost (ModerationParameters parameters , String name , {List <ModerationArea > areas = const <ModerationArea>['media', 'participants'] })
→ Future <HeadlessActionResult >
setParticipantMedia (ModerationParameters parameters , {String id = '' , String name = '' , required String kind })
→ Future <HeadlessActionResult >
setRoomMediaPolicy (MediasfuParameters parameters , {String ? audio , String ? video , String ? screenshare , String ? chat })
→ Future <HeadlessActionResult >
setTranslationPreference (MediasfuParameters parameters , {String ? language , String ? speakerId , bool wantOriginal = false })
→ HeadlessActionResult
sleep (SleepOptions options )
→ Future <void >
Suspends the execution of the current isolate for the specified options.ms milliseconds.
startMeetingProgressTimer ({required StartMeetingProgressTimerOptions options })
→ void
Starts a timer to track the progress of a meeting.
startRecording (StartRecordingOptions options )
→ Future <bool ? >
Starts the recording process, managing different states and actions based on recording options.
startRoomRecording (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
startWhiteboard (MediasfuParameters parameters , {List <WhiteboardUser > ? users })
→ Future <HeadlessActionResult >
stopBreakoutRooms (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
stopParticipantScreenShare (ModerationParameters parameters , {String id = '' , String name = '' })
→ Future <HeadlessActionResult >
stopRecording (StopRecordingOptions options )
→ Future <void >
Stops the recording process, managing different states and actions based on current recording status.
stopRoomRecording (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
stopWhiteboard (MediasfuParameters parameters )
→ Future <HeadlessActionResult >
switchAudioOutput (SwitchAudioOutputOptions options )
→ Future <bool >
Switches audio output between speaker and earpiece/default.
switchCamera (MediasfuParameters parameters , String deviceId )
→ Future <HeadlessActionResult >
switchMicrophone (MediasfuParameters parameters , String deviceId )
→ Future <HeadlessActionResult >
switchVideoAlt (SwitchVideoAltOptions options )
→ Future <void >
Switches the user's video device with alternate logic, taking into account recording state and camera access permissions.
updateRecording (UpdateRecordingOptions options )
→ Future <void >
Updates the recording based on the given parameters, managing recording start,
pause, and resume states, as well as providing alerts for required conditions.
voteInRoomPoll (MediasfuParameters parameters , {required String pollId , required int optionIndex })
→ Future <HeadlessActionResult >