dash-shaka-playback
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -28,2 +28,3 @@ import {HTML5Video, Log, Events} from 'clappr' | ||
this._levels = [] | ||
this.options.shaka = options.shaka || {} | ||
@@ -100,3 +101,3 @@ var checkIfIsReady = (fn) => { | ||
var playerLoaded = this._player.load(new shaka.player.DashVideoSource(this.options.src)) | ||
var playerLoaded = this._player.load(new shaka.player.DashVideoSource(this.options.src, this.options.shaka.interpretContentProtection)) | ||
playerLoaded.then(() => this._loaded()) | ||
@@ -103,0 +104,0 @@ .catch((e) => this._setupError(e)) |
{ | ||
"name": "dash-shaka-playback", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "clappr dash playback based on shaka player", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,2 +38,34 @@ [](https://badge.fury.io/js/dash-shaka-playback) | ||
# DRM | ||
If need to protect your content (DRM) you need to provide a callback for it. | ||
```javascript | ||
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](http://shaka-player-demo.appspot.com/docs/shaka.player.DashVideoSource.html#ContentProtectionCallback) spec: | ||
```javascript | ||
/** | ||
* @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. | ||
* http://shaka-player-demo.appspot.com/docs/shaka.player.DrmInfo.html#Config | ||
*/ | ||
function interpretContentProtection (schemeIdUri, contentProtection) { | ||
} | ||
``` | ||
# Development | ||
@@ -40,0 +72,0 @@ |
Sorry, the diff of this file is too big to display
276532
531
102