Subgroup basic concepts
A subgroup is a kind of a small group in a group call (conference).
Supported call type | Minimum SDK version |
---|---|
Group call | PlanetKit 3.6 |
Overview
LINE Planet uses the words join and leave for entering or exiting a group call, and subscribe and unsubscribe for entering or exiting a subgroup during the group call. When a participant subscribes to a subgroup, the participant is called a subgroup member.
Being a subgroup member means that the participant can receive the subgroup's media and send one's own media to the subgroup. After subscribing to a subgroup, a subgroup member can send media to the subgroup. However, the member must stop sending any media to the subgroup before unsubscribing from the subgroup.
Participants can subscribe to multiple subgroups, but there is a limit to the number of subgroups that can be created per group call.
Subgroup media flow concept
Subscribing to a subgroup means:
- A participant can send media to the subgroup.
- A participant can receive media from the subgroup.
Note that media coming from the main room can be delivered to all participants regardless of their subgroup subscription status.
The diagram above shows an overview of the subgroup media flow.
All participants, including subgroup members, can send media to and receive media from the main room. However, in a subgroup, only the members of the subgroup can send and receive media.
Media can only be sent to one subgroup or main room (main room is a kind of a special subgroup). This means PlanetKit does not send media to multiple subgroups at the same time. However, applications can receive media from multiple subgroups as follows:
- A participant can always receive media from the main room.
- A participant can receive media from subscribed subgroups.
How to send or receive media
After subscribing to a subgroup, applications must call the following method to send media to or receive media from the subgroup.
Send | Receive | |
---|---|---|
Audio | changeMyAudioDestination() | Received automatically after subscription |
Video | changeMyVideoDestination() | startVideo() of PlanetKitPeerControl |
Sending media to a subgroup
PlanetKit provides changeMyAudioDestination()
and changeMyVideoDestination()
to set the subgroup to send media to. Calling changeMyAudioDestination()
or changeMyVideoDestination()
stops existing media transmission and routes the media to the new subgroup. The destination of each media is independent, so applications can send audio or video to different subgroups.
Receive media from a subgroup
Media reception scenarios depend on the media type. Audio is automatically received after subscription. For video, however, applications must call startVideo()
of PlanetKitPeerControl
when the user wants to view the video.
This method of receiving media is consistent with the method of receiving media in the main room after calling joinConference()
.
For more information on how to use PlanetKitPeerControl
, refer to the group video call code example.
Subgroup attributes
A subgroup has three attributes and all subgroup members must have the same subgroup attribute values. Participants with different subgroup attribute values cannot subscribe to the subgroup. For more information, see Application guidance for subgroup API.
The following table shows subgroup attributes and their definitions.
Attribute | Description |
---|---|
peerUpdate | Scope to share the subgroup member list |
videoUpdate | Whether to receive video update events or not |
dataSession | Whether to enable a data session or not |
You must define subgroup attribute values for all subgroups in the application design step. For examples of defining subgroup attribute values, see Example: Multi-subgroup room and Example: Translation room.
peerUpdate
The "peerUpdate" attribute defines how to share the subgroup member list with participants and has the following three types.
- PUBLIC: The subgroup member list is shared with all participants.
- PRIVATE: The subgroup member list is shared with only the members of the same subgroup.
- NONE: The subgroup member list is not shared.
The types also determine which events to generate. The following table shows events that can occur depending on the type of "peerUpdate".
PUBLIC | PRIVATE | NONE | |
---|---|---|---|
Subgroup member (self-subscribed or added member) | peerListDidUpdate peersDidUpdatePublicSubgroup | peerListDidUpdate | N/A |
Non subgroup member (unsubscribed member) | peersDidUpdatePublicSubgroup | N/A | N/A |
videoUpdate
The "videoUpdate" attribute determines whether to inform other members when a subgroup member starts video.
- If "videoUpdate" is TRUE, the
peersVideoDidUpdate
event occurs in order to notify that a subgroup member has started video. - If "videoUpdate" is FALSE,
peersVideoDidUpdate
does not occur when a subgroup member has started video.
dataSession
The "dataSession" attribute determines whether to use a data session or screen share within a subgroup scope. To use a data session or screen share within a subgroup scope, "dataSession" must be TRUE. "Within a subgroup scope" means that data is sent only to the members of the same subgroup.
For more information, refer to Data session and Screen share.
Related documents
Before integrating the subgroup function, refer to the following documents:
- Subgroup flow shows the overall subgroup API call sequence and media flow. This gives you a rough idea of how to use the subgroup API. However, you must refer to API reference (iOS, macOS) in the programming stage.
- Application guidance for subgroup API shows the checklist for application developers to use the subgroup function.
We also provide two examples of using the subgroup function: