Methods returned by useMeeting Hook - React Native
join()
- It is used to join a meeting.
- During initialization using the
<MeetingProvider>
, ifjoinWithoutInteraction
is set totrue
, participant will automatically join the meeting. If it isfalse
explicity call forjoin()
should be made.
Events associated with join()
:
- Local Participant will receive a
onMeetingJoined
event, when successfully joined. - Remote Participant will receive a
onParticipantJoined
event with the newly joinedParticipant
object from the event callback.
Participant having ask_join
permission inside token
-
If a token contains the permission
ask_join
, then the participant will not join the meeting directly after callingjoin()
, but an event will be emitted to the participant having the permissionallow_join
calledonEntryRequested
. -
After the decision from the remote participant, an event will be emitted to participant called
onEntryResponded
. This event will contain the decision made by the remote participant.
Participant having allow_join
permission inside token
- If a token containing the permission
allow_join
, then the participant will join the meeting derectly after callingjoin()
.
leave()
leave()
is used to leave a meeting for local participant only.
Events associated with leave()
:
- Local participant will receive a
onMeetingLeft
event. - All remote participants will receive a
onParticipantLeft
event withParticipant
object from the event callback.
end()
end()
is used to end a meeting for all participants.
Events associated with end()
:
- All remote participants and local participant will receive a
onParticipantLeft
event withParticipant
object from the event callback.
unmuteMic()
unmuteMic()
is used to enable mic of the local participant.
Events associated with unmuteMic()
:
- Every Participant will receive a callback on
onStreamEnabled()
of theuseParticipant()
hook withStream
object.
muteMic()
muteMic()
is used to disable mic of the local participant.
Events associated with muteMic()
:
- Every Participant will receive a callback on
onStreamDisabled()
of theuseParticipant()
hook withStream
object.
toggleMic()
toggleMic()
is used to toogle mic of the local participant.
Events associated with toggleMic()
:
-
Every Participant will receive a callback on
onStreamDisabled()
of theuseParticipant()
hook withStream
object if mic is turned off. -
Every Participant will receive a callback on
onStreamEnabled()
of theuseParticipant()
hook withStream
object if mic is turned on.
enableWebcam()
enableWebcam()
is used to enable webcam of the local participant.
Events associated with enableWebcam()
:
- Every Participant will receive a callback on
onStreamEnabled()
of theuseParticipant()
hook withStream
object.
disableWebcam()
disableWebcam()
is used to disable webcam of the local participant.
Events associated with disableWebcam()
:
- Every Participant will receive a callback on
onStreamDisabled()
of theuseParticipant()
hook withStream
object.
toggleWebcam()
toggleWebcam()
is used to toogle webcam of the local participant.
Events associated with toggleWebcam()
:
-
Every Participant will receive a callback on
onStreamDisabled()
of theuseParticipant()
hook withStream
object if webcam is turned off. -
Every Participant will receive a callback on
onStreamEnabled()
of theuseParticipant()
hook withStream
object if webcam is turned on.
enableScreenShare()
enableScreenShare()
is used to enable screen share of the local participant.
Events associated with enableScreenShare()
:
-
Every Participant will receive a callback on
onStreamEnabled()
of theuseParticipant()
hook withStream
object. -
onPresenterChanged()
will also receive a callback with thepresenterId
.
disableScreenShare()
disableScreenShare()
is used to disable screen share of the local participant.
Events associated with disableScreenShare()
:
-
Every Participant will receive a callback on
onStreamDisabled()
of theuseParticipant()
hook withStream
object. -
onPresenterChanged()
will also receive a callback with thepresenterId
.
toggleScreenShare()
toggleScreenShare()
is used to toogle screen share of the local participant.
Events associated with toggleScreenShare()
:
-
Every Participant will receive a callback on
onStreamDisabled()
of theuseParticipant()
hook withStream
object if screen share is turned off. -
Every Participant will receive a callback on
onStreamEnabled()
of theuseParticipant()
hook withStream
object if screen share is turned on.
For React Native iOS Screen Share feature, you need to follow this guide React Native iOS Screen Share
startRecording()
-
startRecording
is used to start meeting recording. -
webhookUrl
will be triggered when the recording is completed and stored into server. Read more about webhooks here. -
awsDirPath
will be the path for the your S3 bucket where you want to store recordings to. To allow us to store recording in your S3 bucket, you will need to fill this form by providing the required values. VideoSDK AWS S3 Integration -
config: mode
is used to either record video-and-audio both or only audio. And by default it will be video-and-audio. -
config: quality
is only applicable to video-and-audio. -
transcription: enabled
indicates whether post transcription is enabled. -
transcription: summary: enabled
Indicates whether post transcription summary generation is enabled. Only applicable when post transcription is enabled. -
transcription: summary: prompt
provides guidelines or instructions for generating a custom summary based on the post transcription content.
Parameters
- webhookUrl: String
- awsDirPath: String
- config:
- layout:
- type: "GRID" | "SPOTLIGHT" | "SIDEBAR"
- priority: "SPEAKER" | "PIN"
- gridSize: Number
max 4
- theme: "DARK" | "LIGHT" | "DEFAULT"
- mode: "video-and-audio" | "audio"
- quality: "low" | "med" | "high"
- orientation: "landscape" | "portrait"
- layout:
- transcription:
- enabled: Boolean
- summary:
- enabled: Boolean
- prompt: String
Events associated with startRecording()
:
- Every participant will receive a callback on
onRecordingStarted()
Example
const webhookUrl = "https://webhook.your-api-server.com";
const awsDirPath = "/meeting-recordings/";
const config = {
layout: {
type: "SPOTLIGHT",
priority: "PIN",
gridSize: 9,
},
theme: "DEFAULT",
};
const transcription = {
enabled: true,
summary: {
enabled: true,
},
};
const { startRecording } = useMeeting();
startRecording(webhookUrl, awsDirPath, config, transcription);
stopRecording()
stopRecording()
is used to stop the meeting recording.
Events associated with stopRecording()
:
- Every participant will receive a callback on
onRecordingStopped()
startLiveStream()
-
startLiveStream()
is used to start meeting livestreaming. -
You will be able to start live stream meetings to other platforms such as Youtube, Facebook, etc. that support
RTMP
streaming.
Parameters
- outputs: Array<{ url: String, streamKey: String }>
- config:
- layout:
- type: "GRID" | "SPOTLIGHT" | "SIDEBAR"
- priority: "SPEAKER" | "PIN"
- gridSize: Number
max 25
- layout:
Events associated with startLiveStream()
:
- Every participant will receive a callback on
onLiveStreamStarted()