videojs-contrib-dash
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -9,2 +9,5 @@ CHANGELOG | ||
## 2.6.1 (2017-01-05) | ||
* Fixed Live display for live streams | ||
## 2.6.0 (2016-12-12) | ||
@@ -11,0 +14,0 @@ * Added initialization and update source hooks. |
@@ -1,3 +0,3 @@ | ||
/*! videojs-contrib-dash - v2.6.0 - 2016-12-12 | ||
* Copyright (c) 2016 Brightcove */ | ||
/*! videojs-contrib-dash - v2.6.1 - 2017-01-05 | ||
* Copyright (c) 2017 Brightcove */ | ||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
@@ -139,2 +139,11 @@ (function (global){ | ||
} | ||
}, { | ||
key: 'duration', | ||
value: function duration() { | ||
var duration = this.el_.duration; | ||
if (duration === Number.MAX_VALUE) { | ||
return Infinity; | ||
} | ||
return duration; | ||
} | ||
@@ -141,0 +150,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
/*! videojs-contrib-dash - v2.6.0 - 2016-12-12 | ||
* Copyright (c) 2016 Brightcove */ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){(function(b){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a("global/window"),h=d(g),i="undefined"!=typeof window?window.videojs:"undefined"!=typeof b?b.videojs:null,j=d(i),k="undefined"!=typeof window?window.dashjs:"undefined"!=typeof b?b.dashjs:null,l=d(k),m=function(a){return"[object Array]"===Object.prototype.toString.call(a)},n=function(){function a(b,c,d){var f=this;if(e(this,a),d=d||c.options_,this.player=(0,j.default)(d.playerId),this.player.dash=this.player.dash||{},this.tech_=c,this.el_=c.el(),this.elParent_=this.el_.parentNode,b.src){c.isReady_=!1,a.updateSourceData&&(j.default.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),b=a.updateSourceData(b)),a.hooks("updatesource").forEach(function(a){b=a(b)});var g=b.src;this.keySystemOptions_=a.buildDashJSProtData(b.keySystemOptions),this.player.dash.mediaPlayer=l.default.MediaPlayer().create(),this.mediaPlayer_=this.player.dash.mediaPlayer,a.useVideoJSDebug&&(j.default.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),a.useVideoJSDebug(this.mediaPlayer_)),a.beforeInitialize&&(j.default.log.warn('beforeInitialize has been deprecated. Please switch to using hook("beforeinitialize", callback).'),a.beforeInitialize(this.player,this.mediaPlayer_)),a.hooks("beforeinitialize").forEach(function(a){a(f.player,f.mediaPlayer_)}),this.mediaPlayer_.initialize(),d.dash&&d.dash.limitBitrateByPortal?this.mediaPlayer_.setLimitBitrateByPortal(!0):this.mediaPlayer_.setLimitBitrateByPortal(!1),this.mediaPlayer_.attachView(this.el_),this.mediaPlayer_.setAutoPlay(!1),this.mediaPlayer_.setProtectionData(this.keySystemOptions_),this.mediaPlayer_.attachSource(g),this.tech_.triggerReady()}}return f(a,[{key:"dispose",value:function(){this.mediaPlayer_&&this.mediaPlayer_.reset(),this.player.dash&&delete this.player.dash}}],[{key:"buildDashJSProtData",value:function(a){var b={};if(!a||!m(a))return null;for(var c=0;c<a.length;c++){var d=a[c],e=j.default.mergeOptions({},d.options);e.licenseUrl&&(e.serverURL=e.licenseUrl,delete e.licenseUrl),b[d.name]=e}return b}},{key:"hooks",value:function(b,c){return a.hooks_[b]=a.hooks_[b]||[],c&&(a.hooks_[b]=a.hooks_[b].concat(c)),a.hooks_[b]}},{key:"hook",value:function(b,c){a.hooks(b,c)}},{key:"removeHook",value:function(b,c){var d=a.hooks(b).indexOf(c);return d!==-1&&(a.hooks_[b]=a.hooks_[b].slice(),a.hooks_[b].splice(d,1),!0)}}]),a}();n.hooks_={};var o=function(a){n.updateSourceData&&(a=n.updateSourceData(a));var b=document.createElement("video");return!(a.keySystemOptions&&!navigator.requestMediaKeySystemAccess&&!b.msSetMediaKeys)};j.default.DashSourceHandler=function(){return{canHandleSource:function(a){var b=/\.mpd/i;return o(a)?j.default.DashSourceHandler.canPlayType(a.type)?"probably":b.test(a.src)?"maybe":"":""},handleSource:function(a,b,c){return new n(a,b,c)},canPlayType:function(a){return j.default.DashSourceHandler.canPlayType(a)}}},j.default.DashSourceHandler.canPlayType=function(a){var b=/^application\/dash\+xml/i;return b.test(a)?"probably":""},h.default.MediaSource&&j.default.getComponent("Html5").registerSourceHandler(j.default.DashSourceHandler(),0),j.default.Html5DashJS=n,c.default=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"global/window":2}],2:[function(a,b,c){(function(a){"undefined"!=typeof window?b.exports=window:"undefined"!=typeof a?b.exports=a:"undefined"!=typeof self?b.exports=self:b.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]); | ||
/*! videojs-contrib-dash - v2.6.1 - 2017-01-05 | ||
* Copyright (c) 2017 Brightcove */ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){(function(b){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a("global/window"),h=d(g),i="undefined"!=typeof window?window.videojs:"undefined"!=typeof b?b.videojs:null,j=d(i),k="undefined"!=typeof window?window.dashjs:"undefined"!=typeof b?b.dashjs:null,l=d(k),m=function(a){return"[object Array]"===Object.prototype.toString.call(a)},n=function(){function a(b,c,d){var f=this;if(e(this,a),d=d||c.options_,this.player=(0,j.default)(d.playerId),this.player.dash=this.player.dash||{},this.tech_=c,this.el_=c.el(),this.elParent_=this.el_.parentNode,b.src){c.isReady_=!1,a.updateSourceData&&(j.default.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),b=a.updateSourceData(b)),a.hooks("updatesource").forEach(function(a){b=a(b)});var g=b.src;this.keySystemOptions_=a.buildDashJSProtData(b.keySystemOptions),this.player.dash.mediaPlayer=l.default.MediaPlayer().create(),this.mediaPlayer_=this.player.dash.mediaPlayer,a.useVideoJSDebug&&(j.default.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),a.useVideoJSDebug(this.mediaPlayer_)),a.beforeInitialize&&(j.default.log.warn('beforeInitialize has been deprecated. Please switch to using hook("beforeinitialize", callback).'),a.beforeInitialize(this.player,this.mediaPlayer_)),a.hooks("beforeinitialize").forEach(function(a){a(f.player,f.mediaPlayer_)}),this.mediaPlayer_.initialize(),d.dash&&d.dash.limitBitrateByPortal?this.mediaPlayer_.setLimitBitrateByPortal(!0):this.mediaPlayer_.setLimitBitrateByPortal(!1),this.mediaPlayer_.attachView(this.el_),this.mediaPlayer_.setAutoPlay(!1),this.mediaPlayer_.setProtectionData(this.keySystemOptions_),this.mediaPlayer_.attachSource(g),this.tech_.triggerReady()}}return f(a,[{key:"dispose",value:function(){this.mediaPlayer_&&this.mediaPlayer_.reset(),this.player.dash&&delete this.player.dash}},{key:"duration",value:function a(){var a=this.el_.duration;return a===Number.MAX_VALUE?1/0:a}}],[{key:"buildDashJSProtData",value:function(a){var b={};if(!a||!m(a))return null;for(var c=0;c<a.length;c++){var d=a[c],e=j.default.mergeOptions({},d.options);e.licenseUrl&&(e.serverURL=e.licenseUrl,delete e.licenseUrl),b[d.name]=e}return b}},{key:"hooks",value:function(b,c){return a.hooks_[b]=a.hooks_[b]||[],c&&(a.hooks_[b]=a.hooks_[b].concat(c)),a.hooks_[b]}},{key:"hook",value:function(b,c){a.hooks(b,c)}},{key:"removeHook",value:function(b,c){var d=a.hooks(b).indexOf(c);return d!==-1&&(a.hooks_[b]=a.hooks_[b].slice(),a.hooks_[b].splice(d,1),!0)}}]),a}();n.hooks_={};var o=function(a){n.updateSourceData&&(a=n.updateSourceData(a));var b=document.createElement("video");return!(a.keySystemOptions&&!navigator.requestMediaKeySystemAccess&&!b.msSetMediaKeys)};j.default.DashSourceHandler=function(){return{canHandleSource:function(a){var b=/\.mpd/i;return o(a)?j.default.DashSourceHandler.canPlayType(a.type)?"probably":b.test(a.src)?"maybe":"":""},handleSource:function(a,b,c){return new n(a,b,c)},canPlayType:function(a){return j.default.DashSourceHandler.canPlayType(a)}}},j.default.DashSourceHandler.canPlayType=function(a){var b=/^application\/dash\+xml/i;return b.test(a)?"probably":""},h.default.MediaSource&&j.default.getComponent("Html5").registerSourceHandler(j.default.DashSourceHandler(),0),j.default.Html5DashJS=n,c.default=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"global/window":2}],2:[function(a,b,c){(function(a){"undefined"!=typeof window?b.exports=window:"undefined"!=typeof a?b.exports=a:"undefined"!=typeof self?b.exports=self:b.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]); |
@@ -135,2 +135,11 @@ 'use strict'; | ||
} | ||
}, { | ||
key: 'duration', | ||
value: function duration() { | ||
var duration = this.el_.duration; | ||
if (duration === Number.MAX_VALUE) { | ||
return Infinity; | ||
} | ||
return duration; | ||
} | ||
@@ -137,0 +146,0 @@ /** |
@@ -45,3 +45,3 @@ 'use strict'; | ||
files: { | ||
'tmp/browserify.test.js': ['test/browserify.test.js'] | ||
'tmp/browserify.test.js': ['test/build.test.js'] | ||
} | ||
@@ -52,3 +52,3 @@ } | ||
test: { | ||
entry: './test/webpack.test.js', | ||
entry: './test/build.test.js', | ||
output: { | ||
@@ -55,0 +55,0 @@ path: 'tmp/', |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"author": { | ||
@@ -12,0 +12,0 @@ "name": "Brightcove" |
@@ -133,2 +133,10 @@ import window from 'global/window'; | ||
duration() { | ||
const duration = this.el_.duration; | ||
if (duration === Number.MAX_VALUE) { | ||
return Infinity; | ||
} | ||
return duration; | ||
} | ||
/** | ||
@@ -135,0 +143,0 @@ * Get a list of hooks for a specific lifecycle |
Sorry, the diff of this file is not supported yet
52664
781