videojs-contrib-dash
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -1,2 +0,2 @@ | ||
/*! videojs-contrib-dash - v1.1.1 - 2015-08-27 | ||
/*! videojs-contrib-dash - v2.0.0 - 2015-10-16 | ||
* Copyright (c) 2015 Brightcove */ | ||
@@ -43,3 +43,3 @@ (function(window, videojs) { | ||
var | ||
options = tech.options(), | ||
options = tech.options_, | ||
manifestSource; | ||
@@ -130,3 +130,3 @@ | ||
Html5DashJS.hideErrors = function (el) { | ||
el.className += 'vjs-dashjs-hide-errors'; | ||
el.className += ' vjs-dashjs-hide-errors'; | ||
}; | ||
@@ -143,3 +143,3 @@ | ||
setTimeout(function () { | ||
el.className = el.className.replace('vjs-dashjs-hide-errors', ''); | ||
el.className = el.className.replace(' vjs-dashjs-hide-errors', ''); | ||
}, 250); | ||
@@ -210,3 +210,3 @@ }; | ||
if (!!window.MediaSource) { | ||
videojs.Html5.registerSourceHandler({ | ||
videojs.getComponent('Html5').registerSourceHandler({ | ||
canHandleSource: function (source) { | ||
@@ -213,0 +213,0 @@ var dashTypeRE = /^application\/dash\+xml/i; |
@@ -1,3 +0,3 @@ | ||
/*! videojs-contrib-dash - v1.1.1 - 2015-08-27 | ||
/*! videojs-contrib-dash - v2.0.0 - 2015-10-16 | ||
* Copyright (c) 2015 Brightcove */ | ||
!function(a,b){"use strict";function c(a,d){var e,f=d.options();this.tech_=d,this.el_=d.el(),this.elParent_=this.el_.parentNode,a.src&&(d.isReady_=!1,e=a.src,this.keySystemOptions_=c.buildDashJSProtData(a.keySystemOptions),c.hideErrors(this.elParent_),c.useVideoJSDebug&&c.useVideoJSDebug(b),c.context_=c.context_||new Dash.di.DashContext,this.mediaPlayer_=new MediaPlayer(c.context_),this.mediaPlayer_.startup(),this.mediaPlayer_.attachView(this.el_),f.autoplay||this.mediaPlayer_.setAutoPlay(!1),this.mediaPlayer_.retrieveManifest(e,b.bind(this,this.initializeDashJS)))}var d=function(a){return"[object Array]"===Object.prototype.toString.call(a)},e=function(a){return"[object Object]"===Object.prototype.toString.call(a)},f=function(a,b){var c,d,g,h;h={};for(c in b)b.hasOwnProperty(c)&&(d=a[c],g=b[c],e(d)&&e(g)?a[c]=f(d,g):a[c]=b[c]);return a};c.prototype.initializeDashJS=function(a,d){var e={};return d?(c.showErrors(this.elParent_),this.tech_.triggerReady(),void this.dispose()):(c.getWidevineProtectionData&&(e=c.getWidevineProtectionData(a),this.keySystemOptions_=f(this.keySystemOptions_,e)),void this.resetSrc_(b.bind(this,function(){c.showErrors(this.elParent_),this.mediaPlayer_.attachSource(a,null,this.keySystemOptions_),this.tech_.triggerReady()})))},c.hideErrors=function(a){a.className+="vjs-dashjs-hide-errors"},c.showErrors=function(a){setTimeout(function(){a.className=a.className.replace("vjs-dashjs-hide-errors","")},250)},c.buildDashJSProtData=function(a){var b,c,e,g={};if(!a||!d(a))return g;for(e=0;e<a.length;e++)b=a[e],c=f({},b.options),c.licenseUrl&&(c.laURL=c.licenseUrl,delete c.licenseUrl),g[b.name]=c;return g},c.prototype.resetSrc_=function(a){this.el_&&(this.el_.src="",this.el_.setMediaKeys?this.el_.setMediaKeys(null).then(a,a):a())},c.prototype.dispose=function(){this.mediaPlayer_&&this.mediaPlayer_.reset(),this.resetSrc_(function(){})},a.MediaSource&&b.Html5.registerSourceHandler({canHandleSource:function(a){var b=/^application\/dash\+xml/i,c=/\.mpd/i;return b.test(a.type)?"probably":c.test(a.src)?"maybe":""},handleSource:function(a,b){return new c(a,b)}},0),b.Html5DashJS=c}(window,window.videojs); | ||
!function(a,b){"use strict";function c(a,d){var e,f=d.options_;this.tech_=d,this.el_=d.el(),this.elParent_=this.el_.parentNode,a.src&&(d.isReady_=!1,e=a.src,this.keySystemOptions_=c.buildDashJSProtData(a.keySystemOptions),c.hideErrors(this.elParent_),c.useVideoJSDebug&&c.useVideoJSDebug(b),c.context_=c.context_||new Dash.di.DashContext,this.mediaPlayer_=new MediaPlayer(c.context_),this.mediaPlayer_.startup(),this.mediaPlayer_.attachView(this.el_),f.autoplay||this.mediaPlayer_.setAutoPlay(!1),this.mediaPlayer_.retrieveManifest(e,b.bind(this,this.initializeDashJS)))}var d=function(a){return"[object Array]"===Object.prototype.toString.call(a)},e=function(a){return"[object Object]"===Object.prototype.toString.call(a)},f=function(a,b){var c,d,g,h;h={};for(c in b)b.hasOwnProperty(c)&&(d=a[c],g=b[c],e(d)&&e(g)?a[c]=f(d,g):a[c]=b[c]);return a};c.prototype.initializeDashJS=function(a,d){var e={};return d?(c.showErrors(this.elParent_),this.tech_.triggerReady(),void this.dispose()):(c.getWidevineProtectionData&&(e=c.getWidevineProtectionData(a),this.keySystemOptions_=f(this.keySystemOptions_,e)),void this.resetSrc_(b.bind(this,function(){c.showErrors(this.elParent_),this.mediaPlayer_.attachSource(a,null,this.keySystemOptions_),this.tech_.triggerReady()})))},c.hideErrors=function(a){a.className+=" vjs-dashjs-hide-errors"},c.showErrors=function(a){setTimeout(function(){a.className=a.className.replace(" vjs-dashjs-hide-errors","")},250)},c.buildDashJSProtData=function(a){var b,c,e,g={};if(!a||!d(a))return g;for(e=0;e<a.length;e++)b=a[e],c=f({},b.options),c.licenseUrl&&(c.laURL=c.licenseUrl,delete c.licenseUrl),g[b.name]=c;return g},c.prototype.resetSrc_=function(a){this.el_&&(this.el_.src="",this.el_.setMediaKeys?this.el_.setMediaKeys(null).then(a,a):a())},c.prototype.dispose=function(){this.mediaPlayer_&&this.mediaPlayer_.reset(),this.resetSrc_(function(){})},a.MediaSource&&b.getComponent("Html5").registerSourceHandler({canHandleSource:function(a){var b=/^application\/dash\+xml/i,c=/\.mpd/i;return b.test(a.type)?"probably":c.test(a.src)?"maybe":""},handleSource:function(a,b){return new c(a,b)}},0),b.Html5DashJS=c}(window,window.videojs); |
{ | ||
"name": "videojs-contrib-dash", | ||
"description": "A Video.js source-handler providing MPEG-DASH playback.", | ||
"main": "./dist/videojs-dash.min.js", | ||
"repository": { | ||
@@ -8,3 +9,3 @@ "type": "git", | ||
}, | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"author": { | ||
@@ -40,5 +41,5 @@ "name": "Brightcove" | ||
"qunitjs": "^1.17.1", | ||
"video.js": "^4.12.4", | ||
"videojs-automation": "0.2.0" | ||
"video.js": "^5.0.0-rc.70", | ||
"videojs-automation": "^0.3.1" | ||
} | ||
} |
@@ -41,3 +41,3 @@ (function(window, videojs) { | ||
var | ||
options = tech.options(), | ||
options = tech.options_, | ||
manifestSource; | ||
@@ -128,3 +128,3 @@ | ||
Html5DashJS.hideErrors = function (el) { | ||
el.className += 'vjs-dashjs-hide-errors'; | ||
el.className += ' vjs-dashjs-hide-errors'; | ||
}; | ||
@@ -141,3 +141,3 @@ | ||
setTimeout(function () { | ||
el.className = el.className.replace('vjs-dashjs-hide-errors', ''); | ||
el.className = el.className.replace(' vjs-dashjs-hide-errors', ''); | ||
}, 250); | ||
@@ -208,3 +208,3 @@ }; | ||
if (!!window.MediaSource) { | ||
videojs.Html5.registerSourceHandler({ | ||
videojs.getComponent('Html5').registerSourceHandler({ | ||
canHandleSource: function (source) { | ||
@@ -211,0 +211,0 @@ var dashTypeRE = /^application\/dash\+xml/i; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
35635
0