Holding a call
PlanetKit provides a feature to hold or unhold a call, which causes the application to pause or resume sending and receiving media streams. When a user holds or unholds a call, peers receive an event indicating that the user's video has been paused or resumed.
The behavior of holding and unholding a call differs depending on the call type. This page describes how you can hold or unhold a call.
Supported call type | Minimum SDK version |
---|---|
1-to-1 call, group call (conference) | 0.7 |
1-to-1 call
To hold or unhold a 1-to-1 call, use hold()
or unhold()
of PlanetKitCall
.
After you call hold()
to pause the application's transmission and reception of media streams, the peer should wait for unhold()
to be called in order to resume communication. On the peer side, the application lets PlanetKit play a hold tone that was set in the call parameter.
The following diagram shows the flow of holding and unholding a 1-to-1 call.
Related APIs
The following APIs are related to holding and unholding a call in 1-to-1 calls.
Method | Description | Related event callbacks |
---|---|---|
hold() | Starts hold state. You can provide the hold reason. | onPeerHold |
unhold() | Stops hold state. | onPeerUnhold |
Group call
To hold or unhold a group call, use hold()
or unhold()
of PlanetKitConference
.
In group calls, the hold behavior is different from 1-to-1 calls. The key differences are as follows:
- There is no concept of hold tone.
- In 1-to-1 calls, media transmission and reception is paused at the sender (peer) side. In group calls, transmission and reception of peers' media is stopped by Planet Cloud.
The following diagram shows the flow of holding and unholding a group call.
Related APIs
The following APIs are related to holding and unholding a call in group calls.
Method | Description | Related event callbacks |
---|---|---|
hold() | Starts hold state. You can provide the hold reason. | onPeersHold |
unhold() | Stops hold state. | onPeersUnhold |