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

VideoPresentationService

The VideoPresentationService allows sharing videos during a conference. To present a video, the conference participant needs to provide the URL that defines the video location. We recommend sharing files in the MPEG-4 Part 14 or MP4 video formats.

The video presentation workflow:

1. The presenter calls the start method to start the video presentation. This method automatically starts playing the shared video file.

2. All participants receive the started event that includes in the VideoPresentation parameter the URL property specifying the video file location. The application includes URL in the source attribute of the HTML video element that renders the shared video.

3. The presenter can call the pause method to pause the shared video. In such a situation, all conference participants receive the paused event.

4. The presenter can call the play method to resume the paused video. In such a situation, all conference participants receive the played event.

5. The presenter can call the seek method to navigate to a specific section of the shared video. This method applies the provided timestamp to the current time attribute of the HTML video element. After calling the seek method, all conference participants receive the sought event and watch the video from the specified timestamp.

6. The presenter calls the stop method to stop the video presentation.


Events

paused

paused(e: VideoPresentation): void

Emitted when a video presentation is paused.

example

VoxeetSDK.videoPresentation.on("paused", (e) => {});

Parameters:

NameTypeDescription
eVideoPresentationThe object containing properties specific to the event.

Returns: void


played

played(e: VideoPresentation): void

Emitted when a video presentation is resumed.

example

VoxeetSDK.videoPresentation.on("played", (e) => {});

Parameters:

NameTypeDescription
eVideoPresentationThe object containing properties specific to the event.

Returns: void


sought

sought(e: VideoPresentation): void

Emitted when a video presentation is sought.

example

VoxeetSDK.videoPresentation.on("sought", (e) => {});

Parameters:

NameTypeDescription
eVideoPresentationThe object containing properties specific to the event.

Returns: void


started

started(e: VideoPresentation): void

Emitted when a video presentation is started.

example

VoxeetSDK.videoPresentation.on("started", (e) => {});

Parameters:

NameTypeDescription
eVideoPresentationThe object containing properties specific to the event.

Returns: void


stopped

stopped(): void

Emitted when a video presentation is stopped.

example

VoxeetSDK.videoPresentation.on("stopped", () => {});

Returns: void

Accessors

current

get current(): VideoPresentation | null

Returns information about the current video presentation. Use this accessor if you wish to receive information that is available in the VideoPresentation object, such as information about the participant who shares the video or the URL of the presented video file.

Returns: VideoPresentation | null


state

get state(): VideoPresentationState

Provides the current state of the video presentation.

Returns: VideoPresentationState

Methods

pause

pause(timestamp: number): any

Pauses the video presentation. As a timestamp, we recommend using the currentTime attribute of the HTML video element, as in the following example:

const timestamp = Math.round($(`#stream-video video`)[0].currentTime * 1000);

When the timestamp is not specified, the SDK automatically sets the timestamp value to 0.

Parameters:

NameTypeDescription
timestampnumberThe timestamp that informs when the video needs to be paused, in milliseconds.

Returns: any


play

play(): any

Resumes the paused video presentation.

Returns: any


seek

seek(timestamp: number): any

Allows the presenter to navigate to the specific section of the shared video.

Parameters:

NameTypeDescription
timestampnumberThe timestamp the presenter wants to start playing the video from, in milliseconds.

Returns: any


start

start(url: string): any

Enables the video presentation and starts playing the shared video file.

Parameters:

NameTypeDescription
urlstringThe URL that specifies the video file location.

Returns: any


stop

stop(): any

Stops the video presentation.

Returns: any


Did this page help you?