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