Exploring the SDK
In this section, you will explore the use cases of features of iOS Client SDK and observer properties.
Use Cases
Join Meeting
Do the following steps to join the meeting:
- Use
meetingServiceandjoinMeetingAPI to join a meeting. - Observe the join API result by checking the
connectionStateonmeetingService.
A sample code snippet for joining the meeting.
meetingService.join(meetingID: "123****", passcode: "****", displayName: "John Doe") { joinResult in
if joinResult == .success {
print("Join meeting: Success")
} else {
print("Join meeting failed with result \(joinResult)")
}
}
Note:
BlueJeans SDK connects the instance to the meeting ID. Also, there should be only one meeting instance of the SDK in the same iOS application, if you fail to join a meeting for some reason/join another meeting after leaving the first one, you need to reload the page.
Leave Meeting
Use the following command to end the meeting.
BlueJeansSDK.meetingService.leave()
Participants Service
The participantsService provides information about the participants in the meeting.
participant represents a participant in the meeting. It contains properties to identify if video and audio are muted or not, muteState to distinguish if it is muted locally or remotely for both audio and video, the participant's name, and the participant's unique identifier.
Participant Self Audio Mute
setAudioMuted method is used to mute/unmute your local audio.
BlueJeansSDK.meetingService.setAudioMuted(false) //to unmute your audio
BlueJeansSDK.meetingService.setAudioMuted(true) //to mute your audio
Participant Self-Video Mute
setVideoMuted method is used to mute/unmute your local video.
BlueJeansSDK.meetingService.setVideooMuted(false) //to unmute your audio
BlueJeansSDK.meetingService.setVideoMuted(true) //to mute your audio
participants provide a list of meeting participants. Whenever the number of participants in a meeting changes or the properties of any of the current participants changes, the list is published. Any changes are reflected in the participant list, and the list reference remains the same throughout the meeting instance.
Permission Service
The PermissionService provides methods and states to allow more fine-grained control over how and when permission is asked for. You can use the permission service to check and request and set the required permissions to join a meeting.
By default, the iOS Client SDK will ask for microphone/camera permission at the last possible moment - when joining a meeting for the first time. It will use the strings specified in your app's Info.plist when requesting permission.
- You can check whether the user has granted the required permissions to join a meeting (See. hasRequiredPermissions).
- An array of the Permission which is required to have a PermissionStatus of
.authorizedbefore joining a meeting (See. requiredPermissions). - You can set the required permission to join a meeting (See. setRequiredPermissions(_:)).
- You can check the current state of permissions in the SDK (See. currentPermissions).
- You can request permission to join a meeting (See. requestPermission(for:onCompletion:)).
Observing Properties
All services in this SDK have observable properties that allow exposing observe API/Function. observe allows you to observe the property in which you are interested in a call-back. Whenever the property value changes, you will be notified via a call-back.
Note:
- As mentioned in the API Architecture section, inMeeting services get activated when the
connectionStatetransition is .connected. A sample example is given below for registering the call-backs for inMeeting Services after the connection state becomes connected.updater.onTransition(_meetingState) { old, new in DDLogInfo("meetingState changed from \(String(describing: old)) to \(new)") } - observe does not allow observing changes to methods mentioned in the services.
- meeting state variable gives connection state.