Skip to main content
Version: 4.x.x

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

      Methods
        createRoom(roomId:token:participantName:micEnabled:camEnabled:participantId:...) throws -> Room
      • roomIdString

      • tokenString

      • participantIdoptionalString?

      • participantNameoptionalString?

      • micEnabledBool(default:true)

      • camEnabledBool(default:true)

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