Get started with dashjs CDN

BSD-3-Clause licensed

Dash.js is an open-source HTML5 video player library.

Tags:
  • dash
  • playback
  • MPEG

Stable version

Copied!

How to start using dashjs CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with dashjs CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/dashjs/4.7.4/dash.all.min.js"></script>
</head>
<body>
  <video id="videoPlayer" class="video-js" controls preload="auto" width="640" height="360" data-setup='{"techOrder": ["dash"]}'>
    <source src="path/to/your/dash.mpd" type="application/dash+xml">
  </video>

  <script>
    if (typeof window.DASH === 'object') {
      window.addEventListener('DOMContentLoaded', function() {
        var video = document.getElementById('videoPlayer');
        if (DASH.isDASHFormat(video.src)) {
          DASH.load(video);
        }
      });
    }
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions