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) | 1.0 |
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()
ofPlanetKitMakeCallParamBuilder
when making a call. - Callee side: Set the
initialMyVideoState
parameter ofacceptCall()
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 PlanetKitJoinConferenceParamBuilder
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()
ofPlanetKitMakeCallParamBuilder
-
acceptCall()
-
enableVideo()
ofPlanetKitCall
Group call
-
setInitialMyVideoState()
ofPlanetKitJoinConferenceParamBuilder
-
enableVideo()
ofPlanetKitConference