Initializing a Meeting - iOS
config()
Before initializing the meeting, you will need to first provide token
. Please refer this documentation to generate a token.
//meeting configuration using VideoSDK
VideoSDK.config("<your token>");
You can initialize the meeting using a factory method provided by the SDK called initMeeting()
. By passing the parameters according to the need, it will generate a new Meeting
class and the initiated meeting will be returned.
initMeeting()
let meeting = VideoSDK.initMeeting(
meetingId: "abcd-efgh-xyzw",
participantId: "JD", // optional
participantName: "John Doe",
micEnabled: true,
webcamEnabled: true
customCameraVideoStream: customVideoStream, //optional
customAudioStream: customAudioStream, //optional
mode: .SEND_AND_RECV, //optional (default mode is conference)
);
Meeting Initialization Parameters
meetingId
-
Unique Id of the meeting where that participant will be joining.
- type :
String
REQUIRED
- type :
Please refer this documentation to create a room.
participantId
-
Unique Id of the participant. If not passed then SDK will create an Id by itself and will use that id.
- type :
String
OPTIONAL
- type :
participantName
-
Name of the participant who will be joining the meeting, this name will be displayed to other participants in the same meeting.
- type :
String
REQUIRED
- type :
micEnabled
-
Whether
mic
of the participant will be on while joining the meeting. If it is set tofalse
, then mic of that participant will bedisabled
by default, but can beenabled
ordisabled
later.- type:
Boolean
- defaultValue : true
OPTIONAL
- type:
webcamEnabled
-
Whether
webcam
of the participant will be on while joining the meeting. If it is set tofalse
, then webcam of that participant will bedisabled
by default, but can beenabled
ordisabled
later.- type:
Boolean
- defaultValue : true
OPTIONAL
- type:
customCameraVideoStream:
-
If you want to set the initial video custom track, then you can pass the customVideoTrack created using
createCameraVideoTrack
method ofVideoSDK
class.- It has to be of
CustomRTCMediaStream
type. - defaultValue :
nil
OPTIONAL
- It has to be of
customAudioStream:
-
If you want to set the initial audio custom track, then you can pass the customAudioTrack created using
createAudioTrack
method ofVideoSDK
class.- It has to be of
CustomRTCMediaStream
type. - defaultValue :
nil
OPTIONAL
- It has to be of
mode:
-
There are 3 types of modes:
SEND_AND_RECV
: Both audio and video streams will be produced and consumed in this mode.SIGNALLING_ONLY
: Audio and video streams will not be produced or consumed in this mode.RECV_ONLY
: This mode allows only the consumption of audio and video streams without producing any.
-
It has to be of
String
type. -
If you passed
null
then by default VideoSDK will setSEND_AND_RECV
mode.
Important Changes IOS SDK in Version v2.2.0
- The following modes have been deprecated:
CONFERENCE
has been replaced bySEND_AND_RECV
VIEWER
has been replaced bySIGNALLING_ONLY
Please update your implementation to use the new modes.
⚠️ Compatibility Notice:
To ensure a seamless meeting experience, all participants must use the same SDK version.
Do not mix version v2.2.0 + with older versions, as it may cause significant conflicts.
Returns
meeting
- After initializing the meeting,
initMeeting()
will return a newMeeting
instance.
Got a Question? Ask us on discord