/*! * 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,l,i,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[o]&&a[o],d=s.i||{},c=s.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!c[t]){if(!e[t]){if(r[t])return r[t];var l="function"==typeof a[o]&&a[o];if(!n&&l)return l(t,!0);if(s)return s(t,!0);if(f&&"string"==typeof t)return f(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var u=c[t]=new p.Module(t);e[t][0].call(u.exports,d,u,u.exports,a)}return c[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=f,this.exports={}},p.modules=e,p.cache=c,p.parent=s,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=d,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;hd);var l=e("bundle-text:./audio.svg"),i=r.interopDefault(l),u=e("bundle-text:./quality.svg"),a=r.interopDefault(u);function s(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function d(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function r(){o(t.hls?.media===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(!n.levels.length)return;let o=e.quality||{},r=o.auto||"Auto",l=o.title||"Quality",i=o.getName||(e=>e.name||`${e.height}P`),u=n.levels[n.currentLevel],d=u?i(u):r,c=s(n.levels.map((e,t)=>({html:i(e,t),value:t,default:n.currentLevel===t})),"html").sort((e,t)=>t.value-e.value);c.push({html:r,value:-1,default:-1===n.currentLevel});let f=e=>(n.currentLevel=e.value,t.notice.show=`${l}: ${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:d,style:{padding:"0 10px"},selector:c,onSelect:f}),o.setting&&t.setting.update({name:"hls-quality",tooltip:d,html:l,icon:a.default,width:200,selector:c,onSelect:f})}(t.hls),function(n){if(!n.audioTracks.length)return;let o=e.audio||{},r=o.auto||"Auto",l=o.title||"Audio",u=o.getName||(e=>e.name||e.lang||e.language),a=n.audioTracks[n.audioTrack],d=a?u(a):r,c=s(n.audioTracks.map((e,t)=>({html:u(e,t),value:e.id,default:n.audioTrack===e.id})),"html"),f=e=>(n.audioTrack=e.value,t.notice.show=`${l}: ${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:d,style:{padding:"0 10px"},selector:c,onSelect:f}),o.setting&&t.setting.update({name:"hls-audio",tooltip:d,html:l,icon:i.default,width:200,selector:c,onSelect:f})}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=d)},{"bundle-text:./audio.svg":"kni09","bundle-text:./quality.svg":"jbawI","@parcel/transformer-js/src/esmodule-helpers.js":"6ykb1"}],kni09:[function(e,t,n,o){t.exports=''},{}],jbawI:[function(e,t,n,o){t.exports=''},{}],"6ykb1":[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})}},{}]},["dHVos"],"dHVos","parcelRequire4dc0",{});