Meeting Class Methods - iOS
join()
- It is used to join a meeting.
- After meeting initialization by
initMeeting()
it returns a new instance of Meeting. However by default, it will not automatically join the meeting. Hence, to join the meeting you should calljoin()
.
Events associated with join()
:
- Local Participant will receive a
onMeetingJoined
event, when successfully joined. - Remote Participant will receive a [
addParticipant
] event with the newly joinedParticipant
object from the event callback.
Returns
void
leave()
- It is used to leave the current meeting.
Events associated with leave()
:
- Local participant will receive a
onMeetingLeft
event. - All remote participants will receive a
onParticipantLeft
event withparticipantId
.
Returns
void
end()
- It is used to end the current running session.
- By calling
end()
, all joined participants including localParticipant of that session will leave the meeting.
Events associated with end()
:
- All participants and localParticipant, will be emitted [
closeRoom
] event.
Returns
void
enableWebcam()
- It is used to enable self camera.
onStreamEnabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
disableWebcam()
- It is used to enable self camera.
onStreamDisabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
unmuteMic()
- It is used to enable self microphone.
onStreamEnabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
muteMic()
- It is used to disable self microphone.
onStreamDisabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
startRecording()
It is used to start meeting recording.
All participants and localParticipant, will receive
onRecordingStarted
event.webhookUrl
will be triggered when the recording is completed and stored into server. Read more about webhooks here.
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:
Returns
void
Example
let webhookUrl = "https://webhook.your-api-server.com"
let awsDirPath = "/meeting-recordings/"
let config: RecordingConfig = RecordingConfig(
layout: ConfigLayout(
type: .GRID,
priority: .PIN,
gridSize: 4
),
theme: .DARK,
mode: .video_and_audio,
quality: .med,
orientation: .landscape
)
startRecording(webhookUrl: webhookUrl!, awsDirPath: awsDirPath, config: config)
stopRecording()
- It is used to stop meeting recording.
- All participants and localParticipant, will receive
onRecordingStopped
event.
Returns
void
Example
stopRecording();
startLivestream()
- It 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. - All participants and localParticipant, will receive
onLivestreamStarted
event.
Parameters
- outputs:
[LivestreamOutput]
Returns
void
Example
startLivestream(outputs: outputs)
stopLivestream()
- It is used to stop meeting livestreaming.
- All participants and localParticipant, will receive
onLivestreamStopped
event.
Returns
void
Example
stopLivestream();
startHLS()
startHLS()
will start HLS streaming of your meeting.You will be able to start HLS and watch the live stream of meeting over HLS.
mode
is used to either start hls streaming of video-and-audio both or only audio. And by default it will be video-and-audio.quality
is only applicable to video-and-audio.
Parameters
- config:
- layout:
- type: .GRID | .SPOTLIGHT | .SIDEBAR
- priority: .SPEAKER | .PIN
- gridSize: Number
max 25
- theme: .DARK | .LIGHT | .DEFAULT
- mode: .video_and_audio | .audio
- quality: .low | .med | .high
- layout:
Events associated with startHLS()
:
- Every participant will receive a callback of state change of HLS
onHlsStateChanged
Returns
void
Example
var config: HLSConfig = HLSConfig(
layout: HLSLayout(
type: .GRID,
priority: .SPEAKER,
gridSize: 4
),
theme: .DARK,
mode: .video_and_audio,
quality: .high,
orientation: .portrait
)
startHLS(config: config)
stopHLS()
stopHLS()
is used to stop the HLS streaming.
Events associated with stopHLS()
:
- Every participant will receive a callback of state change of HLS
onHlsStateChanged
Returns
void
Example
stopHLS();
changeMode()
changeMode()
is used to change the mode of participant.
Parameters
- mode: Mode
- All available participant modes are
CONFERENCE
andVIEWER
.
- All available participant modes are
Events associated with changeMode()
:
- Every participant will receive a callback of state change of mode
onParticipantModeChanged
Returns
void
Example
changeMode(.VIEWER | .CONFERENCE)
enableScreenShare()
enableScreenShare()
is used to share your local screen to the remote participants in the meeting.
Returns
void
Example
Task {
await meeting.enableScreenShare()
}
disableScreenShare()
disableScreenShare()
is used to stop sharing your local screen.
Returns
void
Example
Task {
await meeting.disableScreenShare()
}
getMics()
getMics
method will return an array of tuples, where each tuple consists of two elements deviceName and deviceType.
Returns
[deviceName: String, deviceType: String]
Example
meeting.getMics()
// sample returned array
// [("Speaker","Speaker"), ("iPhone Microphone", "Receiver")]
changeMic()
changeMic
method will return an array of tuples, where each tuple consists of two elements deviceName and deviceType.
Parameters
- selectedDevice: String
- Here selectedDevice should be the exact string of the
deviceName
that you get after calling thegetMics
method.
- Here selectedDevice should be the exact string of the
Returns
void
Example
meeting.changeMic(selectedDevice: "Speaker")
Got a Question? Ask us on discord