Setting the initial video state
You can set the initial video state of the local user, which is applied when starting a video call or switching from an audio call to a video call.
| Supported call type | Minimum SDK version | 
|---|---|
| 1-to-1 call, group call (conference) | PlanetKit 5.5 | 
Overview
The EInitialMyVideoState enum defines the following values for the initial video state:
- PLNK_INITIAL_MY_VIDEO_STATE_RESUME: The camera is turned on and the video captured by the camera is transmitted.
- PLNK_INITIAL_MY_VIDEO_STATE_PAUSE: The camera remains turned off and video is not transmitted.
- The default value of the APIs described below is PLNK_INITIAL_MY_VIDEO_STATE_RESUME.
- If you set the initial video state to PLNK_INITIAL_MY_VIDEO_STATE_PAUSE, the local user's video is not transmitted. To capture and transmit the local user's video, you must callresumeMyVideo()afterward.
Setting the initial video state at the start of a video call
Depending on the call type, the API used to set the initial video state is as follows.
1-to-1 call
- Caller side: Use SetInitialMyVideoState()ofMakeCallParamwhen making a call.
- Callee side: Set the eInitialMyVideoStateparameter of theAcceptCall()when accepting a call.
For a code example of setting the initial video state in 1-to-1 calls, see 1-to-1 video call.
Group call
Use SetInitialMyVideoState() of ConferenceParam when joining a group call.
For a code example of setting the initial video state in group calls, see Group video call.
Setting the initial video state for switching to a video call
In 1-to-1 calls or group calls, set the eInitialMyVideoState parameter of EnableVideo() when enabling a video call.
For more information, refer to Enabling a video call from an audio call.
Related API
APIs related to initial video state setting are as follows.