2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

VideoPresentationService

The VideoPresentationService allows an application to share a hosted video file with the 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. The MPEG-4 Part 14 or MP4 file formats are recommended 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.

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

Methods

start

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

Starts sharing the video with other conference participants.

Parameters

NameTypeDescription
urlStringnon null URL of the shared video

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

stop

stop(): Promise<VideoPresentation>

Stops sharing the video with other conference participants.

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

play

play(): Promise<VideoPresentation>

Resumes the video presentation.

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

pause

pause(timestamp: long): Promise<VideoPresentation>

Pauses the 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

Gets the description of the presentation due to possible various Activities states.

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

Events

VideoPresentationPaused

Emitted when the presenter pauses the shared video.

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

This object can be accessed through the Websocket usage.

key (String)

The key of the current video.

conferenceId (String)

The conference ID.

participantId (String)

The ID of the participant that shares a video.

timestamp (long)

The current timestamp of the shared video.

VideoPresentationPlay

Emitted when the specific video is resumed.

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

This object can be accessed through the Websocket usage.

key (String)

The key of the current video.

conferenceId (String)

The conference ID.

participantId (String)

The ID of the participant that shares a video.

timestamp (long)

The current timestamp of the shared video.

VideoPresentationSeek

Emitted when the presenter changes the timestamp of the displayed video.

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

This object can be accessed through the Websocket usage.

key (String)

The key of the current video.

conferenceId (String)

The conference ID.

participantId (String)

The ID of the participant that shares a video.

timestamp (long)

The current timestamp of the shared video.

VideoPresentationStarted

Emitted when the presenter starts sharing a video.

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

This object can be accessed through the Websocket usage.

key (String)

The key of the current video.

conferenceId (String)

The conference ID.

participantId (String)

The ID of the participant that 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.

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

This object can be accessed through the Websocket usage.

key (String)

The key of the current video.

conferenceId (String)

The conference ID.

participantId (String)

The ID of the participant that shares a video.