2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

SessionService

The SessionService allows an application to register its participants' information in the Voxeet service. It is mandatory for the application to open a session before it can interact with the service further. During the life cycle of the application, it may open and close sessions multiple times.

Typical application workflow:

1. The application opens a session using the open method.

2. The application can check the SocketStateChangeEvent informing if the WebSocket changed state. To check the state outside of the event, it can use the isSocketOpen method.

3. The application closes the session using the close method.

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

Methods

open

open(@NonNull participantInfo: ParticipantInfo): Promise<Boolean>

Opens a session with the specified ParticipantInfo information.

Parameters

NameTypeDescription
participantInfoParticipantInfonon null ParticipantInfo, it should contain at least one ParticipantName

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

open

open(): Promise<Boolean>

Logs in using information from the previously unclosed session opened earlier. It can also create a temporary "ghost" session.

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

isSocketOpen

isSocketOpen(): boolean

In the SDK, the WebSocket is the last stage of the login process (the first stage is the authentication using the REST API).

Returns: boolean - the current connectivity check.

isLocalParticipant

isLocalParticipant(@NonNull participant: Participant): boolean

Checks if the participant is local or external.

Parameters

NameTypeDescription
participantParticipantnon null valid participant's ID

Returns: boolean - informs if the conference and locally connected participants have the same Voxeet IDs.

close

close(): Promise<Boolean>

Logs out from the current session. Logging out cancels every login progress and leaves the conference.

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

Events

SocketStateChangeEvent

Emitted when the WebSocket changed state.

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

state (WebSocketState)

The new state of the socket.