VideoPresentationService

The VideoPresentationService allows an application to share a hosted video file with conference participants and synchronously control the playback for all participants. The video file location, specified by the url parameter of the start method, needs to be accessible by all participants. We recommend using the MPEG-4 Part 14 or MP4 file formats for the hosted video file.

Typical application workflow for the presenter:

1. The application prepares the file and uploads it to the network location that is accessible by all participants through the url.

2. The application calls the start method to supply other conference participants with the url as a parameter. This method starts sharing the video file during the conference.

2. The application can call the pause method to pause the video and play to resume it.

3. While sharing the video with other conference participants, the application coordinates the timestamp in the local and presented video. It uses the seek method to inform other participants about the current video position (timestamp).

4. The application calls the stop method to end the video presentation.

Typical application workflow for other participants:

1. The application receives the VideoPresentationStarted event informing that the presenter shares the video with other conference participants and it extracts the url of the video.

2. The application receives the VideoPresentationPaused event informing that the video is paused. When it is resumed, the application receives the VideoPresentationPlay event.

3. If the timestamp of the video changed, the application is informed about the current video position via VideoPresentationSeek event.

4. When the presentation is ended, the application receives the VideoPresentationStopped event.

The service is available only to participants who joined a conference using the join method; it is not available for listeners.

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

Methods

start

start(@NonNull url: String): Promise<VideoPresentation>

Starts sharing a video file with other conference participants.

Parameters

NameTypeDescription
urlStringnon null location of a video file

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


stop

stop(): Promise<VideoPresentation>

Stops sharing a video file with other conference participants.

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


play

play(): Promise<VideoPresentation>

Resumes a video presentation.

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


pause

pause(timestamp: long): Promise<VideoPresentation>

Pauses a video presentation.

Parameters

NameTypeDescription
timestamplongthe timestamp of the paused video

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


seek

seek(timestamp: long): Promise<VideoPresentation>

Informs other conference participants about the current video position (timestamp).

Parameters

NameTypeDescription
timestamplongthe new timestamp

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


getCurrentPresentation

getCurrentPresentation(): VideoPresentation

Provides information about a specific video presentation, such as the key holder, state, and URL.

Returns: @Nullable VideoPresentation - the clone of the key holder, URL, and the state. A null value indicates that a specified video presentation does not exist at the moment.

Events

VideoPresentationPaused

Emitted when the presenter pauses the shared video.
This object can be accessed through the WebSocket usage.

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

key (String)

The key of the current video.


conferenceId (String)

The conference ID.


participantId (String)

The ID of the participant who shares a video.


timestamp (long)

The current timestamp of the shared video.

VideoPresentationPlay

Emitted when the presenter resumes the video presentation.
This object can be accessed through the WebSocket usage.

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

key (String)

The key of the current video.


conferenceId (String)

The conference ID.


participantId (String)

The ID of the participant who shares a video.


timestamp (long)

The current timestamp of the shared video.

VideoPresentationSeek

Emitted when the presenter changes the timestamp of the displayed video.
This object can be accessed through the WebSocket usage.

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

key (String)

The key of the current video.


conferenceId (String)

The conference ID.


participantId (String)

The ID of the participant who shares a video.


timestamp (long)

The current timestamp of the shared video.

VideoPresentationStarted

Emitted when the presenter starts sharing a video.
This object can be accessed through the WebSocket usage.

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

key (String)

The key of the current video.


conferenceId (String)

The conference ID.


participantId (String)

The ID of the participant who shares a video.


timestamp (long)

The current timestamp of the shared video.


url (String)

The URL of the video location.

VideoPresentationStopped

Emitted when the presenter stops sharing a video.
This object can be accessed through the WebSocket usage.

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

key (String)

The key of the current video.


conferenceId (String)

The conference ID.


participantId (String)

The ID of the participant who shares a video.