CommandService

The CommandService allows the application to send text messages to all other participants of a specific conference and to redistribute these messages across the EventBus. It also emits the BroadcastEvent to inform that the message is broadcasted and the MessageReceived event to inform that the message is received at the specific conference.

Available in the package com.voxeet.sdk.services.CommandService.

Methods

send

send(@NonNull conferenceId: String, @NonNull message: String): Promise

Sends the message to the conference. The message must be in the form of a string or a representation of strings (json or base64). Message size is limited to 16KB. This method is not available for mixed listeners.

Parameters

NameTypeDescription
conferenceIdStringnon null ID of the conference to which the message will be send
messageStringnon null content of the message (any possible string)

Returns: @NonNull Promise - the promise to resolve.

Events

BroadcastEvent

Emitted when the message is broadcasted.
This object can be accessed through the WebSocket usage.

Available in the package com.voxeet.sdk.json.BroadcastEvent.

message (String)

The instance of the message.


participantId (String)

The ID of the participant who has sent the message.

ChatMessageEvent

Emitted when the application receives the chat message.

Available in the package com.voxeet.sdk.services.chat.ChatMessageEvent.

participant (Participant)

The instance of the participant who has sent the message.


message (ChatMessage)

The instance of the sent message.

MessageReceived

Emitted when the message from the specific participant is received at the specific conference.
This object is generated locally by the SDK.

Available in the package com.voxeet.sdk.events.sdk.MessageReceived.

participantId (String)

The ID of the sender.


conferenceId (String)

The conference ID.


message (String)

The corresponding message.