VideoPresentationService

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

The video presentation workflow:

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

2. All participants receive information about the converted file via the onVideoPresentationChange listener.

3. The presenter can call the pause method to pause the shared video. In such a situation, all conference participants receive information about paused file via the onVideoPresentationChange listener.

4. The presenter can call the play method to resume the paused video. In such a situation, all conference participants receive information about the resumed file via the onVideoPresentationChange listener.

5. The presenter can call the seek method to navigate to a specific section of the shared video. After calling the seek method, all conference participants receive information about the updated timestamp via the onVideoPresentationChange listener.

6. The presenter calls the stop method to stop the video presentation. In such a situation, all conference participants receive this information via the onVideoPresentationStopped listener.

Methods

current

current(): Promise<null | VideoPresentation>

Returns information about the current video presentation.

Returns

Promise<null | VideoPresentation>


pause

pause(timestamp): Promise<void>

Pauses a video presentation.

Parameters

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

Returns

Promise<void>


play

play(): Promise<void>

Resumes the paused video.

Returns

Promise<void>


seek

seek(timestamp): Promise<void>

Allows a 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

Promise<void>


start

start(url): Promise<void>

Starts a video presentation.

Parameters

NameTypeDescription
urlstringThe URL that specifies the video file location.

Returns

Promise<void>


state

state(): Promise<VideoPresentationState>

Provides the current state of a video presentation.

Returns

Promise<VideoPresentationState>


stop

stop(): Promise<void>

Stops a video presentation.

Returns

Promise<void>


Event handlers

onVideoPresentationChange

onVideoPresentationChange(handler): UnsubscribeFunction

Adds a listener to the video presentation started, sought, paused, and played events.

Parameters

NameTypeDescription
handler(data: VideoPresentationEventType, type?: VideoPresentationPaused | VideoPresentationPlayed | VideoPresentationSought | VideoPresentationStarted) => voidAn event callback function.

Returns

UnsubscribeFunction

A function that unsubscribes from event listeners.


onVideoPresentationStopped

onVideoPresentationStopped(handler): UnsubscribeFunction

Adds a listener to the video presentation stopped event.

Parameters

NameTypeDescription
handler() => voidEvent callback function

Returns

UnsubscribeFunction