Skip to main content
Version: 2.0.x

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 call join().

Events associated with join():

  • Local Participant will receive a onMeetingJoined event, when successfully joined.
  • Remote Participant will receive a [addParticipant] event with the newly joined Participant object from the event callback.

Returns

  • void

leave()

  • It is used to leave the current meeting.

Events associated with leave():

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():

Returns

  • void

enableWebcam()

Returns

  • void

disableWebcam()

Returns

  • void

unmuteMic()

Returns

  • void

muteMic()

Returns

  • void

startRecording()

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"

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()

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()

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

Events associated with startHLS():

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():

Returns

  • void

Example

stopHLS();

changeMode()

  • changeMode() is used to change the mode of participant.

Parameters

  • mode: Mode
    • All available participant modes are CONFERENCE and VIEWER.

Events associated with changeMode():

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 the getMics method.

Returns

  • void

Example

meeting.changeMic(selectedDevice: "Speaker")

Got a Question? Ask us on discord