invidious-experimenting/assets/js/videojs-dash.min.js

3 lines
6.5 KiB
JavaScript
Raw Permalink Normal View History

/*! videojs-contrib-dash - v2.8.2 - 2017-04-26
* 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(a){"use strict";function b(a){return a&&a.__esModule?a:{default:a}}function d(a,b){function c(a){return"dash-audio-"+a}function d(a,b){return a.find(function(a){var d=a.index;return c(d)===b.id})}var e=a.dash.mediaPlayer,f=e.getTracksFor("audio"),g=a.audioTracks();g.length&&b.clearTracks(["audio"]);var h=e.getCurrentTrackFor("audio");f.forEach(function(a){var b=a.lang;a.roles&&a.roles.length&&(b+=" ("+a.roles.join(", ")+")"),g.addTrack(new i.default.AudioTrack({enabled:a===h,id:c(a.index),kind:a.kind||"main",label:b,language:a.lang}))}),g.addEventListener("change",function(){for(var a=0;a<g.length;a++){var b=g[a];if(b.enabled){var c=d(f,b);e.setCurrentTrack(c)}else;}})}function e(a,b){a.dash.mediaPlayer.on(g.default.MediaPlayer.events.PLAYBACK_METADATA_LOADED,d.bind(null,a,b))}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f="undefined"!=typeof window?window.dashjs:"undefined"!=typeof a?a.dashjs:null,g=b(f),h="undefined"!=typeof window?window.videojs:"undefined"!=typeof a?a.videojs:null,i=b(h)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(a,b,c){(function(b){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var g=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}}(),h=a("global/window"),i=d(h),j="undefined"!=typeof window?window.videojs:"undefined"!=typeof b?b.videojs:null,k=d(j),l="undefined"!=typeof window?window.dashjs:"undefined"!=typeof b?b.dashjs:null,m=d(l),n=a("./setup-audio-tracks"),o=d(n),p=function(a){return"[object Array]"===Object.prototype.toString.call(a)},q=function(){function a(b,c,d){var g=this;if(f(this,a),d=d||c.options_,this.player=(0,k.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&&(k.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 h=b.src;this.keySystemOptions_=a.buildDashJSProtData(b.keySystemOptions),this.player.dash.mediaPlayer=m.default.MediaPlayer().create(),this.mediaPlayer_=this.player.dash.mediaPlayer,a.useVideoJSDebug&&(k.default.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),a.useVideoJSDebug(this.mediaPlayer_)),a.beforeInitialize&&(k.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(g.player,g.mediaPlayer_)}),this.mediaPlayer_.initialize(),d.dash&&Object.keys(d.dash).forEach(function(a){var b,c="set"+a.charAt(0).toUpperCase()+a.slice(1),f=d.dash[a];return g.mediaPlayer_.hasOwnProperty(c)&&(k.default.log.warn("Using dash options in videojs-contrib-dash without the set prefix "+("has been deprecated. Change '"+a+"' to '"+c+"'")),a=c),g.mediaPlayer_.hasOwnProperty(a)?(p(f)||(f=[f]),void(b=g.mediaPlayer_)[a].apply(b,e(f))):void k.default.log.warn("Warning: dash configuration option unrecogn