Application guidance for subgroup API
This page provides guidelines for using the subgroup API. When implementing an application that uses the subgroup API, keep in mind the following:
- Only subgroup members can send media (audio, video, and screen share) to the subgroup.
- Participants who have not subscribed to the subgroup cannot send media to the subgroup.
- Only subgroup members can receive media (audio, video, and screen share) from the subgroup.
- Participants who have not subscribed to the subgroup cannot receive media from the subgroup.
- Subgroup name size must be less than 16 bytes including the NULL character.
- Subgroup names must be unique.
- LINE Planet Cloud uses subgroup names to distinguish each subgroup.
- If participants use the same subgroup name as an argument when calling the
SubscribeSubgroup()
method, they are subscribed to the same subgroup.
- Subscribing to a subgroup fails if any of the subgroup attributes are different.
- Subgroup attributes are set through the
SubscribeSubgroup()
method, which accepts parameters for "peerUpdate", "videoUpdate", and "dataSession". - Subgroup members belonging to the same subgroup must use the same values for the parameters above.
- If a participant tries to subscribe with different subgroup attribute values, the subscription fails with
PLNK_SUBGRP_SUBS_FAIL_REASON_WRONG_ATTR
ofESubgroupSubscribeFailReason
. - Do not use combination of attributes where "peerUpdate" is
NONE
and "dataSession" istrue
. This subgroup attribute combination is not supported, and causes the subscription to fail withPLNK_SUBGRP_SUBS_FAIL_REASON_WRONG_ATTR
ofESubgroupSubscribeFailReason
.
- Subgroup attributes are set through the
- Subgroup media is independent of each other.
- Applications can send audio and video to different subgroups at the same time.
- The number of subgroups is limited.
- Creating subgroups consumes a lot of resources in LINE Planet Cloud.
- The maximum number of subgroups per group call is 30.
- If the maximum number of subgroups has already been reached, subsequent subscriptions fail with
PLNK_SUBGRP_SUBS_FAIL_REASON_OVER_MAX_SUBGRP_CNT
ofESubgroupSubscribeFailReason
.
- You can determine the subgroup from which the media is coming as follows.
- Audio: PlanetKit provides the currently active speaker's audio volume level along with the user ID and subgroup name.
- Video:
Peer::GetCurrentVideoSubgroupName()
returns the subgroup name. - Screen share:
Peer::GetCurrentScreenShareSubgroupName()
returns the subgroup name.
- Before unsubscribing from a subgroup, transmission of all media (audio, video, and screen share) to the subgroup must be stopped.
Related documents
You can find more information in Subgroup basic concepts.