useMeeting Hook
useMeeting hook abtracts meeting class and takes all the events as parameters and returns all the properties and methods to work meeting instance.
useMeeting example
useMeeting react hook
import {
useMeeting,
} from "@videosdk.live/react-native-sdk";
function onParticipantJoined(participant) {
setParticipant(participant)
}
const {
meetingId,
...
} = useMeeting({
onParticipantJoined,
...
});
Parameters
__namedParametersrequired
objectonParticipantJoinedoptional
eventonParticipantLeftoptional
eventonSpeakerChangedoptional
eventonPresenterChangedoptional
eventonMainParticipantChangedoptional
eventonEntryRequestedoptional
eventonEntryRespondedoptional
eventonRecordingStartedoptional
eventonRecordingStoppedoptional
eventonChatMessageoptional
eventonMeetingJoinedoptional
eventonMeetingLeftoptional
eventonLiveStreamStartedoptional
eventonLiveStreamStoppedoptional
eventonVideoStateChangedoptional
eventonVideoSeekedoptional
eventonPinStateChangedoptional
event
Parameters
Returns
__returnsrequired
objectmeetingId
stringmeeting
MeetinglocalParticipant
ParticipantmainParticipant
ParticipantonMainParticipantChanged
eventactiveSpeakerId
stringparticipants
Map<Participant>pinnedParticipants
Map<string, { cam: bool, share: bool }}>presenterId
stringlocalMicOn
booleanlocalWebcamOn
booleanlocalScreenShareOn
booleanmessages
Map<string>join()
functionleave()
functionend()
functionstartRecording(webhookUrl: string)
functionstopRecording()
functionsendChatMessage()
functionrespondEntry()
functionmuteMic()
functionunmuteMic()
functiontoggleMic()
functiondisableWebcam()
functionenableWebcam()
functiontoggleWebcam()
functiondisableScreenShare()
functionenableScreenShare()
functiontoggleScreenShare()
functiongetMics()
functiongetWebcams()
functionchangeWebcam(deviceId: string)
functionchangeMic(deviceId: string)
functionstartVideo({ link: string })
functionstopVideo()
functionresumeVideo()
functionpauseVideo({ currentTime: number })
functionseekVideo({ currentTime: number })
functionstartLivestream(Array<{ url: string, streamKey: string }>)
functionstopLivestream()
function
Returns
Got a Question? Ask us on discord

