mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin, detailing its usage and providing code examples. - Added a comprehensive guide for language settings (i18n), including instructions for importing languages, setting default languages, and modifying language options. - Included code snippets for initializing the Artplayer with different languages and examples for adding new languages.
This commit is contained in:
1 parent
c1fe0e2b03
commit
5337f9b075
181 files changed
+1680
-1659
No files matched your search
@@ -5,5 +5,5 @@
|
||||
* (c) 2017-2025 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,n,l,t,i,a,r,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[t]&&d[t],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function y(n,l){if(!u[n]){if(!e[n]){if(i[n])return i[n];var a="function"==typeof d[t]&&d[t];if(!l&&a)return a(n,!0);if(p)return p(n,!0);if(c&&"string"==typeof n)return c(n);var r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}s.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},s.cache={};var o=u[n]=new y.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:y(n)}}y.isParcelRequire=!0,y.Module=function(e){this.id=e,this.bundle=y,this.require=c,this.exports={}},y.modules=e,y.cache=u,y.parent=p,y.distDir=void 0,y.publicUrl=void 0,y.devServer=void 0,y.i=s,y.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(y,"root",{get:function(){return d[t]}}),d[t]=y;for(var f=0;f<n.length;f++)y(n[f]);if(l){var g=y(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=g:"function"==typeof define&&define.amd&&define(function(){return g})}}({"2Uydo":[function(e,n,l,t){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(l),i.export(l,"default",()=>o);var a=e("bundle-text:./style.less"),r=i.interopDefault(a);function o(e){return n=>{let{version:l,utils:{errorHandle:t}}=n.constructor,i=l.split(".").map(Number);t(i[0]+i[1]/100>=5,`Artplayer.js@${l} is not compatible the artplayerPluginAds@${o.version}. Please update it to version Artplayer.js@5.x.x`);let{template:{$player:a},icons:{volume:r,volumeClose:d,fullscreenOn:p,fullscreenOff:s,loading:u},constructor:{validator:c,utils:{query:y,append:f,setStyle:g}}}=n;e=c({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 m=null,v=null,x=null,h=null,b=null,w=null,D=0,j=null,P=!1,$=!1,k=!1;function M(e,n){return n.replace("%s",e)}function O(){P=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function A(){P||(j=setTimeout(()=>{D+=1;let n=e.playDuration-D;n>=1?x.innerHTML=M(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),h.innerHTML=M(e.totalDuration-D,e.i18n.countdown),D>=e.totalDuration?O():A()},1e3))}function _(){P||clearTimeout(j)}function T(){$||($=!0,function(){n.template.$ads=f(a,'<div class="artplayer-plugin-ads"></div>'),m=f(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>`),w=f(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),f(w,u),x=y(".artplayer-plugin-ads-close",v=f(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:M(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${M(e.totalDuration,e.i18n.countdown)}</div></div>`)),h=y(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(x,"display","none"),n.proxy(x,"click",()=>{k&&O()});let l=y(".artplayer-plugin-ads-detail",b=f(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>`)),t=y(".artplayer-plugin-ads-muted",b),i=y(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):g(l,"display","none"),e.video){let l=f(t,r),i=f(t,d);g(i,"display","none"),e.muted&&(m.muted=!0,g(l,"display","none"),g(i,"display","inline-flex")),n.proxy(t,"click",()=>{m.muted=!m.muted,m.muted?(g(l,"display","none"),g(i,"display","inline-flex")):(g(l,"display","inline-flex"),g(i,"display","none"))})}else g(t,"display","none");let o=f(i,p),c=f(i,s);g(c,"display","none"),n.proxy(i,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(g(o,"display","inline-flex"),g(c,"display","none")):(g(o,"display","none"),g(c,"display","inline-flex"))}),n.proxy(m,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(m,"error",O),n.proxy(m,"loadedmetadata",()=>{A(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")})):(A(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?_():A()}))}return n.on("ready",()=>{n.once("play",T),n.once("video:playing",T)}),{name:"arLine truncated
|
||||
!function(e,n,l,t,i,a,r,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[t]&&d[t],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function y(n,l){if(!u[n]){if(!e[n]){if(i[n])return i[n];var a="function"==typeof d[t]&&d[t];if(!l&&a)return a(n,!0);if(p)return p(n,!0);if(c&&"string"==typeof n)return c(n);var r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}s.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},s.cache={};var o=u[n]=new y.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:y(n)}}y.isParcelRequire=!0,y.Module=function(e){this.id=e,this.bundle=y,this.require=c,this.exports={}},y.modules=e,y.cache=u,y.parent=p,y.distDir=void 0,y.publicUrl=void 0,y.devServer=void 0,y.i=s,y.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(y,"root",{get:function(){return d[t]}}),d[t]=y;for(var f=0;f<n.length;f++)y(n[f]);if(l){var g=y(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=g:"function"==typeof define&&define.amd&&define(function(){return g})}}({"4omrA":[function(e,n,l,t){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(l),i.export(l,"default",()=>o);var a=e("bundle-text:./style.less"),r=i.interopDefault(a);function o(e){return n=>{let{version:l,utils:{errorHandle:t}}=n.constructor,i=l.split(".").map(Number);t(i[0]+i[1]/100>=5,`Artplayer.js@${l} is not compatible the artplayerPluginAds@${o.version}. Please update it to version Artplayer.js@5.x.x`);let{template:{$player:a},icons:{volume:r,volumeClose:d,fullscreenOn:p,fullscreenOff:s,loading:u},constructor:{validator:c,utils:{query:y,append:f,setStyle:g}}}=n;e=c({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 m=null,v=null,x=null,h=null,b=null,w=null,D=0,j=null,A=!1,P=!1,$=!1;function k(e,n){return n.replace("%s",e)}function O(){A=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function M(){A||(j=setTimeout(()=>{D+=1;let n=e.playDuration-D;n>=1?x.innerHTML=k(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,$||($=!0)),h.innerHTML=k(e.totalDuration-D,e.i18n.countdown),D>=e.totalDuration?O():M()},1e3))}function _(){A||clearTimeout(j)}function T(){P||(P=!0,function(){n.template.$ads=f(a,'<div class="artplayer-plugin-ads"></div>'),m=f(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>`),w=f(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),f(w,u),x=y(".artplayer-plugin-ads-close",v=f(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:k(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${k(e.totalDuration,e.i18n.countdown)}</div></div>`)),h=y(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(x,"display","none"),n.proxy(x,"click",()=>{$&&O()});let l=y(".artplayer-plugin-ads-detail",b=f(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>`)),t=y(".artplayer-plugin-ads-muted",b),i=y(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):g(l,"display","none"),e.video){let l=f(t,r),i=f(t,d);g(i,"display","none"),e.muted&&(m.muted=!0,g(l,"display","none"),g(i,"display","inline-flex")),n.proxy(t,"click",()=>{m.muted=!m.muted,m.muted?(g(l,"display","none"),g(i,"display","inline-flex")):(g(l,"display","inline-flex"),g(i,"display","none"))})}else g(t,"display","none");let o=f(i,p),c=f(i,s);g(c,"display","none"),n.proxy(i,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(g(o,"display","inline-flex"),g(c,"display","none")):(g(o,"display","none"),g(c,"display","inline-flex"))}),n.proxy(m,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(m,"error",O),n.proxy(m,"loadedmetadata",()=>{M(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")})):(M(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?_():M()}))}return n.on("ready",()=>{n.once("play",T),n.once("video:playing",T)}),{name:"arLine truncated
|
||||
//# sourceMappingURL=artplayer-plugin-ads.esm.js.map
|
||||
@@ -1 +1 @@
|
||||
{"mappings":"C,A,S,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,E,I,E,A,a,O,W,W,A,a,O,K,K,A,a,O,O,O,A,a,O,O,O,C,E,E,A,Y,O,C,C,E,E,C,C,E,C,E,E,C,E,C,E,E,E,K,E,C,E,E,A,a,O,Q,A,Y,O,O,O,E,O,O,C,I,C,Q,S,E,C,C,C,E,G,C,C,C,E,C,C,G,C,C,C,E,C,C,G,C,C,E,C,O,C,C,E,C,I,E,A,Y,O,C,C,E,E,C,C,E,C,G,C,G,E,O,E,E,C,G,G,E,O,E,E,C,G,G,G,A,U,O,E,O,E,G,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,O,C,S,C,E,I,E,C,C,E,C,E,C,E,C,O,A,M,E,E,C,E,E,K,C,C,E,I,E,C,C,E,C,I,E,M,C,G,C,C,E,C,E,C,I,C,E,O,C,E,E,E,O,C,E,C,O,C,C,E,C,O,C,S,E,C,E,I,E,E,O,C,G,M,A,C,I,E,C,E,E,E,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,C,S,C,C,C,C,C,C,C,EC1RA,EAAO,OAAO,CAAG,ypC,E,C,E,C,M,C,S,C,C,C,C,C,C,C,ECAjB,EAAQ,cAAc,CAAG,SAAU,CAAC,ELine truncated
|
||||
@@ -5,4 +5,4 @@
|
||||
* (c) 2017-2025 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,n,l,t,i,a,r,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[t]&&d[t],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function y(n,l){if(!u[n]){if(!e[n]){if(i[n])return i[n];var a="function"==typeof d[t]&&d[t];if(!l&&a)return a(n,!0);if(p)return p(n,!0);if(c&&"string"==typeof n)return c(n);var r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}s.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},s.cache={};var o=u[n]=new y.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:y(n)}}y.isParcelRequire=!0,y.Module=function(e){this.id=e,this.bundle=y,this.require=c,this.exports={}},y.modules=e,y.cache=u,y.parent=p,y.distDir=void 0,y.publicUrl=void 0,y.devServer=void 0,y.i=s,y.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(y,"root",{get:function(){return d[t]}}),d[t]=y;for(var f=0;f<n.length;f++)y(n[f]);if(l){var g=y(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=g:"function"==typeof define&&define.amd&&define(function(){return g})}}({ezZng:[function(e,n,l,t){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(l),i.export(l,"default",()=>o);var a=e("bundle-text:./style.less"),r=i.interopDefault(a);function o(e){return n=>{let{version:l,utils:{errorHandle:t}}=n.constructor,i=l.split(".").map(Number);t(i[0]+i[1]/100>=5,`Artplayer.js@${l} is not compatible the artplayerPluginAds@${o.version}. Please update it to version Artplayer.js@5.x.x`);let{template:{$player:a},icons:{volume:r,volumeClose:d,fullscreenOn:p,fullscreenOff:s,loading:u},constructor:{validator:c,utils:{query:y,append:f,setStyle:g}}}=n;e=c({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 m=null,v=null,x=null,h=null,b=null,w=null,D=0,j=null,k=!1,P=!1,$=!1;function O(e,n){return n.replace("%s",e)}function A(){k=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function M(){k||(j=setTimeout(()=>{D+=1;let n=e.playDuration-D;n>=1?x.innerHTML=O(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,$||($=!0)),h.innerHTML=O(e.totalDuration-D,e.i18n.countdown),D>=e.totalDuration?A():M()},1e3))}function T(){k||clearTimeout(j)}function _(){P||(P=!0,function(){n.template.$ads=f(a,'<div class="artplayer-plugin-ads"></div>'),m=f(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>`),w=f(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),f(w,u),x=y(".artplayer-plugin-ads-close",v=f(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:O(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${O(e.totalDuration,e.i18n.countdown)}</div></div>`)),h=y(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(x,"display","none"),n.proxy(x,"click",()=>{$&&A()});let l=y(".artplayer-plugin-ads-detail",b=f(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>`)),t=y(".artplayer-plugin-ads-muted",b),i=y(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):g(l,"display","none"),e.video){let l=f(t,r),i=f(t,d);g(i,"display","none"),e.muted&&(m.muted=!0,g(l,"display","none"),g(i,"display","inline-flex")),n.proxy(t,"click",()=>{m.muted=!m.muted,m.muted?(g(l,"display","none"),g(i,"display","inline-flex")):(g(l,"display","inline-flex"),g(i,"display","none"))})}else g(t,"display","none");let o=f(i,p),c=f(i,s);g(c,"display","none"),n.proxy(i,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(g(o,"display","inline-flex"),g(c,"display","none")):(g(o,"display","none"),g(c,"display","inline-flex"))}),n.proxy(m,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(m,"error",A),n.proxy(m,"loadedmetadata",()=>{M(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")})):(M(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?T():M()}))}return n.on("ready",()=>{n.once("play",_),n.once("video:playing",_)}),{name:"artpLine truncated
|
||||
!function(e,n,l,t,i,a,r,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[t]&&d[t],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function y(n,l){if(!u[n]){if(!e[n]){if(i[n])return i[n];var a="function"==typeof d[t]&&d[t];if(!l&&a)return a(n,!0);if(p)return p(n,!0);if(c&&"string"==typeof n)return c(n);var r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}s.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},s.cache={};var o=u[n]=new y.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:y(n)}}y.isParcelRequire=!0,y.Module=function(e){this.id=e,this.bundle=y,this.require=c,this.exports={}},y.modules=e,y.cache=u,y.parent=p,y.distDir=void 0,y.publicUrl=void 0,y.devServer=void 0,y.i=s,y.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(y,"root",{get:function(){return d[t]}}),d[t]=y;for(var f=0;f<n.length;f++)y(n[f]);if(l){var g=y(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=g:"function"==typeof define&&define.amd&&define(function(){return g})}}({jz4E5:[function(e,n,l,t){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(l),i.export(l,"default",()=>o);var a=e("bundle-text:./style.less"),r=i.interopDefault(a);function o(e){return n=>{let{version:l,utils:{errorHandle:t}}=n.constructor,i=l.split(".").map(Number);t(i[0]+i[1]/100>=5,`Artplayer.js@${l} is not compatible the artplayerPluginAds@${o.version}. Please update it to version Artplayer.js@5.x.x`);let{template:{$player:a},icons:{volume:r,volumeClose:d,fullscreenOn:p,fullscreenOff:s,loading:u},constructor:{validator:c,utils:{query:y,append:f,setStyle:g}}}=n;e=c({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 m=null,v=null,x=null,h=null,b=null,w=null,j=0,D=null,P=!1,$=!1,k=!1;function O(e,n){return n.replace("%s",e)}function A(){P=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function M(){P||(D=setTimeout(()=>{j+=1;let n=e.playDuration-j;n>=1?x.innerHTML=O(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),h.innerHTML=O(e.totalDuration-j,e.i18n.countdown),j>=e.totalDuration?A():M()},1e3))}function E(){P||clearTimeout(D)}function T(){$||($=!0,function(){n.template.$ads=f(a,'<div class="artplayer-plugin-ads"></div>'),m=f(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>`),w=f(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),f(w,u),x=y(".artplayer-plugin-ads-close",v=f(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:O(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${O(e.totalDuration,e.i18n.countdown)}</div></div>`)),h=y(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(x,"display","none"),n.proxy(x,"click",()=>{k&&A()});let l=y(".artplayer-plugin-ads-detail",b=f(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>`)),t=y(".artplayer-plugin-ads-muted",b),i=y(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):g(l,"display","none"),e.video){let l=f(t,r),i=f(t,d);g(i,"display","none"),e.muted&&(m.muted=!0,g(l,"display","none"),g(i,"display","inline-flex")),n.proxy(t,"click",()=>{m.muted=!m.muted,m.muted?(g(l,"display","none"),g(i,"display","inline-flex")):(g(l,"display","inline-flex"),g(i,"display","none"))})}else g(t,"display","none");let o=f(i,p),c=f(i,s);g(c,"display","none"),n.proxy(i,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(g(o,"display","inline-flex"),g(c,"display","none")):(g(o,"display","none"),g(c,"display","inline-flex"))}),n.proxy(m,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(m,"error",A),n.proxy(m,"loadedmetadata",()=>{M(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")})):(M(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?E():M()}))}return n.on("ready",()=>{n.once("play",T),n.once("video:playing",T)}),{name:"artpLine truncated
|
||||
@@ -5,4 +5,4 @@
|
||||
* (c) 2017-2025 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,n,t,l,i,r,a,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof d[l]&&d[l],s=u.i||{},p=u.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(n,t){if(!p[n]){if(!e[n]){if(i[n])return i[n];var r="function"==typeof d[l]&&d[l];if(!t&&r)return r(n,!0);if(u)return u(n,!0);if(c&&"string"==typeof n)return c(n);var a=Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(t){var l=e[n][1][t];return null!=l?l:t},s.cache={};var o=p[n]=new f.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return p[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:f(n)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=p,f.parent=u,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=s,f.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(f,"root",{get:function(){return d[l]}}),d[l]=f;for(var y=0;y<n.length;y++)f(n[y]);if(t){var g=f(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=g:"function"==typeof define&&define.amd&&define(function(){return g})}}({"1qHWP":[function(e,n,t,l){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"default",function(){return d});var r=e("@swc/helpers/cjs/_object_spread.cjs"),a=e("bundle-text:./style.less"),o=i.interopDefault(a);function d(e){return function(n){l=(t=n.constructor).version,(0,t.utils.errorHandle)((i=l.split(".").map(Number))[0]+i[1]/100>=5,"Artplayer.js@".concat(l," is not compatible the artplayerPluginAds@").concat(d.version,". Please update it to version Artplayer.js@5.x.x"));var t,l,i,a=n.template.$player,o=n.icons,u=o.volume,s=o.volumeClose,p=o.fullscreenOn,c=o.fullscreenOff,f=o.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,b=m.append,x=m.setStyle;e=g((0,r._)({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 h=null,w=null,j=null,O=null,P=null,k=null,D=0,_=null,M=!1,q=!1,A=!1;function C(e,n){return n.replace("%s",e)}function E(){M=!0,n.play(),e.video&&h.pause(),x(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function T(){M||(_=setTimeout(function(){D+=1;var n=e.playDuration-D;n>=1?j.innerHTML=C(n,e.i18n.canBeClosed):(j.innerHTML=e.i18n.close,A||(A=!0)),O.innerHTML=C(e.totalDuration-D,e.i18n.countdown),D>=e.totalDuration?E():T()},1e3))}function H(){M||clearTimeout(_)}function $(){q||(q=!0,function(){n.template.$ads=b(a,'<div class="artplayer-plugin-ads"></div>'),h=b(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>")),k=b(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),b(k,f),j=v(".artplayer-plugin-ads-close",w=b(n.template.$ads,'<div class="artplayer-plugin-ads-timer">\n<div class="artplayer-plugin-ads-close">'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'</div>\n<div class="artplayer-plugin-ads-countdown">').concat(C(e.totalDuration,e.i18n.countdown),"</div>\n</div>"))),O=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){A&&E()});var t=v(".artplayer-plugin-ads-detail",P=b(n.template.$ads,'<div class="artplayer-plugin-ads-control">\n<div class="artplayer-plugin-ads-detail">'.concat(e.i18n.detail,'</div>\n<div class="artplayer-plugin-ads-muted"></div>\n<div class="artplayer-plugin-ads-fullscreen"></div>\n</div>'))),l=v(".artplayer-plugin-ads-muted",P),i=v(".artplayer-plugin-ads-fullscreen",P);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):x(t,"display","none"),e.video){var r=b(l,u),o=b(l,s);x(o,"display","none"),e.muted&&(h.muted=!0,x(r,"display","none"),x(o,"display","inline-flex")),n.proxy(l,"click",function(){h.muted=!h.muted,h.muted?(x(r,"display","none"),x(o,"display","inline-flex")):(x(r,"display","inline-flex"),x(o,"display","none"))})}else x(l,"display","none");var d=b(i,p),y=b(i,c);x(y,"display","none"),n.proxy(i,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(x(d,"display","inline-flex"),x(y,"display","none")):(x(d,"display","none"),x(y,"display","inline-flex"))}),n.proxy(h,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(h,"error",E),n.proxy(h,"loadedmetadata",function(){T(),h.play(),x(w,"display","flex"),x(P,"display","flex"),x(k,"display","none")})):(TLine truncated
|
||||
!function(e,n,t,i,l,r,a,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof d[i]&&d[i],s=u.i||{},p=u.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(n,t){if(!p[n]){if(!e[n]){if(l[n])return l[n];var r="function"==typeof d[i]&&d[i];if(!t&&r)return r(n,!0);if(u)return u(n,!0);if(c&&"string"==typeof n)return c(n);var a=Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(t){var i=e[n][1][t];return null!=i?i:t},s.cache={};var o=p[n]=new f.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return p[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:f(n)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=p,f.parent=u,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=s,f.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(f,"root",{get:function(){return d[i]}}),d[i]=f;for(var y=0;y<n.length;y++)f(n[y]);if(t){var g=f(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=g:"function"==typeof define&&define.amd&&define(function(){return g})}}({bzF6W:[function(e,n,t,i){var l=e("@parcel/transformer-js/src/esmodule-helpers.js");l.defineInteropFlag(t),l.export(t,"default",function(){return d});var r=e("@swc/helpers/cjs/_object_spread.cjs"),a=e("bundle-text:./style.less"),o=l.interopDefault(a);function d(e){return function(n){i=(t=n.constructor).version,(0,t.utils.errorHandle)((l=i.split(".").map(Number))[0]+l[1]/100>=5,"Artplayer.js@".concat(i," is not compatible the artplayerPluginAds@").concat(d.version,". Please update it to version Artplayer.js@5.x.x"));var t,i,l,a=n.template.$player,o=n.icons,u=o.volume,s=o.volumeClose,p=o.fullscreenOn,c=o.fullscreenOff,f=o.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,b=m.append,h=m.setStyle;e=g((0,r._)({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 x=null,w=null,j=null,O=null,D=null,P=null,_=0,k=null,A=!1,M=!1,q=!1;function C(e,n){return n.replace("%s",e)}function T(){A=!0,n.play(),e.video&&x.pause(),h(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function B(){A||(k=setTimeout(function(){_+=1;var n=e.playDuration-_;n>=1?j.innerHTML=C(n,e.i18n.canBeClosed):(j.innerHTML=e.i18n.close,q||(q=!0)),O.innerHTML=C(e.totalDuration-_,e.i18n.countdown),_>=e.totalDuration?T():B()},1e3))}function $(){A||clearTimeout(k)}function E(){M||(M=!0,function(){n.template.$ads=b(a,'<div class="artplayer-plugin-ads"></div>'),x=b(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>")),P=b(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),b(P,f),j=v(".artplayer-plugin-ads-close",w=b(n.template.$ads,'<div class="artplayer-plugin-ads-timer">\n<div class="artplayer-plugin-ads-close">'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'</div>\n<div class="artplayer-plugin-ads-countdown">').concat(C(e.totalDuration,e.i18n.countdown),"</div>\n</div>"))),O=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&h(j,"display","none"),n.proxy(j,"click",function(){q&&T()});var t=v(".artplayer-plugin-ads-detail",D=b(n.template.$ads,'<div class="artplayer-plugin-ads-control">\n<div class="artplayer-plugin-ads-detail">'.concat(e.i18n.detail,'</div>\n<div class="artplayer-plugin-ads-muted"></div>\n<div class="artplayer-plugin-ads-fullscreen"></div>\n</div>'))),i=v(".artplayer-plugin-ads-muted",D),l=v(".artplayer-plugin-ads-fullscreen",D);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):h(t,"display","none"),e.video){var r=b(i,u),o=b(i,s);h(o,"display","none"),e.muted&&(x.muted=!0,h(r,"display","none"),h(o,"display","inline-flex")),n.proxy(i,"click",function(){x.muted=!x.muted,x.muted?(h(r,"display","none"),h(o,"display","inline-flex")):(h(r,"display","inline-flex"),h(o,"display","none"))})}else h(i,"display","none");var d=b(l,p),y=b(l,c);h(y,"display","none"),n.proxy(l,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(h(d,"display","inline-flex"),h(y,"display","none")):(h(d,"display","none"),h(y,"display","inline-flex"))}),n.proxy(x,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(x,"error",T),n.proxy(x,"loadedmetadata",function(){B(),x.play(),h(w,"display","flex"),h(D,"display","flex"),h(P,"display","none")})):(B()Line truncated
|
||||
Reference in new issue
Block a user