Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

gkralik/videojs-shaka-tech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

videojs-shaka-tech

A video.js tech for using the Shaka player. This enables video.js to play MPEG-DASH streams.

Build

$ git clone https://github.com/gkralik/videojs-shaka-tech.git
$ cd videojs-shaka-tech
$ npm install
$ npm run build

Built files are stored in the dist/ directory.

Usage

Include videojs-shaka-tech.js after the video.js and Shaka player files and register the tech.

<html>
<head>
    <script src="video.js"></script>
    <script src="shaka-player.compiled.js"></script>
    <script src="dist/videojs-shaka-tech.js"></script>
</head>
<body>
    <video id="video" height="720" crossorigin="anonymous" controls class="video-js">
        <source src="path/to/manifest.mpd" type="application/dash+xml">
    </video>

    <script>
        // register tech
        videojs.registerTech('Shaka', ShakaTech);
        // enable by prepending to the techOrder
        videojs.options.techOrder.unshift('Shaka');
        // or setting the techOrder option when creating the player
        var player = videojs('video', {
            techOrder: ["Shaka", "Html5", "Flash"]
        });
        
        // ... do whatever you would do with video.js
    </script>
</body>
</html

Releases

No releases published

Packages

No packages published