New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dash-shaka-playback

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dash-shaka-playback

clappr dash playback based on shaka player

  • 1.0.10
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

npm version license

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: 'https://shaka-player-demo.appspot.com/assets/angel_one.mpd?_=1446383792251',
          plugins: {
            playback: [DashShakaPlayback]
          },
          parentId: '#player'
        });
    </script>
  </body>
</html>

DRM

If need to protect your content (DRM) you need to provide a callback for it.

var player = new Clappr.Player(
  {
    source: 'https://shaka-player-demo.appspot.com/assets/angel_one.mpd?_=1446383792251',
    plugins: {
      playback: [DashShakaPlayback]
    },
    shaka: {
      interpretContentProtection: myInterpretCallback
    }
    parentId: '#player'
  });

The interpretContentProtection callback spec:

/**
* @param {string} schemeIdUri The ContentProtection's scheme ID URI.
* @param {!Element} contentProtection The ContentProtection element.
* @return {!Array.<shaka.player.DrmInfo.Config>} An array of Config
*     objects or null if the element is not understood by this application.
*     
*/
function interpretContentProtection (schemeIdUri, contentProtection) {
}

You need to provide a function which receives: the content protection scheme id schemeIdUri and the content protection element contentProtection and it must return an array of DRMInfo Config. You can see an example at shaka tutorial for License Request Pre-processing and License Response Post-processing.

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.

enableTextTrack(state)
textTracks()
selectTextTrack(id)
audioTracks()
selectAudioTrack(id)
videoTracks()
selectVideoTrack(id)

observations

This playback supports the browsers that shaka does and it also has the same content restrictions.

FAQs

Package last updated on 05 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc