VideoPresentationService
The VideoPresentationService allows the 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
o be accessible by all participants. MPEG-4 Part 14 or MP4 file format is recommended for the hosted video file.
The app uses HTML video element to render the shared video and listens o various events to stay in sync with the video presentation.
A Typical workflow of the app is:
For the presenter:
1. The app prepares an MP4 file and uploads it to a network location that is accessible by all participants through a URL
.
2. The app calls start method and supply the URL
as its parameter.
3. The app attaches the URL to the HTML video element's
src attribute.
4. The app allows the presenter to pause, resume, seek and stop the video playback.
For participants:
1. The app reacts to started event and extracts the URL from
the VideoPresentation parameter.
2. The app attaches the URL to the HTML video element's
src attribute.
3. The app reacts to seek event and exacts the timestamp and
applies to the video elements' current time attribute.
Events
paused
• paused(e
: VideoPresentation): void
Emitted when a video presentation is paused.
example
VoxeetSDK.videoPresentation.on("paused", (e) => {})
Parameters:
Name | Type |
---|---|
e | VideoPresentation |
Returns: void
played
• played(e
: VideoPresentation): void
Emitted when a video presentation is resumed.
example
VoxeetSDK.videoPresentation.on("played", (e) => {})
Parameters:
Name | Type |
---|---|
e | VideoPresentation |
Returns: void
sought
• sought(e
: VideoPresentation): void
Emitted when a video presentation is sought.
example
VoxeetSDK.videoPresentation.on("sought", (e) => {})
Parameters:
Name | Type |
---|---|
e | VideoPresentation |
Returns: void
started
• started(e
: VideoPresentation): void
Emitted when a video presentation is started.
example
VoxeetSDK.videoPresentation.on("started", (e) => {})
Parameters:
Name | Type |
---|---|
e | VideoPresentation |
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
Provides the current video presentation.
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 current video presentation.
Parameters:
Name | Type | Description |
---|---|---|
timestamp | number | Pause timestamp (in milliseconds) |
Returns: any
play
▸ play(): any
Plays the current video presentation.
Returns: any
seek
▸ seek(timestamp
: number): any
Seeks the current video presentation.
Parameters:
Name | Type | Description |
---|---|---|
timestamp | number | The timestamp of the video to seek to (in milliseconds) |
Returns: any
start
▸ start(url
: string): any
Starts a video presentation.
Parameters:
Name | Type | Description |
---|---|---|
url | string | The URL of the video to present. |
Returns: any
stop
▸ stop(): any
Stops the current video presentation.
Returns: any