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 PlanetKitInitialMyVideoState enum defines the following values for the initial video state:
RESUME: The camera is turned on and the video captured by the camera is transmitted.PAUSE: The camera remains turned off and video is not transmitted.
- The default value of the APIs described below is
RESUME. - If you set the initial video state to
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()ofPlanetKitMakeCallParam.Builderwhen making a call. - Callee side: Set the
initialMyVideoStateparameter 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 PlanetKitConferenceParam.Builder 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 initialMyVideoState 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.
1-to-1 call
-
setInitialMyVideoState()ofPlanetKitMakeCallParam.Builder -
acceptCall() -
enableVideo()ofPlanetKitCall