Skip to content

LiShiSangZi/dash-shaka-playback

 
 

Repository files navigation

npm version license

For the older versions check

dash-shaka-playback

A clappr playback to play dash based on shaka-player.

CDN: https://cdn.jsdelivr.net/clappr.dash-shaka-playback/latest/dash-shaka-playback.js

NPM: https://www.npmjs.com/package/dash-shaka-playback/

dash shaka playback screenshot

Usage

<html>
  <head>
    <script src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
    <script src="https://cdn.jsdelivr.net/clappr.dash-shaka-playback/latest/dash-shaka-playback.js"></script>
  </head>

  <body>
    <div id="player"></div>
    <script>
      var player = new Clappr.Player(
        {
          source: '//storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd',
          plugins: [DashShakaPlayback],
          shakaConfiguration: {
            preferredAudioLanguage: 'pt-BR',
            streaming: {
              rebufferingGoal: 15
            }
          }
          parentId: '#player'
        });
    </script>
  </body>
</html>

DRM

If need to protect your content (DRM) you must use the shakaConfiguration following the shaka configuration need.

Development

Install dependencies:

npm install

Build:

npm run build

Run:

npm start

"extra" features

This playback offers you an API for handling with: audio, video and text tracks.

selectTrack(track)
textTracks()
audioTracks()
videoTracks()

About

A dash playback (based on shaka-player) for 🎬 Clappr

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 68.6%
  • HTML 19.7%
  • Shell 11.7%