feat: update package version to 1.0.0 and remove deprecated HLS quality files

This commit is contained in:
Harvey Zack committed 2024-09-22 16:38:44 +08:00
1 parent 6b93dc95b0
commit 3d33458efc
9 files changed
+33 -257

No files matched your search

@@ -0,0 +1,8 @@
/*!
* artplayer-plugin-hls-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,o,l){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof r[o]&&r[o],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,n){if(!u[t]){if(!e[t]){var l="function"==typeof r[o]&&r[o];if(!n&&l)return l(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var f=u[t]=new s.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=u,s.parent=i,s.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(s,"root",{get:function(){return r[o]}}),r[o]=s;for(var c=0;c<t.length;c++)s(t[c]);if(n){var f=s(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({haa6A:[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"default",()=>s);var l=e("bundle-text:./quality.svg"),r=o.interopDefault(l),i=e("bundle-text:./audio.svg"),u=o.interopDefault(i);function a(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 s(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function l(){o(t.hls?.media===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(!n.levels.length)return;let o=e.quality||{},l=o.auto||"Auto",i=o.title||"Quality",u=o.getName||(e=>e.name||e.height+"P"),s=n.levels[n.currentLevel],c=s?u(s):l,f=a(n.levels.map((e,t)=>({html:u(e,t),value:t,default:n.currentLevel===t})),"html").sort((e,t)=>t.value-e.value);f.push({html:l,value:-1,default:-1===n.currentLevel});let d=e=>(n.currentLevel=e.value,t.loading.show=!0,t.notice.show=`${i}: ${e.html}`,e.html);o.control&&t.controls.update({name:"hls-quality",position:"right",html:c,style:{padding:"0 10px"},selector:f,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:c,html:i,icon:r.default,width:200,selector:f,onSelect:d})}(t.hls),function(n){if(!n.audioTracks.length)return;let o=e.audio||{},l=o.auto||"Auto",r=o.title||"Audio",i=o.getName||(e=>e.name||e.lang||e.language),s=n.audioTracks[n.audioTrack],c=s?i(s):l,f=a(n.audioTracks.map((e,t)=>({html:i(e,t),value:e.id,default:n.audioTrack===e.id})),"html"),d=e=>(n.audioTrack=e.value,t.loading.show=!0,t.notice.show=`${r}: ${e.html}`,e.html);o.control&&t.controls.update({name:"hls-audio",position:"right",html:c,style:{padding:"0 10px"},selector:f,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:c,html:r,icon:u.default,width:200,selector:f,onSelect:d})}(t.hls)}return t.on("ready",l),t.on("restart",l),{name:"artplayerPluginHlsControl",update:l}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=s)},{"bundle-text:./quality.svg":"5aI3W","bundle-text:./audio.svg":"kbgg8","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aI3W":[function(e,t,n){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="18"><path fill="#fff" d="M0 96c0-35.3 28.7-64 64-64h384c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm323.8 106.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6-26.5-33.1c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4S78.8 416 88 416h336c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>'},{}],kbgg8:[function(e,t,n){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="18"><path fill="#fff" d="M256 80C149.9 80 62.4 159.4 49.6 262c9.4-3.8 19.6-6 30.4-6 26.5 0 48 21.5 48 48v128c0 26.5-21.5 48-48 48-44.2 0-80-35.8-80-80V288C0 146.6 114.6 32 256 32s256 114.6 256 256v112c0 44.2-35.8 80-80 80-26.5 0-48-21.5-48-48V304c0-26.5 21.5-48 48-48 10.8 0 21 2.1 30.4 6C449.6 159.4 362.1 80 256 80z"/></svg>'},{}],"9pCYc":[function(e,t,n){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})}},{}]},["haa6A"],"haa6A","parcelRequire4dc0");
@@ -0,0 +1,8 @@
/*!
* artplayer-plugin-hls-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[o]&&l[o],i=u.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!i[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(u)return u(t,!0);if(a&&"string"==typeof t)return a(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var d=i[t]=new c.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=i,c.parent=u,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return l[o]}}),l[o]=c;for(var f=0;f<t.length;f++)c(t[f]);if(n){var d=c(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd&&define(function(){return d})}}({"6nh0Z":[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"default",function(){return c});var r=e("bundle-text:./quality.svg"),l=o.interopDefault(r),u=e("bundle-text:./audio.svg"),i=o.interopDefault(u);function a(e,t){var n=new Map;return e.filter(function(e){var o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function c(){var e=arguments.length>0&&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?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",u=o.title||"Quality",i=o.getName||function(e){return e.name||e.height+"P"},c=n.levels[n.currentLevel],f=c?i(c):r,d=a(n.levels.map(function(e,t){return{html:i(e,t),value:t,default:n.currentLevel===t}}),"html").sort(function(e,t){return t.value-e.value});d.push({html:r,value:-1,default:-1===n.currentLevel});var s=function(e){return n.currentLevel=e.value,t.loading.show=!0,t.notice.show="".concat(u,": ").concat(e.html),e.html};o.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:d,onSelect:s}),o.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:u,icon:l.default,width:200,selector:d,onSelect:s})}}(t.hls),function(n){if(n.audioTracks.length){var o=e.audio||{},r=o.auto||"Auto",l=o.title||"Audio",u=o.getName||function(e){return e.name||e.lang||e.language},c=n.audioTracks[n.audioTrack],f=c?u(c):r,d=a(n.audioTracks.map(function(e,t){return{html:u(e,t),value:e.id,default:n.audioTrack===e.id}}),"html"),s=function(e){return n.audioTrack=e.value,t.loading.show=!0,t.notice.show="".concat(l,": ").concat(e.html),e.html};o.control&&t.controls.update({name:"hls-audio",position:"right",html:f,style:{padding:"0 10px"},selector:d,onSelect:s}),o.setting&&t.setting.update({name:"hls-audio",tooltip:f,html:l,icon:i.default,width:200,selector:d,onSelect:s})}}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=c)},{"bundle-text:./quality.svg":"ghIYQ","bundle-text:./audio.svg":"cPSEW","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ghIYQ:[function(e,t,n){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="18"><path fill="#fff" d="M0 96c0-35.3 28.7-64 64-64h384c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm323.8 106.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6-26.5-33.1c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4S78.8 416 88 416h336c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>'},{}],cPSEW:[function(e,t,n){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="18"><path fill="#fff" d="M256 80C149.9 80 62.4 159.4 49.6 262c9.4-3.8 19.6-6 30.4-6 26.5 0 48 21.5 48 48v128c0 26.5-21.5 48-48 48-44.2 0-80-35.8-80-80V288C0 146.6 114.6 32 256 32s256 114.6 256 256v112c0 44.2-35.8 80-80 80-26.5 0-48-21.5-48-48V304c0-26.5 21.5-48 48-48 10.8 0 21 2.1 30.4 6C449.6 159.4 362.1 80 256 80z"/></svg>'},{}],iWrD0:[function(e,t,n){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})}},{}]},["6nh0Z"],"6nh0Z","parcelRequire4dc0");
@@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "3.0.0",
"version": "1.0.0",
"name": "artplayer-plugin-hls-control",
"types": "types/artplayer-plugin-hls-control.d.ts",
"description": "Iframe plugin for ArtPlayer",