Subroom Audio
This module implements signaling that allows participants to manage a group of whisper participants. Participants in a whisper group gain access to an audio-only livekit room, where they can talk without being heard by other participants in the conference.
The implementing frontend, still has to do most of the livekit management associated with this feature. This module only creates the livekit room, the tokens to join that room and tracks the whisper group state to enforce some behavior.
The WhisperId
that is returned in various events is also the name of the livekit room.
After a livekit access token has been provided through the WhisperGroupCreated or WhisperToken event, the frontend has to connect to the whisper room by itself. The tokens are restricted to audio only, and are revoked when the participant leaves the whisper group.
Commands
CreateWhisperGroup
Creates a new whisper group with the targeted participants. The group creator is implicitly contained in the group.
Fields
Field | Type | Required | Description |
---|---|---|---|
action | enum | yes | Must be "create_whisper_group" |
participants_ids | Participant[] | yes | Ids of participants to invite |
Example
{
"action": "create_whisper_group",
"participant_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]
}
Response
WhisperGroupCreated for the creator and WhisperInvite for the invitees.
InviteToWhisperGroup
Invite participants to an existing whisper group.
Fields
Field | Type | Required | Description |
---|---|---|---|
action | enum | yes | Must be "invite_to_whisper_group" |
whisper_id | string | yes | The id of the whisper group |
participant_ids | Participant[] | yes | Ids of participants to invite |
Example
{
"action": "invite_to_whisper_group",
"whisper_id": "00000000-0000-0000-0000-000000000000",
"participant_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]
}
Response
ParticipantsInvited for the creator and existing participants and WhisperInvite for the new invitees.
AcceptWhisperInvite
Accept an invite to a whisper group.
Fields
Field | Type | Required | Description |
---|---|---|---|
action | enum | yes | Must be "accept_whisper_invite" |
whisper_id | string | yes | The id of the whisper group |
Example
{
"action": "accept_whisper_invite",
"whisper_id": "00000000-0000-0000-0000-000000000000"
}
Response
WhisperToken to the accepting participant, containing the access token for the whisper room. Other participants in the whisper group receive a WhisperInviteAccepted as a notification that another participant joined the room.
DeclineWhisperInvite
Decline an invitation to a whisper group.
Fields
Field | Type | Required | Description |
---|---|---|---|
action | enum | yes | Must be "decline_whisper_invite" |
whisper_id | string | yes | The id of the whisper group |
Example
{
"action": "decline_whisper_invite",
"whisper_id": "00000000-0000-0000-0000-000000000000"
}
Response
Other participants in the whisper group receive a WhisperInviteDeclined.
KickWhisperParticipants
Remove a participant from the whisper group, only the creator of the group can kick participants.
Fields
Field | Type | Required | Description |
---|---|---|---|
action | enum | yes | Must be "kick_whisper_participants" |
whisper_id | string | yes | The id of the whisper group |
participant_ids | Participant[] | yes | Ids of participants to be removed from the group |
Example
{
"action": "kick_whisper_participants",
"whisper_id": "00000000-0000-0000-0000-000000000000",
"participant_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]
}
Response
The kicked participants receive a Kicked message. Other participants in the whisper group receive a LeftWhisperGroup for each participant that has been kicked.
LeaveWhisperGroup
Leave the whisper group. The participant will get removed from the livekit whisper room.
The group gets disbanded when the last participant leaves the group.
Fields
Field | Type | Required | Description |
---|---|---|---|
action | enum | yes | Must be "leave_whisper_group" |
whisper_id | string | yes | The id of the whisper group |
Example
{
"action": "leave_whisper_group",
"whisper_id": "00000000-0000-0000-0000-000000000000"
}
Response
Other participants in the whisper group receive a LeftWhisperGroup.
Events
WhisperGroupCreated
Direct response to CreateWhisperGroup.
The participants in the list have a state associated with them, see WhisperParticipant for the type structure.
Fields
Field | Type | Required | Description |
---|---|---|---|
message | enum | yes | Is "whisper_group_created" |
whisper_id | string | yes | The id of the whisper group |
participants | WhisperParticipant[] | yes | List of invited participants and their state (see WhisperParticipant) |
token | string | yes | The livekit access token that allows the participant to join the whisper room |
Example
{
"message": "whisper_group_created",
"whisper_id": "00000000-0000-0000-0000-000000000000",
"token": "<jwt-token>",
"participants": [
{
"participant_id": "00000000-0000-0000-0000-000000000000",
"state": "creator"
},
{
"participant_id": "00000000-0000-0000-0000-000000000001",
"state": "accepted"
},
{
"participant_id": "00000000-0000-0000-0000-000000000002",
"state": "invited"
}
]
}
WhisperInvite
Received by participants that were invited through CreateWhisperGroup or InviteToWhisperGroup.
The participants in the list have a state associated with them, see WhisperParticipant for the type structure.
Fields
Field | Type | Required | Description |
---|---|---|---|
message | enum | yes | Is "whisper_invite" |
whisper_id | string | yes | The id of the whisper group |
issuer | string | yes | The participant id of the invite issuer |
participants | WhisperParticipant[] | yes | List of invited participants and their state (see WhisperParticipant) |
Example
{
"message": "whisper_invite",
"whisper_id": "00000000-0000-0000-0000-000000000000",
"issuer": "00000000-0000-0000-0000-000000000000",
"participants": [
{
"participant_id": "00000000-0000-0000-0000-000000000000",
"state": "invited"
},
{
"participant_id": "00000000-0000-0000-0000-000000000000",
"state": {
"accepted": {
"track_id": "00000000-0000-0000-0000-000000000000"
}
}
}
]
}
WhisperToken
A direct response to AcceptWhisperInvite. Contains the livekit access token to the whisper room.