2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

CommandService

The CommandService allows the application to send textual ChatMessage messages to all clients and redistributes them across the EventBus. It also emits events informing about the statuses of message transmission. The BroadcastEvent informs that the message is broadcasted. The MessageReceived event informs 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<Boolean>

Sends the message to the conference. The message must be in the form of a string or a representation of strings (json or base64).

Parameters

NameTypeDescription
conferenceIdStringnon null ID of the conference to which the message should be sent
messageStringnon null actual message content (any possible string)

Returns: @NonNull Promise<Boolean> - the promise to resolve.

Events

ChatMessageEvent

Contains chat information.

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

participant (Participant)

The instance of the participant that emitted the message.

message (ChatMessage)

The instance of the sent message.

BroadcastEvent

Emitted when the message is broadcasted.

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

This object can be accessed through the Websocket usage.

message (String)

The instance of the message.

participantId (String)

The ID of the participant that created the call.

MessageReceived

Emitted when the message from the specific participant is received at the specific conference.

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.