VideoSDK Class - iOS
The entry point into the SDK.
Using the VideoSDK Class
The VideoSDK Class includes methods and events to initialize and configure the SDK. It is a factory class.
Methods
__methods
roomId
Stringtoken
StringparticipantIdoptional
String?participantNameoptional
String?micEnabled
Bool(default:true)camEnabled
Bool(default:true)
Methods
createRoom(roomId:token:participantName:micEnabled:camEnabled:participantId:...) throws -> Room
createRoom() throws ERROR_INVALID_PARAMETER for an empty room ID or token, so call it with try. There is no separate config step: the token is a parameter. For every createRoom() parameter, see Creating a Room. For all VideoSDK methods, see VideoSDK Class Methods.
Example
Create Room Example
import VideoSDKRTC
do {
room = try VideoSDK.createRoom(
roomId: roomData.roomId,
token: roomData.token,
participantName: roomData.name,
micEnabled: roomData.micEnabled,
camEnabled: roomData.cameraEnabled
)
} catch {
print("Setup failed: \(error)")
}
Got a Question? Ask us on discord

