/*! * artplayer-plugin-hls-control.js v1.0.1 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ !function(e,t,n,o,r,i,l,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof a[o]&&a[o],f=c.i||{},s=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!s[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof a[o]&&a[o];if(!n&&i)return i(t,!0);if(c)return c(t,!0);if(d&&"string"==typeof t)return d(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}f.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},f.cache={};var u=s[t]=new p.Module(t);e[t][0].call(u.exports,f,u,u.exports,a)}return s[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=d,this.exports={}},p.modules=e,p.cache=s,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=f,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return a[o]}}),a[o]=p;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){var r;o((null==(r=t.hls)?void 0:r.media)===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(n.levels.length){var o=e.quality||{},r=o.auto||"Auto",i=o.title||"Quality",u=o.getName||function(e){return e.name||e.height+"P"},a=n.levels[n.currentLevel],f=a?u(a):r,s=c(n.levels.map(function(e,t){return{html:u(e,t),value:t,default:n.currentLevel===t}}),"html").sort(function(e,t){return t.value-e.value});s.push({html:r,value:-1,default:-1===n.currentLevel});var d=function(e){return n.currentLevel=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:i,icon:l.default,width:200,selector:s,onSelect:d})}}(t.hls),function(n){if(n.audioTracks.length){var o=e.audio||{},r=o.auto||"Auto",i=o.title||"Audio",l=o.getName||function(e){return e.name||e.lang||e.language},u=n.audioTracks[n.audioTrack],f=u?l(u):r,s=c(n.audioTracks.map(function(e,t){return{html:l(e,t),value:e.id,default:n.audioTrack===e.id}}),"html"),d=function(e){return n.audioTrack=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:f,html:i,icon:a.default,width:200,selector:s,onSelect:d})}}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=f)},{"bundle-text:./quality.svg":"emaAn","bundle-text:./audio.svg":"5cT3J","@parcel/transformer-js/src/esmodule-helpers.js":"ihnSZ"}],emaAn:[function(e,t,n,o){t.exports=''},{}],"5cT3J":[function(e,t,n,o){t.exports=''},{}],ihnSZ:[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["bzF6W"],"bzF6W","parcelRequire8255",{});