NEWDolby Interactivity APIs are now the Dolby.io Communications APIs Learn More >
X

SessionService

The SessionService allows an application to register participants' information in the Voxeet service. The application needs to open a session before it can interact with the service further. The application 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 state of the WebSocket by monitoring the SocketStateChangeEvent or using the istOpen method.

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

Using the SessionService the application can also check whether the specific participant is a local participant or an external participant.

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

Methods

open

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

Opens a session using information from the ParticipantInfo model.

Parameters

NameTypeDescription
participantInfoParticipantInfonon null ParticipantInfo which should contain at least one ParticipantName

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


open

open(): Promise<Boolean>

Opens a session using information from the previously closed session. It can also create a temporary "ghost" session.

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


isOpen

isOpen(): boolean

Checks whether there is an open session that connects SDK with backend.

Returns: boolean - Information if a session is open.


isLocalParticipant

isLocalParticipant(@NonNull participant: Participant): boolean

Checks if the specific participant is a local participant or an external participant.

Parameters

NameTypeDescription
participantParticipantnon null valid participant's ID

Returns: boolean - in the case of local participants, the application receives the same Voxeet IDs.


close

close(): Promise<Boolean>

Logs out from the current session.
Logging out cancels all logging processes and leaves the conference.

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

Events

SocketStateChangeEvent

Emitted when the WebSocket state has changed.

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

state (WebSocketState)

The new state of the socket.


Did this page help you?