mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
chore: Update build.js to return compressedHtmlString instead of compressedCssString
This commit is contained in:
1 parent
c7e91e3c8f
commit
774ca866d2
5 files changed
+35
-5
No files matched your search
@@ -4,4 +4,4 @@
|
||||
* (c) 2017-2024 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,n,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[n]&&o[n],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var p=s[t]=new u.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=i,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return o[n]}}),o[n]=u;for(var c=0;c<t.length;c++)u(t[c]);if(r){var p=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({"40mNk":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var a=e("./danmuku"),o=n.interopDefault(a),i=e("./setting"),s=n.interopDefault(i),l=e("./heatmap"),u=n.interopDefault(l);function c(e){return function(t){var r=new o.default(t,e),n=new s.default(t,r);return r.option.heatmap&&(0,u.default)(t,r,r.option.heatmap),{name:"artplayerPluginDanmuku",emit:r.emit.bind(r),load:r.load.bind(r),config:r.config.bind(r),hide:r.hide.bind(r),show:r.show.bind(r),reset:r.reset.bind(r),mount:n.mount.bind(n),get option(){return r.option},get isHide(){return r.isHide},get isStop(){return r.isStop}}}}c.icons=s.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=c)},{"./danmuku":"jgffw","./setting":"d3V7t","./heatmap":"dXFn2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgffw:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return f});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_object_spread"),l=e("@swc/helpers/_/_object_spread_props"),u=e("@swc/helpers/_/_ts_generator"),c=e("./bilibili"),p=e("bundle-text:./worker"),d=n.interopDefault(p),f=function(){function e(t,r){(0,o._)(this,e);var n=t.constructor,a=t.template;this.utils=n.utils,this.validator=n.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(r),this.worker=new Worker(URL.createObjectURL(new Blob([d.default]))),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.reset),this.load()}return(0,i._)(e,[{key:"isRotate",get:function(){var e,t;return null===(t=this.art.plugins)||void 0===t?void 0:null===(e=t.autoOrientation)||void 0===e?void 0:e.state}},{key:"marginTop",get:function(){var t=this.utils.clamp,r=this.option.margin[0],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[0]}},{key:"marginBottom",get:function(){var t=this.utils.clamp,r=this.option.margin[1],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[1]}},{key:"load",value:function(){var e=this;return(0,a._)(function(){var t,r;return(0,u._)(this,function(n){switch(n.label){case 0:t=e.utils.errorHandle,n.label=1;case 1:if(n.trys.push([1,9,,10]),"function"!=typeof e.option.danmuku)return[3,3];return[4,e.option.danmuku()];case 2:case 4:case 6:return e.danmus=n.sent(),[3,8];case 3:if("function"!=typeof e.option.danmuku.then)return[3,5];return[4,e.option.danmuku];case 5:if("string"!=typeof e.option.danmuku)return[3,7];return[4,(0,c.bilibiliDanmuParseFromUrl)(e.option.danmuku)];case 7:e.danmus=e.option.danmuku,n.label=8;case 8:return t(Array.isArray(e.danmus),"Danmuku need return an array as result"),e.queue=[],e.$danmuku.innerText="",e.danmus.forEach(function(t){return e.emit(t)}),e.art.emit("artplayerPluginDanmuku:loaded",e.queue),[3,10];case 9:throw r=n.sent(),e.art.emit("artplayerPluginDanmuku:error",r),r;case 10:return[2,e]}})})()}},{key:"emit",value:function(e){var t=this.utils.clamp;return this.validator(e,{text:"string",mode:"?number",color:"?string",time:"?number",border:"?boolean",style:"?object",escape:"?boolean"}),e.text.trim()&&(e.time?e.time=t(e.time,0,1/0):e.time=this.Line truncated
|
||||
!function(e,t,r,n,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[n]&&o[n],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var p=s[t]=new u.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=i,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return o[n]}}),o[n]=u;for(var c=0;c<t.length;c++)u(t[c]);if(r){var p=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({"40mNk":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var a=e("./danmuku"),o=n.interopDefault(a),i=e("./setting"),s=n.interopDefault(i),l=e("./heatmap"),u=n.interopDefault(l);function c(e){return function(t){var r=new o.default(t,e),n=new s.default(t,r);return r.option.heatmap&&(0,u.default)(t,r,r.option.heatmap),{name:"artplayerPluginDanmuku",emit:r.emit.bind(r),load:r.load.bind(r),config:r.config.bind(r),hide:r.hide.bind(r),show:r.show.bind(r),reset:r.reset.bind(r),mount:n.mount.bind(n),get option(){return r.option},get isHide(){return r.isHide},get isStop(){return r.isStop}}}}c.icons=s.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=c)},{"./danmuku":"jgffw","./setting":"d3V7t","./heatmap":"dXFn2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgffw:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return f});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_object_spread"),l=e("@swc/helpers/_/_object_spread_props"),u=e("@swc/helpers/_/_ts_generator"),c=e("./bilibili"),p=e("bundle-text:./worker"),d=n.interopDefault(p),f=function(){function e(t,r){(0,o._)(this,e);var n=t.constructor,a=t.template;this.utils=n.utils,this.validator=n.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(r),this.worker=new Worker(URL.createObjectURL(new Blob([d.default]))),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.reset),this.load()}return(0,i._)(e,[{key:"isRotate",get:function(){var e,t;return null===(t=this.art.plugins)||void 0===t?void 0:null===(e=t.autoOrientation)||void 0===e?void 0:e.state}},{key:"marginTop",get:function(){var t=this.utils.clamp,r=this.option.margin[0],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[0]}},{key:"marginBottom",get:function(){var t=this.utils.clamp,r=this.option.margin[1],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[1]}},{key:"load",value:function(){var e=this;return(0,a._)(function(){var t,r;return(0,u._)(this,function(n){switch(n.label){case 0:t=e.utils.errorHandle,n.label=1;case 1:if(n.trys.push([1,9,,10]),"function"!=typeof e.option.danmuku)return[3,3];return[4,e.option.danmuku()];case 2:case 4:case 6:return e.danmus=n.sent(),[3,8];case 3:if("function"!=typeof e.option.danmuku.then)return[3,5];return[4,e.option.danmuku];case 5:if("string"!=typeof e.option.danmuku)return[3,7];return[4,(0,c.bilibiliDanmuParseFromUrl)(e.option.danmuku)];case 7:e.danmus=e.option.danmuku,n.label=8;case 8:return t(Array.isArray(e.danmus),"Danmuku need return an array as result"),e.queue=[],e.$danmuku.innerText="",e.danmus.forEach(function(t){return e.emit(t)}),e.art.emit("artplayerPluginDanmuku:loaded",e.queue),[3,10];case 9:throw r=n.sent(),e.art.emit("artplayerPluginDanmuku:error",r),r;case 10:return[2,e]}})})()}},{key:"emit",value:function(e){var t=this.utils.clamp;return this.validator(e,{text:"string",mode:"?number",color:"?string",time:"?number",border:"?boolean",style:"?object",escape:"?boolean"}),e.text.trim()&&(e.time?e.time=t(e.time,0,1/0):e.time=this.Line truncated
|
||||
Reference in new issue
Block a user