vendor: 3,965 bytes, lines 1-7
1/** 2 * videojs-qualityselector 3 * @version 0.0.4 4 * @copyright 2018 Emmanuel Alves <[email protected]> 5 * @license MIT 6 */ 7!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.videojsQualityselector=e()}}(function(){return function e(t,n,o){function r(i,l){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!l&&s)return s(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[i]={exports:{}};t[i][0].call(d.exports,function(e){var n=t[i][1][e];return r(n?n:e)},d,d.exports,e,t,n,o)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<o.length;i++)r(o[i]);return r}({1:[function(e,t,n){(function(e){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i="undefined"!=typeof window?window.videojs:"undefined"!=typeof e?e.videojs:null,l=o(i),s=function(){function e(t){r(this,e),this.player=t,this.sources=[],this.callback=void 0,this.containerDropdownElement=void 0,this.defaults={}}return a(e,[{key:"onQualitySelect",value:function(e){var t=this;if(this.callback&&this.callback(e),this.sources){var n=this.sources.find(function(t){return t.format===e.code});n&&(this.player.src({src:n.src,type:n.type}),this.player.on("loadedmetadata",function(){t.player.play(),Array.from(t.containerDropdownElement.firstChild.childNodes).forEach(function(t){t.dataset.code===e.code?t.setAttribute("class","current"):t.removeAttribute("class")})}));var o=document.getElementById(this.player.id_),r=o.getElementsByClassName("vjs-brand-quality-link");r&&r.length>0&&(r[0].innerText=e.name)}this.onToggleDropdown()}},{key:"onToggleDropdown",value:function(){if(this.containerDropdownElement.className.indexOf("show")===-1)this.containerDropdownElement.className+=" show";else{var e=this.containerDropdownElement.className.replace(" show","");this.containerDropdownElement.className=e}}},{key:"onPlayerReady",value:function(e){var t=this;this.containerDropdownElement=document.createElement("div"),this.containerDropdownElement.className="vjs-quality-dropdown";var n=document.createElement("div");n.className="vjs-quality-container";var o=document.createElement("button");o.className="vjs-brand-quality-link",o.onclick=function(e){return t.onToggleDropdown(e)},o.innerText=e.text||"Quality";var r=document.createElement("ul");e.formats||(e.formats=[{code:"auto",name:"Auto"}]),e.onFormatSelected&&(this.callback=e.onFormatSelected),e.sources&&(this.sources=e.sources),e.formats.map(function(e){var n=document.createElement("li");n.dataset.code=e.code;var o=document.createElement("a");o.innerText=e.name,o.setAttribute("href","#"),o.addEventListener("click",function(n){n.preventDefault(),t.onQualitySelect(e)}),n.appendChild(o),r.appendChild(n)}),this.containerDropdownElement.appendChild(r),n.appendChild(this.containerDropdownElement),n.appendChild(o);var a=this.player.controlBar.fullscreenToggle.el();this.player.controlBar.el().insertBefore(n,a),this.player.addClass("vjs-qualityselector")}}]),e}(),c=function(e){var t=this;this.ready(function(){var n=new s(t);n.onPlayerReady(l.default.mergeOptions(n.defaults,e))})},d=l.default.registerPlugin||l.default.plugin;d("qualityselector",c),c.VERSION="0.0.4",n.default=c,t.exports=n.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.