Some test text!

Make your own UI

Create new UI for WebViewer Video

You can create a custom UI by using the video object. See the API here. With it you can access the underlying HTML5 video element and all its APIs. By setting renderControls in the videoOptions to false, we can disable the default Webviewer-Video controls. See the example code below.

import WebViewer from '@pdftron/webviewer';
import { initializeVideoViewer, renderControlsToDOM } from '@pdftron/webviewer-video';

    path: '/webviewer/lib',
    selectAnnotationOnCreation: true,
    disabledElements: [
).then(async instance => {
  // Extends WebViewer to allow loading HTML5 videos (.mp4, ogg, webm).
  const {
  } = await initializeVideoViewer(
      '---- Insert commercial license key here after purchase ----',
  // Load a video at a specific url. Can be a local or public link
  // If local it needs to be relative to lib/ui/index.html.
  // Or at the root. (eg '/video.mp4')
  const videoUrl = '';

  const docViewer = instance.Core.documentViewer;
  docViewer.addEventListener('documentLoaded', () => {
    const doc = docViewer.getDocument();
    const video = doc.getVideo();
    const videoElement = video.getElement();
    // do stuff here
    const playButton = controls.querySelector('#playButton');

    playButton.addEventListener('click', () => {
      // play the video
      if (videoElement.paused || videoElement.ended) {;

    videoElement.addEventListener('timeupdate', async () => {
      const currentFrameNumber = video.getFrameFromTime(videoElement.currentTime);
      // do something with the frame number

Get the answers you need: Support

PDFTron live tech update & run-through: Jan 20th at 11 am PT