Module: @pdftron/webviewer-video

This is an addon for WebViewer that allows loading HTML5 videos (.mp4, ogg, webm) so that their video frames can be annotated. See the npm package on @pdftron/webviewer-video for more information.

Methods


<async, static> initializeVideoViewer(instance, license)

Initializes the video viewer so that webviewer can load videos.
Parameters:
Name Type Description
instance object The WebViewer instance
license string The WebViewer Video license
Returns:
A promise that resolves to an object containing the functions needed to load videos in WebViewer.
Type
VideoFunctions

Type Definitions


VideoFunctions

Type:
  • Object
Properties:
Name Type Description
loadVideo function Loads a video for the WebViewer instance passed into initializeVideoViewer. First param is the video url. Second param is optional and it is the thumbnail url.
loadVideoUI function Attaches the video player UI for the WebViewer instance passed into initializeVideoViewer.