initMeeting

fun initMeeting(context: Context, meetingId: String, name: String, micEnabled: Boolean, webcamEnabled: Boolean, @Nullable participantId: String, mode: String, multiStream: Boolean, customTracks: Map<String, CustomStreamTrack>, metaData: JSONObject, @Nullable signalingBaseUrl: String, @Nullable preferredProtocol: VideoSDK.PreferredProtocol): Meeting

Initializes and returns a Meeting instance configured with the provided parameters.

The SDK validates the token (set via config) and meeting identifier before creating the meeting object. Call join on the returned instance to connect to the meeting.

Return

A configured Meeting instance ready to call join.

Parameters

context

Application context.

meetingId

Unique ID of the meeting to join. Create one using the Create Room API.

name

Display name of the participant. If null, a random name is generated.

micEnabled

If true, the microphone is enabled when joining.

webcamEnabled

If true, the webcam is enabled when joining.

participantId

Unique participant identifier. If null or empty, one is auto-generated.

mode

Meeting mode. Allowed values: "SEND_AND_RECV", "RECV_ONLY", "SIGNALLING_ONLY". If null, defaults to "SEND_AND_RECV". See MeetingMode.

multiStream

If true, enables simulcast/multistream support.

customTracks

Map of custom audio/video tracks. Keys should be "mic" or "webcam". Create tracks using createCameraVideoTrack or createAudioTrack. If null, default tracks are used.

metaData

JSON metadata associated with the participant. If null, no metadata is attached.

signalingBaseUrl

(Optional) Custom signaling server base URL. If null, the default VideoSDK signaling server is used.

preferredProtocol

(Optional) Preferred network protocol for media transmission. If null, defaults to UDP_OVER_TCP. See PreferredProtocol.

See also