Get started with dash-shaka-playback CDN

BSD-3-Clause licensed

Dash-shaka-playback: Extension for Dash player, seamless MP4 playback with Shaka library.

Tags:
  • dash playback
  • shaka-player
  • javascript

Stable version

Copied!

How to start using dash-shaka-playback CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with dash-shaka-playback CDN - cdnhub.io</title>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/shaka-player.min.js"></script>
  <script src="https://cdn.cdnhub.io/dash-shaka-playback/3.2.0/dash-shaka-playback.min.js"></script>
  <style>
    #player {
      width: 100%;
      height: 100%;
    }
  </style>
</head>
<body>
  <video id="video" class="video-js vjs-default-skin" controls preload="auto" width="100%" height="100%" data-setup='{"techOrder": ["dash"]}'>
    <source src="path/to/your/dash.mpd" type="application/dash+xml">
  </video>
  <div id="player"></div>
  <script>
    const video = document.querySelector('#video');
    const player = new shaka.Player('player');
    player.attachTo(video);
    player.load('path/to/your/dash.mpd');
  </script>
</body>
</html>

All versions