web/res/js/dashjs/videojs-dash.min.js
author Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
Mon, 12 Dec 2016 01:54:10 +0100
changeset 1368 0ae5202742bd
child 1386 af05cd44d393
permissions -rw-r--r--
change flash to dash

/*! videojs-contrib-dash - v2.5.2 - 2016-11-22
 * 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){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&&(b=a.updateSourceData(b));var f=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 beforeInitialize."),a.useVideoJSDebug(this.mediaPlayer_)),a.beforeInitialize&&a.beforeInitialize(this.player,this.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(f),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}}]),a}(),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]);