Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Web / Guides / Adapative Streaming


PDFTron is now Apryse, learn more here.

Adaptive Streaming

WebViewer Video utilizes Shaka Player to allow for adaptive streaming. In order to utilize adaptive streaming, a dash file must be passed when loading the video. Adaptive streaming allows users to load lower resolution videos on slower networks.

What is Adaptive Streaming

Adaptive streaming is a streaming technique that takes into account the user's network and CPU usage to determine the optimal quality of media to pass through to the end user. This allows WebViewer Video to work more effectively on lower end computers/networks, and can also react to any network latency issues that may arise while using WebViewer Video.

Creating a Dash File

Please see here on how to create a dash file to pass to WebViewer Video. In order to create a DASH file you must have multiple videos with different resolutions and link them in a manifest file. After you can simply pass the file as you would pass any video file to WebViewer Video.

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

    path: '/webviewer/lib',
).then(async instance => {
  // Extends WebViewer to allow loading HTML5 videos (.mp4, ogg, webm).
  const {
  } = await initializeVideoViewer(
      license: '---- 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')

  // Dash file url
  const videoUrl = '';

Get the answers you need: Support