Aliyundrive (#436)

* init

* init

* add example

* add initControl

* add initControl

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* build all

* build all

* update style
This commit is contained in:
Harvey Zack authored and GitHub committed 2022-12-31 21:16:54 +08:00
1 parent 4dcde5a539
commit 6b791be35a
52 files changed
+689 -50

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
pip: true,
screenshot: true,
setting: true,
loop: true,
flip: true,
playbackRate: true,
aspectRatio: true,
fullscreen: true,
fullscreenWeb: true,
subtitleOffset: true,
miniProgressBar: true,
airplay: true,
theme: '#23ade5',
quality: [
{
default: true,
html: 'SD 480P',
url: '/assets/sample/video.mp4',
},
{
html: 'HD 720P',
url: '/assets/sample/video.mp4',
},
],
thumbnails: {
url: '/assets/sample/thumbnails.png',
number: 60,
column: 10,
},
subtitle: {
url: '/assets/sample/subtitle.srt',
type: 'srt',
style: {
color: '#fe9200',
fontSize: '20px',
},
encoding: 'utf-8',
},
highlight: [
{
time: 15,
text: 'One more chance',
},
{
time: 30,
text: '谁でもいいはずなのに',
},
{
time: 45,
text: '夏の想い出がまわる',
},
{
time: 60,
text: 'こんなとこにあるはずもないのに',
},
{
time: 75,
text: '终わり',
},
],
icons: {
loading: '<img src="/assets/img/ploading.gif">',
state: '<img width="150" heigth="150" src="/assets/img/state.svg">',
indicator: '<img width="16" heigth="16" src="/assets/img/indicator.svg">',
},
plugins: [
artplayerPluginControl()
],
});
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a.parcelRequire4dc0&&a.parcelRequire4dc0,o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,l){if(!o[n]){if(!e[n]){var t="function"==typeof a.parcelRequire4dc0&&a.parcelRequire4dc0;if(!l&&t)return t(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},u.cache={};var s=o[n]=new p.Module(n);e[n][0].call(s.exports,u,s,s.exports,this)}return o[n].exports;function u(e){var n=u.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=r,p.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(p,"root",{get:function(){return a.parcelRequire4dc0}}),a.parcelRequire4dc0=p;for(var s=0;s<n.length;s++)p(n[s]);var u=p(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({hUYA0:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:p,append:s,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function $(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():$()}),1e3))}function O(){b||clearTimeout(h)}function P(){w||(w=!0,function(){n.template.$ads=s(l,'<div class="artplayer-plugin-ads"></div>'),c=s(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=s(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),s(v,o),y=s(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=p(".artplayer-plugin-ads-close",y),g=p(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=s(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=p(".artplayer-plugin-ads-detail",m),x=p(".artplayer-plugin-ads-muted",m),h=p(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const l=s(x,t),a=s(x,i);u(a,"display","none"),e.muted&&(c.muted=!0,u(l,"display","none"),u(a,"display","inline-flex")),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(l,"display","none"),u(a,"display","inline-flex")):(u(l,"display","inline-flex"),u(a,"display","none"))}))}else u(x,"display","none");const b=s(h,a),w=s(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{$(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):($(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?O():$()})))}return n.on("ready",(()=>{n.once("play",P),n.once("video:playing",P)})),{name:"artplayerPluginAds",skip:k,pause:O,play:$}}}if(l.default=r,r.env="production",r.version="1.0.6",r.build="2022-12-14 23:13:37","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("stylLine truncated
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=r,s.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(s,"root",{get:function(){return a[t]}}),a[t]=s;for(var p=0;p<n.length;p++)s(n[p]);if(l){var u=s(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({hUYA0:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:s,append:p,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function $(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():$()}),1e3))}function O(){b||clearTimeout(h)}function P(){w||(w=!0,function(){n.template.$ads=p(l,'<div class="artplayer-plugin-ads"></div>'),c=p(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=p(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),p(v,o),y=p(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=s(".artplayer-plugin-ads-close",y),g=s(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=p(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=s(".artplayer-plugin-ads-detail",m),x=s(".artplayer-plugin-ads-muted",m),h=s(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const l=p(x,t),a=p(x,i);u(a,"display","none"),e.muted&&(c.muted=!0,u(l,"display","none"),u(a,"display","inline-flex")),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(l,"display","none"),u(a,"display","inline-flex")):(u(l,"display","inline-flex"),u(a,"display","none"))}))}else u(x,"display","none");const b=p(h,a),w=p(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{$(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):($(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?O():$()})))}return n.on("ready",(()=>{n.once("play",P),n.once("video:playing",P)})),{name:"artplayerPluginAds",skip:k,pause:O,play:$}}}if(l.default=r,r.env="production",r.version="1.0.6",r.build="2022-12-31 21:04:21","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(eLine truncated
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,n,t,l,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,o=a.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,t){if(!o[n]){if(!e[n]){var l="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!t&&l)return l(n,!0);if(a)return a(n,!0);if(d&&"string"==typeof n)return d(n);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}p.resolve=function(t){var l=e[n][1][t];return null!=l?l:t},p.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,p,u,u.exports,this)}return o[n].exports;function p(e){var n=p.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=a,s.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=s;for(var u=0;u<n.length;u++)s(n[u]);var p=s(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({hs8jd:[function(e,n,t){var l=e("@parcel/transformer-js/src/esmodule-helpers.js");l.defineInteropFlag(t);var r=e("@swc/helpers/src/_object_spread.mjs"),i=l.interopDefault(r),a=e("bundle-text:./style.less"),o=l.interopDefault(a);function d(e){return function(n){var t=n.template.$player,l=n.icons,r=l.volume,a=l.volumeClose,o=l.fullscreenOn,d=l.fullscreenOff,s=l.loading,u=n.constructor,p=u.validator,c=u.utils,f=c.query,y=c.append,g=c.setStyle;e=p((0,i.default)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var m=null,v=null,h=null,x=null,b=null,j=null,w=0,O=null,D=!1,P=!1,_=!1;function k(e,n){return n.replace("%s",e)}function T(){D=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function q(){D||(O=setTimeout((function(){w+=1;var n=e.playDuration-w;n>=1?h.innerHTML=k(n,e.i18n.canBeClosed):(h.innerHTML=e.i18n.close,_||(_=!0)),x.innerHTML=k(e.totalDuration-w,e.i18n.countdown),w>=e.totalDuration?T():q()}),1e3))}function M(){D||clearTimeout(O)}function A(){P||(P=!0,function(){n.template.$ads=y(t,'<div class="artplayer-plugin-ads"></div>'),m=y(n.template.$ads,e.video?'<video class="artplayer-plugin-ads-video" src="'.concat(e.video,'" loop playsInline></video>'):'<div class="artplayer-plugin-ads-html">'.concat(e.html,"</div>")),j=y(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),y(j,s),v=y(n.template.$ads,'<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">'.concat(e.playDuration<=0?e.i18n.close:k(e.playDuration,e.i18n.canBeClosed),'</div><div class="artplayer-plugin-ads-countdown">').concat(k(e.totalDuration,e.i18n.countdown),"</div></div>")),h=f(".artplayer-plugin-ads-close",v),x=f(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(h,"display","none"),n.proxy(h,"click",(function(){_&&T()})),b=y(n.template.$ads,'<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">'.concat(e.i18n.detail,'</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>'));var l=f(".artplayer-plugin-ads-detail",b),i=f(".artplayer-plugin-ads-muted",b),u=f(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",(function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)})):g(l,"display","none"),e.video){var p=y(i,r),c=y(i,a);g(c,"display","none"),e.muted&&(m.muted=!0,g(p,"display","none"),g(c,"display","inline-flex")),n.proxy(i,"click",(function(){m.muted=!m.muted,m.muted?(g(p,"display","none"),g(c,"display","inline-flex")):(g(p,"display","inline-flex"),g(c,"display","none"))}))}else g(i,"display","none");var w=y(u,o),O=y(u,d);g(O,"display","none"),n.proxy(u,"click",(function(){n.fullscreen=!n.fullscreen,n.fullscreen?(g(w,"display","inline-flex"),g(O,"display","none")):(g(w,"display","none"),g(O,"display","inline-flex"))})),n.proxy(m,"click",(function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(m,"error",T),n.proxy(m,"loadedmetadata",(function(){q(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(j,"display","none")}))):(q(),g(v,"display","flex"),g(b,"display","flex"),g(j,"display","none")),n.proxy(document,"visibilitychange",(function(){document.hidden?M():q()})))}return n.on("ready",(function(){n.once("play",A),n.once("video:playing",A)})),{name:"artplayerPluginAds",skip:T,pause:M,play:q}}}if(Line truncated
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=r,s.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(s,"root",{get:function(){return a[t]}}),a[t]=s;for(var p=0;p<n.length;p++)s(n[p]);if(l){var u=s(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({hs8jd:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:s,append:p,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function P(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():P()}),1e3))}function $(){b||clearTimeout(h)}function O(){w||(w=!0,function(){n.template.$ads=p(l,'<div class="artplayer-plugin-ads"></div>'),c=p(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=p(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),p(v,o),y=p(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=s(".artplayer-plugin-ads-close",y),g=s(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=p(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=s(".artplayer-plugin-ads-detail",m),x=s(".artplayer-plugin-ads-muted",m),h=s(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const l=p(x,t),a=p(x,i);u(a,"display","none"),e.muted&&(c.muted=!0,u(l,"display","none"),u(a,"display","inline-flex")),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(l,"display","none"),u(a,"display","inline-flex")):(u(l,"display","inline-flex"),u(a,"display","none"))}))}else u(x,"display","none");const b=p(h,a),w=p(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{P(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):(P(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?$():P()})))}return n.on("ready",(()=>{n.once("play",O),n.once("video:playing",O)})),{name:"artplayerPluginAds",skip:k,pause:$,play:P}}}if(l.default=r,r.env="production",r.version="1.0.6",r.build="2022-12-31 21:04:22","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(eLine truncated
@@ -0,0 +1,7 @@
/*!
* artplayer-plugin-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,o,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof a[o]&&a[o],i=l.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!i[e]){if(!t[e]){var n="function"==typeof a[o]&&a[o];if(!r&&n)return n(e,!0);if(l)return l(e,!0);if(p&&"string"==typeof e)return p(e);var c=new Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var o=t[e][1][r];return null!=o?o:r},d.cache={};var s=i[e]=new u.Module(e);t[e][0].call(s.exports,d,s,s.exports,this)}return i[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=i,u.parent=l,u.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[o]}}),a[o]=u;for(var c=0;c<e.length;c++)u(e[c]);if(r){var s=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({"16V0T":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=t("bundle-text:./style.less"),a=o.interopDefault(n);function l(){return t=>{!function(t){const{version:e,utils:{errorHandle:r}}=t.constructor,o=e.split(".").map(Number);r(o[0]+o[1]/100>=4.06,`Artplayer.js@${e} is not compatible the artplayerPluginControl@${l.version}. Please update it to version Artplayer.js@4.6.x`)}(t);const{template:{$bottom:e,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:a}}}=t;a(r,"artplayer-plugin-control");const i=o(e,'<div class="apa-control-current"></div>'),p=o(e,'<div class="apa-control-duration"></div>'),u=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e<u.length;e++)t.on(u[e],(()=>{i.innerText=n(t.currentTime),p.innerText=n(t.duration)}));return{name:"artplayerPluginControl"}}}if(r.default=l,l.env="production",l.version="1.0.0",l.build="2022-12-31 21:04:23","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const t=document.createElement("style");t.id="artplayer-plugin-control",t.textContent=a.default,document.head.appendChild(t)}"undefined"!=typeof window&&(window.artplayerPluginControl=l)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(t,e,r){e.exports=".artplayer-plugin-control .art-bottom{height:68px;max-width:520px;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails{bottom:35px}.artplayer-plugin-control .art-bottom .art-progress .art-control-progress{width:100%}.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip{top:-40px!important}.artplayer-plugin-control .art-bottom .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.artplayer-plugin-control .art-bottom .art-controls .art-control-time{display:none}.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel{width:60px!important}.artplayer-plugin-control .art-bottom .art-selector-list{background-color:#000c!important}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control.art-control-show .art-subtitle{bottom:80px}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach((function(r){"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0");
@@ -0,0 +1,7 @@
/*!
* artplayer-plugin-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,o,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof a[o]&&a[o],i=l.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!i[e]){if(!t[e]){var n="function"==typeof a[o]&&a[o];if(!r&&n)return n(e,!0);if(l)return l(e,!0);if(p&&"string"==typeof e)return p(e);var c=new Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var o=t[e][1][r];return null!=o?o:r},d.cache={};var s=i[e]=new u.Module(e);t[e][0].call(s.exports,d,s,s.exports,this)}return i[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=i,u.parent=l,u.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[o]}}),a[o]=u;for(var c=0;c<e.length;c++)u(e[c]);if(r){var s=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({d3G6W:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=t("bundle-text:./style.less"),a=o.interopDefault(n);function l(){return t=>{!function(t){const{version:e,utils:{errorHandle:r}}=t.constructor,o=e.split(".").map(Number);r(o[0]+o[1]/100>=4.06,`Artplayer.js@${e} is not compatible the artplayerPluginControl@${l.version}. Please update it to version Artplayer.js@4.6.x`)}(t);const{template:{$bottom:e,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:a}}}=t;a(r,"artplayer-plugin-control");const i=o(e,'<div class="apa-control-current"></div>'),p=o(e,'<div class="apa-control-duration"></div>'),u=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e<u.length;e++)t.on(u[e],(()=>{i.innerText=n(t.currentTime),p.innerText=n(t.duration)}));return{name:"artplayerPluginControl"}}}if(r.default=l,l.env="production",l.version="1.0.0",l.build="2022-12-31 21:04:24","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const t=document.createElement("style");t.id="artplayer-plugin-control",t.textContent=a.default,document.head.appendChild(t)}"undefined"!=typeof window&&(window.artplayerPluginControl=l)},{"bundle-text:./style.less":"8jCnX","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"8jCnX":[function(t,e,r){e.exports=".artplayer-plugin-control .art-bottom{height:68px;max-width:520px;-webkit-user-select:none;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);-webkit-backdrop-filter:saturate(180%)blur(20px);-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails{bottom:35px}.artplayer-plugin-control .art-bottom .art-progress .art-control-progress{width:100%}.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip{top:-40px!important}.artplayer-plugin-control .art-bottom .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.artplayer-plugin-control .art-bottom .art-controls .art-control-time{display:none}.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel{width:60px!important}.artplayer-plugin-control .art-bottom .art-selector-list{background-color:#000c!important}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control.art-control-show .art-subtitle{bottom:80px}.apa-control-current,.apa-control-duration{display:none}"},{}],"47PTV":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach((function(r){"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}]},["d3G6W"],"d3G6W","parcelRequire4dc0");
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf,s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var i="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}m.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},m.cache={};var d=s[e]=new u.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return s[e].exports;function m(t){var e=m.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a.parcelRequire93cf}}),a.parcelRequire93cf=u;for(var d=0;d<e.length;d++)u(e[d]);var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}({abjMI:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.11",l.build="2022-12-14 23:13:38","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"jJlwF","./setting":"cvUmb","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],jJlwF:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHLine truncated
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[i]&&a[i],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var d=new Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},p.cache={};var m=s[e]=new u.Module(e);t[e][0].call(m.exports,p,m,m.exports,this)}return s[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var d=0;d<e.length;d++)u(e[d]);if(n){var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}}({bgm6t:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.11",l.build="2022-12-31 21:04:24","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"4ns48","./setting":"lO8OT","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("12ceab24749100d0"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0pxLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,n,a){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof i.parcelRequire93cf&&i.parcelRequire93cf,u=o.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!u[e]){if(!t[e]){var n="function"==typeof i.parcelRequire93cf&&i.parcelRequire93cf;if(!r&&n)return n(e,!0);if(o)return o(e,!0);if(s&&"string"==typeof e)return s(e);var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}p.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},p.cache={};var c=u[e]=new l.Module(e);t[e][0].call(c.exports,p,c,c.exports,this)}return u[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=u,l.parent=o,l.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return i.parcelRequire93cf}}),i.parcelRequire93cf=l;for(var c=0;c<e.length;c++)l(e[c]);var p=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({bqk8e:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var a=t("./danmuku"),i=n.interopDefault(a),o=t("./setting"),u=n.interopDefault(o);function s(t){return function(e){!function(t){var e=t.constructor,r=e.version,n=e.utils.errorHandle,a=r.split(".").map(Number);n(a[0]+a[1]/100>=4.04,"Artplayer.js@".concat(r," 不兼容该弹幕库,请更新到 4.4.x 版本以上"))}(e);var r=new(0,i.default)(e,t);return(0,u.default)(e,r),{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),get option(){return r.option},get isHide(){return r.isHide},get isStop(){return r.isStop}}}}r.default=s,s.env="production",s.version="4.4.11",s.build="2022-12-14 23:13:38","undefined"!=typeof window&&(window.artplayerPluginDanmuku=s)},{"./danmuku":"cD7gc","./setting":"3SER8","@parcel/transformer-js/src/esmodule-helpers.js":"6uDyy"}],cD7gc:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return k}));var a=t("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(a),o=t("@swc/helpers/src/_class_call_check.mjs"),u=n.interopDefault(o),s=t("@swc/helpers/src/_create_class.mjs"),l=n.interopDefault(s),c=t("@swc/helpers/src/_object_spread.mjs"),p=n.interopDefault(c),d=t("@swc/helpers/src/_object_spread_props.mjs"),f=n.interopDefault(d),m=t("regenerator-runtime"),h=n.interopDefault(m),y=t("./bilibili"),g=t("./getDanmuTop"),v=n.interopDefault(g),k=function(){"use strict";function e(r,n){(0,u.default)(this,e);var a=r.constructor,i=r.template;if(this.utils=a.utils,this.validator=a.validator,this.$danmuku=i.$danmuku,this.$player=i.$player,this.art=r,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),r.on("video:play",this.start),r.on("video:playing",this.start),r.on("video:pause",this.stop),r.on("video:waiting",this.stop),r.on("fullscreen",this.reset),r.on("fullscreenWeb",this.reset),r.on("destroy",this.destroy),this.load()}return(0,l.default)(e,[{key:"isRotate",get:function(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.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:"filter",value:function(t,e){return this.queue.filter((function(e){return e.$state===t})).map(e)}},{key:"getLeft",value:function(t){var e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}},{key:"getRef",value:function(){var t=this.$refs.pop();if(t)return t;var e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1pLine truncated
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[i]&&a[i],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var d=new Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},p.cache={};var m=s[e]=new u.Module(e);t[e][0].call(m.exports,p,m,m.exports,this)}return s[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var d=0;d<e.length;d++)u(e[d]);if(n){var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}}({dmoJk:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.11",l.build="2022-12-31 21:04:26","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"cEnKl","./setting":"hrSF1","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],cEnKl:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n),i.export(n,"default",(()=>s));var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}getEmits(){const t=[],{clientWidth:e}=this.$player,n=this.getLeft(this.$player);return this.filter("emit",(i=>{const r=i.$ref.offsetTop,a=this.getLeft(i.$ref)-n,o=i.$ref.clientHeight,s=i.$ref.clientWidth,l=a+s,u=e-l,d=l/i.$restTime,m={};m.top=r,m.left=a,m.height=o,m.width=s,m.right=u,m.speed=d,m.distance=l,m.time=i.$restTime,m.mode=i.mode,t.push(m)})),t}getFontSize(t){const{clamp:e}=this.utils,{clientHeight:n}=this.$player;if("number"==typLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0,u=i.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0;if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(c&&"string"==typeof t)return c(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}a.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},a.cache={};var d=u[t]=new f.Module(t);e[t][0].call(d.exports,a,d,d.exports,this)}return u[t].exports;function a(e){var t=a.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=u,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return l.parcelRequire4dc0}}),l.parcelRequire4dc0=f;for(var d=0;d<t.length;d++)f(t[d]);var a=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}({eEHR6:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("bundle-text:./image.svg"),l=r.interopDefault(o);function i(e){return t=>{const{$video:n}=t.template,{errorHandle:r}=t.constructor.utils;return t.on("ready",(function(){const o=t.hls||window.hls;r(o&&o.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",c=o.levels[o.currentLevel],f=c?c.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:o.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:c===e}))),onSelect:e=>(o.nextLevel=e.level,e.html)}),e.setting&&t.setting.add({name:"hls-quality",tooltip:f,html:u,icon:l.default,width:200,selector:o.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:c===e}))),onSelect:function(e){return o.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-14 23:13:39","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"5VXix","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5VXix":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></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||t.hasOwnProperty(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})}},{}]},["eEHR6"],"eEHR6");
!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var a=u[t]=new d.Module(t);e[t][0].call(a.exports,c,a,a.exports,this)}return u[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=i,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return l[o]}}),l[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var a=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}}({eEHR6:[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{const{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;return t.on("ready",(function(){const r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",f=r.levels[r.currentLevel],d=f?f.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:d,style:{padding:"0 10px"},selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:e=>(r.nextLevel=e.level,e.html)}),e.setting&&t.setting.add({name:"hls-quality",tooltip:d,html:u,icon:l.default,width:200,selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:function(e){return r.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-31 21:04:27","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"5VXix","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5VXix":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></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||t.hasOwnProperty(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})}},{}]},["eEHR6"],"eEHR6","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0,u=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0;if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}a.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},a.cache={};var d=u[t]=new c.Module(t);e[t][0].call(d.exports,a,d,d.exports,this)}return u[t].exports;function a(e){var t=a.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=u,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return l.parcelRequire4dc0}}),l.parcelRequire4dc0=c;for(var d=0;d<t.length;d++)c(t[d]);var a=c(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}({"3yim4":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("bundle-text:./image.svg"),l=r.interopDefault(o);function i(e){return function(t){var n=t.template.$video,r=t.constructor.utils.errorHandle;return t.on("ready",(function(){var o=t.hls||window.hls;r(o&&o.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');var i=e.auto||"Auto",u=e.title||"Quality",f=o.levels[o.currentLevel],c=f?f.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:c,style:{padding:"0 10px"},selector:o.levels.map((function(e,t){return{html:e.height+"P",level:e.level||t,default:f===e}})),onSelect:function(e){return o.nextLevel=e.level,e.html}}),e.setting&&t.setting.add({name:"hls-quality",tooltip:c,html:u,icon:l.default,width:200,selector:o.levels.map((function(e,t){return{html:e.height+"P",level:e.level||t,default:f===e}})),onSelect:function(e){return o.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-14 23:13:39","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"9cAMb","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"9cAMb":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"47PTV":[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||t.hasOwnProperty(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})}},{}]},["3yim4"],"3yim4");
!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var a=u[t]=new d.Module(t);e[t][0].call(a.exports,c,a,a.exports,this)}return u[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=i,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return l[o]}}),l[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var a=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}}({"3yim4":[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{const{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;return t.on("ready",(function(){const r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",f=r.levels[r.currentLevel],d=f?f.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:d,style:{padding:"0 10px"},selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:e=>(r.nextLevel=e.level,e.html)}),e.setting&&t.setting.add({name:"hls-quality",tooltip:d,html:u,icon:l.default,width:200,selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:function(e){return r.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-31 21:04:27","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"9cAMb","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"9cAMb":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"47PTV":[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||t.hasOwnProperty(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})}},{}]},["3yim4"],"3yim4","parcelRequire4dc0");
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o.parcelRequire4dc0&&o.parcelRequire4dc0,a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!a[t]){if(!e[t]){var r="function"==typeof o.parcelRequire4dc0&&o.parcelRequire4dc0;if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}u.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},u.cache={};var f=a[t]=new c.Module(t);e[t][0].call(f.exports,u,f,f.exports,this)}return a[t].exports;function u(e){var t=u.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=a,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return o.parcelRequire4dc0}}),o.parcelRequire4dc0=c;for(var f=0;f<t.length;f++)c(t[f]);var u=c(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({aFKtw:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);class r{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:s}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();r.postMessage({type:"response",data:t,id:s})}else{const e=new Function(n)();r.postMessage({type:"response",data:e,id:s})}}catch(e){throw r.postMessage({type:"error",data:e.message,id:s}),e}}static inject(){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');r.postMessage({type:"inject"}),window.addEventListener("message",r.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}n.default=r,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"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||t.hasOwnProperty(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})}},{}]},["aFKtw"],"aFKtw");
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!a[t]){if(!e[t]){var s="function"==typeof o[r]&&o[r];if(!n&&s)return s(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}l.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},l.cache={};var u=a[t]=new f.Module(t);e[t][0].call(u.exports,l,u,u.exports,this)}return a[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=a,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return o[r]}}),o[r]=f;for(var c=0;c<t.length;c++)f(t[c]);if(n){var u=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({aFKtw:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);class r{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:s}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();r.postMessage({type:"response",data:t,id:s})}else{const e=new Function(n)();r.postMessage({type:"response",data:e,id:s})}}catch(e){throw r.postMessage({type:"error",data:e.message,id:s}),e}}static inject(){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');r.postMessage({type:"inject"}),window.addEventListener("message",r.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}n.default=r,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"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||t.hasOwnProperty(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})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var n="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&n)return n(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var f=s[t]=new u.Module(t);e[t][0].call(f.exports,l,f,f.exports,this)}return s[t].exports;function l(e){var t=l.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=a,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=u;for(var f=0;f<t.length;f++)u(t[f]);var l=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define((function(){return l}))}({cJKtw:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return h}));var o=e("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(o),a=e("@swc/helpers/src/_class_call_check.mjs"),s=n.interopDefault(a),c=e("@swc/helpers/src/_create_class.mjs"),u=n.interopDefault(c),f=e("regenerator-runtime"),l=n.interopDefault(f),h=function(){"use strict";function e(t){var r=t.iframe,n=t.url;if((0,s.default)(this,e),r instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof n)throw new Error('"option.url" needs to be a string');this.url=n,this.$iframe=r,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=function(){return null},this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}return(0,u.default)(e,[{key:"onMessage",value:function(e){var t=e.data,r=t.type,n=t.data,o=t.id;if("inject"===r)this.injected=!0;this.promises[o]&&("error"===r?this.promises[o].reject(new Error(n)):this.promises[o].resove(n),delete this.promises[o]),this.messageCallback&&this.messageCallback({type:r,data:n})}},{key:"postMessage",value:function(e){var t=e.type,r=e.data,n=this;return new Promise((function(e,o){(function n(){if(this.destroyed)o(new Error("The instance has been destroyed"));else if(this.injected){var i=Date.now();this.promises[i]={resove:e,reject:o},this.$iframe.contentWindow.postMessage({type:t,data:r,id:i},"*")}else setTimeout(n.bind(this),200)}).call(n)}))}},{key:"commit",value:function(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');var t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}},{key:"message",value:function(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}},{key:"destroy",value:function(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}],[{key:"iframe",get:function(){return window.top!==window}},{key:"postMessage",value:function(t){var r=t.type,n=t.data,o=t.id,i=void 0===o?0:o;if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:r,data:n,id:i},"*")}},{key:"onMessage",value:function(t){return(0,i.default)(l.default.mark((function r(){var n,o,i,a,s,c,u;return l.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.iframe){r.next=2;break}throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');case 2:n=t.data,o=n.type,i=n.data,a=n.id,r.t0=o,r.next="commit"===r.t0?6:23;break;case 6:if(r.prev=6,!i.match(/\bresolve\((.*?)\)/)){r.next=15;break}return s="return new Promise(function(resolve){\n".concat(i,"\n})"),r.next=11,new Function(s)();case 11:c=r.sent,e.postMessage({type:"response",data:c,id:a}),r.next=16;break;case 15:u=new Function(i)(),e.postMessage({type:"response",data:u,id:a});case 16:r.next=22;break;case 18:throw r.prev=18,r.t1=r.catch(6),e.postMessage({type:"error",data:r.t1.message,id:a}),r.t1;case 22:case 23:return r.abrupt("break",24);case 24:case"end":return r.stop()}}),r,null,[[6,18]])})))()}},{key:"inject",value:function(){if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');e.postMessage({type:"inject"}),window.addEventListener("message",e.onMessage)}}]),e}();"undefined"!=typeof window&&(window.ArtplayerPluginIframe=h)},{"@swc/helpers/src/_async_to_generator.mjs":"eiCdg","@swc/helpers/src/_class_call_check.mjs":"fs9hQ","@swc/helpers/src/_create_class.mjs":"eLine truncated
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!a[t]){if(!e[t]){var s="function"==typeof o[r]&&o[r];if(!n&&s)return s(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}l.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},l.cache={};var u=a[t]=new f.Module(t);e[t][0].call(u.exports,l,u,u.exports,this)}return a[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=a,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return o[r]}}),o[r]=f;for(var c=0;c<t.length;c++)f(t[c]);if(n){var u=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({cJKtw:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"default",(()=>s));class s{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!s.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!s.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:r}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();s.postMessage({type:"response",data:t,id:r})}else{const e=new Function(n)();s.postMessage({type:"response",data:e,id:r})}}catch(e){throw s.postMessage({type:"error",data:e.message,id:r}),e}}static inject(){if(!s.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');s.postMessage({type:"inject"}),window.addEventListener("message",s.onMessage)}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}}"undefined"!=typeof window&&(window.ArtplayerPluginIframe=s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"47PTV":[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||t.hasOwnProperty(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})}},{}]},["cJKtw"],"cJKtw","parcelRequire4dc0");
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c;if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},u.cache={};var d=l[t]=new h.Module(t);e[t][0].call(d.exports,u,d,d.exports,this)}return l[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r.parcelRequire7b4c}}),r.parcelRequire7b4c=h;for(var d=0;d<t.length;d++)h(t[d]);var u=h(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({abjMI:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];sLine truncated
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(h&&"string"==typeof t)return h(t);var d=new Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new a.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=s,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return r[n]}}),r[n]=a;for(var d=0;d<t.length;d++)a(t[d]);if(i){var u=a(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({eoujN:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),h=l.getContext("2d");this.emit("canvas",l);const a=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{h.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(a).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(((e,o)=>({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i.parcelRequire7b4c&&i.parcelRequire7b4c,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!l[t]){if(!e[t]){var n="function"==typeof i.parcelRequire7b4c&&i.parcelRequire7b4c;if(!r&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var c=l[t]=new u.Module(t);e[t][0].call(c.exports,f,c,c.exports,this)}return l[t].exports;function f(e){var t=f.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=l,u.parent=s,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i.parcelRequire7b4c}}),i.parcelRequire7b4c=u;for(var c=0;c<t.length;c++)u(t[c]);var f=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}({bqk8e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return v}));var o=e("@swc/helpers/src/_assert_this_initialized.mjs"),i=n.interopDefault(o),s=e("@swc/helpers/src/_class_call_check.mjs"),l=n.interopDefault(s),a=e("@swc/helpers/src/_create_class.mjs"),u=n.interopDefault(a),c=e("@swc/helpers/src/_inherits.mjs"),f=n.interopDefault(c),p=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(p),h=e("./emitter"),m=n.interopDefault(h),y=e("./utils"),v=function(e){"use strict";(0,f.default)(r,e);var t=(0,d.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.default)(this,r),(e=t.call(this)).processing=!1,e.option={},e.setup(Object.assign({},r.DEFAULTS,n)),e.video=r.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind((0,i.default)(e)),e.ondrop=e.ondrop.bind((0,i.default)(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",r.ondragover),e.option.fileInput.addEventListener("drop",r.ondrop),e}return(0,u.default)(r,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;this.option=Object.assign({},this.option,e);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==n.tagName||"file"!==n.type){n.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",n.appendChild(l),this.option.fileInput=l}return["number","width","column","begin","end"].forEach((function(e){t.errorHandle("number"==typeof t.option[e],"The '".concat(e,"' is not a number"))})),this.option.number=(0,y.clamp)(o,10,1e3),this.option.width=(0,y.clamp)(i,10,1e3),this.option.column=(0,y.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,y.sleep)(1e3).then((function(){return e.start()}));var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,y.clamp)(o,0,this.video.duration),this.option.end=(0,y.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var l=this.creatScreenshotDate(),a=this.creatCanvas(),u=a.getContext("2d");this.emit("canvas",a);var c=l.map((function(t,o){return function(){return new Promise((function(i){e.video.oncanplay=function(){u.drawImage(e.video,t.x,t.y,r,s),a.toBlob((function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailLine truncated
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(h&&"string"==typeof t)return h(t);var d=new Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new a.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=s,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return r[n]}}),r[n]=a;for(var d=0;d<t.length;d++)a(t[d]);if(i){var u=a(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({c1BpS:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",(()=>l));var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),h=l.getContext("2d");this.emit("canvas",l);const a=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{h.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(a).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(((e,o)=>({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCanvas(){const{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}downloLine truncated
+2 -2
View File
@@ -1,7 +1,7 @@
/*!
* artplayer.js v4.5.13
* artplayer.js v4.6.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,o,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof a.parcelRequireb749&&a.parcelRequireb749,s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof a.parcelRequireb749&&a.parcelRequireb749;if(!r&&o)return o(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}p.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},p.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return s[t].exports;function p(e){var t=p.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=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a.parcelRequireb749}}),a.parcelRequireb749=c;for(var u=0;u<t.length;u++)c(t[u]);var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({abjMI:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),a=o.interopDefault(i),n=e("option-validator"),s=o.interopDefault(n),l=e("./utils/emitter"),c=o.interopDefault(l),u=e("./utils"),p=e("./scheme"),d=o.interopDefault(p),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),O=e("./info"),T=o.interopDefault(O),E=e("./subtitle"),M=o.interopDefault(E),P=e("./events"),F=o.interopDefault(P),C=e("./hotkey"),H=o.interopDefault(C),A=e("./layer"),R=o.interopDefault(A),D=e("./loading"),z=o.interopDefault(D),B=e("./notice"),L=o.interopDefault(B),N=e("./mask"),V=o.interopDefault(N),_=e("./icons"),Z=o.interopDefault(_),q=e("./setting"),W=o.interopDefault(q),U=e("./storage"),Y=o.interopDefault(U),X=e("./plugins"),G=o.interopDefault(X),J=e("./mobile"),K=o.interopDefault(J);let Q=0;const ee=[];class te extends c.default{constructor(e,t){super(),this.id=++Q;const r=u.mergeDeep(te.option,e);if(this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,v.default)(this),this.events=new(0,F.default)(this),this.whitelist.state?(this.storage=new(0,Y.default)(this),this.icons=new(0,Z.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,L.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,R.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,$.default)(this),this.subtitle=new(0,M.default)(this),this.info=new(0,T.default)(this),this.loading=new(0,z.default)(this),this.hotkey=new(0,H.default)(this),this.mask=new(0,V.default)(this),this.setting=new(0,W.default)(this),this.plugins=new(0,G.default)(this)):this.mobile=new(0,K.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this,this))),te.DEBUG){const e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+te.version),e("Env@"+te.env),e("Build@"+te.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],(t=>e("Event@"+t.type)))}ee.push(this)}static get instances(){return ee}static get version(){return"4.5.13"}static get env(){return"production"}static get build(){return"2022-12-14 23:13:34"}static get config(){return h.default}static get utils(){return u}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:u.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),ee.splicLine truncated
!function(e,t,r,o,a){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof i[o]&&i[o],s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var a="function"==typeof i[o]&&i[o];if(!r&&a)return a(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var p=new Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return s[t].exports;function d(e){var t=d.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=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[o]}}),i[o]=c;for(var p=0;p<t.length;p++)c(t[p]);if(r){var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({"5lTcX":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=e("bundle-text:./style/index.less"),i=o.interopDefault(a),n=e("option-validator"),s=o.interopDefault(n),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),C=o.interopDefault(I),$=e("./info"),P=o.interopDefault($),T=e("./subtitle"),E=o.interopDefault(T),M=e("./events"),F=o.interopDefault(M),A=e("./hotkey"),z=o.interopDefault(A),H=e("./layer"),D=o.interopDefault(H),O=e("./loading"),R=o.interopDefault(O),L=e("./notice"),N=o.interopDefault(L),V=e("./mask"),Y=o.interopDefault(V),_=e("./icons"),W=o.interopDefault(_),q=e("./setting"),B=o.interopDefault(q),U=e("./storage"),Z=o.interopDefault(U),G=e("./plugins"),K=o.interopDefault(G),X=e("./mobile"),J=o.interopDefault(X);let Q=0;const ee=[];class te extends c.default{constructor(e,t){super(),this.id=++Q;const r=p.mergeDeep(te.option,e);if(this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,v.default)(this),this.events=new(0,F.default)(this),this.whitelist.state?(this.storage=new(0,Z.default)(this),this.icons=new(0,W.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,N.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,D.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,C.default)(this),this.subtitle=new(0,E.default)(this),this.info=new(0,P.default)(this),this.loading=new(0,R.default)(this),this.hotkey=new(0,z.default)(this),this.mask=new(0,Y.default)(this),this.setting=new(0,B.default)(this),this.plugins=new(0,K.default)(this)):this.mobile=new(0,J.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this,this))),te.DEBUG){const e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+te.version),e("Env@"+te.env),e("Build@"+te.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],(t=>e("Event@"+t.type)))}ee.push(this)}static get instances(){return ee}static get version(){return"4.6.0"}static get env(){return"production"}static get build(){return"2022-12-31 21:04:17"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),ee.splice(ee.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=te,te.DLine truncated
+2 -2
View File
@@ -1,7 +1,7 @@
/*!
* artplayer.js v4.5.13
* artplayer.js v4.6.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 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:{},s="function"==typeof o.parcelRequireb749&&o.parcelRequireb749,i=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!i[t]){if(!e[t]){var n="function"==typeof o.parcelRequireb749&&o.parcelRequireb749;if(!r&&n)return n(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var u=i[t]=new c.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return i[t].exports;function p(e){var t=p.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=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return o.parcelRequireb749}}),o.parcelRequireb749=c;for(var u=0;u<t.length;u++)c(t[u]);var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({bqk8e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return pe}));var a=e("@swc/helpers/src/_assert_this_initialized.mjs"),o=n.interopDefault(a),s=e("@swc/helpers/src/_class_call_check.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_create_class.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_inherits.mjs"),p=n.interopDefault(u),f=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(f),h=e("bundle-text:./style/index.less"),m=n.interopDefault(h),y=e("option-validator"),v=n.interopDefault(y),g=e("./utils/emitter"),b=n.interopDefault(g),w=e("./utils"),j=e("./scheme"),x=n.interopDefault(j),_=e("./config"),k=n.interopDefault(_),D=e("./whitelist"),S=n.interopDefault(D),I=e("./template"),E=n.interopDefault(I),P=e("./i18n"),T=n.interopDefault(P),M=e("./player"),O=n.interopDefault(M),F=e("./control"),A=n.interopDefault(F),z=e("./contextmenu"),C=n.interopDefault(z),R=e("./info"),V=n.interopDefault(R),L=e("./subtitle"),N=n.interopDefault(L),$=e("./events"),H=n.interopDefault($),X=e("./hotkey"),q=n.interopDefault(X),W=e("./layer"),B=n.interopDefault(W),U=e("./loading"),Y=n.interopDefault(U),G=e("./notice"),Z=n.interopDefault(G),Q=e("./mask"),K=n.interopDefault(Q),J=e("./icons"),ee=n.interopDefault(J),te=e("./setting"),re=n.interopDefault(te),ne=e("./storage"),ae=n.interopDefault(ne),oe=e("./plugins"),se=n.interopDefault(oe),ie=e("./mobile"),le=n.interopDefault(ie),ce=0,ue=[],pe=function(e){"use strict";(0,p.default)(r,e);var t=(0,d.default)(r);function r(e,n){var a;(0,i.default)(this,r),(a=t.call(this)).id=++ce;var s=w.mergeDeep(r.option,e);if(a.option=(0,v.default)(s,x.default),a.isLock=!1,a.isReady=!1,a.isFocus=!1,a.isInput=!1,a.isRotate=!1,a.isDestroy=!1,a.whitelist=new(0,S.default)((0,o.default)(a)),a.template=new(0,E.default)((0,o.default)(a)),a.events=new(0,H.default)((0,o.default)(a)),a.whitelist.state?(a.storage=new(0,ae.default)((0,o.default)(a)),a.icons=new(0,ee.default)((0,o.default)(a)),a.i18n=new(0,T.default)((0,o.default)(a)),a.notice=new(0,Z.default)((0,o.default)(a)),a.player=new(0,O.default)((0,o.default)(a)),a.layers=new(0,B.default)((0,o.default)(a)),a.controls=new(0,A.default)((0,o.default)(a)),a.contextmenu=new(0,C.default)((0,o.default)(a)),a.subtitle=new(0,N.default)((0,o.default)(a)),a.info=new(0,V.default)((0,o.default)(a)),a.loading=new(0,Y.default)((0,o.default)(a)),a.hotkey=new(0,q.default)((0,o.default)(a)),a.mask=new(0,K.default)((0,o.default)(a)),a.setting=new(0,re.default)((0,o.default)(a)),a.plugins=new(0,se.default)((0,o.default)(a))):a.mobile=new(0,le.default)((0,o.default)(a)),"function"==typeof n&&a.on("ready",(function(){return n.call((0,o.default)(a),(0,o.default)(a))})),r.DEBUG){var l=function(e){return console.log("[ART.".concat(a.id,"] -> ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c<k.default.events.length;c++)a.on("video:"+k.default.events[c],(function(e){return l("Event@"+e.type)}))}return ue.push((0,o.default)(a)),a}return(0,c.default)(r,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(e),ue.splice(ue.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return ue}},{key:"version",get:function(){return"4.5.13"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2022-12-14 23:13:35"}},{key:"config",get:function(){return k.default}},{key:"utils",get:funcLine truncated
!function(e,t,r,o,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof a[o]&&a[o],s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var i="function"==typeof a[o]&&a[o];if(!r&&i)return i(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var p=new Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return s[t].exports;function d(e){var t=d.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=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[o]}}),a[o]=c;for(var p=0;p<t.length;p++)c(t[p]);if(r){var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({"4GL94":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",(()=>te));var i=e("bundle-text:./style/index.less"),a=o.interopDefault(i),n=e("option-validator"),s=o.interopDefault(n),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),P=e("./contextmenu"),T=o.interopDefault(P),I=e("./info"),$=o.interopDefault(I),E=e("./subtitle"),M=o.interopDefault(E),L=e("./events"),C=o.interopDefault(L),F=e("./hotkey"),V=o.interopDefault(F),A=e("./layer"),D=o.interopDefault(A),z=e("./loading"),R=o.interopDefault(z),O=e("./notice"),N=o.interopDefault(O),H=e("./mask"),_=o.interopDefault(H),W=e("./icons"),q=o.interopDefault(W),B=e("./setting"),U=o.interopDefault(B),Y=e("./storage"),G=o.interopDefault(Y),Z=e("./plugins"),X=o.interopDefault(Z),J=e("./mobile"),K=o.interopDefault(J);let Q=0;const ee=[];class te extends c.default{static get instances(){return ee}static get version(){return"4.6.0"}static get env(){return"production"}static get build(){return"2022-12-31 21:04:19"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),ee.splice(ee.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}constructor(e,t){super(),this.id=++Q;const r=p.mergeDeep(te.option,e);if(this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,v.default)(this),this.events=new(0,C.default)(this),this.whitelist.state?(this.storage=new(0,G.default)(this),this.icons=new(0,q.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,N.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,D.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,T.default)(this),this.subtitle=new(0,M.default)(this),this.info=new(0,$.default)(this),this.loading=new(0,R.default)(this),this.hotkey=new(0,V.default)(this),this.mask=new(0,_.default)(this),this.setting=new(0,U.default)(this),this.plugins=new(0,X.default)(this)):this.mobile=new(0,K.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this,this))),te.DEBUG){const e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+te.version),e("Env@"+te.env),e("Build@"+te.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],(t=>e("Event@"+t.type)))}ee.pLine truncated
+4
View File
@@ -39,6 +39,10 @@
<a
href="/?libs=./uncompiled/artplayer-plugin-iframe/index.js&example=iframe">artplayer-plugin-iframe</a>
</li>
<li>
<a
href="/?libs=./uncompiled/artplayer-plugin-control/index.js&example=control">artplayer-plugin-control</a>
</li>
<li>
<a
href="/?libs=https://cdnjs.cloudflare.com/ajax/libs/hls.js/8.0.0-beta.3/hls.min.js%0A./uncompiled/artplayer-plugin-hls-quality/index.js&example=hls.quality">artplayer-plugin-hls-quality</a>
+1 -1
View File
@@ -1 +1 @@
if(!self.define){let s,a={};const e=(e,i)=>(e=new URL(e+".js",i).href,a[e]||new Promise((a=>{if("document"in self){const s=document.createElement("script");s.src=e,s.onload=a,document.head.appendChild(s)}else s=e,importScripts(e),a()})).then((()=>{let s=a[e];if(!s)throw new Error(`Module ${e} didn’t register its module`);return s})));self.define=(i,b)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(a[l])return;let c={};const r=s=>e(s,l),n={module:{uri:l},exports:c,require:r};a[l]=Promise.all(i.map((s=>n[s]||r(s)))).then((s=>(b(...s),c)))}}define(["./workbox-6da860f9"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/css/normalize.css",revision:"be7f3425b44480dcf3aab3408f632f37"},{url:"assets/css/style.css",revision:"8a6dc931a51e7d227601899da6dc45c1"},{url:"assets/example/ads.js",revision:"389d77de2c5d399002030a1b346343d1"},{url:"assets/example/danmuku.js",revision:"d16edf04e1ef87914559a0ff0ea2c661"},{url:"assets/example/hls.quality.js",revision:"09073b89894ef2b3bcba2e3727553930"},{url:"assets/example/iframe.js",revision:"24893a44a55daeb33399be3b38a01273"},{url:"assets/example/index.js",revision:"eaca2dcf80c3b90ebd8b53ac6df11fc7"},{url:"assets/example/thumbnail.js",revision:"ed1119d0517accdea6b88aa08cd4fc27"},{url:"assets/img/danmu-off.svg",revision:"a1483de76b68dd12a2fdf2c3734537ea"},{url:"assets/img/danmu-on.svg",revision:"1b846589a581e9d2ed720973d00a8a38"},{url:"assets/img/indicator.svg",revision:"696037ccd6fb7db7c68d82d2c69e7e6c"},{url:"assets/img/logo.png",revision:"113f758a35e9c71b8d9c41240da8233b"},{url:"assets/img/state.svg",revision:"2e9bac37536c46c09a38e74a480b56c6"},{url:"assets/img/subtitle.svg",revision:"9a231c6167f7a8b168b5f19cc892b170"},{url:"assets/js/common.js",revision:"5535e42fc50672f151b0a914cdb8a638"},{url:"assets/js/console.js",revision:"4e9a2c80679b6bbf78a4809a4a90f64a"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus-worker.js",revision:"cef7e5f6ef27a8e01d7c1bcb78cbbe4d"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus.js",revision:"a02d9bcf0639259b92b1c8ddfc45b994"},{url:"assets/js/polyfill/core.js",revision:"1d2194332562ff4194b431f2bad8ad68"},{url:"assets/js/polyfill/encoding-indexes.js",revision:"50f27403be5972eae4831f5b69db1f80"},{url:"assets/js/polyfill/encoding.js",revision:"022884ab2a5bd42b6f4fff580fa0dd34"},{url:"assets/js/polyfill/fetch.polyfill.js",revision:"f625f62b3249b03ef6d9aef1aa375342"},{url:"assets/js/vconsole.min.js",revision:"e637889f2f4e869003f4950cce737ba6"},{url:"assets/js/vs/base/worker/workerMain.js",revision:"ff1e00116d48f10b29a7f4f0deac2cd3"},{url:"assets/js/vs/basic-languages/abap/abap.js",revision:"0d31790a1a820013ebfceaaea520086e"},{url:"assets/js/vs/basic-languages/apex/apex.js",revision:"7ed571a41e7a0f49e3813733ee9668ab"},{url:"assets/js/vs/basic-languages/azcli/azcli.js",revision:"2c95f109efa42b39efd112e1ca3f6156"},{url:"assets/js/vs/basic-languages/bat/bat.js",revision:"3a19616507d8d1f534c6155dd45075b7"},{url:"assets/js/vs/basic-languages/bicep/bicep.js",revision:"a454b074c4897916902a31bc7488c7c6"},{url:"assets/js/vs/basic-languages/cameligo/cameligo.js",revision:"714bc3d62760814c66d2722403956093"},{url:"assets/js/vs/basic-languages/clojure/clojure.js",revision:"bc3dfd6ec24e73dd26c7acb5fdf0026e"},{url:"assets/js/vs/basic-languages/coffee/coffee.js",revision:"72268e931cec85bc41f6677416e86cbd"},{url:"assets/js/vs/basic-languages/cpp/cpp.js",revision:"400136ec6edf93a21103ab54fe244b44"},{url:"assets/js/vs/basic-languages/csharp/csharp.js",revision:"60763afe31e9a27b3e11f31ca07222d0"},{url:"assets/js/vs/basic-languages/csp/csp.js",revision:"7c7a0ecfa43e63dea1c5c3b90e3669ee"},{url:"assets/js/vs/basic-languages/css/css.js",revision:"6ee9d8b753ab02e86d2fef1cd6839bae"},{url:"assets/js/vs/basic-languages/dart/dart.js",revision:"994c907e6e2fca9831c70fb220a8dfe7"},{url:"assets/js/vs/basic-languages/dockerfile/dockerfile.js",revision:"886100cd736f23bfcdf61029439ebb91"},{url:"assets/js/vs/basic-languages/ecl/ecl.js",revision:"59c4e667668ebbb528ba64fd2b76411c"},{url:"assets/js/vs/basic-languages/elixir/elixir.js",revision:"9adf3da05ba73c8728db04aa24479830"},{url:"assets/js/vs/basic-languages/flow9/flow9.js",revision:"07f962e581808968eaf81b4757ba427d"},{url:"assets/js/vs/basic-languages/fsharp/fsharp.js",revision:"4a059944d9de46a22b1e7f3b636beb98"},{url:"assets/js/vs/basic-languages/go/go.js",revision:"1e78e6e22eca1bf5ad47108dead26490"},{url:"assets/js/vs/basic-languages/graphql/graphql.js",revision:"33366aac3f03b0c919818dff9e228bad"},{url:"assets/js/vs/basic-languages/handlebars/handlebars.js",revision:"9a05aa526495f0a1e241f3ac142e91a9"},{url:"assets/js/vs/basic-languages/hcl/hcl.js",revision:"710a5636d53b53e1290873211ddb6a9e"},{url:"assets/js/vs/basic-languages/html/html.js",revision:"2b130bc85c8c8646e5bea546d14a0b41"},{url:"assets/js/vs/basic-languages/ini/ini.js",revision:"2c52fccc7378467c65c40d246cLine truncated
if(!self.define){let s,a={};const e=(e,i)=>(e=new URL(e+".js",i).href,a[e]||new Promise((a=>{if("document"in self){const s=document.createElement("script");s.src=e,s.onload=a,document.head.appendChild(s)}else s=e,importScripts(e),a()})).then((()=>{let s=a[e];if(!s)throw new Error(`Module ${e} didn’t register its module`);return s})));self.define=(i,b)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(a[l])return;let c={};const r=s=>e(s,l),n={module:{uri:l},exports:c,require:r};a[l]=Promise.all(i.map((s=>n[s]||r(s)))).then((s=>(b(...s),c)))}}define(["./workbox-d249b2c8"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/css/normalize.css",revision:"934e11a04762ee86e8181a50912a0635"},{url:"assets/css/style.css",revision:"44a9fc3f99f41e9c17d49d390b6e1d5d"},{url:"assets/example/ads.js",revision:"389d77de2c5d399002030a1b346343d1"},{url:"assets/example/control.js",revision:"14621a96a21a0023485c0adc853a01c0"},{url:"assets/example/danmuku.js",revision:"d16edf04e1ef87914559a0ff0ea2c661"},{url:"assets/example/hls.quality.js",revision:"09073b89894ef2b3bcba2e3727553930"},{url:"assets/example/iframe.js",revision:"24893a44a55daeb33399be3b38a01273"},{url:"assets/example/index.js",revision:"eaca2dcf80c3b90ebd8b53ac6df11fc7"},{url:"assets/example/thumbnail.js",revision:"ed1119d0517accdea6b88aa08cd4fc27"},{url:"assets/img/danmu-off.svg",revision:"11e49cbb3a79c3c5ef21e5a1188b4aea"},{url:"assets/img/danmu-on.svg",revision:"7764c5dab2a94592877406cb79844195"},{url:"assets/img/indicator.svg",revision:"f0803fd6dad6d7f833821d6ad24182ce"},{url:"assets/img/logo.png",revision:"113f758a35e9c71b8d9c41240da8233b"},{url:"assets/img/state.svg",revision:"2e9bac37536c46c09a38e74a480b56c6"},{url:"assets/img/subtitle.svg",revision:"99ff929bf767009e5649212e90c10392"},{url:"assets/js/common.js",revision:"5535e42fc50672f151b0a914cdb8a638"},{url:"assets/js/console.js",revision:"4e9a2c80679b6bbf78a4809a4a90f64a"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus-worker.js",revision:"cef7e5f6ef27a8e01d7c1bcb78cbbe4d"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus.js",revision:"a02d9bcf0639259b92b1c8ddfc45b994"},{url:"assets/js/polyfill/core.js",revision:"1d2194332562ff4194b431f2bad8ad68"},{url:"assets/js/polyfill/encoding-indexes.js",revision:"50f27403be5972eae4831f5b69db1f80"},{url:"assets/js/polyfill/encoding.js",revision:"022884ab2a5bd42b6f4fff580fa0dd34"},{url:"assets/js/polyfill/fetch.polyfill.js",revision:"f625f62b3249b03ef6d9aef1aa375342"},{url:"assets/js/vconsole.min.js",revision:"e637889f2f4e869003f4950cce737ba6"},{url:"assets/js/vs/base/worker/workerMain.js",revision:"ff1e00116d48f10b29a7f4f0deac2cd3"},{url:"assets/js/vs/basic-languages/abap/abap.js",revision:"0d31790a1a820013ebfceaaea520086e"},{url:"assets/js/vs/basic-languages/apex/apex.js",revision:"7ed571a41e7a0f49e3813733ee9668ab"},{url:"assets/js/vs/basic-languages/azcli/azcli.js",revision:"2c95f109efa42b39efd112e1ca3f6156"},{url:"assets/js/vs/basic-languages/bat/bat.js",revision:"3a19616507d8d1f534c6155dd45075b7"},{url:"assets/js/vs/basic-languages/bicep/bicep.js",revision:"a454b074c4897916902a31bc7488c7c6"},{url:"assets/js/vs/basic-languages/cameligo/cameligo.js",revision:"714bc3d62760814c66d2722403956093"},{url:"assets/js/vs/basic-languages/clojure/clojure.js",revision:"bc3dfd6ec24e73dd26c7acb5fdf0026e"},{url:"assets/js/vs/basic-languages/coffee/coffee.js",revision:"72268e931cec85bc41f6677416e86cbd"},{url:"assets/js/vs/basic-languages/cpp/cpp.js",revision:"400136ec6edf93a21103ab54fe244b44"},{url:"assets/js/vs/basic-languages/csharp/csharp.js",revision:"60763afe31e9a27b3e11f31ca07222d0"},{url:"assets/js/vs/basic-languages/csp/csp.js",revision:"7c7a0ecfa43e63dea1c5c3b90e3669ee"},{url:"assets/js/vs/basic-languages/css/css.js",revision:"6ee9d8b753ab02e86d2fef1cd6839bae"},{url:"assets/js/vs/basic-languages/dart/dart.js",revision:"994c907e6e2fca9831c70fb220a8dfe7"},{url:"assets/js/vs/basic-languages/dockerfile/dockerfile.js",revision:"886100cd736f23bfcdf61029439ebb91"},{url:"assets/js/vs/basic-languages/ecl/ecl.js",revision:"59c4e667668ebbb528ba64fd2b76411c"},{url:"assets/js/vs/basic-languages/elixir/elixir.js",revision:"9adf3da05ba73c8728db04aa24479830"},{url:"assets/js/vs/basic-languages/flow9/flow9.js",revision:"07f962e581808968eaf81b4757ba427d"},{url:"assets/js/vs/basic-languages/fsharp/fsharp.js",revision:"4a059944d9de46a22b1e7f3b636beb98"},{url:"assets/js/vs/basic-languages/go/go.js",revision:"1e78e6e22eca1bf5ad47108dead26490"},{url:"assets/js/vs/basic-languages/graphql/graphql.js",revision:"33366aac3f03b0c919818dff9e228bad"},{url:"assets/js/vs/basic-languages/handlebars/handlebars.js",revision:"9a05aa526495f0a1e241f3ac142e91a9"},{url:"assets/js/vs/basic-languages/hcl/hcl.js",revision:"710a5636d53b53e1290873211ddb6a9e"},{url:"assets/js/vs/basic-languages/html/html.js",revision:"2b130bc85c8c8646e5bea546d14a0b41"},{url:Line truncated
@@ -0,0 +1,235 @@
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
(function (modules, entry, mainEntry, parcelRequireName, globalName) {
/* eslint-disable no-undef */
var globalObject =
typeof globalThis !== 'undefined'
? globalThis
: typeof self !== 'undefined'
? self
: typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: {};
/* eslint-enable no-undef */
// Save the require from previous bundle to this closure if any
var previousRequire =
typeof globalObject[parcelRequireName] === 'function' &&
globalObject[parcelRequireName];
var cache = previousRequire.cache || {};
// Do not use `require` to prevent Webpack from trying to bundle this call
var nodeRequire =
typeof module !== 'undefined' &&
typeof module.require === 'function' &&
module.require.bind(module);
function newRequire(name, jumped) {
if (!cache[name]) {
if (!modules[name]) {
// if we cannot find the module within our internal map or
// cache jump to the current global require ie. the last bundle
// that was added to the page.
var currentRequire =
typeof globalObject[parcelRequireName] === 'function' &&
globalObject[parcelRequireName];
if (!jumped && currentRequire) {
return currentRequire(name, true);
}
// If there are other bundles on this page the require from the
// previous one is saved to 'previousRequire'. Repeat this as
// many times as there are bundles until the module is found or
// we exhaust the require chain.
if (previousRequire) {
return previousRequire(name, true);
}
// Try the node require function if it exists.
if (nodeRequire && typeof name === 'string') {
return nodeRequire(name);
}
var err = new Error("Cannot find module '" + name + "'");
err.code = 'MODULE_NOT_FOUND';
throw err;
}
localRequire.resolve = resolve;
localRequire.cache = {};
var module = (cache[name] = new newRequire.Module(name));
modules[name][0].call(
module.exports,
localRequire,
module,
module.exports,
this
);
}
return cache[name].exports;
function localRequire(x) {
var res = localRequire.resolve(x);
return res === false ? {} : newRequire(res);
}
function resolve(x) {
var id = modules[name][1][x];
return id != null ? id : x;
}
}
function Module(moduleName) {
this.id = moduleName;
this.bundle = newRequire;
this.exports = {};
}
newRequire.isParcelRequire = true;
newRequire.Module = Module;
newRequire.modules = modules;
newRequire.cache = cache;
newRequire.parent = previousRequire;
newRequire.register = function (id, exports) {
modules[id] = [
function (require, module) {
module.exports = exports;
},
{},
];
};
Object.defineProperty(newRequire, 'root', {
get: function () {
return globalObject[parcelRequireName];
},
});
globalObject[parcelRequireName] = newRequire;
for (var i = 0; i < entry.length; i++) {
newRequire(entry[i]);
}
if (mainEntry) {
// Expose entry point to Node, AMD or browser globals
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
var mainExports = newRequire(mainEntry);
// CommonJS
if (typeof exports === 'object' && typeof module !== 'undefined') {
module.exports = mainExports;
// RequireJS
} else if (typeof define === 'function' && define.amd) {
define(function () {
return mainExports;
});
// <script>
} else if (globalName) {
this[globalName] = mainExports;
}
}
})({"guaft":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
var _styleLess = require("bundle-text:./style.less");
var _styleLessDefault = parcelHelpers.interopDefault(_styleLess);
function checkVersion(art) {
const { version , utils: { errorHandle } } = art.constructor;
const arr = version.split(".").map(Number);
const major = arr[0];
const minor = arr[1] / 100;
errorHandle(major + minor >= 4.06, `Artplayer.js@${version} is not compatible the artplayerPluginControl@${artplayerPluginControl.version}. Please update it to version Artplayer.js@4.6.x`);
}
function artplayerPluginControl() {
return (art)=>{
checkVersion(art);
const { template: { $bottom , $player } , constructor: { utils: { append , secondToTime , addClass , removeClass , hasClass } } } = art;
const className = "artplayer-plugin-control";
addClass($player, className);
const $current = append($bottom, `<div class="apa-control-current"></div>`);
const $duration = append($bottom, `<div class="apa-control-duration"></div>`);
const events = [
"video:loadedmetadata",
"video:timeupdate",
"video:progress"
];
for(let index = 0; index < events.length; index++)art.on(events[index], ()=>{
$current.innerText = secondToTime(art.currentTime);
$duration.innerText = secondToTime(art.duration);
});
return {
name: "artplayerPluginControl",
get enable () {
return hasClass($player, className);
},
set enable (state){
if (state) addClass($player, className);
else removeClass($player, className);
}
};
};
}
exports.default = artplayerPluginControl;
artplayerPluginControl.env = "development";
artplayerPluginControl.version = "1.0.0";
artplayerPluginControl.build = "2022-12-31 21:07:41";
if (typeof document !== "undefined") {
if (!document.getElementById("artplayer-plugin-control")) {
const $style = document.createElement("style");
$style.id = "artplayer-plugin-control";
$style.textContent = (0, _styleLessDefault.default);
document.head.appendChild($style);
}
}
if (typeof window !== "undefined") window["artplayerPluginControl"] = artplayerPluginControl;
},{"bundle-text:./style.less":"cLvfB","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"cLvfB":[function(require,module,exports) {
module.exports = ".artplayer-plugin-control .art-bottom {\n height: 68px;\n max-width: 520px;\n user-select: none;\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000b3;\n background-image: none;\n border-radius: 10px;\n flex-direction: column;\n align-items: center;\n padding: 0;\n font-size: 13px;\n transition: opacity .3s;\n display: flex;\n position: absolute;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n box-shadow: 0 10px 15px -3px #0003, 0 4px 6px -4px #0003;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress {\n width: 65%;\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n display: flex;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails {\n bottom: 35px;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-progress {\n width: 100%;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip {\n top: -40px !important;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls {\n width: 100%;\n height: auto;\n flex: 1;\n padding: 0 5px;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls .art-control-time {\n display: none;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel {\n width: 60px !important;\n}\n\n.artplayer-plugin-control .art-bottom .art-selector-list {\n background-color: #000c !important;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-current, .artplayer-plugin-control .art-bottom .apa-control-duration {\n width: 17.5%;\n justify-content: center;\n line-height: 1;\n display: flex;\n position: absolute;\n top: 10px;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-current {\n left: 0;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-duration {\n right: 0;\n}\n\n.artplayer-plugin-control .art-settings {\n bottom: 85px;\n}\n\n.artplayer-plugin-control.art-control-show .art-subtitle {\n bottom: 80px;\n}\n\n.apa-control-current, .apa-control-duration {\n display: none;\n}\n\n";
},{}],"5dUr6":[function(require,module,exports) {
exports.interopDefault = function(a) {
return a && a.__esModule ? a : {
default: a
};
};
exports.defineInteropFlag = function(a) {
Object.defineProperty(a, "__esModule", {
value: true
});
};
exports.exportAll = function(source, dest) {
Object.keys(source).forEach(function(key) {
if (key === "default" || key === "__esModule" || dest.hasOwnProperty(key)) return;
Object.defineProperty(dest, key, {
enumerable: true,
get: function() {
return source[key];
}
});
});
return dest;
};
exports.export = function(dest, destName, get) {
Object.defineProperty(dest, destName, {
enumerable: true,
get: get
});
};
},{}]},["guaft"], "guaft", "parcelRequire4dc0")
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;;AAEA,SAAS,aAAa,GAAG,EAAE;IACvB,MAAM,EACF,QAAO,EACP,OAAO,EAAE,YAAW,EAAE,CAAA,EACzB,GAAG,IAAI,WAAW;IACnB,MAAM,MAAM,QAAQ,KAAK,CAAC,KAAK,GAAG,CAAC;IACnC,MAAM,QAAQ,GAAG,CAAC,EAAE;IACpB,MAAM,QAAQ,GAAG,CAAC,EAAE,GAAG;IACvB,YACI,QAAQ,SAAS,MACjB,CAAC,aAAa,EAAE,QAAQ,8CAA8C,EAAE,uBAAuB,OAAO,CAAC,gDAAgD,CAAC;AAEhK;AAEe,SAAS,yBAAyB;IAC7C,OAAO,CAAC,MAAQ;QACZ,aAAa;QAEb,MAAM,EACF,UAAU,EAAE,QAAO,EAAE,QAAO,EAAE,CAAA,EAC9B,aAAa,EACT,OAAO,EAAE,OAAM,EAAE,aAAY,EAAE,SAAQ,EAAE,YAAW,EAAE,SAAQ,EAAE,CAAA,EACnE,CAAA,EACJ,GAAG;QAEJ,MAAM,YAAY;QAClB,SAAS,SAAS;QAElB,MAAM,WAAW,OAAO,SAAS,CAAC,uCAAuC,CAAC;QAC1E,MAAM,YAAY,OAAO,SAAS,CAAC,wCAAwC,CAAC;QAE5E,MAAM,SAAS;YAAC;YAAwB;YAAoB;SAAiB;QAE7E,IAAK,IAAI,QAAQ,GAAG,QAAQ,OAAO,MAAM,EAAE,QACvC,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,IAAM;YACxB,SAAS,SAAS,GAAG,aAAa,IAAI,WAAW;YACjD,UAAU,SAAS,GAAG,aAAa,IAAI,QAAQ;QACnD;QAGJ,OAAO;YACH,MAAM;YACN,IAAI,UAAS;gBACT,OAAO,SAAS,SAAS;YAC7B;YACA,IAAI,QAAO,MAAO;gBACd,IAAI,OACA,SAAS,SAAS;qBAElB,YAAY,SAAS;YAE7B;QACJ;IACJ;AACJ;kBAxCwB;AA0CxB,uBAAuB,GAAG;AAC1B,uBAAuB,OAAO;AAC9B,uBAAuB,KAAK;AAE5B,IAAI,OAAO,aAAa,aACpB;IAAA,IAAI,CAAC,SAAS,cAAc,CAAC,6BAA6B;QACtD,MAAM,SAAS,SAAS,aAAa,CAAC;QACtC,OAAO,EAAE,GAAG;QACZ,OAAO,WAAW,GAAG,CAAA,GAAA,yBAAK,AAAD;QACzB,SAAS,IAAI,CAAC,WAAW,CAAC;IAC9B,CAAC;AAAD,CACH;AAED,IAAI,OAAO,WAAW,aAClB,MAAM,CAAC,yBAAyB,GAAG;;;ACxEvC,OAAO,OAAO,GAAG;;;ACAjB,QAAQ,cAAc,GAAG,SAAU,CAAC,EAAE;IACpC,OAAO,KAAK,EAAE,UAAU,GAAG,IAAI;QAAC,SAAS;IAAC,CAAC;AAC7C;AAEA,QAAQ,iBAAiB,GAAG,SAAU,CAAC,EAAE;IACvC,OAAO,cAAc,CAAC,GAAG,cAAc;QAAC,OAAO,IAAI;IAAA;AACrD;AAEA,QAAQ,SAAS,GAAG,SAAU,MAAM,EAAE,IAAI,EAAE;IAC1C,OAAO,IAAI,CAAC,QAAQ,OAAO,CAAC,SAAU,GAAG,EAAE;QACzC,IAAI,QAAQ,aAAa,QAAQ,gBAAgB,KAAK,cAAc,CAAC,MACnE;QAGF,OAAO,cAAc,CAAC,MAAM,KAAK;YAC/B,YAAY,IAAI;YAChB,KAAK,WAAY;gBACf,OAAO,MAAM,CAAC,IAAI;YACpB;QACF;IACF;IAEA,OAAO;AACT;AAEA,QAAQ,MAAM,GAAG,SAAU,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;IAC9C,OAAO,cAAc,CAAC,MAAM,UAAU;QACpC,YAAY,IAAI;QAChB,KAAK;IACP;AACF","sources":["packages/artplayer-plugin-control/src/index.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b06b37497366e99.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["import style from 'bundle-text:./style.less';\n\nfunction checkVersion(art) {\n const {\n version,\n utils: { errorHandle },\n } = art.constructor;\n const arr = version.split('.').map(Number);\n const major = arr[0];\n const minor = arr[1] / 100;\n errorHandle(\n major + minor >= 4.06,\n `Artplayer.js@${version} is not compatible the artplayerPluginControl@${artplayerPluginControl.version}. Please update it to version Artplayer.js@4.6.x`,\n );\n}\n\nexport default function artplayerPluginControl() {\n return (art) => {\n checkVersion(art);\n\n const {\n template: { $bottom, $player },\n constructor: {\n utils: { append, secondToTime, addClass, removeClass, hasClass },\n },\n } = art;\n\n const className = 'artplayer-plugin-control';\n addClass($player, className);\n\n const $current = append($bottom, `<div class=\"apa-control-current\"></div>`);\n const $duration = append($bottom, `<div class=\"apa-control-duration\"></div>`);\n\n const events = ['video:loadedmetadata', 'video:timeupdate', 'video:progress'];\n\n for (let index = 0; index < events.length; index++) {\n art.on(events[index], () => {\n $current.innerText = secondToTime(art.currentTime);\n $duration.innerText = secondToTime(art.duration);\n });\n }\n\n return {\n name: 'artplayerPluginControl',\n get enable() {\n return hasClass($player, className);\n },\n set enable(state) {\n if (state) {\n addClass($player, className);\n } else {\n removeClass($player, className);\n }\n },\n };\n };\n}\n\nartplayerPluginControl.env = process.env.NODE_ENV;\nartplayerPluginControl.version = process.env.APP_VER;\nartplayerPluginControl.build = process.env.BUILD_DATE;\n\nif (typeof document !== 'undefined') {\n if (!document.getElementById('artplayer-plugin-control')) {\n const $style = document.createElement('style');\n $style.id = 'artplayer-plugin-control';\n $style.textContent = style;\n document.head.appendChild($style);\n }\n}\n\nif (typeof window !== 'undefined') {\n window['artplayerPluginControl'] = artplayerPluginControl;\n}\n","module.exports = \"18666cb8629c0715\";","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportLine truncated
+27 -8
View File
@@ -242,13 +242,13 @@ class Artplayer extends (0, _emitterDefault.default) {
return instances;
}
static get version() {
return "4.5.13";
return "4.6.0";
}
static get env() {
return "development";
}
static get build() {
return "2022-12-25 17:41:09";
return "2022-12-31 21:05:45";
}
static get config() {
return 0, _configDefault.default;
@@ -417,7 +417,7 @@ if (typeof window !== "undefined") window["Artplayer"] = Artplayer;
console.log(`%c ArtPlayer %c ${Artplayer.version} %c https://artplayer.org`, "color: #fff; background: #5f5f5f", "color: #fff; background: #4bc729", "");
},{"bundle-text:./style/index.less":"SvnDa","option-validator":"2tbdu","./utils/emitter":"elSLF","./utils":"jmgNb","./scheme":"gL38d","./config":"2ZnKD","./whitelist":"gd0pl","./template":"bDTDS","./i18n":"k0CtI","./player":"35XKf","./control":"faO0X","./contextmenu":"5npaZ","./info":"6vVKE","./subtitle":"4exyO","./events":"dz5ul","./hotkey":"1nFqF","./layer":"fvy8V","./loading":"h8KPY","./notice":"cr1XY","./mask":"llnR4","./icons":"gP6M7","./setting":"e5Aaq","./storage":"feFxw","./plugins":"h1hfO","./mobile":"c9n1Y","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"SvnDa":[function(require,module,exports) {
module.exports = ".art-video-player {\n z-index: 20;\n width: 100%;\n height: 100%;\n zoom: 1;\n color: #eee;\n text-align: left;\n direction: ltr;\n user-select: none;\n -webkit-tap-highlight-color: #0000;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n background-color: #000;\n outline: 0;\n margin: 0 auto;\n font-family: Roboto, Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n display: flex;\n position: relative;\n}\n\n.art-video-player *, .art-video-player :before, .art-video-player :after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: #666;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: #ccc;\n}\n\n.art-video-player .art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1.5;\n display: inline-flex;\n}\n\n.art-video-player .art-icon svg {\n fill: #fff;\n}\n\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n\n@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) {\n .art-video-player .art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000b3 !important;\n }\n}\n\n.art-video-player .art-video {\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: #000;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-poster {\n z-index: 11;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n width: 100%;\n text-align: center;\n color: #fff;\n pointer-events: none;\n text-shadow: 1px 0 1px #000, 0 1px 1px #000, -1px 0 1px #000, 0 -1px 1px #000, 1px 1px 1px #000, -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000;\n padding: 0 20px;\n font-size: 20px;\n transition: bottom .2s;\n display: none;\n position: absolute;\n bottom: 10px;\n}\n\n.art-video-player .art-subtitle p {\n word-break: break-all;\n height: fit-content;\n margin: 5px 0 0;\n line-height: 1.2;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: block;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: 50px;\n}\n\n.art-video-player .art-danmuku {\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers {\n z-index: 40;\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n\n.art-video-player.art-layer-show .art-layers {\n display: block;\n}\n\n.art-video-player .art-mask {\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-mask .art-state {\n width: 60px;\n height: 60px;\n opacity: .85;\n cursor: pointer;\n pointer-events: auto;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n bottom: 65px;\n right: 30px;\n}\n\n.art-video-player.art-mask-show .art-mask {\n display: flex;\n}\n\n.art-video-player.art-mobile .art-state {\n position: static;\n}\n\n.art-video-player .art-loading {\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n\n.art-video-player .art-bottom {\n z-index: 60;\n height: 100px;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n background-image: linear-gradient(to top, #000, #0006, #0000);\n background-position: bottom;\n background-repeat: repeat-x;\n flex-direction: column;\n justify-content: space-between;\n padding: 50px 10px 0;\n transition: all .2s ease-in-out;\n display: flex;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-bottom .art-progress {\n z-index: 0;\n pointer-events: auto;\n flex: 1;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress {\n height: 4px;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n height: 50%;\n width: 100%;\n background: #fff3;\n align-items: center;\n transition: all .2s;\n display: flex;\n posLine truncated
module.exports = ".art-video-player {\n z-index: 20;\n width: 100%;\n height: 100%;\n zoom: 1;\n color: #eee;\n text-align: left;\n direction: ltr;\n user-select: none;\n -webkit-tap-highlight-color: #0000;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n background-color: #000;\n outline: 0;\n margin: 0 auto;\n font-family: Roboto, Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n display: flex;\n position: relative;\n}\n\n.art-video-player *, .art-video-player :before, .art-video-player :after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: #666;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: #ccc;\n}\n\n.art-video-player .art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1.5;\n display: inline-flex;\n}\n\n.art-video-player .art-icon svg {\n fill: #fff;\n}\n\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n\n@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) {\n .art-video-player .art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000b3 !important;\n }\n}\n\n.art-video-player .art-video {\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: #000;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-poster {\n z-index: 11;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n width: 100%;\n text-align: center;\n color: #fff;\n pointer-events: none;\n text-shadow: 1px 0 1px #000, 0 1px 1px #000, -1px 0 1px #000, 0 -1px 1px #000, 1px 1px 1px #000, -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000;\n padding: 0 20px;\n font-size: 20px;\n transition: bottom .2s;\n display: none;\n position: absolute;\n bottom: 10px;\n}\n\n.art-video-player .art-subtitle p {\n word-break: break-all;\n height: fit-content;\n margin: 5px 0 0;\n line-height: 1.2;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: block;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: 50px;\n}\n\n.art-video-player .art-danmuku {\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers {\n z-index: 40;\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n\n.art-video-player.art-layer-show .art-layers {\n display: block;\n}\n\n.art-video-player .art-mask {\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-mask .art-state {\n width: 60px;\n height: 60px;\n opacity: .85;\n cursor: pointer;\n pointer-events: auto;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n bottom: 65px;\n right: 30px;\n}\n\n.art-video-player.art-mask-show .art-mask {\n display: flex;\n}\n\n.art-video-player.art-mobile .art-state {\n position: static;\n}\n\n.art-video-player .art-loading {\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n\n.art-video-player .art-bottom {\n z-index: 60;\n height: 100px;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n background-image: linear-gradient(to top, #000, #0006, #0000);\n background-position: bottom;\n background-repeat: repeat-x;\n flex-direction: column;\n justify-content: space-between;\n padding: 50px 10px 0;\n transition: all .2s ease-in-out;\n display: flex;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-bottom .art-progress {\n z-index: 0;\n pointer-events: auto;\n flex: 1;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress {\n height: 4px;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n height: 100%;\n width: 100%;\n background: #fff3;\n border-radius: 5px;\n align-items: center;\n transition: all .2s;\Line truncated
},{}],"2tbdu":[function(require,module,exports) {
!function(r, t) {
@@ -1265,7 +1265,7 @@ class Template {
<div class="art-info-panel">
<div class="art-info-item">
<div class="art-info-title">Player version:</div>
<div class="art-info-content">${"4.5.13"}</div>
<div class="art-info-content">${"4.6.0"}</div>
</div>
<div class="art-info-item">
<div class="art-info-title">Video url:</div>
@@ -2977,6 +2977,7 @@ class Component {
(0, _dom.addClass)($list, "art-selector-list");
(0, _dom.append)($list, list);
(0, _dom.append)($ref, $list);
if (this.art.option.backdrop) (0, _dom.addClass)($list, "art-backdrop-filter");
const setLeft = ()=>{
const left = (0, _dom.getStyle)($ref, "width") / 2 - (0, _dom.getStyle)($list, "width") / 2;
$list.style.left = `${left}px`;
@@ -3004,6 +3005,8 @@ exports.default = Component;
},{"./dom":"dNynC","option-validator":"2tbdu","../scheme":"gL38d","./property":"91nLd","./error":"622b3","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"bHDMy":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
var _screenfull = require("../libs/screenfull");
var _screenfullDefault = parcelHelpers.interopDefault(_screenfull);
var _utils = require("../utils");
function fullscreen(option) {
return (art)=>({
@@ -3017,8 +3020,8 @@ function fullscreen(option) {
proxy($control, "click", ()=>{
art.fullscreen = !art.fullscreen;
});
art.on("fullscreen", (value)=>{
if (value) {
(0, _screenfullDefault.default).on("change", ()=>{
if (art.fullscreen) {
(0, _utils.tooltip)($control, i18n.get("Exit Fullscreen"));
(0, _utils.setStyle)($fullscreenOn, "display", "none");
(0, _utils.setStyle)($fullscreenOff, "display", "inline-flex");
@@ -3033,7 +3036,7 @@ function fullscreen(option) {
}
exports.default = fullscreen;
},{"../utils":"jmgNb","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"8HUSd":[function(require,module,exports) {
},{"../libs/screenfull":"eQous","../utils":"jmgNb","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"8HUSd":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
var _utils = require("../utils");
@@ -3384,6 +3387,7 @@ function setting(option) {
(0, _utils.append)($control, icons.setting);
proxy($control, "click", ()=>{
art.setting.toggle = true;
art.setting.updateStyle();
});
art.on("setting", (value)=>{
(0, _utils.tooltip)($control, i18n.get(value ? "Hide Setting" : "Show Setting"));
@@ -3719,7 +3723,7 @@ parcelHelpers.defineInteropFlag(exports);
function version(option) {
return {
...option,
html: `<a href="https://artplayer.org" target="_blank">ArtPlayer ${"4.5.13"}</a>`
html: `<a href="https://artplayer.org" target="_blank">ArtPlayer ${"4.6.0"}</a>`
};
}
exports.default = version;
@@ -4694,6 +4698,19 @@ class Setting extends (0, _componentDefault.default) {
}
return $item;
}
updateStyle(width) {
const { controls , constructor , template: { $player , $setting } } = this.art;
if (controls.setting && !(0, _utils.isMobile)) {
const { left: controlLeft , width: controlWidth } = controls.setting.getBoundingClientRect();
const { left: playerlLeft } = $player.getBoundingClientRect();
const settingLeft = controlLeft - playerlLeft + controlWidth / 2 - (width || constructor.SETTING_WIDTH) / 2;
(0, _utils.setStyle)($setting, "left", `${settingLeft}px`);
(0, _utils.setStyle)($setting, "right", "auto");
} else {
(0, _utils.setStyle)($setting, "left", "auto");
(0, _utils.setStyle)($setting, "right", "10px");
}
}
init(option, width) {
const { constructor } = this.art;
if (this.cache.has(option)) {
@@ -4701,6 +4718,7 @@ class Setting extends (0, _componentDefault.default) {
(0, _utils.inverseClass)($panel, "art-current");
(0, _utils.setStyle)(this.$parent, "width", `${$panel.dataset.width}px`);
(0, _utils.setStyle)(this.$parent, "height", `${$panel.dataset.height}px`);
this.updateStyle(Number($panel.dataset.width));
} else {
const $panel1 = (0, _utils.createElement)("div");
(0, _utils.addClass)($panel1, "art-setting-panel");
@@ -4721,6 +4739,7 @@ class Setting extends (0, _componentDefault.default) {
(0, _utils.inverseClass)($panel1, "art-current");
(0, _utils.setStyle)(this.$parent, "width", `${$panel1.dataset.width}px`);
(0, _utils.setStyle)(this.$parent, "height", `${$panel1.dataset.height}px`);
this.updateStyle(Number($panel1.dataset.width));
if (option[0] && option[0].$parentItem && option[0].$parentItem.mounted) option[0].$parentItem.mounted.call(this.art, $panel1, option[0].$parentItem);
}
}
+1 -1
View File
@@ -1 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;;AACA;;AACA;;AACA;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAI,KAAK;AACT,MAAM,YAAY,EAAE;AACL,MAAM,kBAAkB,CAAA,GAAA,uBAAO,AAAD;IACzC,YAAY,MAAM,EAAE,aAAa,CAAE;QAC/B,KAAK;QAEL,IAAI,CAAC,EAAE,GAAG,EAAE;QAEZ,MAAM,cAAc,OAAM,SAAS,CAAC,UAAU,MAAM,EAAE;QACtD,IAAI,CAAC,MAAM,GAAG,CAAA,GAAA,+BAAS,AAAD,EAAE,aAAa,CAAA,GAAA,sBAAM,AAAD;QAE1C,IAAI,CAAC,MAAM,GAAG,KAAK;QACnB,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,QAAQ,GAAG,KAAK;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK;QAEtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA,GAAA,yBAAS,AAAD,EAAE,IAAI;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA,GAAA,wBAAQ,AAAD,EAAE,IAAI;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;QAE7B,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA,GAAA,qBAAK,AAAD,EAAE,IAAI;YAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA,GAAA,oBAAI,AAAD,EAAE,IAAI;YACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;YAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;YAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,qBAAK,AAAD,EAAE,IAAI;YAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAChC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA,GAAA,2BAAW,AAAD,EAAE,IAAI;YACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA,GAAA,wBAAQ,AAAD,EAAE,IAAI;YACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA,GAAA,oBAAI,AAAD,EAAE,IAAI;YACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;YAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA,GAAA,oBAAI,AAAD,EAAE,IAAI;YACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;QACnC,OACI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;QAGjC,IAAI,OAAO,kBAAkB,YACzB,IAAI,CAAC,EAAE,CAAC,SAAS,IAAM,cAAc,IAAI,CAAC,IAAI,EAAE,IAAI;QAGxD,IAAI,UAAU,KAAK,EAAE;YACjB,MAAM,MAAM,CAAC,MAAQ,QAAQ,GAAG,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;YAC7D,IAAI,aAAa,UAAU,OAAO;YAClC,IAAI,SAAS,UAAU,GAAG;YAC1B,IAAI,WAAW,UAAU,KAAK;YAC9B,IAAK,IAAI,QAAQ,GAAG,QAAQ,CAAA,GAAA,sBAAM,AAAD,EAAE,MAAM,CAAC,MAAM,EAAE,QAC9C,IAAI,CAAC,EAAE,CAAC,WAAW,CAAA,GAAA,sBAAM,AAAD,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,QAAU,IAAI,WAAW,MAAM,IAAI;QAErF,CAAC;QAED,UAAU,IAAI,CAAC,IAAI;IACvB;IAEA,WAAW,YAAY;QACnB,OAAO;IACX;IAEA,WAAW,UAAU;QACjB;IACJ;IAEA,WAAW,MAAM;QACb;IACJ;IAEA,WAAW,QAAQ;QACf;IACJ;IAEA,WAAW,SAAS;QAChB,OAAO,GAAA,sBAAM;IACjB;IAEA,WAAW,QAAQ;QACf,OAAO;IACX;IAEA,WAAW,SAAS;QAChB,OAAO,GAAA,sBAAM;IACjB;IAEA,WAAW,UAAU;QACjB,OAAO,GAAA,uBAAO;IAClB;IAEA,WAAW,YAAY;QACnB,OAAO,GAAA,+BAAS;IACpB;IAEA,WAAW,SAAS;QAChB,OAAO,CAAA,GAAA,+BAAS,AAAD,EAAE,MAAM;IAC3B;IAEA,WAAW,OAAO;QACd,OAAO,CAAA,GAAA,wBAAQ,AAAD,EAAE,IAAI;IACxB;IAEA,WAAW,SAAS;QAChB,OAAO;YACH,IAAI;YACJ,WAAW;YACX,KAAK;YACL,QAAQ;YACR,OAAO;YACP,MAAM;YACN,OAAO;YACP,QAAQ;YACR,QAAQ,KAAK;YACb,OAAO,KAAK;YACZ,UAAU,KAAK;YACf,UAAU,KAAK;YACf,UAAU,KAAK;YACf,MAAM,KAAK;YACX,MAAM,KAAK;YACX,cAAc,KAAK;YACnB,aAAa,KAAK;YAClB,YAAY,KAAK;YACjB,SAAS,KAAK;YACd,QAAQ,IAAI;YACZ,KAAK,KAAK;YACV,OAAO,IAAI;YACX,UAAU,IAAI;YACd,YAAY,KAAK;YACjB,eAAe,KAAK;YACpB,gBAAgB,KAAK;YACrB,iBAAiB,KAAK;YACtB,QAAQ,KAAK;YACb,aAAa,IAAI;YACjB,MAAM,KAAK;YACX,aAAa,KAAK;YAClB,cAAc,KAAK;YACnB,iBAAiB,KAAK;YACtB,SAAS,KAAK;YACd,QAAQ,EAAE;YACV,aAAa,EAAE;YACf,UAAU,EAAE;YACZ,UAAU,EAAE;YACZ,SAAS,EAAE;YACX,WAAW,EAAE;YACb,SAAS,EAAE;YACX,WAAW,EAAE;YACb,YAAY;gBACR,KAAK;gBACL,QAAQ;gBACR,QAAQ;gBACR,OAAO;gBACP,QAAQ;YACZ;YACA,UAAU;gBACN,KAAK;gBACL,MAAM;gBACN,OAAO,CAAC;gBACR,UAAU;YACd;YACA,eAAe;gBACX,UAAU,KAAK;gBACf,SAAS,OAAM,QAAQ,GAAG,SAAS,UAAU;YACjD;YACA,OAAO,CAAC;YACR,YAAY,CAAC;YACb,MAAM,UAAU,QAAQ,CAAC,WAAW;QACxC;IACJ;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK;IAC5B;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK;IAC9B;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM;IAC/B;IAEA,QAAQ,aAAa,IAAI,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,OAAO;QACnB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACtB,UAAU,MAAM,CAAC,UAAU,OAAO,CAAC,IAAI,GAAG;QAC1C,IAAI,CAAC,SAAS,GAAG,IAAI;QACrB,IAAI,CAAC,IAAI,CAAC;IACd;AACJ;kBA3LqB;AA6LrB,UAAU,KAAK,GAAG,KAAK;AACvB,UAAU,WAAW,GAAG,IAAI;AAC5B,UAAU,WAAW,GAAG;AACxB,UAAU,aAAa,GAAG;AAC1B,UAAU,kBAAkB,GAAG;AAC/B,UAAU,mBAAmB,GAAG;AAChC,UAAU,cAAc,GAAG;AAC3B,UAAU,mBAAmB,GAAG;AAChC,UAAU,qBAAqB,GAAG;AAClC,UAAU,0BAA0B,GAAG;AACvC,UAAU,kBAAkB,GAAG;AAC/B,UAAU,mBAAmB,GAAG;AAChC,UAAU,WAAW,GAAG;AACxB,UAAU,WAAW,GAAG;AACxB,UAAU,UAAU,GAAG;AACvB,UAAU,iBAAiB,GAAG;AAC9B,UAAU,iBAAiB,GAAG;AAC9B,UAAU,qBAAqB,GAAG;AAClC,UAAU,kBAAkB,GAAG;AAC/B,UAAU,oBAAoB,GAAG;AACjC,UAAU,iBAAiB,GAAG;AAC9B,UAAU,aAAa,GAAG;AAC1B,UAAU,wBAAwB,GAAG;AACrC,UAAU,6BAA6B,GAAG;AAC1C,UAAU,4BAA4B,GAAG;AACzC,UAAU,cAAc,GAAG;AAC3B,UAAU,kBAAkB,GAAG;AAC/B,UAAU,iBAAiB,GAAG;AAC9B,UAAU,gBAAgB,GAAG;AAC7B,UAAU,WAAW,GAAG;AACxB,UAAU,SAAS,GAAG;AACtB,UAAU,eAAe,GAAG;AAC5B,UAAU,aAAa,GAAG;IAAC;IAAK;IAAM;IAAG;IAAM;IAAK;Line truncated
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;;AACA;;AACA;;AACA;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAI,KAAK;AACT,MAAM,YAAY,EAAE;AACL,MAAM,kBAAkB,CAAA,GAAA,uBAAO,AAAD;IACzC,YAAY,MAAM,EAAE,aAAa,CAAE;QAC/B,KAAK;QAEL,IAAI,CAAC,EAAE,GAAG,EAAE;QAEZ,MAAM,cAAc,OAAM,SAAS,CAAC,UAAU,MAAM,EAAE;QACtD,IAAI,CAAC,MAAM,GAAG,CAAA,GAAA,+BAAS,AAAD,EAAE,aAAa,CAAA,GAAA,sBAAM,AAAD;QAE1C,IAAI,CAAC,MAAM,GAAG,KAAK;QACnB,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK;QACpB,IAAI,CAAC,QAAQ,GAAG,KAAK;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK;QAEtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA,GAAA,yBAAS,AAAD,EAAE,IAAI;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA,GAAA,wBAAQ,AAAD,EAAE,IAAI;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;QAE7B,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA,GAAA,qBAAK,AAAD,EAAE,IAAI;YAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA,GAAA,oBAAI,AAAD,EAAE,IAAI;YACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;YAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;YAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,qBAAK,AAAD,EAAE,IAAI;YAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAChC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA,GAAA,2BAAW,AAAD,EAAE,IAAI;YACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA,GAAA,wBAAQ,AAAD,EAAE,IAAI;YACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA,GAAA,oBAAI,AAAD,EAAE,IAAI;YACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;YAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA,GAAA,oBAAI,AAAD,EAAE,IAAI;YACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;YAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,AAAD,EAAE,IAAI;QACnC,OACI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA,GAAA,sBAAM,AAAD,EAAE,IAAI;QAGjC,IAAI,OAAO,kBAAkB,YACzB,IAAI,CAAC,EAAE,CAAC,SAAS,IAAM,cAAc,IAAI,CAAC,IAAI,EAAE,IAAI;QAGxD,IAAI,UAAU,KAAK,EAAE;YACjB,MAAM,MAAM,CAAC,MAAQ,QAAQ,GAAG,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;YAC7D,IAAI,aAAa,UAAU,OAAO;YAClC,IAAI,SAAS,UAAU,GAAG;YAC1B,IAAI,WAAW,UAAU,KAAK;YAC9B,IAAK,IAAI,QAAQ,GAAG,QAAQ,CAAA,GAAA,sBAAM,AAAD,EAAE,MAAM,CAAC,MAAM,EAAE,QAC9C,IAAI,CAAC,EAAE,CAAC,WAAW,CAAA,GAAA,sBAAM,AAAD,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,QAAU,IAAI,WAAW,MAAM,IAAI;QAErF,CAAC;QAED,UAAU,IAAI,CAAC,IAAI;IACvB;IAEA,WAAW,YAAY;QACnB,OAAO;IACX;IAEA,WAAW,UAAU;QACjB;IACJ;IAEA,WAAW,MAAM;QACb;IACJ;IAEA,WAAW,QAAQ;QACf;IACJ;IAEA,WAAW,SAAS;QAChB,OAAO,GAAA,sBAAM;IACjB;IAEA,WAAW,QAAQ;QACf,OAAO;IACX;IAEA,WAAW,SAAS;QAChB,OAAO,GAAA,sBAAM;IACjB;IAEA,WAAW,UAAU;QACjB,OAAO,GAAA,uBAAO;IAClB;IAEA,WAAW,YAAY;QACnB,OAAO,GAAA,+BAAS;IACpB;IAEA,WAAW,SAAS;QAChB,OAAO,CAAA,GAAA,+BAAS,AAAD,EAAE,MAAM;IAC3B;IAEA,WAAW,OAAO;QACd,OAAO,CAAA,GAAA,wBAAQ,AAAD,EAAE,IAAI;IACxB;IAEA,WAAW,SAAS;QAChB,OAAO;YACH,IAAI;YACJ,WAAW;YACX,KAAK;YACL,QAAQ;YACR,OAAO;YACP,MAAM;YACN,OAAO;YACP,QAAQ;YACR,QAAQ,KAAK;YACb,OAAO,KAAK;YACZ,UAAU,KAAK;YACf,UAAU,KAAK;YACf,UAAU,KAAK;YACf,MAAM,KAAK;YACX,MAAM,KAAK;YACX,cAAc,KAAK;YACnB,aAAa,KAAK;YAClB,YAAY,KAAK;YACjB,SAAS,KAAK;YACd,QAAQ,IAAI;YACZ,KAAK,KAAK;YACV,OAAO,IAAI;YACX,UAAU,IAAI;YACd,YAAY,KAAK;YACjB,eAAe,KAAK;YACpB,gBAAgB,KAAK;YACrB,iBAAiB,KAAK;YACtB,QAAQ,KAAK;YACb,aAAa,IAAI;YACjB,MAAM,KAAK;YACX,aAAa,KAAK;YAClB,cAAc,KAAK;YACnB,iBAAiB,KAAK;YACtB,SAAS,KAAK;YACd,QAAQ,EAAE;YACV,aAAa,EAAE;YACf,UAAU,EAAE;YACZ,UAAU,EAAE;YACZ,SAAS,EAAE;YACX,WAAW,EAAE;YACb,SAAS,EAAE;YACX,WAAW,EAAE;YACb,YAAY;gBACR,KAAK;gBACL,QAAQ;gBACR,QAAQ;gBACR,OAAO;gBACP,QAAQ;YACZ;YACA,UAAU;gBACN,KAAK;gBACL,MAAM;gBACN,OAAO,CAAC;gBACR,UAAU;YACd;YACA,eAAe;gBACX,UAAU,KAAK;gBACf,SAAS,OAAM,QAAQ,GAAG,SAAS,UAAU;YACjD;YACA,OAAO,CAAC;YACR,YAAY,CAAC;YACb,MAAM,UAAU,QAAQ,CAAC,WAAW;QACxC;IACJ;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK;IAC5B;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK;IAC9B;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM;IAC/B;IAEA,QAAQ,aAAa,IAAI,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,OAAO;QACnB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACtB,UAAU,MAAM,CAAC,UAAU,OAAO,CAAC,IAAI,GAAG;QAC1C,IAAI,CAAC,SAAS,GAAG,IAAI;QACrB,IAAI,CAAC,IAAI,CAAC;IACd;AACJ;kBA3LqB;AA6LrB,UAAU,KAAK,GAAG,KAAK;AACvB,UAAU,WAAW,GAAG,IAAI;AAC5B,UAAU,WAAW,GAAG;AACxB,UAAU,aAAa,GAAG;AAC1B,UAAU,kBAAkB,GAAG;AAC/B,UAAU,mBAAmB,GAAG;AAChC,UAAU,cAAc,GAAG;AAC3B,UAAU,mBAAmB,GAAG;AAChC,UAAU,qBAAqB,GAAG;AAClC,UAAU,0BAA0B,GAAG;AACvC,UAAU,kBAAkB,GAAG;AAC/B,UAAU,mBAAmB,GAAG;AAChC,UAAU,WAAW,GAAG;AACxB,UAAU,WAAW,GAAG;AACxB,UAAU,UAAU,GAAG;AACvB,UAAU,iBAAiB,GAAG;AAC9B,UAAU,iBAAiB,GAAG;AAC9B,UAAU,qBAAqB,GAAG;AAClC,UAAU,kBAAkB,GAAG;AAC/B,UAAU,oBAAoB,GAAG;AACjC,UAAU,iBAAiB,GAAG;AAC9B,UAAU,aAAa,GAAG;AAC1B,UAAU,wBAAwB,GAAG;AACrC,UAAU,6BAA6B,GAAG;AAC1C,UAAU,4BAA4B,GAAG;AACzC,UAAU,cAAc,GAAG;AAC3B,UAAU,kBAAkB,GAAG;AAC/B,UAAU,iBAAiB,GAAG;AAC9B,UAAU,gBAAgB,GAAG;AAC7B,UAAU,WAAW,GAAG;AACxB,UAAU,SAAS,GAAG;AACtB,UAAU,eAAe,GAAG;AAC5B,UAAU,aAAa,GAAG;IAAC;IAAK;IAAM;IAAG;IAAM;IAAK;Line truncated
+1
View File
@@ -0,0 +1 @@
define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.3"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.3"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},h=t=>[a.prefix,t,a.suffix].filter((t=>t&&t.length>0)).join("-"),u=t=>t||h(a.precache),l=t=>t||h(a.runtime);function f(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.5.3"]&&_()}catch(t){}function w(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class d{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class p{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let y;async function g(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===y){const t=new Response("");if("body"in t)try{new Response(t.body),y=!0}catch(t){y=!1}y=!1}return y}()?i.body:await i.blob();return new Response(c,o)}function R(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class m{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const v=new Set;try{self["workbox:strategies:6.5.3"]&&_()}catch(t){}function q(t){return"string"==typeof t?new Request(t):t}class U{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new m,this.g=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{}Line truncated
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a.parcelRequire4dc0&&a.parcelRequire4dc0,o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,l){if(!o[n]){if(!e[n]){var t="function"==typeof a.parcelRequire4dc0&&a.parcelRequire4dc0;if(!l&&t)return t(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},u.cache={};var s=o[n]=new p.Module(n);e[n][0].call(s.exports,u,s,s.exports,this)}return o[n].exports;function u(e){var n=u.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=r,p.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(p,"root",{get:function(){return a.parcelRequire4dc0}}),a.parcelRequire4dc0=p;for(var s=0;s<n.length;s++)p(n[s]);var u=p(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({hUYA0:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:p,append:s,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function $(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():$()}),1e3))}function O(){b||clearTimeout(h)}function P(){w||(w=!0,function(){n.template.$ads=s(l,'<div class="artplayer-plugin-ads"></div>'),c=s(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=s(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),s(v,o),y=s(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=p(".artplayer-plugin-ads-close",y),g=p(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=s(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=p(".artplayer-plugin-ads-detail",m),x=p(".artplayer-plugin-ads-muted",m),h=p(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const l=s(x,t),a=s(x,i);u(a,"display","none"),e.muted&&(c.muted=!0,u(l,"display","none"),u(a,"display","inline-flex")),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(l,"display","none"),u(a,"display","inline-flex")):(u(l,"display","inline-flex"),u(a,"display","none"))}))}else u(x,"display","none");const b=s(h,a),w=s(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{$(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):($(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?O():$()})))}return n.on("ready",(()=>{n.once("play",P),n.once("video:playing",P)})),{name:"artplayerPluginAds",skip:k,pause:O,play:$}}}if(l.default=r,r.env="production",r.version="1.0.6",r.build="2022-12-14 23:13:37","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("stylLine truncated
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=r,s.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(s,"root",{get:function(){return a[t]}}),a[t]=s;for(var p=0;p<n.length;p++)s(n[p]);if(l){var u=s(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({hUYA0:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:s,append:p,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function $(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():$()}),1e3))}function O(){b||clearTimeout(h)}function P(){w||(w=!0,function(){n.template.$ads=p(l,'<div class="artplayer-plugin-ads"></div>'),c=p(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=p(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),p(v,o),y=p(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=s(".artplayer-plugin-ads-close",y),g=s(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=p(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=s(".artplayer-plugin-ads-detail",m),x=s(".artplayer-plugin-ads-muted",m),h=s(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const l=p(x,t),a=p(x,i);u(a,"display","none"),e.muted&&(c.muted=!0,u(l,"display","none"),u(a,"display","inline-flex")),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(l,"display","none"),u(a,"display","inline-flex")):(u(l,"display","inline-flex"),u(a,"display","none"))}))}else u(x,"display","none");const b=p(h,a),w=p(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{$(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):($(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?O():$()})))}return n.on("ready",(()=>{n.once("play",P),n.once("video:playing",P)})),{name:"artplayerPluginAds",skip:k,pause:O,play:$}}}if(l.default=r,r.env="production",r.version="1.0.6",r.build="2022-12-31 21:04:21","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(eLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,n,t,l,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,o=a.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,t){if(!o[n]){if(!e[n]){var l="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!t&&l)return l(n,!0);if(a)return a(n,!0);if(d&&"string"==typeof n)return d(n);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}p.resolve=function(t){var l=e[n][1][t];return null!=l?l:t},p.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,p,u,u.exports,this)}return o[n].exports;function p(e){var n=p.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=a,s.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=s;for(var u=0;u<n.length;u++)s(n[u]);var p=s(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({hs8jd:[function(e,n,t){var l=e("@parcel/transformer-js/src/esmodule-helpers.js");l.defineInteropFlag(t);var r=e("@swc/helpers/src/_object_spread.mjs"),i=l.interopDefault(r),a=e("bundle-text:./style.less"),o=l.interopDefault(a);function d(e){return function(n){var t=n.template.$player,l=n.icons,r=l.volume,a=l.volumeClose,o=l.fullscreenOn,d=l.fullscreenOff,s=l.loading,u=n.constructor,p=u.validator,c=u.utils,f=c.query,y=c.append,g=c.setStyle;e=p((0,i.default)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var m=null,v=null,h=null,x=null,b=null,j=null,w=0,O=null,D=!1,P=!1,_=!1;function k(e,n){return n.replace("%s",e)}function T(){D=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function q(){D||(O=setTimeout((function(){w+=1;var n=e.playDuration-w;n>=1?h.innerHTML=k(n,e.i18n.canBeClosed):(h.innerHTML=e.i18n.close,_||(_=!0)),x.innerHTML=k(e.totalDuration-w,e.i18n.countdown),w>=e.totalDuration?T():q()}),1e3))}function M(){D||clearTimeout(O)}function A(){P||(P=!0,function(){n.template.$ads=y(t,'<div class="artplayer-plugin-ads"></div>'),m=y(n.template.$ads,e.video?'<video class="artplayer-plugin-ads-video" src="'.concat(e.video,'" loop playsInline></video>'):'<div class="artplayer-plugin-ads-html">'.concat(e.html,"</div>")),j=y(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),y(j,s),v=y(n.template.$ads,'<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">'.concat(e.playDuration<=0?e.i18n.close:k(e.playDuration,e.i18n.canBeClosed),'</div><div class="artplayer-plugin-ads-countdown">').concat(k(e.totalDuration,e.i18n.countdown),"</div></div>")),h=f(".artplayer-plugin-ads-close",v),x=f(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(h,"display","none"),n.proxy(h,"click",(function(){_&&T()})),b=y(n.template.$ads,'<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">'.concat(e.i18n.detail,'</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>'));var l=f(".artplayer-plugin-ads-detail",b),i=f(".artplayer-plugin-ads-muted",b),u=f(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",(function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)})):g(l,"display","none"),e.video){var p=y(i,r),c=y(i,a);g(c,"display","none"),e.muted&&(m.muted=!0,g(p,"display","none"),g(c,"display","inline-flex")),n.proxy(i,"click",(function(){m.muted=!m.muted,m.muted?(g(p,"display","none"),g(c,"display","inline-flex")):(g(p,"display","inline-flex"),g(c,"display","none"))}))}else g(i,"display","none");var w=y(u,o),O=y(u,d);g(O,"display","none"),n.proxy(u,"click",(function(){n.fullscreen=!n.fullscreen,n.fullscreen?(g(w,"display","inline-flex"),g(O,"display","none")):(g(w,"display","none"),g(O,"display","inline-flex"))})),n.proxy(m,"click",(function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(m,"error",T),n.proxy(m,"loadedmetadata",(function(){q(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(j,"display","none")}))):(q(),g(v,"display","flex"),g(b,"display","flex"),g(j,"display","none")),n.proxy(document,"visibilitychange",(function(){document.hidden?M():q()})))}return n.on("ready",(function(){n.once("play",A),n.once("video:playing",A)})),{name:"artplayerPluginAds",skip:T,pause:M,play:q}}}if(Line truncated
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=r,s.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(s,"root",{get:function(){return a[t]}}),a[t]=s;for(var p=0;p<n.length;p++)s(n[p]);if(l){var u=s(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({hs8jd:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:s,append:p,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function P(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():P()}),1e3))}function $(){b||clearTimeout(h)}function O(){w||(w=!0,function(){n.template.$ads=p(l,'<div class="artplayer-plugin-ads"></div>'),c=p(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=p(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),p(v,o),y=p(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=s(".artplayer-plugin-ads-close",y),g=s(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=p(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=s(".artplayer-plugin-ads-detail",m),x=s(".artplayer-plugin-ads-muted",m),h=s(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const l=p(x,t),a=p(x,i);u(a,"display","none"),e.muted&&(c.muted=!0,u(l,"display","none"),u(a,"display","inline-flex")),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(l,"display","none"),u(a,"display","inline-flex")):(u(l,"display","inline-flex"),u(a,"display","none"))}))}else u(x,"display","none");const b=p(h,a),w=p(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{P(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):(P(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?$():P()})))}return n.on("ready",(()=>{n.once("play",O),n.once("video:playing",O)})),{name:"artplayerPluginAds",skip:k,pause:$,play:P}}}if(l.default=r,r.env="production",r.version="1.0.6",r.build="2022-12-31 21:04:22","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(eLine truncated
@@ -0,0 +1,10 @@
node_modules
.DS_Store
yarn.lock
package-lock.json
test
coverage
.nyc_output
.parcel-cache
.cache
docs
+1
View File
@@ -0,0 +1 @@
package-lock=false
@@ -0,0 +1,11 @@
# artplayer-plugin-control
Control plugin for ArtPlayer
## Demo
[https://artplayer.org](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-control/index.js&example=control)
## License
MIT © Harvey Zack
@@ -0,0 +1,7 @@
/*!
* artplayer-plugin-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],l=a.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!l[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(p&&"string"==typeof r)return p(r);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}c.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},c.cache={};var s=l[r]=new u.Module(r);e[r][0].call(s.exports,c,s,s.exports,this)}return l[r].exports;function c(e){var r=c.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var d=0;d<r.length;d++)u(r[d]);if(t){var s=u(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({"19iYR":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t);var o=e("bundle-text:./style.less"),i=n.interopDefault(o);function a(){return e=>{!function(e){const{version:r,utils:{errorHandle:t}}=e.constructor,n=r.split(".").map(Number);t(n[0]+n[1]/100>=4.06,`Artplayer.js@${r} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@4.6.x`)}(e);const{template:{$bottom:r},constructor:{utils:{append:t,secondToTime:n,addClass:o}}}=e;o(r,"artplayer-plugin-control");const i=t(r,'<div class="apa-control-current"></div>'),l=t(r,'<div class="apa-control-duration"></div>'),p=["video:loadedmetadata","video:timeupdate","video:progress"];for(let r=0;r<p.length;r++)e.on(p[r],(()=>{i.innerText=n(e.currentTime),l.innerText=n(e.duration)}));return{name:"artplayerPluginControl"}}}if(t.default=a,a.env="production",a.version="1.0.0",a.build="2022-12-31 19:31:41","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=i.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"71LXF","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"71LXF":[function(e,r,t){r.exports=".art-video-player .artplayer-plugin-control{height:68px;max-width:520px;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.art-video-player .artplayer-plugin-control .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.art-video-player .artplayer-plugin-control .art-progress .art-control-thumbnails{border-radius:5px;bottom:35px}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress{width:100%}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-control-progress-inner{height:100%;border-radius:5px}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-progress-loaded,.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-progress-played{border-radius:5px}.art-video-player .artplayer-plugin-control .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.art-video-player .artplayer-plugin-control .art-controls .art-control-time{display:none}.art-video-player .artplayer-plugin-control .art-controls .art-volume-panel{width:60px!important}.art-video-player .artplayer-plugin-control .apa-control-current,.art-video-player .artplayer-plugin-control .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.art-video-player .artplayer-plugin-control .apa-control-current{left:0}.art-video-player .artplayer-plugin-control .apa-control-duration{right:0}.art-video-player.art-control-show .art-subtitle{bottom:80px}"},{}],"9pCYc":[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach((function(t){"default"===t||"__esModule"===t||r.hasOwnProperty(t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})})),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}]},["19iYR"],"19iYR","parcelRequire4dc0");
@@ -0,0 +1,7 @@
/*!
* artplayer-plugin-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,r,t,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],l=i.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!l[r]){if(!e[r]){var o="function"==typeof a[n]&&a[n];if(!t&&o)return o(r,!0);if(i)return i(r,!0);if(p&&"string"==typeof r)return p(r);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}c.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},c.cache={};var s=l[r]=new u.Module(r);e[r][0].call(s.exports,c,s,s.exports,this)}return l[r].exports;function c(e){var r=c.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=i,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return a[n]}}),a[n]=u;for(var d=0;d<r.length;d++)u(r[d]);if(t){var s=u(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({"1MB70":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t);var o=e("bundle-text:./style.less"),a=n.interopDefault(o);function i(){return e=>{!function(e){const{version:r,utils:{errorHandle:t}}=e.constructor,n=r.split(".").map(Number);t(n[0]+n[1]/100>=4.06,`Artplayer.js@${r} is not compatible the artplayerPluginControl@${i.version}. Please update it to version Artplayer.js@4.6.x`)}(e);const{template:{$bottom:r},constructor:{utils:{append:t,secondToTime:n,addClass:o}}}=e;o(r,"artplayer-plugin-control");const a=t(r,'<div class="apa-control-current"></div>'),l=t(r,'<div class="apa-control-duration"></div>'),p=["video:loadedmetadata","video:timeupdate","video:progress"];for(let r=0;r<p.length;r++)e.on(p[r],(()=>{a.innerText=n(e.currentTime),l.innerText=n(e.duration)}));return{name:"artplayerPluginControl"}}}if(t.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-31 19:31:42","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=i)},{"bundle-text:./style.less":"k4YuG","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],k4YuG:[function(e,r,t){r.exports=".art-video-player .artplayer-plugin-control{height:68px;max-width:520px;-webkit-user-select:none;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);-webkit-backdrop-filter:saturate(180%)blur(20px);-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.art-video-player .artplayer-plugin-control .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.art-video-player .artplayer-plugin-control .art-progress .art-control-thumbnails{border-radius:5px;bottom:35px}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress{width:100%}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-control-progress-inner{height:100%;border-radius:5px}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-progress-loaded,.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-progress-played{border-radius:5px}.art-video-player .artplayer-plugin-control .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.art-video-player .artplayer-plugin-control .art-controls .art-control-time{display:none}.art-video-player .artplayer-plugin-control .art-controls .art-volume-panel{width:60px!important}.art-video-player .artplayer-plugin-control .apa-control-current,.art-video-player .artplayer-plugin-control .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.art-video-player .artplayer-plugin-control .apa-control-current{left:0}.art-video-player .artplayer-plugin-control .apa-control-duration{right:0}.art-video-player.art-control-show .art-subtitle{bottom:80px}"},{}],"47PTV":[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach((function(t){"default"===t||"__esModule"===t||r.hasOwnProperty(t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})})),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,getLine truncated
@@ -0,0 +1,7 @@
/*!
* artplayer-plugin-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,o,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof a[o]&&a[o],i=l.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!i[e]){if(!t[e]){var n="function"==typeof a[o]&&a[o];if(!r&&n)return n(e,!0);if(l)return l(e,!0);if(p&&"string"==typeof e)return p(e);var c=new Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var o=t[e][1][r];return null!=o?o:r},d.cache={};var s=i[e]=new u.Module(e);t[e][0].call(s.exports,d,s,s.exports,this)}return i[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=i,u.parent=l,u.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[o]}}),a[o]=u;for(var c=0;c<e.length;c++)u(e[c]);if(r){var s=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({"16V0T":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=t("bundle-text:./style.less"),a=o.interopDefault(n);function l(){return t=>{!function(t){const{version:e,utils:{errorHandle:r}}=t.constructor,o=e.split(".").map(Number);r(o[0]+o[1]/100>=4.06,`Artplayer.js@${e} is not compatible the artplayerPluginControl@${l.version}. Please update it to version Artplayer.js@4.6.x`)}(t);const{template:{$bottom:e,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:a}}}=t;a(r,"artplayer-plugin-control");const i=o(e,'<div class="apa-control-current"></div>'),p=o(e,'<div class="apa-control-duration"></div>'),u=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e<u.length;e++)t.on(u[e],(()=>{i.innerText=n(t.currentTime),p.innerText=n(t.duration)}));return{name:"artplayerPluginControl"}}}if(r.default=l,l.env="production",l.version="1.0.0",l.build="2022-12-31 21:04:23","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const t=document.createElement("style");t.id="artplayer-plugin-control",t.textContent=a.default,document.head.appendChild(t)}"undefined"!=typeof window&&(window.artplayerPluginControl=l)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(t,e,r){e.exports=".artplayer-plugin-control .art-bottom{height:68px;max-width:520px;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails{bottom:35px}.artplayer-plugin-control .art-bottom .art-progress .art-control-progress{width:100%}.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip{top:-40px!important}.artplayer-plugin-control .art-bottom .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.artplayer-plugin-control .art-bottom .art-controls .art-control-time{display:none}.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel{width:60px!important}.artplayer-plugin-control .art-bottom .art-selector-list{background-color:#000c!important}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control.art-control-show .art-subtitle{bottom:80px}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach((function(r){"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0");
@@ -0,0 +1,7 @@
/*!
* artplayer-plugin-control.js v1.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,o,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof a[o]&&a[o],i=l.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!i[e]){if(!t[e]){var n="function"==typeof a[o]&&a[o];if(!r&&n)return n(e,!0);if(l)return l(e,!0);if(p&&"string"==typeof e)return p(e);var c=new Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var o=t[e][1][r];return null!=o?o:r},d.cache={};var s=i[e]=new u.Module(e);t[e][0].call(s.exports,d,s,s.exports,this)}return i[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=i,u.parent=l,u.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[o]}}),a[o]=u;for(var c=0;c<e.length;c++)u(e[c]);if(r){var s=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({d3G6W:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=t("bundle-text:./style.less"),a=o.interopDefault(n);function l(){return t=>{!function(t){const{version:e,utils:{errorHandle:r}}=t.constructor,o=e.split(".").map(Number);r(o[0]+o[1]/100>=4.06,`Artplayer.js@${e} is not compatible the artplayerPluginControl@${l.version}. Please update it to version Artplayer.js@4.6.x`)}(t);const{template:{$bottom:e,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:a}}}=t;a(r,"artplayer-plugin-control");const i=o(e,'<div class="apa-control-current"></div>'),p=o(e,'<div class="apa-control-duration"></div>'),u=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e<u.length;e++)t.on(u[e],(()=>{i.innerText=n(t.currentTime),p.innerText=n(t.duration)}));return{name:"artplayerPluginControl"}}}if(r.default=l,l.env="production",l.version="1.0.0",l.build="2022-12-31 21:04:24","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const t=document.createElement("style");t.id="artplayer-plugin-control",t.textContent=a.default,document.head.appendChild(t)}"undefined"!=typeof window&&(window.artplayerPluginControl=l)},{"bundle-text:./style.less":"8jCnX","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"8jCnX":[function(t,e,r){e.exports=".artplayer-plugin-control .art-bottom{height:68px;max-width:520px;-webkit-user-select:none;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);-webkit-backdrop-filter:saturate(180%)blur(20px);-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails{bottom:35px}.artplayer-plugin-control .art-bottom .art-progress .art-control-progress{width:100%}.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip{top:-40px!important}.artplayer-plugin-control .art-bottom .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.artplayer-plugin-control .art-bottom .art-controls .art-control-time{display:none}.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel{width:60px!important}.artplayer-plugin-control .art-bottom .art-selector-list{background-color:#000c!important}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control.art-control-show .art-subtitle{bottom:80px}.apa-control-current,.apa-control-duration{display:none}"},{}],"47PTV":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach((function(r){"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}]},["d3G6W"],"d3G6W","parcelRequire4dc0");
@@ -0,0 +1,24 @@
{
"license": "MIT",
"version": "1.0.0",
"name": "artplayer-plugin-control",
"types": "types/artplayer-plugin-control.d.ts",
"description": "Control plugin for ArtPlayer",
"main": "dist/artplayer-plugin-control.js",
"legacy": "dist/artplayer-plugin-control.legacy.js",
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
"browserslist": "> 0.5%, last 2 versions, not dead",
"homepage": "https://artplayer.org",
"repository": {
"type": "git",
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
},
"bugs": {
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
},
"keywords": [
"html5",
"video",
"player"
]
}
@@ -0,0 +1,74 @@
import style from 'bundle-text:./style.less';
function checkVersion(art) {
const {
version,
utils: { errorHandle },
} = art.constructor;
const arr = version.split('.').map(Number);
const major = arr[0];
const minor = arr[1] / 100;
errorHandle(
major + minor >= 4.06,
`Artplayer.js@${version} is not compatible the artplayerPluginControl@${artplayerPluginControl.version}. Please update it to version Artplayer.js@4.6.x`,
);
}
export default function artplayerPluginControl() {
return (art) => {
checkVersion(art);
const {
template: { $bottom, $player },
constructor: {
utils: { append, secondToTime, addClass, removeClass, hasClass },
},
} = art;
const className = 'artplayer-plugin-control';
addClass($player, className);
const $current = append($bottom, `<div class="apa-control-current"></div>`);
const $duration = append($bottom, `<div class="apa-control-duration"></div>`);
const events = ['video:loadedmetadata', 'video:timeupdate', 'video:progress'];
for (let index = 0; index < events.length; index++) {
art.on(events[index], () => {
$current.innerText = secondToTime(art.currentTime);
$duration.innerText = secondToTime(art.duration);
});
}
return {
name: 'artplayerPluginControl',
get enable() {
return hasClass($player, className);
},
set enable(state) {
if (state) {
addClass($player, className);
} else {
removeClass($player, className);
}
},
};
};
}
artplayerPluginControl.env = process.env.NODE_ENV;
artplayerPluginControl.version = process.env.APP_VER;
artplayerPluginControl.build = process.env.BUILD_DATE;
if (typeof document !== 'undefined') {
if (!document.getElementById('artplayer-plugin-control')) {
const $style = document.createElement('style');
$style.id = 'artplayer-plugin-control';
$style.textContent = style;
document.head.appendChild($style);
}
}
if (typeof window !== 'undefined') {
window['artplayerPluginControl'] = artplayerPluginControl;
}
@@ -0,0 +1,95 @@
.artplayer-plugin-control {
.art-bottom {
display: flex;
align-items: center;
flex-direction: column;
position: absolute;
height: 68px;
max-width: 520px;
user-select: none;
border-radius: 10px;
transition: opacity 0.3s ease;
left: 50%;
transform: translateX(-50%);
bottom: 10px;
font-size: 13px;
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
background-color: rgba(0, 0, 0, 0.7);
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
background-image: none;
padding: 0;
.art-progress {
width: 65%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
.art-control-thumbnails {
bottom: 35px;
}
.art-control-progress {
width: 100%;
}
.art-progress-tip {
top: -40px !important;
}
}
.art-controls {
width: 100%;
height: auto;
flex: 1;
padding: 0 5px;
.art-control-time {
display: none;
}
.art-volume-panel {
width: 60px !important;
}
}
.art-selector-list {
background-color: rgba(0, 0, 0, 0.8) !important;
}
.apa-control-current,
.apa-control-duration {
display: flex;
justify-content: center;
line-height: 1;
width: 17.5%;
position: absolute;
top: 10px;
}
.apa-control-current {
left: 0;
}
.apa-control-duration {
right: 0;
}
}
.art-settings {
bottom: 85px;
}
&.art-control-show {
.art-subtitle {
bottom: 80px;
}
}
}
.apa-control-current,
.apa-control-duration {
display: none;
}
@@ -0,0 +1,13 @@
import type Artplayer from 'artplayer';
export = artplayerPluginControl;
export as namespace artplayerPluginControl;
type Option = {};
type Control = {
name: 'artplayerPluginControl';
enable: Boolean;
};
declare const artplayerPluginControl: (option?: Option) => (art: Artplayer) => Control;
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf,s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var i="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}m.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},m.cache={};var d=s[e]=new u.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return s[e].exports;function m(t){var e=m.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a.parcelRequire93cf}}),a.parcelRequire93cf=u;for(var d=0;d<e.length;d++)u(e[d]);var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}({abjMI:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.11",l.build="2022-12-14 23:13:38","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"jJlwF","./setting":"cvUmb","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],jJlwF:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHLine truncated
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[i]&&a[i],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var d=new Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},p.cache={};var m=s[e]=new u.Module(e);t[e][0].call(m.exports,p,m,m.exports,this)}return s[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var d=0;d<e.length;d++)u(e[d]);if(n){var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}}({bgm6t:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.11",l.build="2022-12-31 21:04:24","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"4ns48","./setting":"lO8OT","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("12ceab24749100d0"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0pxLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,n,a){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof i.parcelRequire93cf&&i.parcelRequire93cf,u=o.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!u[e]){if(!t[e]){var n="function"==typeof i.parcelRequire93cf&&i.parcelRequire93cf;if(!r&&n)return n(e,!0);if(o)return o(e,!0);if(s&&"string"==typeof e)return s(e);var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}p.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},p.cache={};var c=u[e]=new l.Module(e);t[e][0].call(c.exports,p,c,c.exports,this)}return u[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=u,l.parent=o,l.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return i.parcelRequire93cf}}),i.parcelRequire93cf=l;for(var c=0;c<e.length;c++)l(e[c]);var p=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({bqk8e:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var a=t("./danmuku"),i=n.interopDefault(a),o=t("./setting"),u=n.interopDefault(o);function s(t){return function(e){!function(t){var e=t.constructor,r=e.version,n=e.utils.errorHandle,a=r.split(".").map(Number);n(a[0]+a[1]/100>=4.04,"Artplayer.js@".concat(r," 不兼容该弹幕库,请更新到 4.4.x 版本以上"))}(e);var r=new(0,i.default)(e,t);return(0,u.default)(e,r),{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),get option(){return r.option},get isHide(){return r.isHide},get isStop(){return r.isStop}}}}r.default=s,s.env="production",s.version="4.4.11",s.build="2022-12-14 23:13:38","undefined"!=typeof window&&(window.artplayerPluginDanmuku=s)},{"./danmuku":"cD7gc","./setting":"3SER8","@parcel/transformer-js/src/esmodule-helpers.js":"6uDyy"}],cD7gc:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return k}));var a=t("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(a),o=t("@swc/helpers/src/_class_call_check.mjs"),u=n.interopDefault(o),s=t("@swc/helpers/src/_create_class.mjs"),l=n.interopDefault(s),c=t("@swc/helpers/src/_object_spread.mjs"),p=n.interopDefault(c),d=t("@swc/helpers/src/_object_spread_props.mjs"),f=n.interopDefault(d),m=t("regenerator-runtime"),h=n.interopDefault(m),y=t("./bilibili"),g=t("./getDanmuTop"),v=n.interopDefault(g),k=function(){"use strict";function e(r,n){(0,u.default)(this,e);var a=r.constructor,i=r.template;if(this.utils=a.utils,this.validator=a.validator,this.$danmuku=i.$danmuku,this.$player=i.$player,this.art=r,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),r.on("video:play",this.start),r.on("video:playing",this.start),r.on("video:pause",this.stop),r.on("video:waiting",this.stop),r.on("fullscreen",this.reset),r.on("fullscreenWeb",this.reset),r.on("destroy",this.destroy),this.load()}return(0,l.default)(e,[{key:"isRotate",get:function(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.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:"filter",value:function(t,e){return this.queue.filter((function(e){return e.$state===t})).map(e)}},{key:"getLeft",value:function(t){var e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}},{key:"getRef",value:function(){var t=this.$refs.pop();if(t)return t;var e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1pLine truncated
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[i]&&a[i],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var d=new Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},p.cache={};var m=s[e]=new u.Module(e);t[e][0].call(m.exports,p,m,m.exports,this)}return s[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var d=0;d<e.length;d++)u(e[d]);if(n){var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}}({dmoJk:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.11",l.build="2022-12-31 21:04:26","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"cEnKl","./setting":"hrSF1","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],cEnKl:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n),i.export(n,"default",(()=>s));var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}getEmits(){const t=[],{clientWidth:e}=this.$player,n=this.getLeft(this.$player);return this.filter("emit",(i=>{const r=i.$ref.offsetTop,a=this.getLeft(i.$ref)-n,o=i.$ref.clientHeight,s=i.$ref.clientWidth,l=a+s,u=e-l,d=l/i.$restTime,m={};m.top=r,m.left=a,m.height=o,m.width=s,m.right=u,m.speed=d,m.distance=l,m.time=i.$restTime,m.mode=i.mode,t.push(m)})),t}getFontSize(t){const{clamp:e}=this.utils,{clientHeight:n}=this.$player;if("number"==typLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0,u=i.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0;if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(c&&"string"==typeof t)return c(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}a.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},a.cache={};var d=u[t]=new f.Module(t);e[t][0].call(d.exports,a,d,d.exports,this)}return u[t].exports;function a(e){var t=a.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=u,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return l.parcelRequire4dc0}}),l.parcelRequire4dc0=f;for(var d=0;d<t.length;d++)f(t[d]);var a=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}({eEHR6:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("bundle-text:./image.svg"),l=r.interopDefault(o);function i(e){return t=>{const{$video:n}=t.template,{errorHandle:r}=t.constructor.utils;return t.on("ready",(function(){const o=t.hls||window.hls;r(o&&o.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",c=o.levels[o.currentLevel],f=c?c.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:o.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:c===e}))),onSelect:e=>(o.nextLevel=e.level,e.html)}),e.setting&&t.setting.add({name:"hls-quality",tooltip:f,html:u,icon:l.default,width:200,selector:o.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:c===e}))),onSelect:function(e){return o.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-14 23:13:39","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"5VXix","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5VXix":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></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||t.hasOwnProperty(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})}},{}]},["eEHR6"],"eEHR6");
!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var a=u[t]=new d.Module(t);e[t][0].call(a.exports,c,a,a.exports,this)}return u[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=i,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return l[o]}}),l[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var a=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}}({eEHR6:[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{const{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;return t.on("ready",(function(){const r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",f=r.levels[r.currentLevel],d=f?f.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:d,style:{padding:"0 10px"},selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:e=>(r.nextLevel=e.level,e.html)}),e.setting&&t.setting.add({name:"hls-quality",tooltip:d,html:u,icon:l.default,width:200,selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:function(e){return r.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-31 21:04:27","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"5VXix","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5VXix":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></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||t.hasOwnProperty(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})}},{}]},["eEHR6"],"eEHR6","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0,u=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l.parcelRequire4dc0&&l.parcelRequire4dc0;if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}a.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},a.cache={};var d=u[t]=new c.Module(t);e[t][0].call(d.exports,a,d,d.exports,this)}return u[t].exports;function a(e){var t=a.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=u,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return l.parcelRequire4dc0}}),l.parcelRequire4dc0=c;for(var d=0;d<t.length;d++)c(t[d]);var a=c(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}({"3yim4":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("bundle-text:./image.svg"),l=r.interopDefault(o);function i(e){return function(t){var n=t.template.$video,r=t.constructor.utils.errorHandle;return t.on("ready",(function(){var o=t.hls||window.hls;r(o&&o.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');var i=e.auto||"Auto",u=e.title||"Quality",f=o.levels[o.currentLevel],c=f?f.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:c,style:{padding:"0 10px"},selector:o.levels.map((function(e,t){return{html:e.height+"P",level:e.level||t,default:f===e}})),onSelect:function(e){return o.nextLevel=e.level,e.html}}),e.setting&&t.setting.add({name:"hls-quality",tooltip:c,html:u,icon:l.default,width:200,selector:o.levels.map((function(e,t){return{html:e.height+"P",level:e.level||t,default:f===e}})),onSelect:function(e){return o.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-14 23:13:39","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"9cAMb","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"9cAMb":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"47PTV":[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||t.hasOwnProperty(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})}},{}]},["3yim4"],"3yim4");
!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var a=u[t]=new d.Module(t);e[t][0].call(a.exports,c,a,a.exports,this)}return u[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=i,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return l[o]}}),l[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var a=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=a:"function"==typeof define&&define.amd&&define((function(){return a}))}}({"3yim4":[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{const{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;return t.on("ready",(function(){const r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",f=r.levels[r.currentLevel],d=f?f.height+"P":i;e.control&&t.controls.add({name:"hls-quality",position:"right",html:d,style:{padding:"0 10px"},selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:e=>(r.nextLevel=e.level,e.html)}),e.setting&&t.setting.add({name:"hls-quality",tooltip:d,html:u,icon:l.default,width:200,selector:r.levels.map(((e,t)=>({html:e.height+"P",level:e.level||t,default:f===e}))),onSelect:function(e){return r.nextLevel=e.level,e.html}})})),{name:"artplayerPluginHlsQuality"}}}n.default=i,i.env="production",i.version="1.0.0",i.build="2022-12-31 21:04:27","undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"9cAMb","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"9cAMb":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"47PTV":[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||t.hasOwnProperty(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})}},{}]},["3yim4"],"3yim4","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o.parcelRequire4dc0&&o.parcelRequire4dc0,a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!a[t]){if(!e[t]){var r="function"==typeof o.parcelRequire4dc0&&o.parcelRequire4dc0;if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}u.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},u.cache={};var f=a[t]=new c.Module(t);e[t][0].call(f.exports,u,f,f.exports,this)}return a[t].exports;function u(e){var t=u.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=a,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return o.parcelRequire4dc0}}),o.parcelRequire4dc0=c;for(var f=0;f<t.length;f++)c(t[f]);var u=c(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({aFKtw:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);class r{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:s}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();r.postMessage({type:"response",data:t,id:s})}else{const e=new Function(n)();r.postMessage({type:"response",data:e,id:s})}}catch(e){throw r.postMessage({type:"error",data:e.message,id:s}),e}}static inject(){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');r.postMessage({type:"inject"}),window.addEventListener("message",r.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}n.default=r,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"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||t.hasOwnProperty(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})}},{}]},["aFKtw"],"aFKtw");
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!a[t]){if(!e[t]){var s="function"==typeof o[r]&&o[r];if(!n&&s)return s(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}l.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},l.cache={};var u=a[t]=new f.Module(t);e[t][0].call(u.exports,l,u,u.exports,this)}return a[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=a,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return o[r]}}),o[r]=f;for(var c=0;c<t.length;c++)f(t[c]);if(n){var u=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({aFKtw:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);class r{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:s}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();r.postMessage({type:"response",data:t,id:s})}else{const e=new Function(n)();r.postMessage({type:"response",data:e,id:s})}}catch(e){throw r.postMessage({type:"error",data:e.message,id:s}),e}}static inject(){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');r.postMessage({type:"inject"}),window.addEventListener("message",r.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}n.default=r,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"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||t.hasOwnProperty(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})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var n="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&n)return n(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var f=s[t]=new u.Module(t);e[t][0].call(f.exports,l,f,f.exports,this)}return s[t].exports;function l(e){var t=l.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=a,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=u;for(var f=0;f<t.length;f++)u(t[f]);var l=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define((function(){return l}))}({cJKtw:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return h}));var o=e("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(o),a=e("@swc/helpers/src/_class_call_check.mjs"),s=n.interopDefault(a),c=e("@swc/helpers/src/_create_class.mjs"),u=n.interopDefault(c),f=e("regenerator-runtime"),l=n.interopDefault(f),h=function(){"use strict";function e(t){var r=t.iframe,n=t.url;if((0,s.default)(this,e),r instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof n)throw new Error('"option.url" needs to be a string');this.url=n,this.$iframe=r,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=function(){return null},this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}return(0,u.default)(e,[{key:"onMessage",value:function(e){var t=e.data,r=t.type,n=t.data,o=t.id;if("inject"===r)this.injected=!0;this.promises[o]&&("error"===r?this.promises[o].reject(new Error(n)):this.promises[o].resove(n),delete this.promises[o]),this.messageCallback&&this.messageCallback({type:r,data:n})}},{key:"postMessage",value:function(e){var t=e.type,r=e.data,n=this;return new Promise((function(e,o){(function n(){if(this.destroyed)o(new Error("The instance has been destroyed"));else if(this.injected){var i=Date.now();this.promises[i]={resove:e,reject:o},this.$iframe.contentWindow.postMessage({type:t,data:r,id:i},"*")}else setTimeout(n.bind(this),200)}).call(n)}))}},{key:"commit",value:function(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');var t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}},{key:"message",value:function(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}},{key:"destroy",value:function(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}],[{key:"iframe",get:function(){return window.top!==window}},{key:"postMessage",value:function(t){var r=t.type,n=t.data,o=t.id,i=void 0===o?0:o;if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:r,data:n,id:i},"*")}},{key:"onMessage",value:function(t){return(0,i.default)(l.default.mark((function r(){var n,o,i,a,s,c,u;return l.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.iframe){r.next=2;break}throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');case 2:n=t.data,o=n.type,i=n.data,a=n.id,r.t0=o,r.next="commit"===r.t0?6:23;break;case 6:if(r.prev=6,!i.match(/\bresolve\((.*?)\)/)){r.next=15;break}return s="return new Promise(function(resolve){\n".concat(i,"\n})"),r.next=11,new Function(s)();case 11:c=r.sent,e.postMessage({type:"response",data:c,id:a}),r.next=16;break;case 15:u=new Function(i)(),e.postMessage({type:"response",data:u,id:a});case 16:r.next=22;break;case 18:throw r.prev=18,r.t1=r.catch(6),e.postMessage({type:"error",data:r.t1.message,id:a}),r.t1;case 22:case 23:return r.abrupt("break",24);case 24:case"end":return r.stop()}}),r,null,[[6,18]])})))()}},{key:"inject",value:function(){if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');e.postMessage({type:"inject"}),window.addEventListener("message",e.onMessage)}}]),e}();"undefined"!=typeof window&&(window.ArtplayerPluginIframe=h)},{"@swc/helpers/src/_async_to_generator.mjs":"eiCdg","@swc/helpers/src/_class_call_check.mjs":"fs9hQ","@swc/helpers/src/_create_class.mjs":"eLine truncated
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!a[t]){if(!e[t]){var s="function"==typeof o[r]&&o[r];if(!n&&s)return s(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}l.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},l.cache={};var u=a[t]=new f.Module(t);e[t][0].call(u.exports,l,u,u.exports,this)}return a[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=a,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return o[r]}}),o[r]=f;for(var c=0;c<t.length;c++)f(t[c]);if(n){var u=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({cJKtw:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"default",(()=>s));class s{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!s.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!s.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:r}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();s.postMessage({type:"response",data:t,id:r})}else{const e=new Function(n)();s.postMessage({type:"response",data:e,id:r})}}catch(e){throw s.postMessage({type:"error",data:e.message,id:r}),e}}static inject(){if(!s.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');s.postMessage({type:"inject"}),window.addEventListener("message",s.onMessage)}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}}"undefined"!=typeof window&&(window.ArtplayerPluginIframe=s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"47PTV":[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||t.hasOwnProperty(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})}},{}]},["cJKtw"],"cJKtw","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c;if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},u.cache={};var d=l[t]=new h.Module(t);e[t][0].call(d.exports,u,d,d.exports,this)}return l[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r.parcelRequire7b4c}}),r.parcelRequire7b4c=h;for(var d=0;d<t.length;d++)h(t[d]);var u=h(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({abjMI:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];sLine truncated
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(h&&"string"==typeof t)return h(t);var d=new Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new a.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=s,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return r[n]}}),r[n]=a;for(var d=0;d<t.length;d++)a(t[d]);if(i){var u=a(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({eoujN:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),h=l.getContext("2d");this.emit("canvas",l);const a=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{h.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(a).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(((e,o)=>({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i.parcelRequire7b4c&&i.parcelRequire7b4c,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!l[t]){if(!e[t]){var n="function"==typeof i.parcelRequire7b4c&&i.parcelRequire7b4c;if(!r&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var c=l[t]=new u.Module(t);e[t][0].call(c.exports,f,c,c.exports,this)}return l[t].exports;function f(e){var t=f.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=l,u.parent=s,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i.parcelRequire7b4c}}),i.parcelRequire7b4c=u;for(var c=0;c<t.length;c++)u(t[c]);var f=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}({bqk8e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return v}));var o=e("@swc/helpers/src/_assert_this_initialized.mjs"),i=n.interopDefault(o),s=e("@swc/helpers/src/_class_call_check.mjs"),l=n.interopDefault(s),a=e("@swc/helpers/src/_create_class.mjs"),u=n.interopDefault(a),c=e("@swc/helpers/src/_inherits.mjs"),f=n.interopDefault(c),p=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(p),h=e("./emitter"),m=n.interopDefault(h),y=e("./utils"),v=function(e){"use strict";(0,f.default)(r,e);var t=(0,d.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.default)(this,r),(e=t.call(this)).processing=!1,e.option={},e.setup(Object.assign({},r.DEFAULTS,n)),e.video=r.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind((0,i.default)(e)),e.ondrop=e.ondrop.bind((0,i.default)(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",r.ondragover),e.option.fileInput.addEventListener("drop",r.ondrop),e}return(0,u.default)(r,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;this.option=Object.assign({},this.option,e);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==n.tagName||"file"!==n.type){n.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",n.appendChild(l),this.option.fileInput=l}return["number","width","column","begin","end"].forEach((function(e){t.errorHandle("number"==typeof t.option[e],"The '".concat(e,"' is not a number"))})),this.option.number=(0,y.clamp)(o,10,1e3),this.option.width=(0,y.clamp)(i,10,1e3),this.option.column=(0,y.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,y.sleep)(1e3).then((function(){return e.start()}));var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,y.clamp)(o,0,this.video.duration),this.option.end=(0,y.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var l=this.creatScreenshotDate(),a=this.creatCanvas(),u=a.getContext("2d");this.emit("canvas",a);var c=l.map((function(t,o){return function(){return new Promise((function(i){e.video.oncanplay=function(){u.drawImage(e.video,t.x,t.y,r,s),a.toBlob((function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailLine truncated
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(h&&"string"==typeof t)return h(t);var d=new Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new a.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=s,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return r[n]}}),r[n]=a;for(var d=0;d<t.length;d++)a(t[d]);if(i){var u=a(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({c1BpS:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",(()=>l));var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),h=l.getContext("2d");this.emit("canvas",l);const a=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{h.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(a).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(((e,o)=>({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCanvas(){const{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}downloLine truncated
+2 -2
View File
@@ -1,7 +1,7 @@
/*!
* artplayer.js v4.5.13
* artplayer.js v4.6.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,o,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof a.parcelRequireb749&&a.parcelRequireb749,s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof a.parcelRequireb749&&a.parcelRequireb749;if(!r&&o)return o(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}p.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},p.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return s[t].exports;function p(e){var t=p.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=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a.parcelRequireb749}}),a.parcelRequireb749=c;for(var u=0;u<t.length;u++)c(t[u]);var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({abjMI:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),a=o.interopDefault(i),n=e("option-validator"),s=o.interopDefault(n),l=e("./utils/emitter"),c=o.interopDefault(l),u=e("./utils"),p=e("./scheme"),d=o.interopDefault(p),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),O=e("./info"),T=o.interopDefault(O),E=e("./subtitle"),M=o.interopDefault(E),P=e("./events"),F=o.interopDefault(P),C=e("./hotkey"),H=o.interopDefault(C),A=e("./layer"),R=o.interopDefault(A),D=e("./loading"),z=o.interopDefault(D),B=e("./notice"),L=o.interopDefault(B),N=e("./mask"),V=o.interopDefault(N),_=e("./icons"),Z=o.interopDefault(_),q=e("./setting"),W=o.interopDefault(q),U=e("./storage"),Y=o.interopDefault(U),X=e("./plugins"),G=o.interopDefault(X),J=e("./mobile"),K=o.interopDefault(J);let Q=0;const ee=[];class te extends c.default{constructor(e,t){super(),this.id=++Q;const r=u.mergeDeep(te.option,e);if(this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,v.default)(this),this.events=new(0,F.default)(this),this.whitelist.state?(this.storage=new(0,Y.default)(this),this.icons=new(0,Z.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,L.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,R.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,$.default)(this),this.subtitle=new(0,M.default)(this),this.info=new(0,T.default)(this),this.loading=new(0,z.default)(this),this.hotkey=new(0,H.default)(this),this.mask=new(0,V.default)(this),this.setting=new(0,W.default)(this),this.plugins=new(0,G.default)(this)):this.mobile=new(0,K.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this,this))),te.DEBUG){const e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+te.version),e("Env@"+te.env),e("Build@"+te.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],(t=>e("Event@"+t.type)))}ee.push(this)}static get instances(){return ee}static get version(){return"4.5.13"}static get env(){return"production"}static get build(){return"2022-12-14 23:13:34"}static get config(){return h.default}static get utils(){return u}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:u.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),ee.splicLine truncated
!function(e,t,r,o,a){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof i[o]&&i[o],s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var a="function"==typeof i[o]&&i[o];if(!r&&a)return a(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var p=new Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return s[t].exports;function d(e){var t=d.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=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[o]}}),i[o]=c;for(var p=0;p<t.length;p++)c(t[p]);if(r){var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({"5lTcX":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=e("bundle-text:./style/index.less"),i=o.interopDefault(a),n=e("option-validator"),s=o.interopDefault(n),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),C=o.interopDefault(I),$=e("./info"),P=o.interopDefault($),T=e("./subtitle"),E=o.interopDefault(T),M=e("./events"),F=o.interopDefault(M),A=e("./hotkey"),z=o.interopDefault(A),H=e("./layer"),D=o.interopDefault(H),O=e("./loading"),R=o.interopDefault(O),L=e("./notice"),N=o.interopDefault(L),V=e("./mask"),Y=o.interopDefault(V),_=e("./icons"),W=o.interopDefault(_),q=e("./setting"),B=o.interopDefault(q),U=e("./storage"),Z=o.interopDefault(U),G=e("./plugins"),K=o.interopDefault(G),X=e("./mobile"),J=o.interopDefault(X);let Q=0;const ee=[];class te extends c.default{constructor(e,t){super(),this.id=++Q;const r=p.mergeDeep(te.option,e);if(this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,v.default)(this),this.events=new(0,F.default)(this),this.whitelist.state?(this.storage=new(0,Z.default)(this),this.icons=new(0,W.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,N.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,D.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,C.default)(this),this.subtitle=new(0,E.default)(this),this.info=new(0,P.default)(this),this.loading=new(0,R.default)(this),this.hotkey=new(0,z.default)(this),this.mask=new(0,Y.default)(this),this.setting=new(0,B.default)(this),this.plugins=new(0,K.default)(this)):this.mobile=new(0,J.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this,this))),te.DEBUG){const e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+te.version),e("Env@"+te.env),e("Build@"+te.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],(t=>e("Event@"+t.type)))}ee.push(this)}static get instances(){return ee}static get version(){return"4.6.0"}static get env(){return"production"}static get build(){return"2022-12-31 21:04:17"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),ee.splice(ee.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=te,te.DLine truncated
+2 -2
View File
@@ -1,7 +1,7 @@
/*!
* artplayer.js v4.5.13
* artplayer.js v4.6.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2022 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:{},s="function"==typeof o.parcelRequireb749&&o.parcelRequireb749,i=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!i[t]){if(!e[t]){var n="function"==typeof o.parcelRequireb749&&o.parcelRequireb749;if(!r&&n)return n(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var u=i[t]=new c.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return i[t].exports;function p(e){var t=p.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=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return o.parcelRequireb749}}),o.parcelRequireb749=c;for(var u=0;u<t.length;u++)c(t[u]);var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({bqk8e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return pe}));var a=e("@swc/helpers/src/_assert_this_initialized.mjs"),o=n.interopDefault(a),s=e("@swc/helpers/src/_class_call_check.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_create_class.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_inherits.mjs"),p=n.interopDefault(u),f=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(f),h=e("bundle-text:./style/index.less"),m=n.interopDefault(h),y=e("option-validator"),v=n.interopDefault(y),g=e("./utils/emitter"),b=n.interopDefault(g),w=e("./utils"),j=e("./scheme"),x=n.interopDefault(j),_=e("./config"),k=n.interopDefault(_),D=e("./whitelist"),S=n.interopDefault(D),I=e("./template"),E=n.interopDefault(I),P=e("./i18n"),T=n.interopDefault(P),M=e("./player"),O=n.interopDefault(M),F=e("./control"),A=n.interopDefault(F),z=e("./contextmenu"),C=n.interopDefault(z),R=e("./info"),V=n.interopDefault(R),L=e("./subtitle"),N=n.interopDefault(L),$=e("./events"),H=n.interopDefault($),X=e("./hotkey"),q=n.interopDefault(X),W=e("./layer"),B=n.interopDefault(W),U=e("./loading"),Y=n.interopDefault(U),G=e("./notice"),Z=n.interopDefault(G),Q=e("./mask"),K=n.interopDefault(Q),J=e("./icons"),ee=n.interopDefault(J),te=e("./setting"),re=n.interopDefault(te),ne=e("./storage"),ae=n.interopDefault(ne),oe=e("./plugins"),se=n.interopDefault(oe),ie=e("./mobile"),le=n.interopDefault(ie),ce=0,ue=[],pe=function(e){"use strict";(0,p.default)(r,e);var t=(0,d.default)(r);function r(e,n){var a;(0,i.default)(this,r),(a=t.call(this)).id=++ce;var s=w.mergeDeep(r.option,e);if(a.option=(0,v.default)(s,x.default),a.isLock=!1,a.isReady=!1,a.isFocus=!1,a.isInput=!1,a.isRotate=!1,a.isDestroy=!1,a.whitelist=new(0,S.default)((0,o.default)(a)),a.template=new(0,E.default)((0,o.default)(a)),a.events=new(0,H.default)((0,o.default)(a)),a.whitelist.state?(a.storage=new(0,ae.default)((0,o.default)(a)),a.icons=new(0,ee.default)((0,o.default)(a)),a.i18n=new(0,T.default)((0,o.default)(a)),a.notice=new(0,Z.default)((0,o.default)(a)),a.player=new(0,O.default)((0,o.default)(a)),a.layers=new(0,B.default)((0,o.default)(a)),a.controls=new(0,A.default)((0,o.default)(a)),a.contextmenu=new(0,C.default)((0,o.default)(a)),a.subtitle=new(0,N.default)((0,o.default)(a)),a.info=new(0,V.default)((0,o.default)(a)),a.loading=new(0,Y.default)((0,o.default)(a)),a.hotkey=new(0,q.default)((0,o.default)(a)),a.mask=new(0,K.default)((0,o.default)(a)),a.setting=new(0,re.default)((0,o.default)(a)),a.plugins=new(0,se.default)((0,o.default)(a))):a.mobile=new(0,le.default)((0,o.default)(a)),"function"==typeof n&&a.on("ready",(function(){return n.call((0,o.default)(a),(0,o.default)(a))})),r.DEBUG){var l=function(e){return console.log("[ART.".concat(a.id,"] -> ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c<k.default.events.length;c++)a.on("video:"+k.default.events[c],(function(e){return l("Event@"+e.type)}))}return ue.push((0,o.default)(a)),a}return(0,c.default)(r,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(e),ue.splice(ue.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return ue}},{key:"version",get:function(){return"4.5.13"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2022-12-14 23:13:35"}},{key:"config",get:function(){return k.default}},{key:"utils",get:funcLine truncated
!function(e,t,r,o,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof a[o]&&a[o],s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var i="function"==typeof a[o]&&a[o];if(!r&&i)return i(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var p=new Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return s[t].exports;function d(e){var t=d.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=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[o]}}),a[o]=c;for(var p=0;p<t.length;p++)c(t[p]);if(r){var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({"4GL94":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",(()=>te));var i=e("bundle-text:./style/index.less"),a=o.interopDefault(i),n=e("option-validator"),s=o.interopDefault(n),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),P=e("./contextmenu"),T=o.interopDefault(P),I=e("./info"),$=o.interopDefault(I),E=e("./subtitle"),M=o.interopDefault(E),L=e("./events"),C=o.interopDefault(L),F=e("./hotkey"),V=o.interopDefault(F),A=e("./layer"),D=o.interopDefault(A),z=e("./loading"),R=o.interopDefault(z),O=e("./notice"),N=o.interopDefault(O),H=e("./mask"),_=o.interopDefault(H),W=e("./icons"),q=o.interopDefault(W),B=e("./setting"),U=o.interopDefault(B),Y=e("./storage"),G=o.interopDefault(Y),Z=e("./plugins"),X=o.interopDefault(Z),J=e("./mobile"),K=o.interopDefault(J);let Q=0;const ee=[];class te extends c.default{static get instances(){return ee}static get version(){return"4.6.0"}static get env(){return"production"}static get build(){return"2022-12-31 21:04:19"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),ee.splice(ee.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}constructor(e,t){super(),this.id=++Q;const r=p.mergeDeep(te.option,e);if(this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,v.default)(this),this.events=new(0,C.default)(this),this.whitelist.state?(this.storage=new(0,G.default)(this),this.icons=new(0,q.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,N.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,D.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,T.default)(this),this.subtitle=new(0,M.default)(this),this.info=new(0,$.default)(this),this.loading=new(0,R.default)(this),this.hotkey=new(0,V.default)(this),this.mask=new(0,_.default)(this),this.setting=new(0,U.default)(this),this.plugins=new(0,X.default)(this)):this.mobile=new(0,K.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this,this))),te.DEBUG){const e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+te.version),e("Env@"+te.env),e("Build@"+te.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],(t=>e("Event@"+t.type)))}ee.pLine truncated
+2 -3
View File
@@ -1,7 +1,7 @@
{
"license": "MIT",
"name": "artplayer",
"version": "4.5.13",
"version": "4.6.0",
"main": "dist/artplayer.js",
"legacy": "dist/artplayer.legacy.js",
"types": "types/artplayer.d.ts",
@@ -22,7 +22,6 @@
"player"
],
"dependencies": {
"option-validator": "^2.0.6",
"screenfull": "^6.0.2"
"option-validator": "^2.0.6"
}
}
+3 -2
View File
@@ -1,3 +1,4 @@
import screenfull from '../libs/screenfull';
import { append, tooltip, setStyle } from '../utils';
export default function fullscreen(option) {
@@ -15,8 +16,8 @@ export default function fullscreen(option) {
art.fullscreen = !art.fullscreen;
});
art.on('fullscreen', (value) => {
if (value) {
screenfull.on('change', () => {
if (art.fullscreen) {
tooltip($control, i18n.get('Exit Fullscreen'));
setStyle($fullscreenOn, 'display', 'none');
setStyle($fullscreenOff, 'display', 'inline-flex');
@@ -11,6 +11,7 @@ export default function setting(option) {
proxy($control, 'click', () => {
art.setting.toggle = true;
art.setting.updateStyle();
});
art.on('setting', (value) => {
+22
View File
@@ -9,6 +9,7 @@ import {
append,
addClass,
setStyle,
isMobile,
inverseClass,
createElement,
includeFromEvent,
@@ -342,6 +343,25 @@ export default class Setting extends Component {
return $item;
}
updateStyle(width) {
const {
controls,
constructor,
template: { $player, $setting },
} = this.art;
if (controls.setting && !isMobile) {
const { left: controlLeft, width: controlWidth } = controls.setting.getBoundingClientRect();
const { left: playerlLeft } = $player.getBoundingClientRect();
const settingLeft = controlLeft - playerlLeft + controlWidth / 2 - (width || constructor.SETTING_WIDTH) / 2;
setStyle($setting, 'left', `${settingLeft}px`);
setStyle($setting, 'right', 'auto');
} else {
setStyle($setting, 'left', 'auto');
setStyle($setting, 'right', '10px');
}
}
init(option, width) {
const { constructor } = this.art;
@@ -350,6 +370,7 @@ export default class Setting extends Component {
inverseClass($panel, 'art-current');
setStyle(this.$parent, 'width', `${$panel.dataset.width}px`);
setStyle(this.$parent, 'height', `${$panel.dataset.height}px`);
this.updateStyle(Number($panel.dataset.width));
} else {
const $panel = createElement('div');
addClass($panel, 'art-setting-panel');
@@ -377,6 +398,7 @@ export default class Setting extends Component {
inverseClass($panel, 'art-current');
setStyle(this.$parent, 'width', `${$panel.dataset.width}px`);
setStyle(this.$parent, 'height', `${$panel.dataset.height}px`);
this.updateStyle(Number($panel.dataset.width));
if (option[0] && option[0].$parentItem && option[0].$parentItem.mounted) {
option[0].$parentItem.mounted.call(this.art, $panel, option[0].$parentItem);
+15 -5
View File
@@ -36,8 +36,9 @@
display: flex;
align-items: center;
position: relative;
height: 50%;
height: 100%;
width: 100%;
border-radius: 5px;
transition: all 0.2s ease;
background: rgba(255, 255, 255, 0.2);
@@ -50,6 +51,7 @@
bottom: 0;
height: 100%;
width: 0;
border-radius: 3px;
background: rgba(255, 255, 255, 0.4);
}
@@ -62,6 +64,7 @@
bottom: 0;
height: 100%;
width: 0;
border-radius: 3px;
}
.art-progress-highlight {
@@ -81,7 +84,7 @@
top: 0;
width: 7px;
height: 100%;
background: #fff;
background: rgba(255, 255, 255, 0.75);
pointer-events: auto;
}
}
@@ -131,10 +134,12 @@
.art-control-thumbnails {
display: none;
position: absolute;
bottom: 8px;
bottom: 10px;
left: 0;
border-radius: 3px;
pointer-events: none;
background-color: rgba(0, 0, 0, 0.7);
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2);
}
.art-control-loop {
@@ -190,7 +195,7 @@
display: flex;
align-items: center;
justify-content: center;
opacity: 0.9;
opacity: 0.75;
font-size: 12px;
min-height: 36px;
min-width: 36px;
@@ -198,6 +203,7 @@
text-align: center;
cursor: pointer;
white-space: nowrap;
transition: opacity 0.1s ease-in-out;
.art-icon {
display: flex;
align-items: center;
@@ -205,6 +211,11 @@
float: left;
height: 36px;
width: 36px;
transform: scale(1);
transition: transform 0.2s ease-in-out;
&:active {
transform: scale(0.85);
}
}
&:hover {
opacity: 1;
@@ -291,7 +302,6 @@
&:hover {
.art-progress .art-control-progress .art-control-progress-inner {
height: 100%;
.art-progress-indicator {
transform: scale(1, 1);
visibility: visible;
+2 -2
View File
@@ -3,8 +3,8 @@
display: none;
position: absolute;
z-index: 90;
right: 10px;
bottom: 50px;
left: 0;
bottom: 60px;
height: auto;
overflow: auto;
font-size: 13px;
@@ -122,6 +122,10 @@ export default class Component {
append($list, list);
append($ref, $list);
if (this.art.option.backdrop) {
addClass($list, 'art-backdrop-filter');
}
const setLeft = () => {
const left = getStyle($ref, 'width') / 2 - getStyle($list, 'width') / 2;
$list.style.left = `${left}px`;