Overview of data and message functions
PlanetKit provides various functions for sending and receiving data and messages other than media streams. The characteristics of the data and message functions provided by PlanetKit are as follows. For more information on each function, refer to the linked documents.
Function | Supported call and user types | Point of time for usage | Usage examples |
---|---|---|---|
Call start message | 1-to-1 call (caller, callee) | During call setup | The call start message can be used in two major ways. First, it can be used to display a message to the user before the call connection between the caller and callee. For example, the caller can let the callee see the purpose of the call before accepting the call. Secondly, it can be used as metadata at the application layer. Since the call start message is the only message that can be exchanged between the caller and callee before the call connection, it can help resolve compatibility issues that occur during the call. For instance, let's consider a specific case related to compatibility issues. Suppose feature A, which requires compatibility between caller and callee during a call, has been inevitably upgraded, and the caller is using the new version while the callee is using the old version. If the callee includes in the call start message that they are using the old version, the caller can recognize this and adjust compatibility with the callee. Conversely, if the callee is using the new version and the caller is using the old version, the callee can adjust compatibility with the caller by checking the call start message. |
App server data | 1-to-1 call (caller), group call | During call setup | App server data is data sent from the client to the application server. It can be used primarily for call-related monitoring in the application. For example, if you want to analyze the number of group call participants by application version, you can design the application to include the application version in the app server data and send it. |
Data session | 1-to-1 call (caller, callee), group call | After call setup completion | Data sessions are used to transmit streaming data between devices in the same group during a 1-to-1 call or a group call. Transmitting and receiving too much data during a call can negatively affect call quality. Using data sessions can minimize call quality degradation while conveniently exchanging data with call participants. The application defines a stream ID according to the data type and then performs data transmission and processing by stream ID. Depending on whether data transmission reliability is provided and the data type (message or bytes), you can select one of four types of data sessions. For example, you can choose the type of data session based on the characteristics of the data to transmit.
|
Sending short data | 1-to-1 call (caller, callee), group call | After call setup completion | Using short data transmission, the application can send short messages to call participants with simple steps. If you want to send messages or data at low cost sporadically (for example, at least every 30 seconds) or under specific conditions, use short data transmission. For example, it can be useful in situations where you want to periodically notify participants of a user's status message (away/busy) in a predefined format during a group call. However, since there are restrictions on message length, it is recommended to use data sessions if you need to send long messages. Although internal transactions are managed and several retransmission attempts are made after checking the data transmission result, data transmission reliability is basically not provided. |
Contents sharing | 1-to-1 call (caller, callee), group call | After call setup completion | Contents sharing is used when a user wants to share data that changes over time with call participants. When data shared using contents sharing changes, an event occurs for the recipients. The shared data can either be individually possessed by each recipient (normal sharing) or exist as a single instance in the room (exclusive sharing, room scope sharing). In the case of exclusive sharing, only the user who requested the contents sharing can modify the data, and in the case of room scope sharing, all group room participants can modify the data. Contents sharing provides information on the time elapsed after the data was updated. The application can utilize this when it needs data based on time changes. For example, if a participant shares video playback (for example, a feature to watch YouTube together) and another participant enters the room later, you can use the elapsed time information provided by the content sharing function to determine what part of the video other participants are currently watching and start playback from that point of time. |