diff --git a/CHANGELOG.md b/CHANGELOG.md index 41201918a..03bce6652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [5.4.0] - 2026-03-12 + - Refactor `Parcel` to `Vite` - Change `Artplayer.FULLSCREEN_WEB_IN_BODY` defaults to `true` - The `reset` method is used to reset video request diff --git a/docs/compiled/artplayer-plugin-ads.js b/docs/compiled/artplayer-plugin-ads.js index ea40bc7c0..445dbac42 100644 --- a/docs/compiled/artplayer-plugin-ads.js +++ b/docs/compiled/artplayer-plugin-ads.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ads.js v2.0.1 + * artplayer-plugin-ads.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-ads.legacy.js b/docs/compiled/artplayer-plugin-ads.legacy.js index fb83bf891..3ff5d0dc3 100644 --- a/docs/compiled/artplayer-plugin-ads.legacy.js +++ b/docs/compiled/artplayer-plugin-ads.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ads.js v2.0.1 + * artplayer-plugin-ads.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-ads.mjs b/docs/compiled/artplayer-plugin-ads.mjs index b5132a64f..6d707e371 100644 --- a/docs/compiled/artplayer-plugin-ads.mjs +++ b/docs/compiled/artplayer-plugin-ads.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ads.js v2.0.1 + * artplayer-plugin-ads.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-ambilight.js b/docs/compiled/artplayer-plugin-ambilight.js index 9d2c0789a..a55f58bc3 100644 --- a/docs/compiled/artplayer-plugin-ambilight.js +++ b/docs/compiled/artplayer-plugin-ambilight.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ambilight.js v1.0.1 + * artplayer-plugin-ambilight.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-ambilight.legacy.js b/docs/compiled/artplayer-plugin-ambilight.legacy.js index 9d2c0789a..a55f58bc3 100644 --- a/docs/compiled/artplayer-plugin-ambilight.legacy.js +++ b/docs/compiled/artplayer-plugin-ambilight.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ambilight.js v1.0.1 + * artplayer-plugin-ambilight.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-ambilight.mjs b/docs/compiled/artplayer-plugin-ambilight.mjs index 19196e4c8..0a79f243c 100644 --- a/docs/compiled/artplayer-plugin-ambilight.mjs +++ b/docs/compiled/artplayer-plugin-ambilight.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ambilight.js v1.0.1 + * artplayer-plugin-ambilight.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-asr.js b/docs/compiled/artplayer-plugin-asr.js index e3d6ed33f..eba061fb8 100644 --- a/docs/compiled/artplayer-plugin-asr.js +++ b/docs/compiled/artplayer-plugin-asr.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-asr.js v2.0.1 + * artplayer-plugin-asr.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-asr.legacy.js b/docs/compiled/artplayer-plugin-asr.legacy.js index d3e9fd649..71d3bc90c 100644 --- a/docs/compiled/artplayer-plugin-asr.legacy.js +++ b/docs/compiled/artplayer-plugin-asr.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-asr.js v2.0.1 + * artplayer-plugin-asr.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-asr.mjs b/docs/compiled/artplayer-plugin-asr.mjs index 691a4e3a1..37fc36858 100644 --- a/docs/compiled/artplayer-plugin-asr.mjs +++ b/docs/compiled/artplayer-plugin-asr.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-asr.js v2.0.1 + * artplayer-plugin-asr.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-audio-track.js b/docs/compiled/artplayer-plugin-audio-track.js index 20eec294f..73bcbdb50 100644 --- a/docs/compiled/artplayer-plugin-audio-track.js +++ b/docs/compiled/artplayer-plugin-audio-track.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-audio-track.js v1.0.2 + * artplayer-plugin-audio-track.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-audio-track.legacy.js b/docs/compiled/artplayer-plugin-audio-track.legacy.js index 2bc1d846d..671c9653a 100644 --- a/docs/compiled/artplayer-plugin-audio-track.legacy.js +++ b/docs/compiled/artplayer-plugin-audio-track.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-audio-track.js v1.0.2 + * artplayer-plugin-audio-track.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-audio-track.mjs b/docs/compiled/artplayer-plugin-audio-track.mjs index 65bc77c9e..32277977d 100644 --- a/docs/compiled/artplayer-plugin-audio-track.mjs +++ b/docs/compiled/artplayer-plugin-audio-track.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-audio-track.js v1.0.2 + * artplayer-plugin-audio-track.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-auto-thumbnail.js b/docs/compiled/artplayer-plugin-auto-thumbnail.js index 1b03715ae..32a90e93e 100644 --- a/docs/compiled/artplayer-plugin-auto-thumbnail.js +++ b/docs/compiled/artplayer-plugin-auto-thumbnail.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-auto-thumbnail.js v1.0.2 + * artplayer-plugin-auto-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js b/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js index b652cd5f5..130e2be79 100644 --- a/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js +++ b/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-auto-thumbnail.js v1.0.2 + * artplayer-plugin-auto-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-auto-thumbnail.mjs b/docs/compiled/artplayer-plugin-auto-thumbnail.mjs index 057c7208f..534add23f 100644 --- a/docs/compiled/artplayer-plugin-auto-thumbnail.mjs +++ b/docs/compiled/artplayer-plugin-auto-thumbnail.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-auto-thumbnail.js v1.0.2 + * artplayer-plugin-auto-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-chapter.js b/docs/compiled/artplayer-plugin-chapter.js index f87cdc7d2..015e3f482 100644 --- a/docs/compiled/artplayer-plugin-chapter.js +++ b/docs/compiled/artplayer-plugin-chapter.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chapter.js v1.0.3 + * artplayer-plugin-chapter.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-chapter.legacy.js b/docs/compiled/artplayer-plugin-chapter.legacy.js index f87cdc7d2..015e3f482 100644 --- a/docs/compiled/artplayer-plugin-chapter.legacy.js +++ b/docs/compiled/artplayer-plugin-chapter.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chapter.js v1.0.3 + * artplayer-plugin-chapter.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-chapter.mjs b/docs/compiled/artplayer-plugin-chapter.mjs index fff9ff1f3..89a98a3d3 100644 --- a/docs/compiled/artplayer-plugin-chapter.mjs +++ b/docs/compiled/artplayer-plugin-chapter.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chapter.js v1.0.3 + * artplayer-plugin-chapter.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-chromecast.js b/docs/compiled/artplayer-plugin-chromecast.js index c9af83721..f6a65e412 100644 --- a/docs/compiled/artplayer-plugin-chromecast.js +++ b/docs/compiled/artplayer-plugin-chromecast.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chromecast.js v1.0.2 + * artplayer-plugin-chromecast.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-chromecast.legacy.js b/docs/compiled/artplayer-plugin-chromecast.legacy.js index c8822c840..a9bf8d244 100644 --- a/docs/compiled/artplayer-plugin-chromecast.legacy.js +++ b/docs/compiled/artplayer-plugin-chromecast.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chromecast.js v1.0.2 + * artplayer-plugin-chromecast.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-chromecast.mjs b/docs/compiled/artplayer-plugin-chromecast.mjs index 1a828128a..394e29f20 100644 --- a/docs/compiled/artplayer-plugin-chromecast.mjs +++ b/docs/compiled/artplayer-plugin-chromecast.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chromecast.js v1.0.2 + * artplayer-plugin-chromecast.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-danmuku-mask.js b/docs/compiled/artplayer-plugin-danmuku-mask.js index 098b1dbcb..fada1a94e 100644 --- a/docs/compiled/artplayer-plugin-danmuku-mask.js +++ b/docs/compiled/artplayer-plugin-danmuku-mask.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku-mask.js v1.0.1 + * artplayer-plugin-danmuku-mask.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-danmuku-mask.legacy.js b/docs/compiled/artplayer-plugin-danmuku-mask.legacy.js index 692455d96..b77fb2283 100644 --- a/docs/compiled/artplayer-plugin-danmuku-mask.legacy.js +++ b/docs/compiled/artplayer-plugin-danmuku-mask.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku-mask.js v1.0.1 + * artplayer-plugin-danmuku-mask.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-danmuku-mask.mjs b/docs/compiled/artplayer-plugin-danmuku-mask.mjs index 5b74e387a..03cda29b0 100644 --- a/docs/compiled/artplayer-plugin-danmuku-mask.mjs +++ b/docs/compiled/artplayer-plugin-danmuku-mask.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku-mask.js v1.0.1 + * artplayer-plugin-danmuku-mask.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-danmuku.js b/docs/compiled/artplayer-plugin-danmuku.js index 13ad5ddc2..7869ed8ba 100644 --- a/docs/compiled/artplayer-plugin-danmuku.js +++ b/docs/compiled/artplayer-plugin-danmuku.js @@ -1,7 +1,7 @@ /*! - * artplayer-plugin-danmuku.js v5.2.1 + * artplayer-plugin-danmuku.js v5.3.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";function t(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function e(e){if("string"!==typeof e)return[];const i=e.matchAll(/]*?p="(?

[^"]+)"[^>]*>(?.*?)<\/d>/gs);return Array.from(i).map(e=>{const i=e.groups.p.split(",");if(i.length>=8){return{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(i[0]),mode:t(Number(i[1])),fontSize:Number(i[2]),color:`#${Number(i[3]).toString(16)}`,timestamp:Number(i[4]),pool:Number(i[5]),userID:i[6],rowID:Number(i[7])}}return null}).filter(Boolean)}function i({data:t}){const{xml:i,id:a}=t;if(!a||!i)return;const n=e(i);globalThis.postMessage({danmus:n,id:a})}function a(){const a=`\n ${t.toString()}\n ${e.toString()}\n onmessage = ${i.toString()}\n `,n=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}const n='/*!\n * artplayer-plugin-danmuku.js v5.2.1\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',s="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",n],{type:"text/javascript;charset=utf-8"});function o(t){let e;try{if(e=s&&(self.URL||self.webkitURL).createObjectURL(s),!e)throw"";const i=new Worker(e,{type:"module",name:t?.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(n),{type:"module",name:t?.name})}}class r{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=r.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new o,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return r.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=r.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){const{errorHandle:i}=this.utils;let n=[];const s=t||this.option.danmuku;try{"function"===typeof s?n=await s():s instanceof Promise?n=await s:"string"===typeof s?n=await(o=s,new Promise(async t=>{const i=await fetch(o),n=await i.text();try{const e=a();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:n,id:Date.now()})}catch(s){console.error("Error parsing Bilibili Danmu:",s);const i=e(n);t(i)}})):Array.isArray(s)&&(n=s),i(Array.isArray(n),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},r.option,this.option,t),this.validator(this.option,r.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=r.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const l={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function d(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,o=null;function r(r=[]){if(s=null,o=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(r)&&r.length)h=[...r];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const g=h.map(t=>t[1]),f=(Math.min(...g)+Math.max(...g))/2;for(let t=0;tf?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(i**2+a**2),angle:Math.atan2(a,i)}}(e||t,i||t),s=l.map(Math.cos(n.angle)*p.flattening,0,1,1,0),o=n.angle*s+(a?Math.PI:0),r=n.length*p.smoothing;return[t[0]+Math.cos(o)*r,t[1]+Math.sin(o)*r]},v=h.map(t=>[l.map(t[0],p.xMin,p.xMax,0,d.w),l.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),o=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&o&&(s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&o&&"played"===t&&(s.setAttribute("offset",100*e+"%"),o.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>r()),t.on("resize",()=>r()),t.on("artplayerPluginDanmuku:loaded",()=>r()),t.on("artplayerPluginDanmuku:points",t=>r(t))}})}const p='',h='',u='',c='',m='',g='',f='',y='',v='',k='',$='',x='';class w{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:$,$off:k,$config:u,$style:x,$mode_0_off:c,$mode_0_on:m,$mode_1_off:g,$mode_1_on:f,$mode_2_off:y,$mode_2_on:v,$check_on:h,$check_off:p}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${$}${k}\n
\n
\n ${u}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${c}${m}\n
\u6eda\u52a8
\n
\n
\n ${g}${f}\n
\u9876\u90e8
\n
\n
\n ${y}${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${h}${p}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${h}${p}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${x}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${m}\n
\u6eda\u52a8
\n
\n
\n ${f}\n
\u9876\u90e8
\n
\n
\n ${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}async emit(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function b(t){return e=>{const i=new r(e,t),a=new w(e,i);return i.option.heatmap&&d(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return b.icons=w.icons,b}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";function t(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function e(e){if("string"!==typeof e)return[];const i=e.matchAll(/]*?p="(?

[^"]+)"[^>]*>(?.*?)<\/d>/gs);return Array.from(i).map(e=>{const i=e.groups.p.split(",");if(i.length>=8){return{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(i[0]),mode:t(Number(i[1])),fontSize:Number(i[2]),color:`#${Number(i[3]).toString(16)}`,timestamp:Number(i[4]),pool:Number(i[5]),userID:i[6],rowID:Number(i[7])}}return null}).filter(Boolean)}function i({data:t}){const{xml:i,id:a}=t;if(!a||!i)return;const n=e(i);globalThis.postMessage({danmus:n,id:a})}function a(){const a=`\n ${t.toString()}\n ${e.toString()}\n onmessage = ${i.toString()}\n `,n=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}const n='/*!\n * artplayer-plugin-danmuku.js v5.3.0\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',s="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",n],{type:"text/javascript;charset=utf-8"});function o(t){let e;try{if(e=s&&(self.URL||self.webkitURL).createObjectURL(s),!e)throw"";const i=new Worker(e,{type:"module",name:t?.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(n),{type:"module",name:t?.name})}}class r{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=r.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new o,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return r.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=r.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){const{errorHandle:i}=this.utils;let n=[];const s=t||this.option.danmuku;try{"function"===typeof s?n=await s():s instanceof Promise?n=await s:"string"===typeof s?n=await(o=s,new Promise(async t=>{const i=await fetch(o),n=await i.text();try{const e=a();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:n,id:Date.now()})}catch(s){console.error("Error parsing Bilibili Danmu:",s);const i=e(n);t(i)}})):Array.isArray(s)&&(n=s),i(Array.isArray(n),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},r.option,this.option,t),this.validator(this.option,r.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=r.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const l={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function d(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,o=null;function r(r=[]){if(s=null,o=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(r)&&r.length)h=[...r];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const g=h.map(t=>t[1]),f=(Math.min(...g)+Math.max(...g))/2;for(let t=0;tf?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(i**2+a**2),angle:Math.atan2(a,i)}}(e||t,i||t),s=l.map(Math.cos(n.angle)*p.flattening,0,1,1,0),o=n.angle*s+(a?Math.PI:0),r=n.length*p.smoothing;return[t[0]+Math.cos(o)*r,t[1]+Math.sin(o)*r]},v=h.map(t=>[l.map(t[0],p.xMin,p.xMax,0,d.w),l.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),o=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&o&&(s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&o&&"played"===t&&(s.setAttribute("offset",100*e+"%"),o.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>r()),t.on("resize",()=>r()),t.on("artplayerPluginDanmuku:loaded",()=>r()),t.on("artplayerPluginDanmuku:points",t=>r(t))}})}const p='',h='',u='',c='',m='',g='',f='',y='',v='',k='',$='',x='';class w{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:$,$off:k,$config:u,$style:x,$mode_0_off:c,$mode_0_on:m,$mode_1_off:g,$mode_1_on:f,$mode_2_off:y,$mode_2_on:v,$check_on:h,$check_off:p}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${$}${k}\n
\n
\n ${u}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${c}${m}\n
\u6eda\u52a8
\n
\n
\n ${g}${f}\n
\u9876\u90e8
\n
\n
\n ${y}${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${h}${p}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${h}${p}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${x}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${m}\n
\u6eda\u52a8
\n
\n
\n ${f}\n
\u9876\u90e8
\n
\n
\n ${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}async emit(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function b(t){return e=>{const i=new r(e,t),a=new w(e,i);return i.option.heatmap&&d(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return b.icons=w.icons,b}); diff --git a/docs/compiled/artplayer-plugin-danmuku.legacy.js b/docs/compiled/artplayer-plugin-danmuku.legacy.js index a08a3fac2..83a1130ab 100644 --- a/docs/compiled/artplayer-plugin-danmuku.legacy.js +++ b/docs/compiled/artplayer-plugin-danmuku.legacy.js @@ -1,7 +1,7 @@ /*! - * artplayer-plugin-danmuku.js v5.2.1 + * artplayer-plugin-danmuku.js v5.3.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,o=Math.pow,r=(e,i,a)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,l=(t,e)=>{for(var i in e||(e={}))n.call(e,i)&&r(t,i,e[i]);if(a)for(var i of a(e))s.call(e,i)&&r(t,i,e[i]);return t},d=(t,a)=>e(t,i(a)),p=(t,e,i)=>new Promise((a,n)=>{var s=t=>{try{r(i.next(t))}catch(e){n(e)}},o=t=>{try{r(i.throw(t))}catch(e){n(e)}},r=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);r((i=i.apply(t,e)).next())});function h(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function u(t){if("string"!==typeof t)return[];const e=new RegExp(']*?p="(?

[^"]+)"[^>]*>(?.*?)<\\/d>',"gs"),i=t.matchAll(e);return Array.from(i).map(t=>{const e=t.groups.p.split(",");if(e.length>=8){return{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:h(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}return null}).filter(Boolean)}function c({data:t}){const{xml:e,id:i}=t;if(!i||!e)return;const a=u(e);globalThis.postMessage({danmus:a,id:i})}function m(){const t=`\n ${h.toString()}\n ${u.toString()}\n onmessage = ${c.toString()}\n `,e=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(e))}const f='/*!\n * artplayer-plugin-danmuku.js v5.2.1\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',g="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",f],{type:"text/javascript;charset=utf-8"});function y(t){let e;try{if(e=g&&(self.URL||self.webkitURL).createObjectURL(g),!e)throw"";const i=new Worker(e,{type:"module",name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(f),{type:"module",name:null==t?void 0:t.name})}}class v{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=v.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new y,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){var t,e;return null==(e=null==(t=this.art.plugins)?void 0:t.autoOrientation)?void 0:e.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return v.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=v.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}load(t){return p(this,null,function*(){const{errorHandle:e}=this.utils;let i=[];const a=t||this.option.danmuku;try{"function"===typeof a?i=yield a():a instanceof Promise?i=yield a:"string"===typeof a?i=yield(n=a,new Promise(t=>p(null,null,function*(){const e=yield fetch(n),i=yield e.text();try{const e=m();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:i,id:Date.now()})}catch(a){console.error("Error parsing Bilibili Danmu:",a);const e=u(i);t(e)}}))):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},v.option,this.option,t),this.validator(this.option,v.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=v.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(()=>p(this,null,function*(){if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const k={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function x(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,r=null;function l(l=[]){if(s=null,r=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(l)&&l.length)h=[...l];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const f=h.map(t=>t[1]),g=(Math.min(...f)+Math.max(...f))/2;for(let t=0;tg?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(o(i,2)+o(a,2)),angle:Math.atan2(a,i)}}(e||t,i||t),s=k.map(Math.cos(n.angle)*p.flattening,0,1,1,0),r=n.angle*s+(a?Math.PI:0),l=n.length*p.smoothing;return[t[0]+Math.cos(r)*l,t[1]+Math.sin(r)*l]},v=h.map(t=>[k.map(t[0],p.xMin,p.xMax,0,d.w),k.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),r=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&r&&(s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&r&&"played"===t&&(s.setAttribute("offset",100*e+"%"),r.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>l()),t.on("resize",()=>l()),t.on("artplayerPluginDanmuku:loaded",()=>l()),t.on("artplayerPluginDanmuku:points",t=>l(t))}})}const $='',w='',b='',S='',M='',z='',E='',T='',C='',F='',A='',P='';class D{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:A,$off:F,$config:b,$style:P,$mode_0_off:S,$mode_0_on:M,$mode_1_off:z,$mode_1_on:E,$mode_2_off:T,$mode_2_on:C,$check_on:w,$check_off:$}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${A}${F}\n
\n
\n ${b}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${S}${M}\n
\u6eda\u52a8
\n
\n
\n ${z}${E}\n
\u9876\u90e8
\n
\n
\n ${T}${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${w}${$}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${w}${$}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${P}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${M}\n
\u6eda\u52a8
\n
\n
\n ${E}\n
\u9876\u90e8
\n
\n
\n ${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return l({min:0,max:100,steps:[]},this.option.OPACITY)}get FONT_SIZE(){return l({min:12,max:120,steps:[]},this.option.FONT_SIZE)}get MARGIN(){return l({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}]},this.option.MARGIN)}get SPEED(){return l({min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}]},this.option.SPEED)}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider(d(l({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider(d(l({},this.MARGIN),{container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}})),this.slider.fontSize=this.createSlider(d(l({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider(d(l({},this.SPEED),{container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}}))}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}emit(){return p(this,null,function*(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=yield this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}})}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function O(t){return e=>{const i=new v(e,t),a=new D(e,i);return i.option.heatmap&&x(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return O.icons=D.icons,O}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,o=Math.pow,r=(e,i,a)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,l=(t,e)=>{for(var i in e||(e={}))n.call(e,i)&&r(t,i,e[i]);if(a)for(var i of a(e))s.call(e,i)&&r(t,i,e[i]);return t},d=(t,a)=>e(t,i(a)),p=(t,e,i)=>new Promise((a,n)=>{var s=t=>{try{r(i.next(t))}catch(e){n(e)}},o=t=>{try{r(i.throw(t))}catch(e){n(e)}},r=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);r((i=i.apply(t,e)).next())});function h(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function u(t){if("string"!==typeof t)return[];const e=new RegExp(']*?p="(?

[^"]+)"[^>]*>(?.*?)<\\/d>',"gs"),i=t.matchAll(e);return Array.from(i).map(t=>{const e=t.groups.p.split(",");if(e.length>=8){return{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:h(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}return null}).filter(Boolean)}function c({data:t}){const{xml:e,id:i}=t;if(!i||!e)return;const a=u(e);globalThis.postMessage({danmus:a,id:i})}function m(){const t=`\n ${h.toString()}\n ${u.toString()}\n onmessage = ${c.toString()}\n `,e=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(e))}const f='/*!\n * artplayer-plugin-danmuku.js v5.3.0\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',g="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",f],{type:"text/javascript;charset=utf-8"});function y(t){let e;try{if(e=g&&(self.URL||self.webkitURL).createObjectURL(g),!e)throw"";const i=new Worker(e,{type:"module",name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(f),{type:"module",name:null==t?void 0:t.name})}}class v{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=v.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new y,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){var t,e;return null==(e=null==(t=this.art.plugins)?void 0:t.autoOrientation)?void 0:e.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return v.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=v.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}load(t){return p(this,null,function*(){const{errorHandle:e}=this.utils;let i=[];const a=t||this.option.danmuku;try{"function"===typeof a?i=yield a():a instanceof Promise?i=yield a:"string"===typeof a?i=yield(n=a,new Promise(t=>p(null,null,function*(){const e=yield fetch(n),i=yield e.text();try{const e=m();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:i,id:Date.now()})}catch(a){console.error("Error parsing Bilibili Danmu:",a);const e=u(i);t(e)}}))):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},v.option,this.option,t),this.validator(this.option,v.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=v.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(()=>p(this,null,function*(){if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const k={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function x(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,r=null;function l(l=[]){if(s=null,r=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(l)&&l.length)h=[...l];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const f=h.map(t=>t[1]),g=(Math.min(...f)+Math.max(...f))/2;for(let t=0;tg?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(o(i,2)+o(a,2)),angle:Math.atan2(a,i)}}(e||t,i||t),s=k.map(Math.cos(n.angle)*p.flattening,0,1,1,0),r=n.angle*s+(a?Math.PI:0),l=n.length*p.smoothing;return[t[0]+Math.cos(r)*l,t[1]+Math.sin(r)*l]},v=h.map(t=>[k.map(t[0],p.xMin,p.xMax,0,d.w),k.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),r=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&r&&(s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&r&&"played"===t&&(s.setAttribute("offset",100*e+"%"),r.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>l()),t.on("resize",()=>l()),t.on("artplayerPluginDanmuku:loaded",()=>l()),t.on("artplayerPluginDanmuku:points",t=>l(t))}})}const $='',w='',b='',S='',M='',z='',E='',T='',C='',F='',A='',P='';class D{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:A,$off:F,$config:b,$style:P,$mode_0_off:S,$mode_0_on:M,$mode_1_off:z,$mode_1_on:E,$mode_2_off:T,$mode_2_on:C,$check_on:w,$check_off:$}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${A}${F}\n
\n
\n ${b}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${S}${M}\n
\u6eda\u52a8
\n
\n
\n ${z}${E}\n
\u9876\u90e8
\n
\n
\n ${T}${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${w}${$}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${w}${$}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${P}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${M}\n
\u6eda\u52a8
\n
\n
\n ${E}\n
\u9876\u90e8
\n
\n
\n ${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return l({min:0,max:100,steps:[]},this.option.OPACITY)}get FONT_SIZE(){return l({min:12,max:120,steps:[]},this.option.FONT_SIZE)}get MARGIN(){return l({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}]},this.option.MARGIN)}get SPEED(){return l({min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}]},this.option.SPEED)}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider(d(l({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider(d(l({},this.MARGIN),{container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}})),this.slider.fontSize=this.createSlider(d(l({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider(d(l({},this.SPEED),{container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}}))}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}emit(){return p(this,null,function*(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=yield this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}})}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function O(t){return e=>{const i=new v(e,t),a=new D(e,i);return i.option.heatmap&&x(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return O.icons=D.icons,O}); diff --git a/docs/compiled/artplayer-plugin-danmuku.mjs b/docs/compiled/artplayer-plugin-danmuku.mjs index 7eb392f66..fac426cd8 100644 --- a/docs/compiled/artplayer-plugin-danmuku.mjs +++ b/docs/compiled/artplayer-plugin-danmuku.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku.js v5.2.1 + * artplayer-plugin-danmuku.js v5.3.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. @@ -80,7 +80,7 @@ function bilibiliDanmuParseFromUrl(url) { } }); } -const jsContent = '/*!\n * artplayer-plugin-danmuku.js v5.2.1\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction getDanmuTop({ target, visibles, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {\n const maxTop = clientHeight - marginBottom;\n const danmus = visibles.filter((item) => item.mode === target.mode && item.top <= maxTop).sort((prev, next) => prev.top - next.top);\n if (danmus.length === 0) {\n if (target.mode === 2) {\n return maxTop - target.height;\n } else {\n return marginTop;\n }\n }\n danmus.unshift({\n type: "top",\n top: 0,\n left: 0,\n right: 0,\n height: marginTop,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n danmus.push({\n type: "bottom",\n top: maxTop,\n left: 0,\n right: 0,\n height: marginBottom,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n if (target.mode === 2) {\n for (let index = danmus.length - 2; index >= 0; index -= 1) {\n const item = danmus[index];\n const prev = danmus[index + 1];\n const itemBottom = item.top + item.height;\n const diff = prev.top - itemBottom;\n if (diff >= target.height) {\n return prev.top - target.height;\n }\n }\n } else {\n for (let index = 1; index < danmus.length; index += 1) {\n const item = danmus[index];\n const prev = danmus[index - 1];\n const prevBottom = prev.top + prev.height;\n const diff = item.top - prevBottom;\n if (diff >= target.height) {\n return prevBottom;\n }\n }\n }\n const topMap = [];\n for (let index = 1; index < danmus.length - 1; index += 1) {\n const item = danmus[index];\n if (topMap.length) {\n const last = topMap[topMap.length - 1];\n if (last[0].top === item.top) {\n last.push(item);\n } else {\n topMap.push([item]);\n }\n } else {\n topMap.push([item]);\n }\n }\n if (antiOverlap) {\n switch (target.mode) {\n case 0: {\n const result = topMap.find((list) => {\n return list.every((danmu) => {\n if (clientWidth < danmu.distance)\n return false;\n if (target.speed < danmu.speed)\n return true;\n const overlapTime = danmu.right / (target.speed - danmu.speed);\n if (overlapTime > danmu.time)\n return true;\n return false;\n });\n });\n return result && result[0] ? result[0].top : void 0;\n }\n // 静止弹幕没有重叠问题\n case 1:\n case 2:\n return void 0;\n }\n } else {\n switch (target.mode) {\n case 0:\n topMap.sort((prev, next) => {\n const nextMinRight = Math.min(...next.map((item) => item.right));\n const prevMinRight = Math.min(...prev.map((item) => item.right));\n return nextMinRight * next.length - prevMinRight * prev.length;\n });\n break;\n case 1:\n case 2:\n topMap.sort((prev, next) => {\n const nextMaxWidth = Math.max(...next.map((item) => item.width));\n const prevMaxWidth = Math.max(...prev.map((item) => item.width));\n return prevMaxWidth * prev.length - nextMaxWidth * next.length;\n });\n break;\n }\n return topMap[0][0].top;\n }\n}\nonmessage = (event) => {\n const { data } = event;\n if (!data.id || !data.type)\n return;\n const fns = { getDanmuTop };\n const fn = fns[data.type];\n const result = fn(data);\n globalThis.postMessage({\n result,\n id: data.id\n });\n};\n'; +const jsContent = '/*!\n * artplayer-plugin-danmuku.js v5.3.0\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction getDanmuTop({ target, visibles, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {\n const maxTop = clientHeight - marginBottom;\n const danmus = visibles.filter((item) => item.mode === target.mode && item.top <= maxTop).sort((prev, next) => prev.top - next.top);\n if (danmus.length === 0) {\n if (target.mode === 2) {\n return maxTop - target.height;\n } else {\n return marginTop;\n }\n }\n danmus.unshift({\n type: "top",\n top: 0,\n left: 0,\n right: 0,\n height: marginTop,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n danmus.push({\n type: "bottom",\n top: maxTop,\n left: 0,\n right: 0,\n height: marginBottom,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n if (target.mode === 2) {\n for (let index = danmus.length - 2; index >= 0; index -= 1) {\n const item = danmus[index];\n const prev = danmus[index + 1];\n const itemBottom = item.top + item.height;\n const diff = prev.top - itemBottom;\n if (diff >= target.height) {\n return prev.top - target.height;\n }\n }\n } else {\n for (let index = 1; index < danmus.length; index += 1) {\n const item = danmus[index];\n const prev = danmus[index - 1];\n const prevBottom = prev.top + prev.height;\n const diff = item.top - prevBottom;\n if (diff >= target.height) {\n return prevBottom;\n }\n }\n }\n const topMap = [];\n for (let index = 1; index < danmus.length - 1; index += 1) {\n const item = danmus[index];\n if (topMap.length) {\n const last = topMap[topMap.length - 1];\n if (last[0].top === item.top) {\n last.push(item);\n } else {\n topMap.push([item]);\n }\n } else {\n topMap.push([item]);\n }\n }\n if (antiOverlap) {\n switch (target.mode) {\n case 0: {\n const result = topMap.find((list) => {\n return list.every((danmu) => {\n if (clientWidth < danmu.distance)\n return false;\n if (target.speed < danmu.speed)\n return true;\n const overlapTime = danmu.right / (target.speed - danmu.speed);\n if (overlapTime > danmu.time)\n return true;\n return false;\n });\n });\n return result && result[0] ? result[0].top : void 0;\n }\n // 静止弹幕没有重叠问题\n case 1:\n case 2:\n return void 0;\n }\n } else {\n switch (target.mode) {\n case 0:\n topMap.sort((prev, next) => {\n const nextMinRight = Math.min(...next.map((item) => item.right));\n const prevMinRight = Math.min(...prev.map((item) => item.right));\n return nextMinRight * next.length - prevMinRight * prev.length;\n });\n break;\n case 1:\n case 2:\n topMap.sort((prev, next) => {\n const nextMaxWidth = Math.max(...next.map((item) => item.width));\n const prevMaxWidth = Math.max(...prev.map((item) => item.width));\n return prevMaxWidth * prev.length - nextMaxWidth * next.length;\n });\n break;\n }\n return topMap[0][0].top;\n }\n}\nonmessage = (event) => {\n const { data } = event;\n if (!data.id || !data.type)\n return;\n const fns = { getDanmuTop };\n const fn = fns[data.type];\n const result = fn(data);\n globalThis.postMessage({\n result,\n id: data.id\n });\n};\n'; const blob = typeof self !== "undefined" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", jsContent], { type: "text/javascript;charset=utf-8" }); function WorkerWrapper(options) { let objURL; diff --git a/docs/compiled/artplayer-plugin-dash-control.js b/docs/compiled/artplayer-plugin-dash-control.js index 61def74d6..bb42c1d7b 100644 --- a/docs/compiled/artplayer-plugin-dash-control.js +++ b/docs/compiled/artplayer-plugin-dash-control.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-dash-control.js v1.0.1 + * artplayer-plugin-dash-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-dash-control.legacy.js b/docs/compiled/artplayer-plugin-dash-control.legacy.js index 61def74d6..bb42c1d7b 100644 --- a/docs/compiled/artplayer-plugin-dash-control.legacy.js +++ b/docs/compiled/artplayer-plugin-dash-control.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-dash-control.js v1.0.1 + * artplayer-plugin-dash-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-dash-control.mjs b/docs/compiled/artplayer-plugin-dash-control.mjs index 41478eeb1..e2374e353 100644 --- a/docs/compiled/artplayer-plugin-dash-control.mjs +++ b/docs/compiled/artplayer-plugin-dash-control.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-dash-control.js v1.0.1 + * artplayer-plugin-dash-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-document-pip.js b/docs/compiled/artplayer-plugin-document-pip.js index a62ba9d26..2fdef0b83 100644 --- a/docs/compiled/artplayer-plugin-document-pip.js +++ b/docs/compiled/artplayer-plugin-document-pip.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-document-pip.js v1.0.3 + * artplayer-plugin-document-pip.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-document-pip.legacy.js b/docs/compiled/artplayer-plugin-document-pip.legacy.js index a25c03d21..787c05f56 100644 --- a/docs/compiled/artplayer-plugin-document-pip.legacy.js +++ b/docs/compiled/artplayer-plugin-document-pip.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-document-pip.js v1.0.3 + * artplayer-plugin-document-pip.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-document-pip.mjs b/docs/compiled/artplayer-plugin-document-pip.mjs index 78872d3a8..451cd5a78 100644 --- a/docs/compiled/artplayer-plugin-document-pip.mjs +++ b/docs/compiled/artplayer-plugin-document-pip.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-document-pip.js v1.0.3 + * artplayer-plugin-document-pip.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-hls-control.js b/docs/compiled/artplayer-plugin-hls-control.js index c2c82b3a1..975adfd0c 100644 --- a/docs/compiled/artplayer-plugin-hls-control.js +++ b/docs/compiled/artplayer-plugin-hls-control.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-hls-control.js v1.0.2 + * artplayer-plugin-hls-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-hls-control.legacy.js b/docs/compiled/artplayer-plugin-hls-control.legacy.js index 220a60abf..29de770fa 100644 --- a/docs/compiled/artplayer-plugin-hls-control.legacy.js +++ b/docs/compiled/artplayer-plugin-hls-control.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-hls-control.js v1.0.2 + * artplayer-plugin-hls-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-hls-control.mjs b/docs/compiled/artplayer-plugin-hls-control.mjs index 8dab51822..8169373f1 100644 --- a/docs/compiled/artplayer-plugin-hls-control.mjs +++ b/docs/compiled/artplayer-plugin-hls-control.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-hls-control.js v1.0.2 + * artplayer-plugin-hls-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-jassub.js b/docs/compiled/artplayer-plugin-jassub.js index fc245c28f..985434418 100644 --- a/docs/compiled/artplayer-plugin-jassub.js +++ b/docs/compiled/artplayer-plugin-jassub.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-jassub.js v1.0.1 + * artplayer-plugin-jassub.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-jassub.legacy.js b/docs/compiled/artplayer-plugin-jassub.legacy.js index 26ed827a6..908b38a90 100644 --- a/docs/compiled/artplayer-plugin-jassub.legacy.js +++ b/docs/compiled/artplayer-plugin-jassub.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-jassub.js v1.0.1 + * artplayer-plugin-jassub.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-jassub.mjs b/docs/compiled/artplayer-plugin-jassub.mjs index 5b63eb278..b25489f1d 100644 --- a/docs/compiled/artplayer-plugin-jassub.mjs +++ b/docs/compiled/artplayer-plugin-jassub.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-jassub.js v1.0.1 + * artplayer-plugin-jassub.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-multiple-subtitles.js b/docs/compiled/artplayer-plugin-multiple-subtitles.js index 7928ca912..749450150 100644 --- a/docs/compiled/artplayer-plugin-multiple-subtitles.js +++ b/docs/compiled/artplayer-plugin-multiple-subtitles.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-multiple-subtitles.js v1.1.1 + * artplayer-plugin-multiple-subtitles.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js b/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js index be3b4ee4d..f6b175bd8 100644 --- a/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js +++ b/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-multiple-subtitles.js v1.1.1 + * artplayer-plugin-multiple-subtitles.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-multiple-subtitles.mjs b/docs/compiled/artplayer-plugin-multiple-subtitles.mjs index 80bedade6..8a9d230f3 100644 --- a/docs/compiled/artplayer-plugin-multiple-subtitles.mjs +++ b/docs/compiled/artplayer-plugin-multiple-subtitles.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-multiple-subtitles.js v1.1.1 + * artplayer-plugin-multiple-subtitles.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-vast.js b/docs/compiled/artplayer-plugin-vast.js index caab7807b..b86279484 100644 --- a/docs/compiled/artplayer-plugin-vast.js +++ b/docs/compiled/artplayer-plugin-vast.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vast.js v1.1.1 + * artplayer-plugin-vast.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-vast.legacy.js b/docs/compiled/artplayer-plugin-vast.legacy.js index 25022105d..104963dd7 100644 --- a/docs/compiled/artplayer-plugin-vast.legacy.js +++ b/docs/compiled/artplayer-plugin-vast.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vast.js v1.1.1 + * artplayer-plugin-vast.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-vast.mjs b/docs/compiled/artplayer-plugin-vast.mjs index 507c818d4..fb8194a22 100644 --- a/docs/compiled/artplayer-plugin-vast.mjs +++ b/docs/compiled/artplayer-plugin-vast.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vast.js v1.1.1 + * artplayer-plugin-vast.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-vtt-thumbnail.js b/docs/compiled/artplayer-plugin-vtt-thumbnail.js index ff64ef33a..3627b491f 100644 --- a/docs/compiled/artplayer-plugin-vtt-thumbnail.js +++ b/docs/compiled/artplayer-plugin-vtt-thumbnail.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vtt-thumbnail.js v1.0.4 + * artplayer-plugin-vtt-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js b/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js index edf11e79b..dead67bbf 100644 --- a/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js +++ b/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vtt-thumbnail.js v1.0.4 + * artplayer-plugin-vtt-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-plugin-vtt-thumbnail.mjs b/docs/compiled/artplayer-plugin-vtt-thumbnail.mjs index 42e603212..ecffe74e3 100644 --- a/docs/compiled/artplayer-plugin-vtt-thumbnail.mjs +++ b/docs/compiled/artplayer-plugin-vtt-thumbnail.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vtt-thumbnail.js v1.0.4 + * artplayer-plugin-vtt-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-proxy-canvas.js b/docs/compiled/artplayer-proxy-canvas.js index 25e4dddcd..a033c5dc5 100644 --- a/docs/compiled/artplayer-proxy-canvas.js +++ b/docs/compiled/artplayer-proxy-canvas.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-canvas.js v1.0.1 + * artplayer-proxy-canvas.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-proxy-canvas.legacy.js b/docs/compiled/artplayer-proxy-canvas.legacy.js index 43fd3d2dd..cb5cbd9e7 100644 --- a/docs/compiled/artplayer-proxy-canvas.legacy.js +++ b/docs/compiled/artplayer-proxy-canvas.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-canvas.js v1.0.1 + * artplayer-proxy-canvas.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-proxy-canvas.mjs b/docs/compiled/artplayer-proxy-canvas.mjs index 1d9e45ca4..705b3ca71 100644 --- a/docs/compiled/artplayer-proxy-canvas.mjs +++ b/docs/compiled/artplayer-proxy-canvas.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-canvas.js v1.0.1 + * artplayer-proxy-canvas.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-proxy-mediabunny.js b/docs/compiled/artplayer-proxy-mediabunny.js index 1e6efeeae..d783a9953 100644 --- a/docs/compiled/artplayer-proxy-mediabunny.js +++ b/docs/compiled/artplayer-proxy-mediabunny.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-mediabunny.js v1.0.1 + * artplayer-proxy-mediabunny.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-proxy-mediabunny.legacy.js b/docs/compiled/artplayer-proxy-mediabunny.legacy.js index 760501e5b..979246864 100644 --- a/docs/compiled/artplayer-proxy-mediabunny.legacy.js +++ b/docs/compiled/artplayer-proxy-mediabunny.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-mediabunny.js v1.0.1 + * artplayer-proxy-mediabunny.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-proxy-mediabunny.mjs b/docs/compiled/artplayer-proxy-mediabunny.mjs index 46b93030b..77d3f9981 100644 --- a/docs/compiled/artplayer-proxy-mediabunny.mjs +++ b/docs/compiled/artplayer-proxy-mediabunny.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-mediabunny.js v1.0.1 + * artplayer-proxy-mediabunny.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-tool-iframe.js b/docs/compiled/artplayer-tool-iframe.js index 646b56b94..8180b1f34 100644 --- a/docs/compiled/artplayer-tool-iframe.js +++ b/docs/compiled/artplayer-tool-iframe.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-iframe.js v1.0.1 + * artplayer-tool-iframe.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-tool-iframe.legacy.js b/docs/compiled/artplayer-tool-iframe.legacy.js index d3c550a40..4d398aa1e 100644 --- a/docs/compiled/artplayer-tool-iframe.legacy.js +++ b/docs/compiled/artplayer-tool-iframe.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-iframe.js v1.0.1 + * artplayer-tool-iframe.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-tool-iframe.mjs b/docs/compiled/artplayer-tool-iframe.mjs index 65141c663..3e99c0366 100644 --- a/docs/compiled/artplayer-tool-iframe.mjs +++ b/docs/compiled/artplayer-tool-iframe.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-tool-iframe.js v1.0.1 + * artplayer-tool-iframe.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-tool-thumbnail.js b/docs/compiled/artplayer-tool-thumbnail.js index 8b5600dc0..e16cbeccd 100644 --- a/docs/compiled/artplayer-tool-thumbnail.js +++ b/docs/compiled/artplayer-tool-thumbnail.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-thumbnail.js v4.3.12 + * artplayer-tool-thumbnail.js v4.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-tool-thumbnail.legacy.js b/docs/compiled/artplayer-tool-thumbnail.legacy.js index 8b5600dc0..e16cbeccd 100644 --- a/docs/compiled/artplayer-tool-thumbnail.legacy.js +++ b/docs/compiled/artplayer-tool-thumbnail.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-thumbnail.js v4.3.12 + * artplayer-tool-thumbnail.js v4.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer-tool-thumbnail.mjs b/docs/compiled/artplayer-tool-thumbnail.mjs index 2ab283089..f0eab6e03 100644 --- a/docs/compiled/artplayer-tool-thumbnail.mjs +++ b/docs/compiled/artplayer-tool-thumbnail.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-tool-thumbnail.js v4.3.12 + * artplayer-tool-thumbnail.js v4.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/docs/compiled/artplayer.js b/docs/compiled/artplayer.js index 2597bb2fa..623b028e0 100644 --- a/docs/compiled/artplayer.js +++ b/docs/compiled/artplayer.js @@ -1,7 +1,7 @@ /*! - * artplayer.js v5.3.1 + * artplayer.js v5.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var a=(e||(e=1,r.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(o=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(t){return t.constructor?t.constructor.name:null}function o(t,e){var a=2=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,h="undefined"!==typeof window&&"undefined"!==typeof document;function u(t,e=document){return e.querySelector(t)}function m(t,e=document){return Array.from(e.querySelectorAll(t))}function f(t,e){return t.classList.add(e)}function g(t,e){return t.classList.remove(e)}function v(t,e){return t.classList.contains(e)}function y(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function b(t){return t.parentNode.removeChild(t)}function w(t,e,r){return t.style[e]=r,t}function x(t,e){for(const r in e)w(t,r,e[r]);return t}function k(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function $(t,e){k(t).forEach(t=>g(t,e)),f(t,e)}function T(t,e,r="top"){p||(t.setAttribute("aria-label",e),f(t,"hint--rounded"),f(t,`hint--${r}`))}function E(t,e=0){const r=t.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=a&&r.top+r.height+e>=0,i=r.left-e<=o+e&&r.left+r.width+e>=0;return n&&i}function C(t,e){return R(t).includes(e)}function z(t,e){return e.parentNode.replaceChild(t,e),t}function L(t){return document.createElement(t)}function S(t="",e=""){const r=L("i");return f(r,"art-icon"),f(r,`art-icon-${t}`),y(r,e),r}function M(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function I(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function P(t){return t.getBoundingClientRect()}function A(t,e){return new Promise((r,a)=>{const o=new Image;o.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=o.width*e,n.height=o.height*e,i.drawImage(o,0,0,n.width,n.height),n.toBlob(e=>{const o=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(o),a(new Error(`Image load failed: ${t}`))},n.src=o})}else r(o)},o.onerror=function(){a(new Error(`Image load failed: ${t}`))},o.src=t})}function R(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class O extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function _(t,e){if(!t)throw new O(e);return t}function V(t){return t.includes("?")?V(t.split("?")[0]):t.includes("#")?V(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function Y(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function D(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function N(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),a=Math.floor(t-3600*e-60*r);return(e>0?[e,r,a]:[r,a]).map(t=>t<10?`0${t}`:String(t)).join(":")}function B(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const H=Object.defineProperty,{hasOwnProperty:W}=Object.prototype;function j(t,e){return W.call(t,e)}function U(t,e){return Object.getOwnPropertyDescriptor(t,e)}function q(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(a=>{const o=t[a],n=r[a];Array.isArray(o)&&Array.isArray(n)?t[a]=o.concat(...n):e(o)&&e(n)?t[a]=q(o,n):t[a]=n}),t),{})}function X(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=`${r}00`),2===r.length&&(a=`${r}0`),`${e},${a}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function G(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function K(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const a=t.match(e);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function Z(t=0){return new Promise(e=>setTimeout(e,t))}function J(t,e){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,a)),e)}}function Q(t,e){let r=!1;return function(...a){r||(t.apply(this,a),r=!0,setTimeout(()=>{r=!1},e))}}const tt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:O,addClass:f,append:y,assToVtt:K,capitalize:N,clamp:D,createElement:L,debounce:J,def:H,download:Y,errorHandle:_,escape:B,get:U,getComposedPath:R,getExt:V,getIcon:S,getRect:P,getStyle:function(t,e,r=!0){const a=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(a):a},has:j,hasClass:v,includeFromEvent:C,inverseClass:$,isBrowser:h,isIOS:c,isIOS13:d,isInViewport:E,isMobile:p,isSafari:l,loadImg:A,mergeDeep:q,query:u,queryAll:m,remove:b,removeClass:g,replaceElement:z,secondToTime:F,setStyle:w,setStyleText:M,setStyles:x,siblings:k,sleep:Z,srtToVtt:X,supportsFlex:I,throttle:Q,tooltip:T,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:s,vttToBlob:G},Symbol.toStringTag,{value:"Module"})),et="array",rt="boolean",at="string",ot="number",nt="object",it="function";function st(t,e,r){return _(e===at||e===ot||t instanceof Element,`${r.join(".")} require '${at}' or 'Element' type`)}const lt={html:st,disable:`?${rt}`,name:`?${at}`,index:`?${ot}`,style:`?${nt}`,click:`?${it}`,mounted:`?${it}`,tooltip:`?${at}|${ot}`,width:`?${ot}`,selector:`?${et}`,onSelect:`?${it}`,switch:`?${rt}`,onSwitch:`?${it}`,range:`?${et}`,onRange:`?${it}`,onChange:`?${it}`},ct={id:at,container:st,url:at,poster:at,type:at,theme:at,lang:at,volume:ot,isLive:rt,muted:rt,autoplay:rt,autoSize:rt,autoMini:rt,loop:rt,flip:rt,playbackRate:rt,aspectRatio:rt,screenshot:rt,setting:rt,hotkey:rt,pip:rt,mutex:rt,backdrop:rt,fullscreen:rt,fullscreenWeb:rt,subtitleOffset:rt,miniProgressBar:rt,useSSR:rt,playsInline:rt,lock:rt,gesture:rt,fastForward:rt,autoPlayback:rt,autoOrientation:rt,airplay:rt,proxy:`?${it}`,plugins:[it],layers:[lt],contextmenu:[lt],settings:[lt],controls:[{...lt,position:(t,e,r)=>{const a=["top","left","right"];return _(a.includes(t),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${rt}`,html:at,url:at}],highlight:[{time:ot,text:at}],thumbnails:{url:at,number:ot,column:ot,width:ot,height:ot,scale:ot},subtitle:{url:at,name:at,type:at,style:nt,escape:rt,encoding:at,onVttLoad:it},moreVideoAttr:nt,i18n:nt,icons:nt,cssVar:nt,customType:nt};class dt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return v(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?f(e,r):g(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",o(e,lt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;_(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const a=L("div");f(a,`art-${this.name}`),f(a,`art-${this.name}-${r}`);const n=Array.from(this.$parent.children);a.dataset.index=e.index||this.id;const i=n.find(t=>Number(t.dataset.index)>=Number(a.dataset.index));i?i.insertAdjacentElement("beforebegin",a):y(this.$parent,a),e.html&&y(a,e.html),e.style&&x(a,e.style),e.tooltip&&T(a,e.tooltip);const s=[];if(e.click){const t=this.art.events.proxy(a,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});s.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,a,s),this[r]=a,this.cache.set(r,{$ref:a,events:s,option:e}),e.mounted&&e.mounted.call(this.art,a),a}remove(t){_(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],b(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class pt extends dt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,p||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:a}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:a}}=e,o=a.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return{...t,html:`${r.get("Play Speed")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.playbackRate=Number(a),t.show=!1)},mounted:t=>{const r=u('[data-value="1"]',t);r&&$(r,"art-current"),e.on("video:ratechange",()=>{const r=m("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&$(r,"art-current")})}}}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:a}}=e,o=a.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return{...t,html:`${r.get("Aspect Ratio")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.aspectRatio=a,t.show=!1)},mounted:t=>{const r=u('[data-value="default"]',t);r&&$(r,"art-current"),e.on("aspectRatio",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:a}}=e,o=a.map(t=>`${r.get(N(t))}`).join("");return{...t,html:`${r.get("Video Flip")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.flip=a.toLowerCase(),t.show=!1)},mounted:t=>{const r=u('[data-value="normal"]',t);r&&$(r,"art-current"),e.on("flip",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"flip",index:30})),this.add(function(t){return e=>({...t,html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=h?location.href:"";return{...t,html:`ArtPlayer ${n}`}}({name:"version",index:50})),this.add(function(t){return e=>({...t,html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let o=0;o{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,o=t.clientY,{height:n,width:i,left:s,top:l}=P(r),{height:c,width:d}=P(a);let p=e-s,h=o-l;e+d>s+i&&(p=i-d),o+c>l+n&&(h=n-c),x(a,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{C(t,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function ht(t,e){const{$progress:r}=t.template,{left:a}=P(r),o=D((p?e.touches[0].clientX:e.clientX)-a,0,r.clientWidth),n=o/r.clientWidth*t.duration;return{second:n,time:F(n),width:o,percentage:D(o/r.clientWidth,0,1)}}function ut(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,a=r*t.duration;t.emit("setBar","played",r,e),t.seek=a}else{const{second:r,percentage:a}=ht(t,e);t.emit("setBar","played",a,e),t.seek=r}}function mt(t){return e=>{const{icons:r,option:a,proxy:o}=e,{$player:n}=e.template;return{...t,html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let i=null,s=!1;const l=u(".art-progress-hover",t),c=u(".art-progress-loaded",t),d=u(".art-progress-played",t),h=u(".art-progress-highlight",t),m=u(".art-progress-indicator",t),v=u(".art-progress-tip",t);function b(r,a){const{width:o,time:n}=a||ht(e,r);v.textContent=n||"00:00";const i=v.clientWidth;o<=i/2?w(v,"left",0):o>t.clientWidth-i/2?w(v,"left",t.clientWidth-i+"px"):w(v,"left",o-i/2+"px")}r.indicator?y(m,r.indicator):w(m,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,a,o){const s="played"===r&&o&&p;if("loaded"===r&&w(c,"width",100*a+"%"),"hover"===r&&(w(l,"width",100*a+"%"),C(o,h)?function(r){const{width:a}=ht(e,r),{text:o}=r.target.dataset;v.textContent=o;const n=v.clientWidth;a<=n/2?w(v,"left",0):a>t.clientWidth-n/2?w(v,"left",t.clientWidth-n+"px"):w(v,"left",a-n/2+"px")}(o):b(o),0===a?g(n,"art-progress-hover"):f(n,"art-progress-hover")),"played"===r&&(w(d,"width",100*a+"%"),w(m,"left",100*a+"%")),s){f(n,"art-progress-hover");b(o,{width:t.clientWidth*a,time:F(a*e.duration)}),clearTimeout(i),i=setTimeout(()=>{g(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){h.textContent="";for(let t=0;t`;y(h,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),p||(o(t,"click",t=>{t.target!==m&&ut(e,t)}),o(t,"mousemove",t=>{const{percentage:r}=ht(e,t);e.emit("setBar","hover",r,t)}),o(t,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),o(t,"mousedown",t=>{s=0===t.button}),e.on("document:mousemove",t=>{if(s){const{second:r,percentage:a}=ht(e,t);e.emit("setBar","played",a,t),e.seek=r}}),e.on("document:mouseup",()=>{s&&(s=!1)}))}}}}class ft extends dt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:a}=this.art.template;t.on("mousemove",()=>{p||(this.show=!0)}),t.on("click",()=>{p?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=C(t,a)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(g(r,"art-hide-cursor"),f(r,"art-hover"),this.timer=Date.now()):(f(r,"art-hide-cursor"),g(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(mt({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.play),i=y(t,a.pause);function s(){w(n,"display","flex"),w(i,"display","none")}function l(){w(n,"display","none"),w(i,"display","flex")}T(n,o.get("Play")),T(i,o.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a}=e,o=y(t,a.volume),n=y(t,a.volumeClose),i=y(t,'
'),s=y(i,'
'),l=y(s,'
'),c=y(s,'
'),d=y(c,'
'),h=y(d,'
'),u=y(c,'
');function m(t){const{top:e,height:r}=P(c);return 1-(t.clientY-e)/r}function f(){if(e.muted||0===e.volume)w(o,"display","none"),w(n,"display","flex"),w(u,"top","100%"),w(h,"top","100%"),l.textContent=0;else{const t=100*e.volume;w(o,"display","flex"),w(n,"display","none"),w(u,"top",100-t+"%"),w(h,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(f(),e.on("video:volumechange",f),r(o,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),p)w(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=m(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=m(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>({...t,style:p?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${F(e.currentTime)} / ${F(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let o=0;o{this.art.quality=t.quality}),t.screenshot&&!p&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{T(t,o.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{T(t,o.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenWebOn),i=y(t,a.fullscreenWebOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(T(t,o.get("Exit Web Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Web Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenOn),i=y(t,a.fullscreenOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(T(t,o.get("Exit Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),H(e,"$control_item",{get:()=>r}),H(e,"$control_value",{get:()=>o})}const i=a(n,"click",async e=>{const r=R(e),a=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(a),t.onSelect&&(o.innerHTML=await t.onSelect.call(this.art,a,a.$control_item,e))});r.push(i)}}function gt(t,e,r,a){const o=e-a,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(o)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,o);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class vt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:a,$video:o}}=t;function n(e){C(e,a)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(o,"click",e=>{const a=Date.now();i.push(a);const{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>a-t<=n);switch(c.length){case 1:t.emit("click",e),p?!t.isLock&&o&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),p?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{f(r,"art-hover"),t.emit("hover",!0,e)},e=>{g(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:a}=t;t.on("resize",()=>{const{aspectRatio:e,notice:a}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,a.show=""});const o=J(()=>t.emit("resize"),a.RESIZE_TIME);t.on("window:orientationchange",()=>o()),t.on("window:resize",()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>o())}(t,this),function(t,e){if(p&&!t.option.isLive){const{$video:r,$progress:a}=t.template;let o=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){o===a&&ut(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:a,pageY:n}=e.touches[0],c=gt(i,s,a,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=D((a-i)/t.width,-1,1),d=D((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=o===r?t.constructor.TOUCH_MOVE_RATIO:1,u=D(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",D(u/t.duration,0,1),e),t.notice.show=`${F(u)} / ${F(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,o=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{o=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(a,"touchstart",t=>{o=a,c(t)}),e.proxy(a,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:a}}=t,o=Q(()=>{t.emit("view",E(a,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>o()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],a=["resize","scroll","orientationchange"],o=[];function n(n={}){for(let t=0;t{const a=n.document||i.ownerDocument||document,s=e.proxy(a,r,e=>{t.emit(`document:${r}`,e)});o.push(s)}),a.forEach(r=>{const a=n.window||i.ownerDocument?.defaultView||window,s=e.proxy(a,r,e=>{t.emit(`window:${r}`,e)});o.push(s)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,a={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,a));t.addEventListener(e,r,a);const o=()=>t.removeEventListener(e,r,a);return this.destroyEvents.add(o),o}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class yt{constructor(t){this.art=t,this.keys={},p||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n',...t.option.icons};for(const r in e)H(this,r,{get:()=>S(r,e[r])})}}class kt extends dt{constructor(t){super(t),this.name="info",p||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;t(a,"click",()=>{this.show=!1});let n=null;const i=m("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{w(o,"display","none"),w(n,"display",null)}),a.proxy(e.$state,"click",()=>t.play())}}class Ct{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:a}}=this.art;t?(a.textContent=t instanceof Error?t.message.trim():t,f(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{a.textContent="",g(r,"art-notice-show")},e.NOTICE_TIME)):g(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const zt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Lt=(()=>{if("undefined"===typeof document)return!1;const t=zt[0],e={};for(const r of zt){if(r[1]in document){for(const[a,o]of r.entries())e[t[a]]=o;return e}}return!1})(),St={change:Lt.fullscreenchange,error:Lt.fullscreenerror},Mt={request:(t=document.documentElement,e)=>new Promise((r,a)=>{const o=()=>{Mt.off("change",o),r()};Mt.on("change",o);const n=t[Lt.requestFullscreen](e);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((t,e)=>{if(!Mt.isFullscreen)return void t();const r=()=>{Mt.off("change",r),t()};Mt.on("change",r);const a=document[Lt.exitFullscreen]();a instanceof Promise&&a.then(r).catch(e)}),toggle:(t,e)=>Mt.isFullscreen?Mt.exit():Mt.request(t,e),onchange(t){Mt.on("change",t)},onerror(t){Mt.on("error",t)},on(t,e){const r=St[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=St[t];r&&document.removeEventListener(r,e,!1)},raw:Lt};function It(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;t.once("video:loadedmetadata",()=>{var n;Mt.isEnabled?(n=t,Mt.on("change",()=>{n.emit("fullscreen",Mt.isFullscreen),Mt.isFullscreen?(n.state="fullscreen",f(o,"art-fullscreen")):g(o,"art-fullscreen"),n.emit("resize")}),Mt.on("error",t=>{n.emit("fullscreenError",t)}),H(n,"fullscreen",{get:()=>Mt.isFullscreen,async set(t){t?await Mt.request(o):await Mt.exit()}})):a.webkitSupportsFullscreen?(t=>{t.on("document:webkitfullscreenchange",()=>{t.emit("fullscreen",t.fullscreen),t.emit("resize")}),H(t,"fullscreen",{get:()=>document.fullscreenElement===a,set(e){e?(t.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})})(t):H(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),H(t,"fullscreen",U(t,"fullscreen"))})}function Pt(t){const{icons:e,proxy:r,storage:a,template:{$player:o,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(g(o,"art-mini"),w(e,"display","none"),o.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(w(e,"display","none"),w(r,"display","flex")):(w(e,"display","flex"),w(r,"display","none"))}function p(){const{$mini:e}=t.template,r=P(e),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),w(e,"top",`${o}px`),w(e,"left",`${n}px`)}H(t,"mini",{get:()=>v(o,"art-mini"),set(h){if(h){t.state="mini",f(o,"art-mini");const h=function(){const{$mini:o}=t.template;if(o)return y(o,n),w(o,"display","flex");{const o=L("div");f(o,"art-mini-popup"),y(document.body,o),t.template.$mini=o,y(o,n);const p=y(o,'
');y(p,e.close),r(p,"click",c);const h=y(o,'
'),u=y(h,e.play),m=y(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(o,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){f(o,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;w(o,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,g(o,"art-mini-dragging");const t=P(o);a.set("left",t.left),a.set("top",t.top),w(o,"left",`${t.left}px`),w(o,"top",`${t.top}px`),w(o,"transform",null)}}),o}}(),u=a.get("top"),m=a.get("left");"number"===typeof u&&"number"===typeof m?(w(h,"top",`${u}px`),w(h,"left",`${m}px`),E(h)||p()):p(),t.emit("mini",!0)}else c()}})}function At(t){const{i18n:e,notice:r,template:{$video:a}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:a}=t;e.disablePictureInPicture=!1,H(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw a.show=t,t})):document.exitPictureInPicture().catch(t=>{throw a.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):a.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),H(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):H(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function Rt(t){const{option:e,template:{$progress:r,$video:a}}=t;let o=null,n=!1,i=null;t.on("setBar",async(o,s,l)=>{const c=t.controls?.thumbnails,{url:d,scale:h}=e.thumbnails;if(!c||!d)return;if("hover"===o||"played"===o&&l&&p){if(i||n||(n=!0,i=await A(d,h),n=!1),!i)return;const o=r.clientWidth*s;o>0&&or.clientWidth-h/2?w(n,"left",r.clientWidth-h+"px"):w(n,"left",o-h/2+"px")}(o)}}),H(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(o),o=null,n=!1,i=null)}})}Object.defineProperties(Mt,{isFullscreen:{get:()=>Boolean(document[Lt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Lt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Lt.fullscreenEnabled])}});class Ot{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;H(t,"url",{get:()=>r.src,async set(a){if(a){const o=t.url,n=e.type||V(a),i=e.customType[n];n&&i?(await Z(),t.loading.show=!0,i.call(t,r,a,t)):(URL.revokeObjectURL(o),r.src=a),o!==t.url&&(t.option.url=a,t.isReady&&o&&t.once("video:canplay",()=>{t.emit("restart",a)}))}else await Z(),t.loading.show=!0}})}(t),function(t){const{template:{$video:e}}=t;H(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=t;H(t,"play",{async value(){const i=await n.play();if(r.show=e.get("Play"),t.emit("play"),a.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;H(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${F(t.currentTime)} / ${F(t.duration)}`),t.emit("seek",t.currentTime,r)}}),H(t,"forward",{set(e){t.seek=t.currentTime+e}}),H(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:a,storage:o}=t;H(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=D(t,0,1),a.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&o.set("volume",e.volume)}}),H(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;H(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=D(r,0,t.duration))}})}(t),function(t){H(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((a,o)=>{if(e===t.url)return void a();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),o(e)},metadata:()=>{t.currentTime=r},canplay:async()=>{t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&await t.play(),t.notice.show="",a()}};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}H(t,"switchQuality",{value:r=>e(r,t.currentTime)}),H(t,"switchUrl",{value:t=>e(t,0)}),H(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:a}=t;H(t,"playbackRate",{get:()=>e.playbackRate,set(o){if(o){if(o===e.playbackRate)return;e.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;H(t,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)w(a,"width",null),w(a,"height",null),w(a,"margin",null),delete o.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=o,i=e/r,s=t[0]/t[1];i>s?(w(a,"width",s*r+"px"),w(a,"height","100%"),w(a,"margin","0 auto")):(w(a,"width","100%"),w(a,"height",e/s+"px"),w(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,a=L("canvas");H(t,"getDataURL",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),t(a.toDataURL("image/png"))}catch(n){e.show=n,o(n)}})}),H(t,"getBlobUrl",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,o(n)}})}),H(t,"screenshot",{value:async e=>{const a=await t.getDataURL();return Y(a,`${e||`artplayer_${F(r.currentTime)}`}.png`),t.emit("screenshot",a),a}})}(t),It(t),function(t){const{constructor:e,template:{$container:r,$player:a}}=t;let o="";H(t,"fullscreenWeb",{get:()=>v(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&y(document.body,a),t.state="fullscreenWeb",w(a,"width","100%"),w(a,"height","100%"),f(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&y(r,a),o&&(a.style.cssText=o,o=""),g(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),At(t),function(t){const{$video:e}=t.template;H(t,"loaded",{get:()=>t.loadedTime/e.duration}),H(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){H(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;H(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:a}=t.template;H(t,"autoSize",{value(){const{videoWidth:o,videoHeight:n}=a,{width:i,height:s}=P(e),l=o/n;if(i/s>l)w(r,"width",s*l/i*100+"%"),w(r,"height","100%");else{const t=i/l/s*100;w(r,"width","100%"),w(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){H(t,"rect",{get:()=>P(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[a]})}H(t,"x",{get:()=>t.left+window.pageXOffset}),H(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:a}=t;H(t,"flip",{get:()=>e.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete e.dataset.flip:e.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get(N(o))}`,t.emit("flip",o)}})}(t),Pt(t),function(t){const{template:{$poster:e}}=t;H(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch{return""}},set(t){w(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;H(t,"autoHeight",{value(){const{clientWidth:a}=e,{videoHeight:o,videoWidth:n}=r,i=o*(a/n);w(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;H(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){H(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){H(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];H(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let a=0;aa.$track?.offset||0,set(o){const{cues:n}=t.subtitle;if(!a.$track||0===n.length)return;const i=D(o,-10,10);a.$track.offset=i;for(let e=0;e{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,H(t,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){H(t,"quality",{set(e){const{controls:r,notice:a,i18n:o}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:n?.html||"",selector:e,onSelect:async e=>(await t.switchQuality(e.url),a.show=`${o.get("Switch Video")}: ${e.html}`,e.html)})}})}(t),Rt(t),function(t){const{i18n:e,notice:r,option:a,constructor:o,proxy:n,template:{$player:s,$video:l,$poster:c}}=t;let d=0;for(let p=0;p{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{d=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{a.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",async n=>{d{t.emit("resize"),p&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,w(c,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:a,$poster:o}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(a.volume=D(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(a.volume=D(n,0,1)),e.poster&&w(o,"backgroundImage",`url(${e.poster})`),e.autoplay&&(a.autoplay=e.autoplay),e.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function _t(t){const{notice:e,constructor:r,template:{$player:a,$video:o}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=o,r=document.documentElement.clientWidth,a=document.documentElement.clientHeight;return t>e&&ra}return t.on("fullscreenWeb",e=>{if(e){if(l()){const e=Number(r.AUTO_ORIENTATION_TIME??0);setTimeout(()=>{t.fullscreenWeb&&!v(a,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;w(a,"width",`${r}px`),w(a,"height",`${e}px`),w(a,"transform-origin","0 0"),w(a,"transform",`rotate(90deg) translate(0, -${e}px)`),f(a,n),t.isRotate=!0,t.emit("resize")}()},e)}}else v(a,n)&&(w(a,"width",""),w(a,"height",""),w(a,"transform-origin",""),w(a,"transform",""),g(a,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",async t=>{const r=!!screen?.orientation?.lock;if(t){if(r&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(t),s=!0,f(a,i)}catch(o){s=!1,e.show=o}}else if(v(a,i)&&g(a,i),r&&s){try{screen.orientation.unlock()}catch{}s=!1}}),{name:"autoOrientation",get state(){return v(a,n)}}}function Vt(t){const{i18n:e,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=u(".art-auto-playback-last",s),c=u(".art-auto-playback-jump",s),d=u(".art-auto-playback-close",s);y(d,r.close);let p=null;function h(){const r=(a.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),w(s,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&(w(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${F(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{w(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),w(i,"display","none"),w(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{w(s,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=a.get("times")||{},r=Object.keys(e);r.length>o.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,a.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(t){const e=a.get("times")||{};return delete e[t],a.set("times",e),e}}}function Yt(t){const{constructor:e,proxy:r,template:{$player:a,$video:o}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,g(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,f(a,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return v(a,"art-fast-forward")}}}function Dt(t){const{layers:e,icons:r,template:{$player:a}}=t;function o(){return v(a,"art-lock")}function n(){f(a,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){g(a,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const a=y(e,r.lock),o=y(e,r.unlock);w(a,"display","none"),t.on("lock",t=>{t?(w(a,"display","inline-flex"),w(o,"display","none")):(w(a,"display","none"),w(o,"display","inline-flex"))})},click(){o()?i():n()}}),{name:"lock",get state(){return o()},set state(t){t?n():i()}}}function Nt(t){return t.on("control",e=>{e?g(t.template.$player,"art-mini-progress-bar"):f(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Ft{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Nt),e.lock&&p&&this.add(Dt),e.autoPlayback&&!e.isLive&&this.add(Vt),e.autoOrientation&&p&&this.add(_t),e.fastForward&&p&&!e.isLive&&this.add(Yt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return _(!j(this,r),`Cannot add a plugin that already has the same name: ${r}`),H(this,r,{value:e}),this}}class Bt extends dt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:a}}=t;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=C(t,r.setting),a=C(t,this.$parent);!this.show||e||a||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:a,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:o.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:a,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:o.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=t;function n(t){return e.get(N(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:a,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:o.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:a}=t;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){for(let r=0;r{e.default=e===t,e.default&&e.$item&&$(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,a=[]){for(let o=0;oe}),H(n,"$parents",{get:()=>r}),H(n,"$option",{get:()=>t});const a=[];H(n,"$events",{get:()=>a}),H(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,a)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){const{controls:t,constructor:{SETTING_WIDTH:e,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(t.setting&&this.show){const n=this.active[0]?.$parent?.width||e,{left:i,width:s}=P(t.setting),{left:l,width:c}=P(a),d=i-l+s/2-n/2;if(w(o,"height",`${this.active===this.option?this.active.length*r:(this.active.length+1)*r}px`),w(o,"width",`${n}px`),this.art.isRotate||p)return;d+n>c?(w(o,"left",null),w(o,"right",null)):(w(o,"left",`${d}px`),w(o,"right","auto"))}}inactivate(t){for(let e=0;e'),s=L("div");f(s,"art-setting-item-left-icon"),y(s,a),y(i,s),y(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),y(e,n)}createItem(t,e=!1){if(!this.cache.has(t.$option))return;const r=this.cache.get(t.$option),a=t.$item;let o="selector";j(t,"switch")&&(o="switch"),j(t,"range")&&(o="range"),j(t,"onClick")&&(o="button");const{icons:n,proxy:i,constructor:s}=this.art,l=L("div");f(l,"art-setting-item"),w(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=t.name||"",l.dataset.value=t.value||"";const c=y(l,'
'),d=y(l,'
'),p=L("div");switch(f(p,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":y(p,t.icon||n.config);break;case"selector":t.selector?.length?y(p,t.icon||n.config):y(p,n.check)}y(c,p),H(t,"$icon",{configurable:!0,get:()=>p}),H(t,"icon",{configurable:!0,get:()=>p.innerHTML,set(t){p.innerHTML="",y(p,t)}});const h=L("div");f(h,"art-setting-item-left-text"),y(h,t.html||""),y(c,h),H(t,"$html",{configurable:!0,get:()=>h}),H(t,"html",{configurable:!0,get:()=>h.innerHTML,set(t){h.innerHTML="",y(h,t)}});const u=L("div");switch(f(u,"art-setting-item-right-tooltip"),y(u,t.tooltip||""),y(d,u),H(t,"$tooltip",{configurable:!0,get:()=>u}),H(t,"tooltip",{configurable:!0,get:()=>u.innerHTML,set(t){u.innerHTML="",y(u,t)}}),o){case"switch":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,n.switchOn),a=y(e,n.switchOff);w(t.switch?a:r,"display","none"),y(d,e),H(t,"$switch",{configurable:!0,get:()=>e});let o=t.switch;H(t,"switch",{configurable:!0,get:()=>o,set(t){o=t,t?(w(a,"display","none"),w(r,"display",null)):(w(a,"display",null),w(r,"display","none"))}});break}case"range":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],f(r,"art-setting-range"),y(d,e),H(t,"$range",{configurable:!0,get:()=>r});let a=[...t.range];H(t,"range",{configurable:!0,get:()=>a,set(t){a=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(t.selector?.length){const t=L("div");f(t,"art-setting-item-right-icon"),y(t,n.arrowRight),y(d,t)}}switch(o){case"switch":if(t.onSwitch){const e=i(l,"click",async e=>{t.switch=await t.onSwitch.call(this.art,t,l,e)});t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=i(t.$range,"change",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onRange.call(this.art,t,l,e)});t.$events.push(e)}if(t.onChange){const e=i(t.$range,"input",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onChange.call(this.art,t,l,e)});t.$events.push(e)}}break;case"selector":{const e=i(l,"click",async e=>{t.selector?.length?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=await t.$parent.onSelect.call(this.art,t,l,e)))});t.$events.push(e),t.default&&f(l,"art-current")}break;case"button":if(t.onClick){const e=i(l,"click",async e=>{t.tooltip=await t.onClick.call(this.art,t,l,e)});t.$events.push(e)}}H(t,"$item",{configurable:!0,get:()=>l}),e?z(l,a):y(r,l),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){if(this.active=t,this.cache.has(t)){$(this.cache.get(t),"art-current")}else{const e=L("div");this.cache.set(t,e),f(e,"art-setting-panel"),y(this.$parent,e),$(e,"art-current"),t[0]?.$parent&&this.createHeader(t[0]);for(let r=0;rnull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?x(r,t):w(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?B(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(t,e={}){const{i18n:r,notice:a,option:o}=this.art,n={...o.subtitle,...e,url:t},i=await this.init(n);return e.name&&(a.show=`${r.get("Switch Subtitle")}: ${e.name}`),i}createTrack(t,e){const{template:r,proxy:a,option:o}=this.art,{$video:n,$track:i}=r,s=L("track");s.default=!0,s.kind=t,s.src=e,s.label=o.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,b(i),y(n,s),r.$track=s,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(t){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(o(t,ct.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||V(t.url)){case"srt":{const e=X(r);return G(t.onVttLoad(e))}case"ass":{const e=K(r);return G(t.onVttLoad(e))}case"vtt":return G(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null}}class Ut{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=u(e.container),_(this.$container,`No container element found by ${e.container}`)),_(I(),"The current browser does not support flex layout");const a=this.$container.tagName.toLowerCase();_("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),_(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${n}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return u(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=Ut.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);_(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),z(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&f(this.$player,"art-backdrop"),p&&f(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":f(this.$player,"art-destroy")}}class qt{on(t,e,r){const a=this.e||(this.e={});return(a[t]||(a[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const a=this;function o(...n){a.off(t,o),e.apply(r,n)}return o._=e,this.on(t,o,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let a=0;ae.call(this,this)),Kt.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${Kt.version}`);for(let e=0;et(`Event@${e.type}`))}Gt.push(this)}static get instances(){return Gt}static get version(){return n}static get config(){return i}static get utils(){return tt}static get scheme(){return ct}static get Emitter(){return qt}static get validator(){return o}static get kindOf(){return o.kindOf}static get html(){return Ut.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:l?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){Kt.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),Gt.splice(Gt.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return Kt.STYLE=Wt,Kt.DEBUG=!1,Kt.CONTEXTMENU=!0,Kt.NOTICE_TIME=2e3,Kt.SETTING_WIDTH=250,Kt.SETTING_ITEM_WIDTH=200,Kt.SETTING_ITEM_HEIGHT=35,Kt.RESIZE_TIME=200,Kt.SCROLL_TIME=200,Kt.SCROLL_GAP=50,Kt.AUTO_PLAYBACK_MAX=10,Kt.AUTO_PLAYBACK_MIN=5,Kt.AUTO_PLAYBACK_TIMEOUT=3e3,Kt.RECONNECT_TIME_MAX=5,Kt.RECONNECT_SLEEP_TIME=1e3,Kt.CONTROL_HIDE_TIME=3e3,Kt.DBCLICK_TIME=300,Kt.DBCLICK_FULLSCREEN=!0,Kt.MOBILE_DBCLICK_PLAY=!0,Kt.MOBILE_CLICK_PLAY=!1,Kt.AUTO_ORIENTATION_TIME=200,Kt.INFO_LOOP_TIME=1e3,Kt.FAST_FORWARD_VALUE=3,Kt.FAST_FORWARD_TIME=1e3,Kt.TOUCH_MOVE_RATIO=.5,Kt.VOLUME_STEP=.1,Kt.SEEK_STEP=5,Kt.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],Kt.ASPECT_RATIO=["default","4:3","16:9"],Kt.FLIP=["normal","horizontal","vertical"],Kt.FULLSCREEN_WEB_IN_BODY=!0,Kt.LOG_VERSION=!0,Kt.USE_RAF=!1,Kt.REMOVE_SRC_WHEN_DESTROY=!0,h&&(M("artplayer-style",Wt),setTimeout(()=>{Kt.LOG_VERSION&&console.log(`%c ArtPlayer %c ${Kt.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),Kt}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var a=(e||(e=1,r.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(o=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(t){return t.constructor?t.constructor.name:null}function o(t,e){var a=2=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,h="undefined"!==typeof window&&"undefined"!==typeof document;function u(t,e=document){return e.querySelector(t)}function m(t,e=document){return Array.from(e.querySelectorAll(t))}function f(t,e){return t.classList.add(e)}function g(t,e){return t.classList.remove(e)}function v(t,e){return t.classList.contains(e)}function y(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function b(t){return t.parentNode.removeChild(t)}function w(t,e,r){return t.style[e]=r,t}function x(t,e){for(const r in e)w(t,r,e[r]);return t}function k(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function $(t,e){k(t).forEach(t=>g(t,e)),f(t,e)}function T(t,e,r="top"){p||(t.setAttribute("aria-label",e),f(t,"hint--rounded"),f(t,`hint--${r}`))}function E(t,e=0){const r=t.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=a&&r.top+r.height+e>=0,i=r.left-e<=o+e&&r.left+r.width+e>=0;return n&&i}function C(t,e){return R(t).includes(e)}function z(t,e){return e.parentNode.replaceChild(t,e),t}function L(t){return document.createElement(t)}function S(t="",e=""){const r=L("i");return f(r,"art-icon"),f(r,`art-icon-${t}`),y(r,e),r}function M(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function I(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function P(t){return t.getBoundingClientRect()}function A(t,e){return new Promise((r,a)=>{const o=new Image;o.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=o.width*e,n.height=o.height*e,i.drawImage(o,0,0,n.width,n.height),n.toBlob(e=>{const o=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(o),a(new Error(`Image load failed: ${t}`))},n.src=o})}else r(o)},o.onerror=function(){a(new Error(`Image load failed: ${t}`))},o.src=t})}function R(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class O extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function _(t,e){if(!t)throw new O(e);return t}function V(t){return t.includes("?")?V(t.split("?")[0]):t.includes("#")?V(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function Y(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function D(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function N(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),a=Math.floor(t-3600*e-60*r);return(e>0?[e,r,a]:[r,a]).map(t=>t<10?`0${t}`:String(t)).join(":")}function B(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const H=Object.defineProperty,{hasOwnProperty:W}=Object.prototype;function j(t,e){return W.call(t,e)}function U(t,e){return Object.getOwnPropertyDescriptor(t,e)}function q(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(a=>{const o=t[a],n=r[a];Array.isArray(o)&&Array.isArray(n)?t[a]=o.concat(...n):e(o)&&e(n)?t[a]=q(o,n):t[a]=n}),t),{})}function X(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=`${r}00`),2===r.length&&(a=`${r}0`),`${e},${a}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function G(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function K(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const a=t.match(e);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function Z(t=0){return new Promise(e=>setTimeout(e,t))}function J(t,e){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,a)),e)}}function Q(t,e){let r=!1;return function(...a){r||(t.apply(this,a),r=!0,setTimeout(()=>{r=!1},e))}}const tt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:O,addClass:f,append:y,assToVtt:K,capitalize:N,clamp:D,createElement:L,debounce:J,def:H,download:Y,errorHandle:_,escape:B,get:U,getComposedPath:R,getExt:V,getIcon:S,getRect:P,getStyle:function(t,e,r=!0){const a=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(a):a},has:j,hasClass:v,includeFromEvent:C,inverseClass:$,isBrowser:h,isIOS:c,isIOS13:d,isInViewport:E,isMobile:p,isSafari:l,loadImg:A,mergeDeep:q,query:u,queryAll:m,remove:b,removeClass:g,replaceElement:z,secondToTime:F,setStyle:w,setStyleText:M,setStyles:x,siblings:k,sleep:Z,srtToVtt:X,supportsFlex:I,throttle:Q,tooltip:T,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:s,vttToBlob:G},Symbol.toStringTag,{value:"Module"})),et="array",rt="boolean",at="string",ot="number",nt="object",it="function";function st(t,e,r){return _(e===at||e===ot||t instanceof Element,`${r.join(".")} require '${at}' or 'Element' type`)}const lt={html:st,disable:`?${rt}`,name:`?${at}`,index:`?${ot}`,style:`?${nt}`,click:`?${it}`,mounted:`?${it}`,tooltip:`?${at}|${ot}`,width:`?${ot}`,selector:`?${et}`,onSelect:`?${it}`,switch:`?${rt}`,onSwitch:`?${it}`,range:`?${et}`,onRange:`?${it}`,onChange:`?${it}`},ct={id:at,container:st,url:at,poster:at,type:at,theme:at,lang:at,volume:ot,isLive:rt,muted:rt,autoplay:rt,autoSize:rt,autoMini:rt,loop:rt,flip:rt,playbackRate:rt,aspectRatio:rt,screenshot:rt,setting:rt,hotkey:rt,pip:rt,mutex:rt,backdrop:rt,fullscreen:rt,fullscreenWeb:rt,subtitleOffset:rt,miniProgressBar:rt,useSSR:rt,playsInline:rt,lock:rt,gesture:rt,fastForward:rt,autoPlayback:rt,autoOrientation:rt,airplay:rt,proxy:`?${it}`,plugins:[it],layers:[lt],contextmenu:[lt],settings:[lt],controls:[{...lt,position:(t,e,r)=>{const a=["top","left","right"];return _(a.includes(t),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${rt}`,html:at,url:at}],highlight:[{time:ot,text:at}],thumbnails:{url:at,number:ot,column:ot,width:ot,height:ot,scale:ot},subtitle:{url:at,name:at,type:at,style:nt,escape:rt,encoding:at,onVttLoad:it},moreVideoAttr:nt,i18n:nt,icons:nt,cssVar:nt,customType:nt};class dt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return v(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?f(e,r):g(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",o(e,lt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;_(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const a=L("div");f(a,`art-${this.name}`),f(a,`art-${this.name}-${r}`);const n=Array.from(this.$parent.children);a.dataset.index=e.index||this.id;const i=n.find(t=>Number(t.dataset.index)>=Number(a.dataset.index));i?i.insertAdjacentElement("beforebegin",a):y(this.$parent,a),e.html&&y(a,e.html),e.style&&x(a,e.style),e.tooltip&&T(a,e.tooltip);const s=[];if(e.click){const t=this.art.events.proxy(a,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});s.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,a,s),this[r]=a,this.cache.set(r,{$ref:a,events:s,option:e}),e.mounted&&e.mounted.call(this.art,a),a}remove(t){_(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],b(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class pt extends dt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,p||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:a}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:a}}=e,o=a.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return{...t,html:`${r.get("Play Speed")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.playbackRate=Number(a),t.show=!1)},mounted:t=>{const r=u('[data-value="1"]',t);r&&$(r,"art-current"),e.on("video:ratechange",()=>{const r=m("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&$(r,"art-current")})}}}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:a}}=e,o=a.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return{...t,html:`${r.get("Aspect Ratio")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.aspectRatio=a,t.show=!1)},mounted:t=>{const r=u('[data-value="default"]',t);r&&$(r,"art-current"),e.on("aspectRatio",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:a}}=e,o=a.map(t=>`${r.get(N(t))}`).join("");return{...t,html:`${r.get("Video Flip")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.flip=a.toLowerCase(),t.show=!1)},mounted:t=>{const r=u('[data-value="normal"]',t);r&&$(r,"art-current"),e.on("flip",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"flip",index:30})),this.add(function(t){return e=>({...t,html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=h?location.href:"";return{...t,html:`ArtPlayer ${n}`}}({name:"version",index:50})),this.add(function(t){return e=>({...t,html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let o=0;o{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,o=t.clientY,{height:n,width:i,left:s,top:l}=P(r),{height:c,width:d}=P(a);let p=e-s,h=o-l;e+d>s+i&&(p=i-d),o+c>l+n&&(h=n-c),x(a,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{C(t,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function ht(t,e){const{$progress:r}=t.template,{left:a}=P(r),o=D((p?e.touches[0].clientX:e.clientX)-a,0,r.clientWidth),n=o/r.clientWidth*t.duration;return{second:n,time:F(n),width:o,percentage:D(o/r.clientWidth,0,1)}}function ut(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,a=r*t.duration;t.emit("setBar","played",r,e),t.seek=a}else{const{second:r,percentage:a}=ht(t,e);t.emit("setBar","played",a,e),t.seek=r}}function mt(t){return e=>{const{icons:r,option:a,proxy:o}=e,{$player:n,$progress:i}=e.template;return{...t,html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let s=null,l=!1;const c=u(".art-progress-hover",t),d=u(".art-progress-loaded",t),h=u(".art-progress-played",t),m=u(".art-progress-highlight",t),v=u(".art-progress-indicator",t),b=u(".art-progress-tip",t);function x(r,a){const{width:o,time:n}=a||ht(e,r);b.textContent=n||"00:00";const i=b.clientWidth;o<=i/2?w(b,"left",0):o>t.clientWidth-i/2?w(b,"left",t.clientWidth-i+"px"):w(b,"left",o-i/2+"px")}r.indicator?y(v,r.indicator):w(v,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,a,o){const i="played"===r&&o&&p;if("loaded"===r&&w(d,"width",100*a+"%"),"hover"===r&&(w(c,"width",100*a+"%"),C(o,m)?function(r){const{width:a}=ht(e,r),{text:o}=r.target.dataset;b.textContent=o;const n=b.clientWidth;a<=n/2?w(b,"left",0):a>t.clientWidth-n/2?w(b,"left",t.clientWidth-n+"px"):w(b,"left",a-n/2+"px")}(o):x(o),0===a?g(n,"art-progress-hover"):f(n,"art-progress-hover")),"played"===r&&(w(h,"width",100*a+"%"),w(v,"left",100*a+"%")),i){f(n,"art-progress-hover");x(o,{width:t.clientWidth*a,time:F(a*e.duration)}),clearTimeout(s),s=setTimeout(()=>{g(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){m.textContent="";for(let t=0;t`;y(m,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),p||(o(i,"click",t=>{t.target!==v&&ut(e,t)}),o(i,"mousemove",t=>{const{percentage:r}=ht(e,t);e.emit("setBar","hover",r,t)}),o(i,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),o(i,"mousedown",t=>{l=0===t.button}),e.on("document:mousemove",t=>{if(l){const{second:r,percentage:a}=ht(e,t);e.emit("setBar","played",a,t),e.seek=r}}),e.on("document:mouseup",()=>{l&&(l=!1)}))}}}}class ft extends dt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:a}=this.art.template;t.on("mousemove",()=>{p||(this.show=!0)}),t.on("click",()=>{p?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=C(t,a)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(g(r,"art-hide-cursor"),f(r,"art-hover"),this.timer=Date.now()):(f(r,"art-hide-cursor"),g(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(mt({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.play),i=y(t,a.pause);function s(){w(n,"display","flex"),w(i,"display","none")}function l(){w(n,"display","none"),w(i,"display","flex")}T(n,o.get("Play")),T(i,o.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a}=e,o=y(t,a.volume),n=y(t,a.volumeClose),i=y(t,'
'),s=y(i,'
'),l=y(s,'
'),c=y(s,'
'),d=y(c,'
'),h=y(d,'
'),u=y(c,'
');function m(t){const{top:e,height:r}=P(c);return 1-(t.clientY-e)/r}function f(){if(e.muted||0===e.volume)w(o,"display","none"),w(n,"display","flex"),w(u,"top","100%"),w(h,"top","100%"),l.textContent=0;else{const t=100*e.volume;w(o,"display","flex"),w(n,"display","none"),w(u,"top",100-t+"%"),w(h,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(f(),e.on("video:volumechange",f),r(o,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),p)w(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=m(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=m(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>({...t,style:p?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${F(e.currentTime)} / ${F(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let o=0;o{this.art.quality=t.quality}),t.screenshot&&!p&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{T(t,o.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{T(t,o.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenWebOn),i=y(t,a.fullscreenWebOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(T(t,o.get("Exit Web Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Web Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenOn),i=y(t,a.fullscreenOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(T(t,o.get("Exit Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),H(e,"$control_item",{get:()=>r}),H(e,"$control_value",{get:()=>o})}const i=a(n,"click",async e=>{const r=R(e),a=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(a),t.onSelect&&(o.innerHTML=await t.onSelect.call(this.art,a,a.$control_item,e))});r.push(i)}}function gt(t,e,r,a){const o=e-a,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(o)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,o);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class vt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:a,$video:o}}=t;function n(e){C(e,a)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(o,"click",e=>{const a=Date.now();i.push(a);const{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>a-t<=n);switch(c.length){case 1:t.emit("click",e),p?!t.isLock&&o&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),p?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{f(r,"art-hover"),t.emit("hover",!0,e)},e=>{g(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:a}=t;t.on("resize",()=>{const{aspectRatio:e,notice:a}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,a.show=""});const o=J(()=>t.emit("resize"),a.RESIZE_TIME);t.on("window:orientationchange",()=>o()),t.on("window:resize",()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>o())}(t,this),function(t,e){if(p&&!t.option.isLive){const{$video:r,$progress:a}=t.template;let o=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){o===a&&ut(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:a,pageY:n}=e.touches[0],c=gt(i,s,a,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=D((a-i)/t.width,-1,1),d=D((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=o===r?t.constructor.TOUCH_MOVE_RATIO:1,u=D(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",D(u/t.duration,0,1),e),t.notice.show=`${F(u)} / ${F(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,o=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{o=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(a,"touchstart",t=>{o=a,c(t)}),e.proxy(a,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:a}}=t,o=Q(()=>{t.emit("view",E(a,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>o()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],a=["resize","scroll","orientationchange"],o=[];function n(n={}){for(let t=0;t{const a=n.document||i.ownerDocument||document,s=e.proxy(a,r,e=>{t.emit(`document:${r}`,e)});o.push(s)}),a.forEach(r=>{const a=n.window||i.ownerDocument?.defaultView||window,s=e.proxy(a,r,e=>{t.emit(`window:${r}`,e)});o.push(s)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,a={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,a));t.addEventListener(e,r,a);const o=()=>t.removeEventListener(e,r,a);return this.destroyEvents.add(o),o}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class yt{constructor(t){this.art=t,this.keys={},p||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n',...t.option.icons};for(const r in e)H(this,r,{get:()=>S(r,e[r])})}}class kt extends dt{constructor(t){super(t),this.name="info",p||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;t(a,"click",()=>{this.show=!1});let n=null;const i=m("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{w(o,"display","none"),w(n,"display",null)}),a.proxy(e.$state,"click",()=>t.play())}}class Ct{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:a}}=this.art;t?(a.textContent=t instanceof Error?t.message.trim():t,f(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{a.textContent="",g(r,"art-notice-show")},e.NOTICE_TIME)):g(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const zt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Lt=(()=>{if("undefined"===typeof document)return!1;const t=zt[0],e={};for(const r of zt){if(r[1]in document){for(const[a,o]of r.entries())e[t[a]]=o;return e}}return!1})(),St={change:Lt.fullscreenchange,error:Lt.fullscreenerror},Mt={request:(t=document.documentElement,e)=>new Promise((r,a)=>{const o=()=>{Mt.off("change",o),r()};Mt.on("change",o);const n=t[Lt.requestFullscreen](e);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((t,e)=>{if(!Mt.isFullscreen)return void t();const r=()=>{Mt.off("change",r),t()};Mt.on("change",r);const a=document[Lt.exitFullscreen]();a instanceof Promise&&a.then(r).catch(e)}),toggle:(t,e)=>Mt.isFullscreen?Mt.exit():Mt.request(t,e),onchange(t){Mt.on("change",t)},onerror(t){Mt.on("error",t)},on(t,e){const r=St[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=St[t];r&&document.removeEventListener(r,e,!1)},raw:Lt};function It(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;t.once("video:loadedmetadata",()=>{var n;Mt.isEnabled?(n=t,Mt.on("change",()=>{n.emit("fullscreen",Mt.isFullscreen),Mt.isFullscreen?(n.state="fullscreen",f(o,"art-fullscreen")):g(o,"art-fullscreen"),n.emit("resize")}),Mt.on("error",t=>{n.emit("fullscreenError",t)}),H(n,"fullscreen",{get:()=>Mt.isFullscreen,async set(t){t?await Mt.request(o):await Mt.exit()}})):a.webkitSupportsFullscreen?(t=>{t.on("document:webkitfullscreenchange",()=>{t.emit("fullscreen",t.fullscreen),t.emit("resize")}),H(t,"fullscreen",{get:()=>document.fullscreenElement===a,set(e){e?(t.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})})(t):H(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),H(t,"fullscreen",U(t,"fullscreen"))})}function Pt(t){const{icons:e,proxy:r,storage:a,template:{$player:o,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(g(o,"art-mini"),w(e,"display","none"),o.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(w(e,"display","none"),w(r,"display","flex")):(w(e,"display","flex"),w(r,"display","none"))}function p(){const{$mini:e}=t.template,r=P(e),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),w(e,"top",`${o}px`),w(e,"left",`${n}px`)}H(t,"mini",{get:()=>v(o,"art-mini"),set(h){if(h){t.state="mini",f(o,"art-mini");const h=function(){const{$mini:o}=t.template;if(o)return y(o,n),w(o,"display","flex");{const o=L("div");f(o,"art-mini-popup"),y(document.body,o),t.template.$mini=o,y(o,n);const p=y(o,'
');y(p,e.close),r(p,"click",c);const h=y(o,'
'),u=y(h,e.play),m=y(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(o,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){f(o,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;w(o,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,g(o,"art-mini-dragging");const t=P(o);a.set("left",t.left),a.set("top",t.top),w(o,"left",`${t.left}px`),w(o,"top",`${t.top}px`),w(o,"transform",null)}}),o}}(),u=a.get("top"),m=a.get("left");"number"===typeof u&&"number"===typeof m?(w(h,"top",`${u}px`),w(h,"left",`${m}px`),E(h)||p()):p(),t.emit("mini",!0)}else c()}})}function At(t){const{i18n:e,notice:r,template:{$video:a}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:a}=t;e.disablePictureInPicture=!1,H(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw a.show=t,t})):document.exitPictureInPicture().catch(t=>{throw a.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):a.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),H(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):H(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function Rt(t){const{option:e,template:{$progress:r,$video:a}}=t;let o=null,n=!1,i=null;t.on("setBar",async(o,s,l)=>{const c=t.controls?.thumbnails,{url:d,scale:h}=e.thumbnails;if(!c||!d)return;if("hover"===o||"played"===o&&l&&p){if(i||n||(n=!0,i=await A(d,h),n=!1),!i)return;const o=r.clientWidth*s;o>0&&or.clientWidth-h/2?w(n,"left",r.clientWidth-h+"px"):w(n,"left",o-h/2+"px")}(o)}}),H(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(o),o=null,n=!1,i=null)}})}Object.defineProperties(Mt,{isFullscreen:{get:()=>Boolean(document[Lt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Lt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Lt.fullscreenEnabled])}});class Ot{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;H(t,"url",{get:()=>r.src,async set(a){if(a){const o=t.url,n=e.type||V(a),i=e.customType[n];n&&i?(await Z(),t.loading.show=!0,i.call(t,r,a,t)):(URL.revokeObjectURL(o),r.src=a),o!==t.url&&(t.option.url=a,t.isReady&&o&&t.once("video:canplay",()=>{t.emit("restart",a)}))}else await Z(),t.loading.show=!0}})}(t),function(t){const{template:{$video:e}}=t;H(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=t;H(t,"play",{async value(){const i=await n.play();if(r.show=e.get("Play"),t.emit("play"),a.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;H(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${F(t.currentTime)} / ${F(t.duration)}`),t.emit("seek",t.currentTime,r)}}),H(t,"forward",{set(e){t.seek=t.currentTime+e}}),H(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:a,storage:o}=t;H(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=D(t,0,1),a.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&o.set("volume",e.volume)}}),H(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;H(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=D(r,0,t.duration))}})}(t),function(t){H(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((a,o)=>{if(e===t.url)return void a();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),o(e)},metadata:()=>{t.currentTime=r},canplay:async()=>{t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&await t.play(),t.notice.show="",a()}};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}H(t,"switchQuality",{value:r=>e(r,t.currentTime)}),H(t,"switchUrl",{value:t=>e(t,0)}),H(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:a}=t;H(t,"playbackRate",{get:()=>e.playbackRate,set(o){if(o){if(o===e.playbackRate)return;e.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;H(t,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)w(a,"width",null),w(a,"height",null),w(a,"margin",null),delete o.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=o,i=e/r,s=t[0]/t[1];i>s?(w(a,"width",s*r+"px"),w(a,"height","100%"),w(a,"margin","0 auto")):(w(a,"width","100%"),w(a,"height",e/s+"px"),w(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,a=L("canvas");H(t,"getDataURL",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),t(a.toDataURL("image/png"))}catch(n){e.show=n,o(n)}})}),H(t,"getBlobUrl",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,o(n)}})}),H(t,"screenshot",{value:async e=>{const a=await t.getDataURL();return Y(a,`${e||`artplayer_${F(r.currentTime)}`}.png`),t.emit("screenshot",a),a}})}(t),It(t),function(t){const{constructor:e,template:{$container:r,$player:a}}=t;let o="";H(t,"fullscreenWeb",{get:()=>v(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&y(document.body,a),t.state="fullscreenWeb",w(a,"width","100%"),w(a,"height","100%"),f(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&y(r,a),o&&(a.style.cssText=o,o=""),g(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),At(t),function(t){const{$video:e}=t.template;H(t,"loaded",{get:()=>t.loadedTime/e.duration}),H(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){H(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;H(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:a}=t.template;H(t,"autoSize",{value(){const{videoWidth:o,videoHeight:n}=a,{width:i,height:s}=P(e),l=o/n;if(i/s>l)w(r,"width",s*l/i*100+"%"),w(r,"height","100%");else{const t=i/l/s*100;w(r,"width","100%"),w(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){H(t,"rect",{get:()=>P(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[a]})}H(t,"x",{get:()=>t.left+window.pageXOffset}),H(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:a}=t;H(t,"flip",{get:()=>e.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete e.dataset.flip:e.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get(N(o))}`,t.emit("flip",o)}})}(t),Pt(t),function(t){const{template:{$poster:e}}=t;H(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch{return""}},set(t){w(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;H(t,"autoHeight",{value(){const{clientWidth:a}=e,{videoHeight:o,videoWidth:n}=r,i=o*(a/n);w(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;H(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){H(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){H(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];H(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let a=0;aa.$track?.offset||0,set(o){const{cues:n}=t.subtitle;if(!a.$track||0===n.length)return;const i=D(o,-10,10);a.$track.offset=i;for(let e=0;e{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,H(t,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){H(t,"quality",{set(e){const{controls:r,notice:a,i18n:o}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:n?.html||"",selector:e,onSelect:async e=>(await t.switchQuality(e.url),a.show=`${o.get("Switch Video")}: ${e.html}`,e.html)})}})}(t),Rt(t),function(t){const{i18n:e,notice:r,option:a,constructor:o,proxy:n,template:{$player:s,$video:l,$poster:c}}=t;let d=0;for(let p=0;p{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{d=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{a.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",async n=>{d{t.emit("resize"),p&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,w(c,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:a,$poster:o}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(a.volume=D(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(a.volume=D(n,0,1)),e.poster&&w(o,"backgroundImage",`url(${e.poster})`),e.autoplay&&(a.autoplay=e.autoplay),e.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function _t(t){const{notice:e,constructor:r,template:{$player:a,$video:o}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=o,r=document.documentElement.clientWidth,a=document.documentElement.clientHeight;return t>e&&ra}return t.on("fullscreenWeb",e=>{if(e){if(l()){const e=Number(r.AUTO_ORIENTATION_TIME??0);setTimeout(()=>{t.fullscreenWeb&&!v(a,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;w(a,"width",`${r}px`),w(a,"height",`${e}px`),w(a,"transform-origin","0 0"),w(a,"transform",`rotate(90deg) translate(0, -${e}px)`),f(a,n),t.isRotate=!0,t.emit("resize")}()},e)}}else v(a,n)&&(w(a,"width",""),w(a,"height",""),w(a,"transform-origin",""),w(a,"transform",""),g(a,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",async t=>{const r=!!screen?.orientation?.lock;if(t){if(r&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(t),s=!0,f(a,i)}catch(o){s=!1,e.show=o}}else if(v(a,i)&&g(a,i),r&&s){try{screen.orientation.unlock()}catch{}s=!1}}),{name:"autoOrientation",get state(){return v(a,n)}}}function Vt(t){const{i18n:e,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=u(".art-auto-playback-last",s),c=u(".art-auto-playback-jump",s),d=u(".art-auto-playback-close",s);y(d,r.close);let p=null;function h(){const r=(a.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),w(s,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&(w(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${F(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{w(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),w(i,"display","none"),w(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{w(s,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=a.get("times")||{},r=Object.keys(e);r.length>o.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,a.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(t){const e=a.get("times")||{};return delete e[t],a.set("times",e),e}}}function Yt(t){const{constructor:e,proxy:r,template:{$player:a,$video:o}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,g(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,f(a,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return v(a,"art-fast-forward")}}}function Dt(t){const{layers:e,icons:r,template:{$player:a}}=t;function o(){return v(a,"art-lock")}function n(){f(a,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){g(a,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const a=y(e,r.lock),o=y(e,r.unlock);w(a,"display","none"),t.on("lock",t=>{t?(w(a,"display","inline-flex"),w(o,"display","none")):(w(a,"display","none"),w(o,"display","inline-flex"))})},click(){o()?i():n()}}),{name:"lock",get state(){return o()},set state(t){t?n():i()}}}function Nt(t){return t.on("control",e=>{e?g(t.template.$player,"art-mini-progress-bar"):f(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Ft{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Nt),e.lock&&p&&this.add(Dt),e.autoPlayback&&!e.isLive&&this.add(Vt),e.autoOrientation&&p&&this.add(_t),e.fastForward&&p&&!e.isLive&&this.add(Yt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return _(!j(this,r),`Cannot add a plugin that already has the same name: ${r}`),H(this,r,{value:e}),this}}class Bt extends dt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:a}}=t;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=C(t,r.setting),a=C(t,this.$parent);!this.show||e||a||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:a,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:o.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:a,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:o.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=t;function n(t){return e.get(N(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:a,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:o.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:a}=t;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){for(let r=0;r{e.default=e===t,e.default&&e.$item&&$(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,a=[]){for(let o=0;oe}),H(n,"$parents",{get:()=>r}),H(n,"$option",{get:()=>t});const a=[];H(n,"$events",{get:()=>a}),H(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,a)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){const{controls:t,constructor:{SETTING_WIDTH:e,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(t.setting&&this.show){const n=this.active[0]?.$parent?.width||e,{left:i,width:s}=P(t.setting),{left:l,width:c}=P(a),d=i-l+s/2-n/2;if(w(o,"height",`${this.active===this.option?this.active.length*r:(this.active.length+1)*r}px`),w(o,"width",`${n}px`),this.art.isRotate||p)return;d+n>c?(w(o,"left",null),w(o,"right",null)):(w(o,"left",`${d}px`),w(o,"right","auto"))}}inactivate(t){for(let e=0;e'),s=L("div");f(s,"art-setting-item-left-icon"),y(s,a),y(i,s),y(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),y(e,n)}createItem(t,e=!1){if(!this.cache.has(t.$option))return;const r=this.cache.get(t.$option),a=t.$item;let o="selector";j(t,"switch")&&(o="switch"),j(t,"range")&&(o="range"),j(t,"onClick")&&(o="button");const{icons:n,proxy:i,constructor:s}=this.art,l=L("div");f(l,"art-setting-item"),w(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=t.name||"",l.dataset.value=t.value||"";const c=y(l,'
'),d=y(l,'
'),p=L("div");switch(f(p,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":y(p,t.icon||n.config);break;case"selector":t.selector?.length?y(p,t.icon||n.config):y(p,n.check)}y(c,p),H(t,"$icon",{configurable:!0,get:()=>p}),H(t,"icon",{configurable:!0,get:()=>p.innerHTML,set(t){p.innerHTML="",y(p,t)}});const h=L("div");f(h,"art-setting-item-left-text"),y(h,t.html||""),y(c,h),H(t,"$html",{configurable:!0,get:()=>h}),H(t,"html",{configurable:!0,get:()=>h.innerHTML,set(t){h.innerHTML="",y(h,t)}});const u=L("div");switch(f(u,"art-setting-item-right-tooltip"),y(u,t.tooltip||""),y(d,u),H(t,"$tooltip",{configurable:!0,get:()=>u}),H(t,"tooltip",{configurable:!0,get:()=>u.innerHTML,set(t){u.innerHTML="",y(u,t)}}),o){case"switch":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,n.switchOn),a=y(e,n.switchOff);w(t.switch?a:r,"display","none"),y(d,e),H(t,"$switch",{configurable:!0,get:()=>e});let o=t.switch;H(t,"switch",{configurable:!0,get:()=>o,set(t){o=t,t?(w(a,"display","none"),w(r,"display",null)):(w(a,"display",null),w(r,"display","none"))}});break}case"range":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],f(r,"art-setting-range"),y(d,e),H(t,"$range",{configurable:!0,get:()=>r});let a=[...t.range];H(t,"range",{configurable:!0,get:()=>a,set(t){a=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(t.selector?.length){const t=L("div");f(t,"art-setting-item-right-icon"),y(t,n.arrowRight),y(d,t)}}switch(o){case"switch":if(t.onSwitch){const e=i(l,"click",async e=>{t.switch=await t.onSwitch.call(this.art,t,l,e)});t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=i(t.$range,"change",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onRange.call(this.art,t,l,e)});t.$events.push(e)}if(t.onChange){const e=i(t.$range,"input",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onChange.call(this.art,t,l,e)});t.$events.push(e)}}break;case"selector":{const e=i(l,"click",async e=>{t.selector?.length?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=await t.$parent.onSelect.call(this.art,t,l,e)))});t.$events.push(e),t.default&&f(l,"art-current")}break;case"button":if(t.onClick){const e=i(l,"click",async e=>{t.tooltip=await t.onClick.call(this.art,t,l,e)});t.$events.push(e)}}H(t,"$item",{configurable:!0,get:()=>l}),e?z(l,a):y(r,l),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){if(this.active=t,this.cache.has(t)){$(this.cache.get(t),"art-current")}else{const e=L("div");this.cache.set(t,e),f(e,"art-setting-panel"),y(this.$parent,e),$(e,"art-current"),t[0]?.$parent&&this.createHeader(t[0]);for(let r=0;rnull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?x(r,t):w(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?B(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(t,e={}){const{i18n:r,notice:a,option:o}=this.art,n={...o.subtitle,...e,url:t},i=await this.init(n);return e.name&&(a.show=`${r.get("Switch Subtitle")}: ${e.name}`),i}createTrack(t,e){const{template:r,proxy:a,option:o}=this.art,{$video:n,$track:i}=r,s=L("track");s.default=!0,s.kind=t,s.src=e,s.label=o.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,b(i),y(n,s),r.$track=s,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(t){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(o(t,ct.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||V(t.url)){case"srt":{const e=X(r);return G(t.onVttLoad(e))}case"ass":{const e=K(r);return G(t.onVttLoad(e))}case"vtt":return G(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null}}class Ut{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=u(e.container),_(this.$container,`No container element found by ${e.container}`)),_(I(),"The current browser does not support flex layout");const a=this.$container.tagName.toLowerCase();_("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),_(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${n}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return u(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=Ut.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);_(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),z(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&f(this.$player,"art-backdrop"),p&&f(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":f(this.$player,"art-destroy")}}class qt{on(t,e,r){const a=this.e||(this.e={});return(a[t]||(a[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const a=this;function o(...n){a.off(t,o),e.apply(r,n)}return o._=e,this.on(t,o,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let a=0;ae.call(this,this)),Kt.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${Kt.version}`);for(let e=0;et(`Event@${e.type}`))}Gt.push(this)}static get instances(){return Gt}static get version(){return n}static get config(){return i}static get utils(){return tt}static get scheme(){return ct}static get Emitter(){return qt}static get validator(){return o}static get kindOf(){return o.kindOf}static get html(){return Ut.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:l?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){Kt.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),Gt.splice(Gt.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return Kt.STYLE=Wt,Kt.DEBUG=!1,Kt.CONTEXTMENU=!0,Kt.NOTICE_TIME=2e3,Kt.SETTING_WIDTH=250,Kt.SETTING_ITEM_WIDTH=200,Kt.SETTING_ITEM_HEIGHT=35,Kt.RESIZE_TIME=200,Kt.SCROLL_TIME=200,Kt.SCROLL_GAP=50,Kt.AUTO_PLAYBACK_MAX=10,Kt.AUTO_PLAYBACK_MIN=5,Kt.AUTO_PLAYBACK_TIMEOUT=3e3,Kt.RECONNECT_TIME_MAX=5,Kt.RECONNECT_SLEEP_TIME=1e3,Kt.CONTROL_HIDE_TIME=3e3,Kt.DBCLICK_TIME=300,Kt.DBCLICK_FULLSCREEN=!0,Kt.MOBILE_DBCLICK_PLAY=!0,Kt.MOBILE_CLICK_PLAY=!1,Kt.AUTO_ORIENTATION_TIME=200,Kt.INFO_LOOP_TIME=1e3,Kt.FAST_FORWARD_VALUE=3,Kt.FAST_FORWARD_TIME=1e3,Kt.TOUCH_MOVE_RATIO=.5,Kt.VOLUME_STEP=.1,Kt.SEEK_STEP=5,Kt.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],Kt.ASPECT_RATIO=["default","4:3","16:9"],Kt.FLIP=["normal","horizontal","vertical"],Kt.FULLSCREEN_WEB_IN_BODY=!0,Kt.LOG_VERSION=!0,Kt.USE_RAF=!1,Kt.REMOVE_SRC_WHEN_DESTROY=!0,h&&(M("artplayer-style",Wt),setTimeout(()=>{Kt.LOG_VERSION&&console.log(`%c ArtPlayer %c ${Kt.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),Kt}); diff --git a/docs/compiled/artplayer.legacy.js b/docs/compiled/artplayer.legacy.js index db6846ba5..fca0a796e 100644 --- a/docs/compiled/artplayer.legacy.js +++ b/docs/compiled/artplayer.legacy.js @@ -1,7 +1,7 @@ /*! - * artplayer.js v5.3.1 + * artplayer.js v5.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))n.call(e,r)&&s(t,r,e[r]);if(a)for(var r of a(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,a)=>{var n=t=>{try{s(r.next(t))}catch(e){a(e)}},i=t=>{try{s(r.throw(t))}catch(e){a(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(n,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h,u={exports:{}};var m=(h||(h=1,u.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(a=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2=1,k=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(y)||x,$="undefined"!==typeof window&&"undefined"!==typeof document;function T(t,e=document){return e.querySelector(t)}function E(t,e=document){return Array.from(e.querySelectorAll(t))}function C(t,e){return t.classList.add(e)}function z(t,e){return t.classList.remove(e)}function L(t,e){return t.classList.contains(e)}function S(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function M(t){return t.parentNode.removeChild(t)}function I(t,e,r){return t.style[e]=r,t}function P(t,e){for(const r in e)I(t,r,e[r]);return t}function A(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function O(t,e){A(t).forEach(t=>z(t,e)),C(t,e)}function R(t,e,r="top"){k||(t.setAttribute("aria-label",e),C(t,"hint--rounded"),C(t,`hint--${r}`))}function _(t,e=0){const r=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=o&&r.top+r.height+e>=0,i=r.left-e<=a+e&&r.left+r.width+e>=0;return n&&i}function V(t,e){return j(t).includes(e)}function Y(t,e){return e.parentNode.replaceChild(t,e),t}function D(t){return document.createElement(t)}function N(t="",e=""){const r=D("i");return C(r,"art-icon"),C(r,`art-icon-${t}`),S(r,e),r}function F(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function B(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function H(t){return t.getBoundingClientRect()}function W(t,e){return new Promise((r,o)=>{const a=new Image;a.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=a.width*e,n.height=a.height*e,i.drawImage(a,0,0,n.width,n.height),n.toBlob(e=>{const a=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(a),o(new Error(`Image load failed: ${t}`))},n.src=a})}else r(a)},a.onerror=function(){o(new Error(`Image load failed: ${t}`))},a.src=t})}function j(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class U extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function q(t,e){if(!t)throw new U(e);return t}function X(t){return t.includes("?")?X(t.split("?")[0]):t.includes("#")?X(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function G(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function K(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function Z(t){return t.charAt(0).toUpperCase()+t.slice(1)}function J(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),o=Math.floor(t-3600*e-60*r);return(e>0?[e,r,o]:[r,o]).map(t=>t<10?`0${t}`:String(t)).join(":")}function Q(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const tt=Object.defineProperty,{hasOwnProperty:et}=Object.prototype;function rt(t,e){return et.call(t,e)}function ot(t,e){return Object.getOwnPropertyDescriptor(t,e)}function at(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(o=>{const a=t[o],n=r[o];Array.isArray(a)&&Array.isArray(n)?t[o]=a.concat(...n):e(a)&&e(n)?t[o]=at(a,n):t[o]=n}),t),{})}function nt(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=`${r}00`),2===r.length&&(o=`${r}0`),`${e},${o}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function it(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function st(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const o=t.match(e);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function lt(t=0){return new Promise(e=>setTimeout(e,t))}function ct(t,e){let r;return function(...o){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,o)),e)}}function dt(t,e){let r=!1;return function(...o){r||(t.apply(this,o),r=!0,setTimeout(()=>{r=!1},e))}}const pt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:U,addClass:C,append:S,assToVtt:st,capitalize:Z,clamp:K,createElement:D,debounce:ct,def:tt,download:G,errorHandle:q,escape:Q,get:ot,getComposedPath:j,getExt:X,getIcon:N,getRect:H,getStyle:function(t,e,r=!0){const o=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(o):o},has:rt,hasClass:L,includeFromEvent:V,inverseClass:O,isBrowser:$,isIOS:w,isIOS13:x,isInViewport:_,isMobile:k,isSafari:b,loadImg:W,mergeDeep:at,query:T,queryAll:E,remove:M,removeClass:z,replaceElement:Y,secondToTime:J,setStyle:I,setStyleText:F,setStyles:P,siblings:A,sleep:lt,srtToVtt:nt,supportsFlex:B,throttle:dt,tooltip:R,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:y,vttToBlob:it},Symbol.toStringTag,{value:"Module"})),ht="array",ut="boolean",mt="string",ft="number",gt="object",vt="function";function yt(t,e,r){return q(e===mt||e===ft||t instanceof Element,`${r.join(".")} require '${mt}' or 'Element' type`)}const bt={html:yt,disable:`?${ut}`,name:`?${mt}`,index:`?${ft}`,style:`?${gt}`,click:`?${vt}`,mounted:`?${vt}`,tooltip:`?${mt}|${ft}`,width:`?${ft}`,selector:`?${ht}`,onSelect:`?${vt}`,switch:`?${ut}`,onSwitch:`?${vt}`,range:`?${ht}`,onRange:`?${vt}`,onChange:`?${vt}`},wt={id:mt,container:yt,url:mt,poster:mt,type:mt,theme:mt,lang:mt,volume:ft,isLive:ut,muted:ut,autoplay:ut,autoSize:ut,autoMini:ut,loop:ut,flip:ut,playbackRate:ut,aspectRatio:ut,screenshot:ut,setting:ut,hotkey:ut,pip:ut,mutex:ut,backdrop:ut,fullscreen:ut,fullscreenWeb:ut,subtitleOffset:ut,miniProgressBar:ut,useSSR:ut,playsInline:ut,lock:ut,gesture:ut,fastForward:ut,autoPlayback:ut,autoOrientation:ut,airplay:ut,proxy:`?${vt}`,plugins:[vt],layers:[bt],contextmenu:[bt],settings:[bt],controls:[c(l({},bt),{position:(t,e,r)=>{const o=["top","left","right"];return q(o.includes(t),`${r.join(".")} only accept ${o.toString()} as parameters`)}})],quality:[{default:`?${ut}`,html:mt,url:mt}],highlight:[{time:ft,text:mt}],thumbnails:{url:mt,number:ft,column:ft,width:ft,height:ft,scale:ft},subtitle:{url:mt,name:mt,type:mt,style:gt,escape:ut,encoding:mt,onVttLoad:vt},moreVideoAttr:gt,i18n:gt,icons:gt,cssVar:gt,customType:gt};class xt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return L(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?C(e,r):z(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",f(e,bt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;q(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const o=D("div");C(o,`art-${this.name}`),C(o,`art-${this.name}-${r}`);const a=Array.from(this.$parent.children);o.dataset.index=e.index||this.id;const n=a.find(t=>Number(t.dataset.index)>=Number(o.dataset.index));n?n.insertAdjacentElement("beforebegin",o):S(this.$parent,o),e.html&&S(o,e.html),e.style&&P(o,e.style),e.tooltip&&R(o,e.tooltip);const i=[];if(e.click){const t=this.art.events.proxy(o,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});i.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,o,i),this[r]=o,this.cache.set(r,{$ref:o,events:i,option:e}),e.mounted&&e.mounted.call(this.art,o),o}remove(t){q(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],M(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class kt extends xt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,k||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:o}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:o}}=e,a=o.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return c(l({},t),{html:`${r.get("Play Speed")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.playbackRate=Number(o),t.show=!1)},mounted:t=>{const r=T('[data-value="1"]',t);r&&O(r,"art-current"),e.on("video:ratechange",()=>{const r=E("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&O(r,"art-current")})}})}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:o}}=e,a=o.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return c(l({},t),{html:`${r.get("Aspect Ratio")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.aspectRatio=o,t.show=!1)},mounted:t=>{const r=T('[data-value="default"]',t);r&&O(r,"art-current"),e.on("aspectRatio",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:o}}=e,a=o.map(t=>`${r.get(Z(t))}`).join("");return c(l({},t),{html:`${r.get("Video Flip")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.flip=o.toLowerCase(),t.show=!1)},mounted:t=>{const r=T('[data-value="normal"]',t);r&&O(r,"art-current"),e.on("flip",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"flip",index:30})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=$?location.href:"";return c(l({},t),{html:`ArtPlayer ${g}`})}({name:"version",index:50})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let a=0;a{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,a=t.clientY,{height:n,width:i,left:s,top:l}=H(r),{height:c,width:d}=H(o);let p=e-s,h=a-l;e+d>s+i&&(p=i-d),a+c>l+n&&(h=n-c),P(o,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{V(t,o)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function $t(t,e){const{$progress:r}=t.template,{left:o}=H(r),a=K((k?e.touches[0].clientX:e.clientX)-o,0,r.clientWidth),n=a/r.clientWidth*t.duration;return{second:n,time:J(n),width:a,percentage:K(a/r.clientWidth,0,1)}}function Tt(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,o=r*t.duration;t.emit("setBar","played",r,e),t.seek=o}else{const{second:r,percentage:o}=$t(t,e);t.emit("setBar","played",o,e),t.seek=r}}function Et(t){return e=>{const{icons:r,option:o,proxy:a}=e,{$player:n}=e.template;return c(l({},t),{html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let i=null,s=!1;const l=T(".art-progress-hover",t),c=T(".art-progress-loaded",t),d=T(".art-progress-played",t),p=T(".art-progress-highlight",t),h=T(".art-progress-indicator",t),u=T(".art-progress-tip",t);function m(r,o){const{width:a,time:n}=o||$t(e,r);u.textContent=n||"00:00";const i=u.clientWidth;a<=i/2?I(u,"left",0):a>t.clientWidth-i/2?I(u,"left",t.clientWidth-i+"px"):I(u,"left",a-i/2+"px")}r.indicator?S(h,r.indicator):I(h,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,o,a){const s="played"===r&&a&&k;if("loaded"===r&&I(c,"width",100*o+"%"),"hover"===r&&(I(l,"width",100*o+"%"),V(a,p)?function(r){const{width:o}=$t(e,r),{text:a}=r.target.dataset;u.textContent=a;const n=u.clientWidth;o<=n/2?I(u,"left",0):o>t.clientWidth-n/2?I(u,"left",t.clientWidth-n+"px"):I(u,"left",o-n/2+"px")}(a):m(a),0===o?z(n,"art-progress-hover"):C(n,"art-progress-hover")),"played"===r&&(I(d,"width",100*o+"%"),I(h,"left",100*o+"%")),s){C(n,"art-progress-hover");m(a,{width:t.clientWidth*o,time:J(o*e.duration)}),clearTimeout(i),i=setTimeout(()=>{z(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){p.textContent="";for(let t=0;t`;S(p,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),k||(a(t,"click",t=>{t.target!==h&&Tt(e,t)}),a(t,"mousemove",t=>{const{percentage:r}=$t(e,t);e.emit("setBar","hover",r,t)}),a(t,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),a(t,"mousedown",t=>{s=0===t.button}),e.on("document:mousemove",t=>{if(s){const{second:r,percentage:o}=$t(e,t);e.emit("setBar","played",o,t),e.seek=r}}),e.on("document:mouseup",()=>{s&&(s=!1)}))}})}}class Ct extends xt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:o}=this.art.template;t.on("mousemove",()=>{k||(this.show=!0)}),t.on("click",()=>{k?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=V(t,o)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(z(r,"art-hide-cursor"),C(r,"art-hover"),this.timer=Date.now()):(C(r,"art-hide-cursor"),z(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(Et({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.play),i=S(t,o.pause);function s(){I(n,"display","flex"),I(i,"display","none")}function l(){I(n,"display","none"),I(i,"display","flex")}R(n,a.get("Play")),R(i,a.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o}=e,a=S(t,o.volume),n=S(t,o.volumeClose),i=S(t,'
'),s=S(i,'
'),l=S(s,'
'),c=S(s,'
'),d=S(c,'
'),p=S(d,'
'),h=S(c,'
');function u(t){const{top:e,height:r}=H(c);return 1-(t.clientY-e)/r}function m(){if(e.muted||0===e.volume)I(a,"display","none"),I(n,"display","flex"),I(h,"top","100%"),I(p,"top","100%"),l.textContent=0;else{const t=100*e.volume;I(a,"display","flex"),I(n,"display","none"),I(h,"top",100-t+"%"),I(p,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(m(),e.on("video:volumechange",m),r(a,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),k)I(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=u(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=u(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>c(l({},t),{style:k?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${J(e.currentTime)} / ${J(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const o=["video:loadedmetadata","video:timeupdate","video:progress"];for(let a=0;a{this.art.quality=t.quality}),t.screenshot&&!k&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{R(t,a.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{R(t,a.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenWebOn),i=S(t,o.fullscreenWebOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(R(t,a.get("Exit Web Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Web Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenOn),i=S(t,o.fullscreenOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(R(t,a.get("Exit Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),tt(e,"$control_item",{get:()=>r}),tt(e,"$control_value",{get:()=>a})}const i=o(n,"click",e=>d(this,null,function*(){const r=j(e),o=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(o),t.onSelect&&(a.innerHTML=yield t.onSelect.call(this.art,o,o.$control_item,e))}));r.push(i)}}function zt(t,e,r,o){const a=e-o,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(a)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,a);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class Lt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:o,$video:a}}=t;function n(e){V(e,o)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(a,"click",e=>{const o=Date.now();i.push(o);const{MOBILE_CLICK_PLAY:a,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>o-t<=n);switch(c.length){case 1:t.emit("click",e),k?!t.isLock&&a&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),k?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{C(r,"art-hover"),t.emit("hover",!0,e)},e=>{z(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:o}=t;t.on("resize",()=>{const{aspectRatio:e,notice:o}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,o.show=""});const a=ct(()=>t.emit("resize"),o.RESIZE_TIME);t.on("window:orientationchange",()=>a()),t.on("window:resize",()=>a()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>a())}(t,this),function(t,e){if(k&&!t.option.isLive){const{$video:r,$progress:o}=t.template;let a=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){a===o&&Tt(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:o,pageY:n}=e.touches[0],c=zt(i,s,o,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=K((o-i)/t.width,-1,1),d=K((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=a===r?t.constructor.TOUCH_MOVE_RATIO:1,u=K(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",K(u/t.duration,0,1),e),t.notice.show=`${J(u)} / ${J(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,a=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{a=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(o,"touchstart",t=>{a=o,c(t)}),e.proxy(o,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:o}}=t,a=dt(()=>{t.emit("view",_(o,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>a()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],o=["resize","scroll","orientationchange"],a=[];function n(n={}){for(let t=0;t{const o=n.document||i.ownerDocument||document,s=e.proxy(o,r,e=>{t.emit(`document:${r}`,e)});a.push(s)}),o.forEach(r=>{var o;const s=n.window||(null==(o=i.ownerDocument)?void 0:o.defaultView)||window,l=e.proxy(s,r,e=>{t.emit(`window:${r}`,e)});a.push(l)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,o={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,o));t.addEventListener(e,r,o);const a=()=>t.removeEventListener(e,r,o);return this.destroyEvents.add(a),a}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class St{constructor(t){this.art=t,this.keys={},k||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n'},t.option.icons);for(const r in e)tt(this,r,{get:()=>N(r,e[r])})}}class At extends xt{constructor(t){super(t),this.name="info",k||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:o,$video:a}}=this.art;t(o,"click",()=>{this.show=!1});let n=null;const i=E("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{I(a,"display","none"),I(n,"display",null)}),o.proxy(e.$state,"click",()=>t.play())}}class Vt{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:o}}=this.art;t?(o.textContent=t instanceof Error?t.message.trim():t,C(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{o.textContent="",z(r,"art-notice-show")},e.NOTICE_TIME)):z(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Dt=(()=>{if("undefined"===typeof document)return!1;const t=Yt[0],e={};for(const r of Yt){if(r[1]in document){for(const[o,a]of r.entries())e[t[o]]=a;return e}}return!1})(),Nt={change:Dt.fullscreenchange,error:Dt.fullscreenerror},Ft={request:(t=document.documentElement,e)=>new Promise((r,o)=>{const a=()=>{Ft.off("change",a),r()};Ft.on("change",a);const n=t[Dt.requestFullscreen](e);n instanceof Promise&&n.then(a).catch(o)}),exit:()=>new Promise((t,e)=>{if(!Ft.isFullscreen)return void t();const r=()=>{Ft.off("change",r),t()};Ft.on("change",r);const o=document[Dt.exitFullscreen]();o instanceof Promise&&o.then(r).catch(e)}),toggle:(t,e)=>Ft.isFullscreen?Ft.exit():Ft.request(t,e),onchange(t){Ft.on("change",t)},onerror(t){Ft.on("error",t)},on(t,e){const r=Nt[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=Nt[t];r&&document.removeEventListener(r,e,!1)},raw:Dt};function Bt(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t,n=t=>{Ft.on("change",()=>{t.emit("fullscreen",Ft.isFullscreen),Ft.isFullscreen?(t.state="fullscreen",C(a,"art-fullscreen")):z(a,"art-fullscreen"),t.emit("resize")}),Ft.on("error",e=>{t.emit("fullscreenError",e)}),tt(t,"fullscreen",{get:()=>Ft.isFullscreen,set(t){return d(this,null,function*(){t?yield Ft.request(a):yield Ft.exit()})}})};t.once("video:loadedmetadata",()=>{var a;Ft.isEnabled?n(t):o.webkitSupportsFullscreen?((a=t).on("document:webkitfullscreenchange",()=>{a.emit("fullscreen",a.fullscreen),a.emit("resize")}),tt(a,"fullscreen",{get:()=>document.fullscreenElement===o,set(t){t?(a.state="fullscreen",o.webkitEnterFullscreen()):o.webkitExitFullscreen()}})):tt(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),tt(t,"fullscreen",ot(t,"fullscreen"))})}function Ht(t){const{icons:e,proxy:r,storage:o,template:{$player:a,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(z(a,"art-mini"),I(e,"display","none"),a.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(I(e,"display","none"),I(r,"display","flex")):(I(e,"display","flex"),I(r,"display","none"))}function p(){const{$mini:e}=t.template,r=H(e),a=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;o.set("top",a),o.set("left",n),I(e,"top",`${a}px`),I(e,"left",`${n}px`)}tt(t,"mini",{get:()=>L(a,"art-mini"),set(h){if(h){t.state="mini",C(a,"art-mini");const h=function(){const{$mini:a}=t.template;if(a)return S(a,n),I(a,"display","flex");{const a=D("div");C(a,"art-mini-popup"),S(document.body,a),t.template.$mini=a,S(a,n);const p=S(a,'
');S(p,e.close),r(p,"click",c);const h=S(a,'
'),u=S(h,e.play),m=S(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(a,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){C(a,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;I(a,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,z(a,"art-mini-dragging");const t=H(a);o.set("left",t.left),o.set("top",t.top),I(a,"left",`${t.left}px`),I(a,"top",`${t.top}px`),I(a,"transform",null)}}),a}}(),u=o.get("top"),m=o.get("left");"number"===typeof u&&"number"===typeof m?(I(h,"top",`${u}px`),I(h,"left",`${m}px`),_(h)||p()):p(),t.emit("mini",!0)}else c()}})}function Wt(t){const{i18n:e,notice:r,template:{$video:o}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:o}=t;e.disablePictureInPicture=!1,tt(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw o.show=t,t})):document.exitPictureInPicture().catch(t=>{throw o.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):o.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),tt(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):tt(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function jt(t){const{option:e,template:{$progress:r,$video:o}}=t;let a=null,n=!1,i=null;t.on("setBar",(a,s,l)=>d(null,null,function*(){var c;const d=null==(c=t.controls)?void 0:c.thumbnails,{url:p,scale:h}=e.thumbnails;if(!d||!p)return;if("hover"===a||"played"===a&&l&&k){if(i||n||(n=!0,i=yield W(p,h),n=!1),!i)return;const a=r.clientWidth*s;a>0&&ar.clientWidth-u/2?I(s,"left",r.clientWidth-u+"px"):I(s,"left",a-u/2+"px")}(a)}})),tt(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(a),a=null,n=!1,i=null)}})}Object.defineProperties(Ft,{isFullscreen:{get:()=>Boolean(document[Dt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Dt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Dt.fullscreenEnabled])}});class Ut{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;tt(t,"url",{get:()=>r.src,set(o){return d(this,null,function*(){if(o){const a=t.url,n=e.type||X(o),i=e.customType[n];n&&i?(yield lt(),t.loading.show=!0,i.call(t,r,o,t)):(URL.revokeObjectURL(a),r.src=o),a!==t.url&&(t.option.url=o,t.isReady&&a&&t.once("video:canplay",()=>{t.emit("restart",o)}))}else yield lt(),t.loading.show=!0})}})}(t),function(t){const{template:{$video:e}}=t;tt(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:o,constructor:{instances:a},template:{$video:n}}=t;tt(t,"play",{value(){return d(this,null,function*(){const i=yield n.play();if(r.show=e.get("Play"),t.emit("play"),o.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;tt(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${J(t.currentTime)} / ${J(t.duration)}`),t.emit("seek",t.currentTime,r)}}),tt(t,"forward",{set(e){t.seek=t.currentTime+e}}),tt(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:o,storage:a}=t;tt(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=K(t,0,1),o.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&a.set("volume",e.volume)}}),tt(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;tt(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=K(r,0,t.duration))}})}(t),function(t){tt(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((o,a)=>{if(e===t.url)return void o();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),a(e)},metadata:()=>{t.currentTime=r},canplay:()=>d(null,null,function*(){t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&(yield t.play()),t.notice.show="",o()})};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}tt(t,"switchQuality",{value:r=>e(r,t.currentTime)}),tt(t,"switchUrl",{value:t=>e(t,0)}),tt(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:o}=t;tt(t,"playbackRate",{get:()=>e.playbackRate,set(a){if(a){if(a===e.playbackRate)return;e.playbackRate=a,o.show=`${r.get("Rate")}: ${1===a?r.get("Normal"):`${a}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t;tt(t,"aspectRatio",{get:()=>a.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)I(o,"width",null),I(o,"height",null),I(o,"margin",null),delete a.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=a,i=e/r,s=t[0]/t[1];i>s?(I(o,"width",s*r+"px"),I(o,"height","100%"),I(o,"margin","0 auto")):(I(o,"width","100%"),I(o,"height",e/s+"px"),I(o,"margin","auto 0")),a.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,o=D("canvas");tt(t,"getDataURL",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),t(o.toDataURL("image/png"))}catch(n){e.show=n,a(n)}})}),tt(t,"getBlobUrl",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),o.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,a(n)}})}),tt(t,"screenshot",{value:e=>d(null,null,function*(){const o=yield t.getDataURL();return G(o,`${e||`artplayer_${J(r.currentTime)}`}.png`),t.emit("screenshot",o),o})})}(t),Bt(t),function(t){const{constructor:e,template:{$container:r,$player:o}}=t;let a="";tt(t,"fullscreenWeb",{get:()=>L(o,"art-fullscreen-web"),set(n){n?(a=o.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&S(document.body,o),t.state="fullscreenWeb",I(o,"width","100%"),I(o,"height","100%"),C(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&S(r,o),a&&(o.style.cssText=a,a=""),z(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),Wt(t),function(t){const{$video:e}=t.template;tt(t,"loaded",{get:()=>t.loadedTime/e.duration}),tt(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){tt(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;tt(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:o}=t.template;tt(t,"autoSize",{value(){const{videoWidth:a,videoHeight:n}=o,{width:i,height:s}=H(e),l=a/n;if(i/s>l)I(r,"width",s*l/i*100+"%"),I(r,"height","100%");else{const t=i/l/s*100;I(r,"width","100%"),I(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){tt(t,"rect",{get:()=>H(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[o]})}tt(t,"x",{get:()=>t.left+window.pageXOffset}),tt(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:o}=t;tt(t,"flip",{get:()=>e.dataset.flip||"normal",set(a){a||(a="normal"),"normal"===a?delete e.dataset.flip:e.dataset.flip=a,o.show=`${r.get("Video Flip")}: ${r.get(Z(a))}`,t.emit("flip",a)}})}(t),Ht(t),function(t){const{template:{$poster:e}}=t;tt(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){I(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;tt(t,"autoHeight",{value(){const{clientWidth:o}=e,{videoHeight:a,videoWidth:n}=r,i=a*(o/n);I(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;tt(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){tt(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){tt(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];tt(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let o=0;o{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,tt(t,"airplay",{value(){n?(a.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){tt(t,"quality",{set(e){const{controls:r,notice:o,i18n:a}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:(null==n?void 0:n.html)||"",selector:e,onSelect(e){return d(this,null,function*(){return yield t.switchQuality(e.url),o.show=`${a.get("Switch Video")}: ${e.html}`,e.html})}})}})}(t),jt(t),function(t){const{i18n:e,notice:r,option:o,constructor:a,proxy:n,template:{$player:i,$video:s,$poster:l}}=t;let c=0;for(let d=0;d{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{c=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{o.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",n=>d(null,null,function*(){c{t.emit("resize"),k&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,I(l,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:o,$poster:a}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(o.volume=K(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(o.volume=K(n,0,1)),e.poster&&I(a,"backgroundImage",`url(${e.poster})`),e.autoplay&&(o.autoplay=e.autoplay),e.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function qt(t){const{notice:e,constructor:r,template:{$player:o,$video:a}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=a,r=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return t>e&&ro}return t.on("fullscreenWeb",e=>{var a;if(e){if(l()){const e=Number(null!=(a=r.AUTO_ORIENTATION_TIME)?a:0);setTimeout(()=>{t.fullscreenWeb&&!L(o,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;I(o,"width",`${r}px`),I(o,"height",`${e}px`),I(o,"transform-origin","0 0"),I(o,"transform",`rotate(90deg) translate(0, -${e}px)`),C(o,n),t.isRotate=!0,t.emit("resize")}()},e)}}else L(o,n)&&(I(o,"width",""),I(o,"height",""),I(o,"transform-origin",""),I(o,"transform",""),z(o,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",t=>d(null,null,function*(){var r;const a=!!(null==(r=null==screen?void 0:screen.orientation)?void 0:r.lock);if(t){if(a&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";yield screen.orientation.lock(t),s=!0,C(o,i)}catch(n){s=!1,e.show=n}}else if(L(o,i)&&z(o,i),a&&s){try{screen.orientation.unlock()}catch(c){}s=!1}})),{name:"autoOrientation",get state(){return L(o,n)}}}function Xt(t){const{i18n:e,icons:r,storage:o,constructor:a,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=T(".art-auto-playback-last",s),c=T(".art-auto-playback-jump",s),d=T(".art-auto-playback-close",s);S(d,r.close);let p=null;function h(){const r=(o.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),I(s,"display","none"),r&&r>=a.AUTO_PLAYBACK_MIN&&(I(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${J(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{I(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),I(i,"display","none"),I(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{I(s,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=o.get("times")||{},r=Object.keys(e);r.length>a.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,o.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return o.get("times")||{}},clear:()=>o.del("times"),delete(t){const e=o.get("times")||{};return delete e[t],o.set("times",e),e}}}function Gt(t){const{constructor:e,proxy:r,template:{$player:o,$video:a}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,z(o,"art-fast-forward"))};return r(a,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,C(o,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return L(o,"art-fast-forward")}}}function Kt(t){const{layers:e,icons:r,template:{$player:o}}=t;function a(){return L(o,"art-lock")}function n(){C(o,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){z(o,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const o=S(e,r.lock),a=S(e,r.unlock);I(o,"display","none"),t.on("lock",t=>{t?(I(o,"display","inline-flex"),I(a,"display","none")):(I(o,"display","none"),I(a,"display","inline-flex"))})},click(){a()?i():n()}}),{name:"lock",get state(){return a()},set state(t){t?n():i()}}}function Zt(t){return t.on("control",e=>{e?z(t.template.$player,"art-mini-progress-bar"):C(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Jt{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Zt),e.lock&&k&&this.add(Kt),e.autoPlayback&&!e.isLive&&this.add(Xt),e.autoOrientation&&k&&this.add(qt),e.fastForward&&k&&!e.isLive&&this.add(Gt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return q(!rt(this,r),`Cannot add a plugin that already has the same name: ${r}`),tt(this,r,{value:e}),this}}class Qt extends xt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:o}}=t;this.name="setting",this.$parent=o,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=V(t,r.setting),o=V(t,this.$parent);!this.show||e||o||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,PLAYBACK_RATE:a}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:o,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:a.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,ASPECT_RATIO:a}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:o,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:a.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,FLIP:a}}=t;function n(t){return e.get(Z(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:o,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:a.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:o}=t;return{width:o.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){var r;for(let o=0;o{e.default=e===t,e.default&&e.$item&&O(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,o=[]){for(let a=0;ae}),tt(n,"$parents",{get:()=>r}),tt(n,"$option",{get:()=>t});const o=[];tt(n,"$events",{get:()=>o}),tt(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,o)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){var t,e;const{controls:r,constructor:{SETTING_WIDTH:o,SETTING_ITEM_HEIGHT:a},template:{$player:n,$setting:i}}=this.art;if(r.setting&&this.show){const s=(null==(e=null==(t=this.active[0])?void 0:t.$parent)?void 0:e.width)||o,{left:l,width:c}=H(r.setting),{left:d,width:p}=H(n),h=l-d+c/2-s/2;if(I(i,"height",`${this.active===this.option?this.active.length*a:(this.active.length+1)*a}px`),I(i,"width",`${s}px`),this.art.isRotate||k)return;h+s>p?(I(i,"left",null),I(i,"right",null)):(I(i,"left",`${h}px`),I(i,"right","auto"))}}inactivate(t){for(let e=0;e'),s=D("div");C(s,"art-setting-item-left-icon"),S(s,o),S(i,s),S(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),S(e,n)}createItem(t,e=!1){var r,o;if(!this.cache.has(t.$option))return;const a=this.cache.get(t.$option),n=t.$item;let i="selector";rt(t,"switch")&&(i="switch"),rt(t,"range")&&(i="range"),rt(t,"onClick")&&(i="button");const{icons:s,proxy:l,constructor:c}=this.art,p=D("div");C(p,"art-setting-item"),I(p,"height",`${c.SETTING_ITEM_HEIGHT}px`),p.dataset.name=t.name||"",p.dataset.value=t.value||"";const h=S(p,'
'),u=S(p,'
'),m=D("div");switch(C(m,"art-setting-item-left-icon"),i){case"button":case"switch":case"range":S(m,t.icon||s.config);break;case"selector":(null==(r=t.selector)?void 0:r.length)?S(m,t.icon||s.config):S(m,s.check)}S(h,m),tt(t,"$icon",{configurable:!0,get:()=>m}),tt(t,"icon",{configurable:!0,get:()=>m.innerHTML,set(t){m.innerHTML="",S(m,t)}});const f=D("div");C(f,"art-setting-item-left-text"),S(f,t.html||""),S(h,f),tt(t,"$html",{configurable:!0,get:()=>f}),tt(t,"html",{configurable:!0,get:()=>f.innerHTML,set(t){f.innerHTML="",S(f,t)}});const g=D("div");switch(C(g,"art-setting-item-right-tooltip"),S(g,t.tooltip||""),S(u,g),tt(t,"$tooltip",{configurable:!0,get:()=>g}),tt(t,"tooltip",{configurable:!0,get:()=>g.innerHTML,set(t){g.innerHTML="",S(g,t)}}),i){case"switch":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,s.switchOn),o=S(e,s.switchOff);I(t.switch?o:r,"display","none"),S(u,e),tt(t,"$switch",{configurable:!0,get:()=>e});let a=t.switch;tt(t,"switch",{configurable:!0,get:()=>a,set(t){a=t,t?(I(o,"display","none"),I(r,"display",null)):(I(o,"display",null),I(r,"display","none"))}});break}case"range":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],C(r,"art-setting-range"),S(u,e),tt(t,"$range",{configurable:!0,get:()=>r});let o=[...t.range];tt(t,"range",{configurable:!0,get:()=>o,set(t){o=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(null==(o=t.selector)?void 0:o.length){const t=D("div");C(t,"art-setting-item-right-icon"),S(t,s.arrowRight),S(u,t)}}switch(i){case"switch":if(t.onSwitch){const e=l(p,"click",e=>d(this,null,function*(){t.switch=yield t.onSwitch.call(this.art,t,p,e)}));t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=l(t.$range,"change",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onRange.call(this.art,t,p,e)}));t.$events.push(e)}if(t.onChange){const e=l(t.$range,"input",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onChange.call(this.art,t,p,e)}));t.$events.push(e)}}break;case"selector":{const e=l(p,"click",e=>d(this,null,function*(){var r;(null==(r=t.selector)?void 0:r.length)?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=yield t.$parent.onSelect.call(this.art,t,p,e)))}));t.$events.push(e),t.default&&C(p,"art-current")}break;case"button":if(t.onClick){const e=l(p,"click",e=>d(this,null,function*(){t.tooltip=yield t.onClick.call(this.art,t,p,e)}));t.$events.push(e)}}tt(t,"$item",{configurable:!0,get:()=>p}),e?Y(p,n):S(a,p),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){var e;if(this.active=t,this.cache.has(t)){O(this.cache.get(t),"art-current")}else{const r=D("div");this.cache.set(t,r),C(r,"art-setting-panel"),S(this.$parent,r),O(r,"art-current"),(null==(e=t[0])?void 0:e.$parent)&&this.createHeader(t[0]);for(let e=0;enull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){var t,e;return null==(e=null==(t=this.art.template.$video)?void 0:t.textTracks)?void 0:e[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?P(r,t):I(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?Q(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}switch(t){return d(this,arguments,function*(t,e={}){const{i18n:r,notice:o,option:a}=this.art,n=c(l(l({},a.subtitle),e),{url:t}),i=yield this.init(n);return e.name&&(o.show=`${r.get("Switch Subtitle")}: ${e.name}`),i})}createTrack(t,e){const{template:r,proxy:o,option:a}=this.art,{$video:n,$track:i}=r,s=D("track");s.default=!0,s.kind=t,s.src=e,s.label=a.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,M(i),S(n,s),r.$track=s,this.destroyEvent=o(this.textTrack,"cuechange",()=>this.update())}init(t){return d(this,null,function*(){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(f(t,wt.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||X(t.url)){case"srt":{const e=nt(r);return it(t.onVttLoad(e))}case"ass":{const e=st(r);return it(t.onVttLoad(e))}case"vtt":return it(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null})}}class oe{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=T(e.container),q(this.$container,`No container element found by ${e.container}`)),q(B(),"The current browser does not support flex layout");const o=this.$container.tagName.toLowerCase();q("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),q(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${g}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return T(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=oe.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);q(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),Y(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&C(this.$player,"art-backdrop"),k&&C(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":C(this.$player,"art-destroy")}}class ae{on(t,e,r){const o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const o=this;function a(...n){o.off(t,a),e.apply(r,n)}return a._=e,this.on(t,a,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let o=0;oe.call(this,this)),se.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${se.version}`);for(let e=0;et(`Event@${e.type}`))}ie.push(this)}static get instances(){return ie}static get version(){return g}static get config(){return v}static get utils(){return pt}static get scheme(){return wt}static get Emitter(){return ae}static get validator(){return f}static get kindOf(){return f.kindOf}static get html(){return oe.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:b?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null==navigator?void 0:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){se.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),ie.splice(ie.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return se.STYLE=ee,se.DEBUG=!1,se.CONTEXTMENU=!0,se.NOTICE_TIME=2e3,se.SETTING_WIDTH=250,se.SETTING_ITEM_WIDTH=200,se.SETTING_ITEM_HEIGHT=35,se.RESIZE_TIME=200,se.SCROLL_TIME=200,se.SCROLL_GAP=50,se.AUTO_PLAYBACK_MAX=10,se.AUTO_PLAYBACK_MIN=5,se.AUTO_PLAYBACK_TIMEOUT=3e3,se.RECONNECT_TIME_MAX=5,se.RECONNECT_SLEEP_TIME=1e3,se.CONTROL_HIDE_TIME=3e3,se.DBCLICK_TIME=300,se.DBCLICK_FULLSCREEN=!0,se.MOBILE_DBCLICK_PLAY=!0,se.MOBILE_CLICK_PLAY=!1,se.AUTO_ORIENTATION_TIME=200,se.INFO_LOOP_TIME=1e3,se.FAST_FORWARD_VALUE=3,se.FAST_FORWARD_TIME=1e3,se.TOUCH_MOVE_RATIO=.5,se.VOLUME_STEP=.1,se.SEEK_STEP=5,se.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],se.ASPECT_RATIO=["default","4:3","16:9"],se.FLIP=["normal","horizontal","vertical"],se.FULLSCREEN_WEB_IN_BODY=!0,se.LOG_VERSION=!0,se.USE_RAF=!1,se.REMOVE_SRC_WHEN_DESTROY=!0,$&&(F("artplayer-style",ee),setTimeout(()=>{se.LOG_VERSION&&console.log(`%c ArtPlayer %c ${se.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),se}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))n.call(e,r)&&s(t,r,e[r]);if(a)for(var r of a(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,a)=>{var n=t=>{try{s(r.next(t))}catch(e){a(e)}},i=t=>{try{s(r.throw(t))}catch(e){a(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(n,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h,u={exports:{}};var m=(h||(h=1,u.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(a=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2=1,k=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(y)||x,$="undefined"!==typeof window&&"undefined"!==typeof document;function T(t,e=document){return e.querySelector(t)}function E(t,e=document){return Array.from(e.querySelectorAll(t))}function C(t,e){return t.classList.add(e)}function z(t,e){return t.classList.remove(e)}function L(t,e){return t.classList.contains(e)}function S(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function M(t){return t.parentNode.removeChild(t)}function I(t,e,r){return t.style[e]=r,t}function P(t,e){for(const r in e)I(t,r,e[r]);return t}function A(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function O(t,e){A(t).forEach(t=>z(t,e)),C(t,e)}function R(t,e,r="top"){k||(t.setAttribute("aria-label",e),C(t,"hint--rounded"),C(t,`hint--${r}`))}function _(t,e=0){const r=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=o&&r.top+r.height+e>=0,i=r.left-e<=a+e&&r.left+r.width+e>=0;return n&&i}function V(t,e){return j(t).includes(e)}function Y(t,e){return e.parentNode.replaceChild(t,e),t}function D(t){return document.createElement(t)}function N(t="",e=""){const r=D("i");return C(r,"art-icon"),C(r,`art-icon-${t}`),S(r,e),r}function F(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function B(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function H(t){return t.getBoundingClientRect()}function W(t,e){return new Promise((r,o)=>{const a=new Image;a.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=a.width*e,n.height=a.height*e,i.drawImage(a,0,0,n.width,n.height),n.toBlob(e=>{const a=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(a),o(new Error(`Image load failed: ${t}`))},n.src=a})}else r(a)},a.onerror=function(){o(new Error(`Image load failed: ${t}`))},a.src=t})}function j(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class U extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function q(t,e){if(!t)throw new U(e);return t}function X(t){return t.includes("?")?X(t.split("?")[0]):t.includes("#")?X(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function G(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function K(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function Z(t){return t.charAt(0).toUpperCase()+t.slice(1)}function J(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),o=Math.floor(t-3600*e-60*r);return(e>0?[e,r,o]:[r,o]).map(t=>t<10?`0${t}`:String(t)).join(":")}function Q(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const tt=Object.defineProperty,{hasOwnProperty:et}=Object.prototype;function rt(t,e){return et.call(t,e)}function ot(t,e){return Object.getOwnPropertyDescriptor(t,e)}function at(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(o=>{const a=t[o],n=r[o];Array.isArray(a)&&Array.isArray(n)?t[o]=a.concat(...n):e(a)&&e(n)?t[o]=at(a,n):t[o]=n}),t),{})}function nt(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=`${r}00`),2===r.length&&(o=`${r}0`),`${e},${o}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function it(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function st(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const o=t.match(e);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function lt(t=0){return new Promise(e=>setTimeout(e,t))}function ct(t,e){let r;return function(...o){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,o)),e)}}function dt(t,e){let r=!1;return function(...o){r||(t.apply(this,o),r=!0,setTimeout(()=>{r=!1},e))}}const pt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:U,addClass:C,append:S,assToVtt:st,capitalize:Z,clamp:K,createElement:D,debounce:ct,def:tt,download:G,errorHandle:q,escape:Q,get:ot,getComposedPath:j,getExt:X,getIcon:N,getRect:H,getStyle:function(t,e,r=!0){const o=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(o):o},has:rt,hasClass:L,includeFromEvent:V,inverseClass:O,isBrowser:$,isIOS:w,isIOS13:x,isInViewport:_,isMobile:k,isSafari:b,loadImg:W,mergeDeep:at,query:T,queryAll:E,remove:M,removeClass:z,replaceElement:Y,secondToTime:J,setStyle:I,setStyleText:F,setStyles:P,siblings:A,sleep:lt,srtToVtt:nt,supportsFlex:B,throttle:dt,tooltip:R,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:y,vttToBlob:it},Symbol.toStringTag,{value:"Module"})),ht="array",ut="boolean",mt="string",ft="number",gt="object",vt="function";function yt(t,e,r){return q(e===mt||e===ft||t instanceof Element,`${r.join(".")} require '${mt}' or 'Element' type`)}const bt={html:yt,disable:`?${ut}`,name:`?${mt}`,index:`?${ft}`,style:`?${gt}`,click:`?${vt}`,mounted:`?${vt}`,tooltip:`?${mt}|${ft}`,width:`?${ft}`,selector:`?${ht}`,onSelect:`?${vt}`,switch:`?${ut}`,onSwitch:`?${vt}`,range:`?${ht}`,onRange:`?${vt}`,onChange:`?${vt}`},wt={id:mt,container:yt,url:mt,poster:mt,type:mt,theme:mt,lang:mt,volume:ft,isLive:ut,muted:ut,autoplay:ut,autoSize:ut,autoMini:ut,loop:ut,flip:ut,playbackRate:ut,aspectRatio:ut,screenshot:ut,setting:ut,hotkey:ut,pip:ut,mutex:ut,backdrop:ut,fullscreen:ut,fullscreenWeb:ut,subtitleOffset:ut,miniProgressBar:ut,useSSR:ut,playsInline:ut,lock:ut,gesture:ut,fastForward:ut,autoPlayback:ut,autoOrientation:ut,airplay:ut,proxy:`?${vt}`,plugins:[vt],layers:[bt],contextmenu:[bt],settings:[bt],controls:[c(l({},bt),{position:(t,e,r)=>{const o=["top","left","right"];return q(o.includes(t),`${r.join(".")} only accept ${o.toString()} as parameters`)}})],quality:[{default:`?${ut}`,html:mt,url:mt}],highlight:[{time:ft,text:mt}],thumbnails:{url:mt,number:ft,column:ft,width:ft,height:ft,scale:ft},subtitle:{url:mt,name:mt,type:mt,style:gt,escape:ut,encoding:mt,onVttLoad:vt},moreVideoAttr:gt,i18n:gt,icons:gt,cssVar:gt,customType:gt};class xt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return L(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?C(e,r):z(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",f(e,bt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;q(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const o=D("div");C(o,`art-${this.name}`),C(o,`art-${this.name}-${r}`);const a=Array.from(this.$parent.children);o.dataset.index=e.index||this.id;const n=a.find(t=>Number(t.dataset.index)>=Number(o.dataset.index));n?n.insertAdjacentElement("beforebegin",o):S(this.$parent,o),e.html&&S(o,e.html),e.style&&P(o,e.style),e.tooltip&&R(o,e.tooltip);const i=[];if(e.click){const t=this.art.events.proxy(o,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});i.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,o,i),this[r]=o,this.cache.set(r,{$ref:o,events:i,option:e}),e.mounted&&e.mounted.call(this.art,o),o}remove(t){q(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],M(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class kt extends xt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,k||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:o}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:o}}=e,a=o.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return c(l({},t),{html:`${r.get("Play Speed")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.playbackRate=Number(o),t.show=!1)},mounted:t=>{const r=T('[data-value="1"]',t);r&&O(r,"art-current"),e.on("video:ratechange",()=>{const r=E("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&O(r,"art-current")})}})}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:o}}=e,a=o.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return c(l({},t),{html:`${r.get("Aspect Ratio")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.aspectRatio=o,t.show=!1)},mounted:t=>{const r=T('[data-value="default"]',t);r&&O(r,"art-current"),e.on("aspectRatio",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:o}}=e,a=o.map(t=>`${r.get(Z(t))}`).join("");return c(l({},t),{html:`${r.get("Video Flip")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.flip=o.toLowerCase(),t.show=!1)},mounted:t=>{const r=T('[data-value="normal"]',t);r&&O(r,"art-current"),e.on("flip",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"flip",index:30})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=$?location.href:"";return c(l({},t),{html:`ArtPlayer ${g}`})}({name:"version",index:50})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let a=0;a{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,a=t.clientY,{height:n,width:i,left:s,top:l}=H(r),{height:c,width:d}=H(o);let p=e-s,h=a-l;e+d>s+i&&(p=i-d),a+c>l+n&&(h=n-c),P(o,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{V(t,o)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function $t(t,e){const{$progress:r}=t.template,{left:o}=H(r),a=K((k?e.touches[0].clientX:e.clientX)-o,0,r.clientWidth),n=a/r.clientWidth*t.duration;return{second:n,time:J(n),width:a,percentage:K(a/r.clientWidth,0,1)}}function Tt(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,o=r*t.duration;t.emit("setBar","played",r,e),t.seek=o}else{const{second:r,percentage:o}=$t(t,e);t.emit("setBar","played",o,e),t.seek=r}}function Et(t){return e=>{const{icons:r,option:o,proxy:a}=e,{$player:n,$progress:i}=e.template;return c(l({},t),{html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let s=null,l=!1;const c=T(".art-progress-hover",t),d=T(".art-progress-loaded",t),p=T(".art-progress-played",t),h=T(".art-progress-highlight",t),u=T(".art-progress-indicator",t),m=T(".art-progress-tip",t);function f(r,o){const{width:a,time:n}=o||$t(e,r);m.textContent=n||"00:00";const i=m.clientWidth;a<=i/2?I(m,"left",0):a>t.clientWidth-i/2?I(m,"left",t.clientWidth-i+"px"):I(m,"left",a-i/2+"px")}r.indicator?S(u,r.indicator):I(u,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,o,a){const i="played"===r&&a&&k;if("loaded"===r&&I(d,"width",100*o+"%"),"hover"===r&&(I(c,"width",100*o+"%"),V(a,h)?function(r){const{width:o}=$t(e,r),{text:a}=r.target.dataset;m.textContent=a;const n=m.clientWidth;o<=n/2?I(m,"left",0):o>t.clientWidth-n/2?I(m,"left",t.clientWidth-n+"px"):I(m,"left",o-n/2+"px")}(a):f(a),0===o?z(n,"art-progress-hover"):C(n,"art-progress-hover")),"played"===r&&(I(p,"width",100*o+"%"),I(u,"left",100*o+"%")),i){C(n,"art-progress-hover");f(a,{width:t.clientWidth*o,time:J(o*e.duration)}),clearTimeout(s),s=setTimeout(()=>{z(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){h.textContent="";for(let t=0;t`;S(h,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),k||(a(i,"click",t=>{t.target!==u&&Tt(e,t)}),a(i,"mousemove",t=>{const{percentage:r}=$t(e,t);e.emit("setBar","hover",r,t)}),a(i,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),a(i,"mousedown",t=>{l=0===t.button}),e.on("document:mousemove",t=>{if(l){const{second:r,percentage:o}=$t(e,t);e.emit("setBar","played",o,t),e.seek=r}}),e.on("document:mouseup",()=>{l&&(l=!1)}))}})}}class Ct extends xt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:o}=this.art.template;t.on("mousemove",()=>{k||(this.show=!0)}),t.on("click",()=>{k?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=V(t,o)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(z(r,"art-hide-cursor"),C(r,"art-hover"),this.timer=Date.now()):(C(r,"art-hide-cursor"),z(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(Et({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.play),i=S(t,o.pause);function s(){I(n,"display","flex"),I(i,"display","none")}function l(){I(n,"display","none"),I(i,"display","flex")}R(n,a.get("Play")),R(i,a.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o}=e,a=S(t,o.volume),n=S(t,o.volumeClose),i=S(t,'
'),s=S(i,'
'),l=S(s,'
'),c=S(s,'
'),d=S(c,'
'),p=S(d,'
'),h=S(c,'
');function u(t){const{top:e,height:r}=H(c);return 1-(t.clientY-e)/r}function m(){if(e.muted||0===e.volume)I(a,"display","none"),I(n,"display","flex"),I(h,"top","100%"),I(p,"top","100%"),l.textContent=0;else{const t=100*e.volume;I(a,"display","flex"),I(n,"display","none"),I(h,"top",100-t+"%"),I(p,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(m(),e.on("video:volumechange",m),r(a,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),k)I(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=u(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=u(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>c(l({},t),{style:k?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${J(e.currentTime)} / ${J(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const o=["video:loadedmetadata","video:timeupdate","video:progress"];for(let a=0;a{this.art.quality=t.quality}),t.screenshot&&!k&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{R(t,a.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{R(t,a.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenWebOn),i=S(t,o.fullscreenWebOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(R(t,a.get("Exit Web Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Web Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenOn),i=S(t,o.fullscreenOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(R(t,a.get("Exit Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),tt(e,"$control_item",{get:()=>r}),tt(e,"$control_value",{get:()=>a})}const i=o(n,"click",e=>d(this,null,function*(){const r=j(e),o=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(o),t.onSelect&&(a.innerHTML=yield t.onSelect.call(this.art,o,o.$control_item,e))}));r.push(i)}}function zt(t,e,r,o){const a=e-o,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(a)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,a);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class Lt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:o,$video:a}}=t;function n(e){V(e,o)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(a,"click",e=>{const o=Date.now();i.push(o);const{MOBILE_CLICK_PLAY:a,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>o-t<=n);switch(c.length){case 1:t.emit("click",e),k?!t.isLock&&a&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),k?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{C(r,"art-hover"),t.emit("hover",!0,e)},e=>{z(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:o}=t;t.on("resize",()=>{const{aspectRatio:e,notice:o}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,o.show=""});const a=ct(()=>t.emit("resize"),o.RESIZE_TIME);t.on("window:orientationchange",()=>a()),t.on("window:resize",()=>a()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>a())}(t,this),function(t,e){if(k&&!t.option.isLive){const{$video:r,$progress:o}=t.template;let a=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){a===o&&Tt(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:o,pageY:n}=e.touches[0],c=zt(i,s,o,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=K((o-i)/t.width,-1,1),d=K((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=a===r?t.constructor.TOUCH_MOVE_RATIO:1,u=K(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",K(u/t.duration,0,1),e),t.notice.show=`${J(u)} / ${J(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,a=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{a=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(o,"touchstart",t=>{a=o,c(t)}),e.proxy(o,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:o}}=t,a=dt(()=>{t.emit("view",_(o,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>a()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],o=["resize","scroll","orientationchange"],a=[];function n(n={}){for(let t=0;t{const o=n.document||i.ownerDocument||document,s=e.proxy(o,r,e=>{t.emit(`document:${r}`,e)});a.push(s)}),o.forEach(r=>{var o;const s=n.window||(null==(o=i.ownerDocument)?void 0:o.defaultView)||window,l=e.proxy(s,r,e=>{t.emit(`window:${r}`,e)});a.push(l)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,o={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,o));t.addEventListener(e,r,o);const a=()=>t.removeEventListener(e,r,o);return this.destroyEvents.add(a),a}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class St{constructor(t){this.art=t,this.keys={},k||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n'},t.option.icons);for(const r in e)tt(this,r,{get:()=>N(r,e[r])})}}class At extends xt{constructor(t){super(t),this.name="info",k||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:o,$video:a}}=this.art;t(o,"click",()=>{this.show=!1});let n=null;const i=E("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{I(a,"display","none"),I(n,"display",null)}),o.proxy(e.$state,"click",()=>t.play())}}class Vt{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:o}}=this.art;t?(o.textContent=t instanceof Error?t.message.trim():t,C(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{o.textContent="",z(r,"art-notice-show")},e.NOTICE_TIME)):z(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Dt=(()=>{if("undefined"===typeof document)return!1;const t=Yt[0],e={};for(const r of Yt){if(r[1]in document){for(const[o,a]of r.entries())e[t[o]]=a;return e}}return!1})(),Nt={change:Dt.fullscreenchange,error:Dt.fullscreenerror},Ft={request:(t=document.documentElement,e)=>new Promise((r,o)=>{const a=()=>{Ft.off("change",a),r()};Ft.on("change",a);const n=t[Dt.requestFullscreen](e);n instanceof Promise&&n.then(a).catch(o)}),exit:()=>new Promise((t,e)=>{if(!Ft.isFullscreen)return void t();const r=()=>{Ft.off("change",r),t()};Ft.on("change",r);const o=document[Dt.exitFullscreen]();o instanceof Promise&&o.then(r).catch(e)}),toggle:(t,e)=>Ft.isFullscreen?Ft.exit():Ft.request(t,e),onchange(t){Ft.on("change",t)},onerror(t){Ft.on("error",t)},on(t,e){const r=Nt[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=Nt[t];r&&document.removeEventListener(r,e,!1)},raw:Dt};function Bt(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t,n=t=>{Ft.on("change",()=>{t.emit("fullscreen",Ft.isFullscreen),Ft.isFullscreen?(t.state="fullscreen",C(a,"art-fullscreen")):z(a,"art-fullscreen"),t.emit("resize")}),Ft.on("error",e=>{t.emit("fullscreenError",e)}),tt(t,"fullscreen",{get:()=>Ft.isFullscreen,set(t){return d(this,null,function*(){t?yield Ft.request(a):yield Ft.exit()})}})};t.once("video:loadedmetadata",()=>{var a;Ft.isEnabled?n(t):o.webkitSupportsFullscreen?((a=t).on("document:webkitfullscreenchange",()=>{a.emit("fullscreen",a.fullscreen),a.emit("resize")}),tt(a,"fullscreen",{get:()=>document.fullscreenElement===o,set(t){t?(a.state="fullscreen",o.webkitEnterFullscreen()):o.webkitExitFullscreen()}})):tt(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),tt(t,"fullscreen",ot(t,"fullscreen"))})}function Ht(t){const{icons:e,proxy:r,storage:o,template:{$player:a,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(z(a,"art-mini"),I(e,"display","none"),a.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(I(e,"display","none"),I(r,"display","flex")):(I(e,"display","flex"),I(r,"display","none"))}function p(){const{$mini:e}=t.template,r=H(e),a=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;o.set("top",a),o.set("left",n),I(e,"top",`${a}px`),I(e,"left",`${n}px`)}tt(t,"mini",{get:()=>L(a,"art-mini"),set(h){if(h){t.state="mini",C(a,"art-mini");const h=function(){const{$mini:a}=t.template;if(a)return S(a,n),I(a,"display","flex");{const a=D("div");C(a,"art-mini-popup"),S(document.body,a),t.template.$mini=a,S(a,n);const p=S(a,'
');S(p,e.close),r(p,"click",c);const h=S(a,'
'),u=S(h,e.play),m=S(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(a,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){C(a,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;I(a,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,z(a,"art-mini-dragging");const t=H(a);o.set("left",t.left),o.set("top",t.top),I(a,"left",`${t.left}px`),I(a,"top",`${t.top}px`),I(a,"transform",null)}}),a}}(),u=o.get("top"),m=o.get("left");"number"===typeof u&&"number"===typeof m?(I(h,"top",`${u}px`),I(h,"left",`${m}px`),_(h)||p()):p(),t.emit("mini",!0)}else c()}})}function Wt(t){const{i18n:e,notice:r,template:{$video:o}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:o}=t;e.disablePictureInPicture=!1,tt(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw o.show=t,t})):document.exitPictureInPicture().catch(t=>{throw o.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):o.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),tt(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):tt(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function jt(t){const{option:e,template:{$progress:r,$video:o}}=t;let a=null,n=!1,i=null;t.on("setBar",(a,s,l)=>d(null,null,function*(){var c;const d=null==(c=t.controls)?void 0:c.thumbnails,{url:p,scale:h}=e.thumbnails;if(!d||!p)return;if("hover"===a||"played"===a&&l&&k){if(i||n||(n=!0,i=yield W(p,h),n=!1),!i)return;const a=r.clientWidth*s;a>0&&ar.clientWidth-u/2?I(s,"left",r.clientWidth-u+"px"):I(s,"left",a-u/2+"px")}(a)}})),tt(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(a),a=null,n=!1,i=null)}})}Object.defineProperties(Ft,{isFullscreen:{get:()=>Boolean(document[Dt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Dt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Dt.fullscreenEnabled])}});class Ut{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;tt(t,"url",{get:()=>r.src,set(o){return d(this,null,function*(){if(o){const a=t.url,n=e.type||X(o),i=e.customType[n];n&&i?(yield lt(),t.loading.show=!0,i.call(t,r,o,t)):(URL.revokeObjectURL(a),r.src=o),a!==t.url&&(t.option.url=o,t.isReady&&a&&t.once("video:canplay",()=>{t.emit("restart",o)}))}else yield lt(),t.loading.show=!0})}})}(t),function(t){const{template:{$video:e}}=t;tt(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:o,constructor:{instances:a},template:{$video:n}}=t;tt(t,"play",{value(){return d(this,null,function*(){const i=yield n.play();if(r.show=e.get("Play"),t.emit("play"),o.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;tt(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${J(t.currentTime)} / ${J(t.duration)}`),t.emit("seek",t.currentTime,r)}}),tt(t,"forward",{set(e){t.seek=t.currentTime+e}}),tt(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:o,storage:a}=t;tt(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=K(t,0,1),o.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&a.set("volume",e.volume)}}),tt(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;tt(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=K(r,0,t.duration))}})}(t),function(t){tt(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((o,a)=>{if(e===t.url)return void o();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),a(e)},metadata:()=>{t.currentTime=r},canplay:()=>d(null,null,function*(){t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&(yield t.play()),t.notice.show="",o()})};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}tt(t,"switchQuality",{value:r=>e(r,t.currentTime)}),tt(t,"switchUrl",{value:t=>e(t,0)}),tt(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:o}=t;tt(t,"playbackRate",{get:()=>e.playbackRate,set(a){if(a){if(a===e.playbackRate)return;e.playbackRate=a,o.show=`${r.get("Rate")}: ${1===a?r.get("Normal"):`${a}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t;tt(t,"aspectRatio",{get:()=>a.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)I(o,"width",null),I(o,"height",null),I(o,"margin",null),delete a.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=a,i=e/r,s=t[0]/t[1];i>s?(I(o,"width",s*r+"px"),I(o,"height","100%"),I(o,"margin","0 auto")):(I(o,"width","100%"),I(o,"height",e/s+"px"),I(o,"margin","auto 0")),a.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,o=D("canvas");tt(t,"getDataURL",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),t(o.toDataURL("image/png"))}catch(n){e.show=n,a(n)}})}),tt(t,"getBlobUrl",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),o.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,a(n)}})}),tt(t,"screenshot",{value:e=>d(null,null,function*(){const o=yield t.getDataURL();return G(o,`${e||`artplayer_${J(r.currentTime)}`}.png`),t.emit("screenshot",o),o})})}(t),Bt(t),function(t){const{constructor:e,template:{$container:r,$player:o}}=t;let a="";tt(t,"fullscreenWeb",{get:()=>L(o,"art-fullscreen-web"),set(n){n?(a=o.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&S(document.body,o),t.state="fullscreenWeb",I(o,"width","100%"),I(o,"height","100%"),C(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&S(r,o),a&&(o.style.cssText=a,a=""),z(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),Wt(t),function(t){const{$video:e}=t.template;tt(t,"loaded",{get:()=>t.loadedTime/e.duration}),tt(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){tt(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;tt(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:o}=t.template;tt(t,"autoSize",{value(){const{videoWidth:a,videoHeight:n}=o,{width:i,height:s}=H(e),l=a/n;if(i/s>l)I(r,"width",s*l/i*100+"%"),I(r,"height","100%");else{const t=i/l/s*100;I(r,"width","100%"),I(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){tt(t,"rect",{get:()=>H(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[o]})}tt(t,"x",{get:()=>t.left+window.pageXOffset}),tt(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:o}=t;tt(t,"flip",{get:()=>e.dataset.flip||"normal",set(a){a||(a="normal"),"normal"===a?delete e.dataset.flip:e.dataset.flip=a,o.show=`${r.get("Video Flip")}: ${r.get(Z(a))}`,t.emit("flip",a)}})}(t),Ht(t),function(t){const{template:{$poster:e}}=t;tt(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){I(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;tt(t,"autoHeight",{value(){const{clientWidth:o}=e,{videoHeight:a,videoWidth:n}=r,i=a*(o/n);I(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;tt(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){tt(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){tt(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];tt(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let o=0;o{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,tt(t,"airplay",{value(){n?(a.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){tt(t,"quality",{set(e){const{controls:r,notice:o,i18n:a}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:(null==n?void 0:n.html)||"",selector:e,onSelect(e){return d(this,null,function*(){return yield t.switchQuality(e.url),o.show=`${a.get("Switch Video")}: ${e.html}`,e.html})}})}})}(t),jt(t),function(t){const{i18n:e,notice:r,option:o,constructor:a,proxy:n,template:{$player:i,$video:s,$poster:l}}=t;let c=0;for(let d=0;d{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{c=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{o.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",n=>d(null,null,function*(){c{t.emit("resize"),k&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,I(l,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:o,$poster:a}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(o.volume=K(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(o.volume=K(n,0,1)),e.poster&&I(a,"backgroundImage",`url(${e.poster})`),e.autoplay&&(o.autoplay=e.autoplay),e.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function qt(t){const{notice:e,constructor:r,template:{$player:o,$video:a}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=a,r=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return t>e&&ro}return t.on("fullscreenWeb",e=>{var a;if(e){if(l()){const e=Number(null!=(a=r.AUTO_ORIENTATION_TIME)?a:0);setTimeout(()=>{t.fullscreenWeb&&!L(o,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;I(o,"width",`${r}px`),I(o,"height",`${e}px`),I(o,"transform-origin","0 0"),I(o,"transform",`rotate(90deg) translate(0, -${e}px)`),C(o,n),t.isRotate=!0,t.emit("resize")}()},e)}}else L(o,n)&&(I(o,"width",""),I(o,"height",""),I(o,"transform-origin",""),I(o,"transform",""),z(o,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",t=>d(null,null,function*(){var r;const a=!!(null==(r=null==screen?void 0:screen.orientation)?void 0:r.lock);if(t){if(a&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";yield screen.orientation.lock(t),s=!0,C(o,i)}catch(n){s=!1,e.show=n}}else if(L(o,i)&&z(o,i),a&&s){try{screen.orientation.unlock()}catch(c){}s=!1}})),{name:"autoOrientation",get state(){return L(o,n)}}}function Xt(t){const{i18n:e,icons:r,storage:o,constructor:a,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=T(".art-auto-playback-last",s),c=T(".art-auto-playback-jump",s),d=T(".art-auto-playback-close",s);S(d,r.close);let p=null;function h(){const r=(o.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),I(s,"display","none"),r&&r>=a.AUTO_PLAYBACK_MIN&&(I(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${J(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{I(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),I(i,"display","none"),I(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{I(s,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=o.get("times")||{},r=Object.keys(e);r.length>a.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,o.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return o.get("times")||{}},clear:()=>o.del("times"),delete(t){const e=o.get("times")||{};return delete e[t],o.set("times",e),e}}}function Gt(t){const{constructor:e,proxy:r,template:{$player:o,$video:a}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,z(o,"art-fast-forward"))};return r(a,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,C(o,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return L(o,"art-fast-forward")}}}function Kt(t){const{layers:e,icons:r,template:{$player:o}}=t;function a(){return L(o,"art-lock")}function n(){C(o,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){z(o,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const o=S(e,r.lock),a=S(e,r.unlock);I(o,"display","none"),t.on("lock",t=>{t?(I(o,"display","inline-flex"),I(a,"display","none")):(I(o,"display","none"),I(a,"display","inline-flex"))})},click(){a()?i():n()}}),{name:"lock",get state(){return a()},set state(t){t?n():i()}}}function Zt(t){return t.on("control",e=>{e?z(t.template.$player,"art-mini-progress-bar"):C(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Jt{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Zt),e.lock&&k&&this.add(Kt),e.autoPlayback&&!e.isLive&&this.add(Xt),e.autoOrientation&&k&&this.add(qt),e.fastForward&&k&&!e.isLive&&this.add(Gt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return q(!rt(this,r),`Cannot add a plugin that already has the same name: ${r}`),tt(this,r,{value:e}),this}}class Qt extends xt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:o}}=t;this.name="setting",this.$parent=o,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=V(t,r.setting),o=V(t,this.$parent);!this.show||e||o||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,PLAYBACK_RATE:a}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:o,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:a.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,ASPECT_RATIO:a}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:o,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:a.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,FLIP:a}}=t;function n(t){return e.get(Z(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:o,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:a.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:o}=t;return{width:o.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){var r;for(let o=0;o{e.default=e===t,e.default&&e.$item&&O(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,o=[]){for(let a=0;ae}),tt(n,"$parents",{get:()=>r}),tt(n,"$option",{get:()=>t});const o=[];tt(n,"$events",{get:()=>o}),tt(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,o)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){var t,e;const{controls:r,constructor:{SETTING_WIDTH:o,SETTING_ITEM_HEIGHT:a},template:{$player:n,$setting:i}}=this.art;if(r.setting&&this.show){const s=(null==(e=null==(t=this.active[0])?void 0:t.$parent)?void 0:e.width)||o,{left:l,width:c}=H(r.setting),{left:d,width:p}=H(n),h=l-d+c/2-s/2;if(I(i,"height",`${this.active===this.option?this.active.length*a:(this.active.length+1)*a}px`),I(i,"width",`${s}px`),this.art.isRotate||k)return;h+s>p?(I(i,"left",null),I(i,"right",null)):(I(i,"left",`${h}px`),I(i,"right","auto"))}}inactivate(t){for(let e=0;e'),s=D("div");C(s,"art-setting-item-left-icon"),S(s,o),S(i,s),S(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),S(e,n)}createItem(t,e=!1){var r,o;if(!this.cache.has(t.$option))return;const a=this.cache.get(t.$option),n=t.$item;let i="selector";rt(t,"switch")&&(i="switch"),rt(t,"range")&&(i="range"),rt(t,"onClick")&&(i="button");const{icons:s,proxy:l,constructor:c}=this.art,p=D("div");C(p,"art-setting-item"),I(p,"height",`${c.SETTING_ITEM_HEIGHT}px`),p.dataset.name=t.name||"",p.dataset.value=t.value||"";const h=S(p,'
'),u=S(p,'
'),m=D("div");switch(C(m,"art-setting-item-left-icon"),i){case"button":case"switch":case"range":S(m,t.icon||s.config);break;case"selector":(null==(r=t.selector)?void 0:r.length)?S(m,t.icon||s.config):S(m,s.check)}S(h,m),tt(t,"$icon",{configurable:!0,get:()=>m}),tt(t,"icon",{configurable:!0,get:()=>m.innerHTML,set(t){m.innerHTML="",S(m,t)}});const f=D("div");C(f,"art-setting-item-left-text"),S(f,t.html||""),S(h,f),tt(t,"$html",{configurable:!0,get:()=>f}),tt(t,"html",{configurable:!0,get:()=>f.innerHTML,set(t){f.innerHTML="",S(f,t)}});const g=D("div");switch(C(g,"art-setting-item-right-tooltip"),S(g,t.tooltip||""),S(u,g),tt(t,"$tooltip",{configurable:!0,get:()=>g}),tt(t,"tooltip",{configurable:!0,get:()=>g.innerHTML,set(t){g.innerHTML="",S(g,t)}}),i){case"switch":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,s.switchOn),o=S(e,s.switchOff);I(t.switch?o:r,"display","none"),S(u,e),tt(t,"$switch",{configurable:!0,get:()=>e});let a=t.switch;tt(t,"switch",{configurable:!0,get:()=>a,set(t){a=t,t?(I(o,"display","none"),I(r,"display",null)):(I(o,"display",null),I(r,"display","none"))}});break}case"range":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],C(r,"art-setting-range"),S(u,e),tt(t,"$range",{configurable:!0,get:()=>r});let o=[...t.range];tt(t,"range",{configurable:!0,get:()=>o,set(t){o=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(null==(o=t.selector)?void 0:o.length){const t=D("div");C(t,"art-setting-item-right-icon"),S(t,s.arrowRight),S(u,t)}}switch(i){case"switch":if(t.onSwitch){const e=l(p,"click",e=>d(this,null,function*(){t.switch=yield t.onSwitch.call(this.art,t,p,e)}));t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=l(t.$range,"change",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onRange.call(this.art,t,p,e)}));t.$events.push(e)}if(t.onChange){const e=l(t.$range,"input",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onChange.call(this.art,t,p,e)}));t.$events.push(e)}}break;case"selector":{const e=l(p,"click",e=>d(this,null,function*(){var r;(null==(r=t.selector)?void 0:r.length)?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=yield t.$parent.onSelect.call(this.art,t,p,e)))}));t.$events.push(e),t.default&&C(p,"art-current")}break;case"button":if(t.onClick){const e=l(p,"click",e=>d(this,null,function*(){t.tooltip=yield t.onClick.call(this.art,t,p,e)}));t.$events.push(e)}}tt(t,"$item",{configurable:!0,get:()=>p}),e?Y(p,n):S(a,p),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){var e;if(this.active=t,this.cache.has(t)){O(this.cache.get(t),"art-current")}else{const r=D("div");this.cache.set(t,r),C(r,"art-setting-panel"),S(this.$parent,r),O(r,"art-current"),(null==(e=t[0])?void 0:e.$parent)&&this.createHeader(t[0]);for(let e=0;enull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){var t,e;return null==(e=null==(t=this.art.template.$video)?void 0:t.textTracks)?void 0:e[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?P(r,t):I(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?Q(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}switch(t){return d(this,arguments,function*(t,e={}){const{i18n:r,notice:o,option:a}=this.art,n=c(l(l({},a.subtitle),e),{url:t}),i=yield this.init(n);return e.name&&(o.show=`${r.get("Switch Subtitle")}: ${e.name}`),i})}createTrack(t,e){const{template:r,proxy:o,option:a}=this.art,{$video:n,$track:i}=r,s=D("track");s.default=!0,s.kind=t,s.src=e,s.label=a.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,M(i),S(n,s),r.$track=s,this.destroyEvent=o(this.textTrack,"cuechange",()=>this.update())}init(t){return d(this,null,function*(){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(f(t,wt.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||X(t.url)){case"srt":{const e=nt(r);return it(t.onVttLoad(e))}case"ass":{const e=st(r);return it(t.onVttLoad(e))}case"vtt":return it(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null})}}class oe{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=T(e.container),q(this.$container,`No container element found by ${e.container}`)),q(B(),"The current browser does not support flex layout");const o=this.$container.tagName.toLowerCase();q("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),q(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${g}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return T(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=oe.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);q(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),Y(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&C(this.$player,"art-backdrop"),k&&C(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":C(this.$player,"art-destroy")}}class ae{on(t,e,r){const o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const o=this;function a(...n){o.off(t,a),e.apply(r,n)}return a._=e,this.on(t,a,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let o=0;oe.call(this,this)),se.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${se.version}`);for(let e=0;et(`Event@${e.type}`))}ie.push(this)}static get instances(){return ie}static get version(){return g}static get config(){return v}static get utils(){return pt}static get scheme(){return wt}static get Emitter(){return ae}static get validator(){return f}static get kindOf(){return f.kindOf}static get html(){return oe.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:b?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null==navigator?void 0:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){se.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),ie.splice(ie.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return se.STYLE=ee,se.DEBUG=!1,se.CONTEXTMENU=!0,se.NOTICE_TIME=2e3,se.SETTING_WIDTH=250,se.SETTING_ITEM_WIDTH=200,se.SETTING_ITEM_HEIGHT=35,se.RESIZE_TIME=200,se.SCROLL_TIME=200,se.SCROLL_GAP=50,se.AUTO_PLAYBACK_MAX=10,se.AUTO_PLAYBACK_MIN=5,se.AUTO_PLAYBACK_TIMEOUT=3e3,se.RECONNECT_TIME_MAX=5,se.RECONNECT_SLEEP_TIME=1e3,se.CONTROL_HIDE_TIME=3e3,se.DBCLICK_TIME=300,se.DBCLICK_FULLSCREEN=!0,se.MOBILE_DBCLICK_PLAY=!0,se.MOBILE_CLICK_PLAY=!1,se.AUTO_ORIENTATION_TIME=200,se.INFO_LOOP_TIME=1e3,se.FAST_FORWARD_VALUE=3,se.FAST_FORWARD_TIME=1e3,se.TOUCH_MOVE_RATIO=.5,se.VOLUME_STEP=.1,se.SEEK_STEP=5,se.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],se.ASPECT_RATIO=["default","4:3","16:9"],se.FLIP=["normal","horizontal","vertical"],se.FULLSCREEN_WEB_IN_BODY=!0,se.LOG_VERSION=!0,se.USE_RAF=!1,se.REMOVE_SRC_WHEN_DESTROY=!0,$&&(F("artplayer-style",ee),setTimeout(()=>{se.LOG_VERSION&&console.log(`%c ArtPlayer %c ${se.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),se}); diff --git a/docs/compiled/artplayer.mjs b/docs/compiled/artplayer.mjs index 40c306e9d..24305d13a 100644 --- a/docs/compiled/artplayer.mjs +++ b/docs/compiled/artplayer.mjs @@ -1,5 +1,5 @@ /*! - * artplayer.js v5.3.1 + * artplayer.js v5.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. @@ -157,7 +157,7 @@ function requireOptionValidator() { } var optionValidatorExports = requireOptionValidator(); const validator = /* @__PURE__ */ getDefaultExportFromCjs(optionValidatorExports); -const version$1 = "5.3.1"; +const version$1 = "5.4.0"; const config$1 = { properties: [ "audioTracks", @@ -1203,7 +1203,7 @@ function setCurrentTime(art, event) { function progress(options) { return (art) => { const { icons, option, proxy } = art; - const { $player } = art.template; + const { $player, $progress } = art.template; return { ...options, html: ` @@ -1317,19 +1317,19 @@ function progress(options) { } art.emit("setBar", "loaded", art.loaded || 0); if (!isMobile) { - proxy($control, "click", (event) => { + proxy($progress, "click", (event) => { if (event.target !== $indicator) { setCurrentTime(art, event); } }); - proxy($control, "mousemove", (event) => { + proxy($progress, "mousemove", (event) => { const { percentage } = getPosFromEvent(art, event); art.emit("setBar", "hover", percentage, event); }); - proxy($control, "mouseleave", (event) => { + proxy($progress, "mouseleave", (event) => { art.emit("setBar", "hover", 0, event); }); - proxy($control, "mousedown", (event) => { + proxy($progress, "mousedown", (event) => { isDragging = event.button === 0; }); art.on("document:mousemove", (event) => { @@ -4472,7 +4472,7 @@ class Storage { } } } -const style = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 8px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px, var(--art-subtitle-border) -1px -1px 1px, var(--art-subtitle-border) 1px -1px 1px, var(--art-subtitle-border) -1px 1px 1px;\n}\n.art-video-player.art-subtitle-show .art-subtitle {\n display: flex;\n}\n.art-video-player.art-control-show .art-subtitle {\n bottom: calc(var(--art-control-height) + var(--art-subtitle-bottom));\n}\n.art-danmuku {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n}\n.art-video-player .art-layers {\n position: absolute;\n inset: 0;\n z-index: 40;\n width: 100%;\n height: 100%;\n display: none;\n pointer-events: none;\n}\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n.art-video-player.art-layer-show .art-layers {\n display: flex;\n}\n.art-video-player .art-mask {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player .art-mask .art-state {\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transform: scale(2);\n width: var(--art-state-size);\n height: var(--art-state-size);\n transition: all var(--art-transition-duration) ease;\n}\n.art-video-player.art-mask-show .art-state {\n cursor: pointer;\n pointer-events: auto;\n opacity: var(--art-state-opacity);\n transform: scale(1);\n}\n.art-video-player.art-loading-show .art-state {\n display: none;\n}\n.art-video-player .art-loading {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n.art-video-player.art-loading-show .art-mask {\n display: none;\n}\n.art-video-player .art-bottom {\n position: absolute;\n inset: 0;\n z-index: 60;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n padding: 0 var(--art-padding);\n transition: all var(--art-transition-duration) ease;\n background-size: 100% var(--art-bottom-height);\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-video-player .art-bottom .art-controls,\n.art-video-player .art-bottom .art-progress {\n transform: translateY(var(--art-bottom-offset));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player.art-control-show .art-bottom,\n.art-video-player.art-hover .art-bottom {\n opacity: 1;\n}\n.art-video-player.art-control-show .art-bottom .art-controls,\n.art-video-player.art-hover .art-bottom .art-controls,\n.art-video-player.art-control-show .art-bottom .art-progress,\n.art-video-player.art-hover .art-bottom .art-progress {\n transform: translateY(0);\n}\n.art-bottom .art-progress {\n position: relative;\n z-index: 0;\n pointer-events: auto;\n padding-top: var(--art-progress-top-gap);\n padding-bottom: var(--art-bottom-gap);\n}\n.art-bottom .art-progress .art-control-progress {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n height: var(--art-progress-height);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n display: flex;\n align-items: center;\n position: relative;\n height: 50%;\n width: 100%;\n transition: height var(--art-transition-duration) ease;\n background-color: var(--art-progress-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-hover-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-loaded-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played {\n position: absolute;\n inset: 0;\n z-index: 20;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-theme);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n right: auto;\n pointer-events: auto;\n width: var(--art-highlight-width) !important;\n transform: translateX(calc(var(--art-highlight-width) / -2));\n background-color: var(--art-highlight-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 40;\n left: 0;\n border-radius: 50%;\n width: var(--art-indicator-size);\n height: var(--art-indicator-size);\n transform: scale(var(--art-indicator-scale));\n margin-left: calc(var(--art-indicator-size) / -2);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon {\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover {\n transform: scale(1.2) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active {\n transform: scale(1) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n z-index: 50;\n top: -25px;\n left: 0;\n padding: 3px 5px;\n line-height: 1;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n white-space: nowrap;\n background-color: var(--art-tip-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner {\n height: 100%;\n}\n.art-bottom .art-progress .art-control-thumbnails {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n bottom: calc(var(--art-bottom-gap) + 10px);\n left: 0;\n border-radius: var(--art-border-radius);\n pointer-events: none;\n background-color: var(--art-widget-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px -1px rgba(0, 0, 0, 0.2);\n}\n.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n transform: scale(1);\n}\n.art-progress-hover .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip,\n.art-progress-hover .art-bottom .art-progress .art-control-thumbnails {\n transform: scale(1);\n opacity: 1;\n}\n.art-video-player .art-controls {\n position: relative;\n z-index: 10;\n pointer-events: auto;\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: var(--art-control-height);\n}\n.art-video-player .art-controls .art-controls-left,\n.art-video-player .art-controls .art-controls-right {\n display: flex;\n height: 100%;\n}\n.art-video-player .art-controls .art-controls-center {\n display: none;\n justify-content: center;\n align-items: center;\n flex: 1;\n height: 100%;\n padding: 0 10px;\n}\n.art-video-player .art-controls .art-controls-right {\n justify-content: flex-end;\n}\n.art-video-player .art-controls .art-control {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n white-space: nowrap;\n opacity: var(--art-control-opacity);\n min-height: var(--art-control-height);\n min-width: var(--art-control-height);\n transition: opacity var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon {\n height: var(--art-control-icon-size);\n width: var(--art-control-icon-size);\n transform: scale(var(--art-control-icon-scale));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon:active {\n transform: scale(calc(var(--art-control-icon-scale) * 0.8));\n}\n.art-video-player .art-controls .art-control:hover {\n opacity: 1;\n}\n.art-control-volume {\n position: relative;\n}\n.art-control-volume .art-volume-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n left: 0;\n right: 0;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n cursor: default;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n width: var(--art-control-height);\n height: var(--art-volume-height);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n height: 100%;\n width: 100%;\n padding: 10px 0 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider {\n flex: 1;\n width: 100%;\n display: flex;\n cursor: pointer;\n position: relative;\n justify-content: center;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle {\n position: relative;\n display: flex;\n justify-content: center;\n width: 2px;\n border-radius: var(--art-border-radius);\n overflow: hidden;\n background-color: rgba(255, 255, 255, 0.25);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n background-color: var(--art-theme);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator {\n position: absolute;\n width: var(--art-volume-handle-size);\n height: var(--art-volume-handle-size);\n margin-top: calc(var(--art-volume-handle-size) / -2);\n flex-shrink: 0;\n transform: scale(1);\n border-radius: 100%;\n background-color: var(--art-theme);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator {\n transform: scale(0.9);\n}\n.art-control-volume:hover .art-volume-panel {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player .art-notice {\n display: none;\n position: absolute;\n inset: 0;\n z-index: 80;\n width: 100%;\n height: 100%;\n height: auto;\n bottom: auto;\n padding: var(--art-padding);\n pointer-events: none;\n}\n.art-video-player .art-notice .art-notice-inner {\n display: inline-flex;\n padding: 5px;\n line-height: 1;\n border-radius: var(--art-border-radius);\n background-color: var(--art-tip-background);\n}\n.art-video-player.art-notice-show .art-notice {\n display: flex;\n}\n.art-video-player .art-contextmenus {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 120;\n padding: 5px 0;\n border-radius: var(--art-border-radius);\n font-size: 12px;\n background-color: var(--art-widget-background);\n min-width: var(--art-contextmenus-min-width);\n}\n.art-video-player .art-contextmenus .art-contextmenu {\n cursor: pointer;\n display: flex;\n padding: 10px 15px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu span {\n padding: 0 8px;\n}\n.art-video-player .art-contextmenus .art-contextmenu span:hover,\n.art-video-player .art-contextmenus .art-contextmenu span.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-contextmenus .art-contextmenu:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu:last-child {\n border-bottom: none;\n}\n.art-video-player.art-contextmenu-show .art-contextmenus {\n display: flex;\n}\n.art-video-player .art-settings {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 90;\n left: auto;\n overflow-y: auto;\n overflow-x: hidden;\n border-radius: var(--art-border-radius);\n max-height: var(--art-settings-max-height);\n right: var(--art-padding);\n bottom: var(--art-control-height);\n transition: all var(--art-transition-duration) ease;\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-settings .art-setting-panel {\n display: none;\n flex-direction: column;\n}\n.art-video-player .art-settings .art-setting-panel.art-current {\n display: flex;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 5px;\n cursor: pointer;\n overflow: hidden;\n transition: background-color var(--art-transition-duration) ease;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check {\n visibility: hidden;\n height: 15px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check {\n visibility: visible;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n gap: 5px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--art-settings-icon-size);\n width: var(--art-settings-icon-size);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip {\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.5);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 32px;\n height: 24px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range {\n height: 3px;\n width: 80px;\n outline: none;\n appearance: none;\n background-color: rgba(255, 255, 255, 0.2);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item-back {\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player.art-setting-show .art-settings {\n display: flex;\n}\n.art-video-player .art-info {\n display: none;\n position: absolute;\n left: var(--art-padding);\n top: var(--art-padding);\n z-index: 100;\n padding: 10px;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-info .art-info-panel {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-title {\n width: 100px;\n text-align: right;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-content {\n width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: all;\n}\n.art-video-player .art-info .art-info-close {\n position: absolute;\n top: 5px;\n right: 5px;\n cursor: pointer;\n}\n.art-video-player.art-info-show .art-info {\n display: flex;\n}\n.art-hide-cursor * {\n cursor: none !important;\n}\n.art-video-player[data-aspect-ratio] {\n overflow: hidden;\n}\n.art-video-player[data-aspect-ratio] .art-video {\n object-fit: fill;\n box-sizing: content-box;\n}\n.art-fullscreen {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n}\n.art-fullscreen-web {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n position: fixed;\n inset: 0;\n z-index: var(--art-fullscreen-web-index);\n width: 100%;\n height: 100%;\n}\n.art-mini-popup {\n position: fixed;\n z-index: 9999;\n width: 320px;\n height: 180px;\n background: #000;\n border-radius: var(--art-border-radius);\n cursor: move;\n user-select: none;\n overflow: hidden;\n transition: opacity 0.2s ease;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n}\n.art-mini-popup svg {\n fill: #fff;\n}\n.art-mini-popup .art-video {\n pointer-events: none;\n}\n.art-mini-popup .art-mini-close {\n position: absolute;\n z-index: 20;\n right: 10px;\n top: 10px;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n.art-mini-popup .art-mini-state {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease;\n background-color: rgba(0, 0, 0, 0.25);\n}\n.art-mini-popup .art-mini-state .art-icon {\n opacity: 0.75;\n cursor: pointer;\n transform: scale(3);\n pointer-events: auto;\n transition: transform 0.2s ease;\n}\n.art-mini-popup .art-mini-state .art-icon:active {\n transform: scale(2.5);\n}\n.art-mini-popup.art-mini-dragging {\n opacity: 0.9;\n}\n.art-mini-popup:hover .art-mini-close,\n.art-mini-popup:hover .art-mini-state {\n opacity: 1;\n}\n.art-video-player[data-flip='horizontal'] .art-video {\n transform: scaleX(-1);\n}\n.art-video-player[data-flip='vertical'] .art-video {\n transform: scaleY(-1);\n}\n.art-video-player .art-layer-lock {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n border-radius: 50%;\n transform: translateY(-50%);\n height: var(--art-lock-size);\n width: var(--art-lock-size);\n left: var(--art-padding);\n background-color: var(--art-tip-background);\n}\n.art-video-player .art-layer-auto-playback {\n display: none;\n gap: 10px;\n align-items: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n padding: 10px;\n line-height: 1;\n left: var(--art-padding);\n bottom: calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close svg {\n width: 15px;\n height: 15px;\n fill: var(--art-theme);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-jump {\n color: var(--art-theme);\n cursor: pointer;\n}\n.art-video-player.art-lock .art-subtitle {\n bottom: var(--art-subtitle-bottom) !important;\n}\n.art-video-player.art-mini-progress-bar .art-bottom,\n.art-video-player.art-lock .art-bottom {\n opacity: 1;\n padding: 0;\n background-image: none;\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-controls,\n.art-video-player.art-lock .art-bottom .art-controls,\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress,\n.art-video-player.art-lock .art-bottom .art-progress {\n transform: translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height) / 4));\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,\n.art-video-player.art-lock .art-bottom .art-progress-indicator {\n display: none !important;\n}\n.art-video-player.art-control-show .art-layer-lock {\n display: flex;\n}\n.art-control-selector {\n position: relative;\n display: flex;\n justify-content: center;\n}\n.art-control-selector .art-selector-list {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n overflow-y: auto;\n overflow-x: hidden;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n max-height: var(--art-selector-max-height);\n background-color: var(--art-widget-background);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-selector .art-selector-list .art-selector-item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n padding: 10px 15px;\n flex-shrink: 0;\n line-height: 1;\n}\n.art-control-selector .art-selector-list .art-selector-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-control-selector .art-selector-list .art-selector-item:hover,\n.art-control-selector .art-selector-list .art-selector-item.art-current {\n color: var(--art-theme);\n}\n.art-control-selector:hover .art-selector-list {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player {\n /*! Hint.css - v2.7.0 - 2021-10-01\n * https://kushagra.dev/lab/hint/\n * Copyright (c) 2021 Kushagra Gour */\n /*-------------------------------------*\\\n HINT.css - A CSS tooltip library\n \\*-------------------------------------*/\n /**\n * HINT.css is a tooltip library made in pure CSS.\n *\n * Source: https://github.com/chinchang/hint.css\n * Demo: http://kushagragour.in/lab/hint/\n *\n */\n /**\n * source: hint-core.scss\n *\n * Defines the basic styling for the tooltip.\n * Each tooltip is made of 2 parts:\n * 1) body (:after)\n * 2) arrow (:before)\n *\n * Classes added:\n * 1) hint\n */\n /**\n * source: hint-position.scss\n *\n * Defines the positoning logic for the tooltips.\n *\n * Classes added:\n * 1) hint--top\n * 2) hint--bottom\n * 3) hint--left\n * 4) hint--right\n */\n /**\n * set default color for tooltip arrows\n */\n /**\n * top tooltip\n */\n /**\n * bottom tooltip\n */\n /**\n * right tooltip\n */\n /**\n * left tooltip\n */\n /**\n * top-left tooltip\n */\n /**\n * top-right tooltip\n */\n /**\n * bottom-left tooltip\n */\n /**\n * bottom-right tooltip\n */\n /**\n * source: hint-sizes.scss\n *\n * Defines width restricted tooltips that can span\n * across multiple lines.\n *\n * Classes added:\n * 1) hint--small\n * 2) hint--medium\n * 3) hint--large\n *\n */\n /**\n * source: hint-theme.scss\n *\n * Defines basic theme for tooltips.\n *\n */\n /**\n * source: hint-color-types.scss\n *\n * Contains tooltips of various types based on color differences.\n *\n * Classes added:\n * 1) hint--error\n * 2) hint--warning\n * 3) hint--info\n * 4) hint--success\n *\n */\n /**\n * Error\n */\n /**\n * Warning\n */\n /**\n * Info\n */\n /**\n * Success\n */\n /**\n * source: hint-always.scss\n *\n * Defines a persisted tooltip which shows always.\n *\n * Classes added:\n * 1) hint--always\n *\n */\n /**\n * source: hint-rounded.scss\n *\n * Defines rounded corner tooltips.\n *\n * Classes added:\n * 1) hint--rounded\n *\n */\n /**\n * source: hint-effects.scss\n *\n * Defines various transition effects for the tooltips.\n *\n * Classes added:\n * 1) hint--no-animate\n * 2) hint--bounce\n *\n */\n}\n.art-video-player [class*='hint--'] {\n position: relative;\n display: inline-block;\n font-style: normal;\n /**\n * tooltip arrow\n */\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:before,\n.art-video-player [class*='hint--']:after {\n position: absolute;\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n visibility: hidden;\n opacity: 0;\n z-index: 1000000;\n pointer-events: none;\n -webkit-transition: 0.3s ease;\n -moz-transition: 0.3s ease;\n transition: 0.3s ease;\n -webkit-transition-delay: 0ms;\n -moz-transition-delay: 0ms;\n transition-delay: 0ms;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n visibility: visible;\n opacity: 1;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n -webkit-transition-delay: 100ms;\n -moz-transition-delay: 100ms;\n transition-delay: 100ms;\n}\n.art-video-player [class*='hint--']:before {\n content: '';\n position: absolute;\n background: transparent;\n border: 6px solid transparent;\n z-index: 1000001;\n}\n.art-video-player [class*='hint--']:after {\n background: #000000;\n color: white;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n line-height: 12px;\n white-space: nowrap;\n}\n.art-video-player [class*='hint--'][aria-label]:after {\n content: attr(aria-label);\n}\n.art-video-player [class*='hint--'][data-hint]:after {\n content: attr(data-hint);\n}\n.art-video-player [aria-label='']:before,\n.art-video-player [aria-label='']:after,\n.art-video-player [data-hint='']:before,\n.art-video-player [data-hint='']:after {\n display: none !important;\n}\n.art-video-player .hint--top-left:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top-right:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--bottom-left:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom-right:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--left:before {\n border-left-color: #000000;\n}\n.art-video-player .hint--right:before {\n border-right-color: #000000;\n}\n.art-video-player .hint--top:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top:before,\n.art-video-player .hint--top:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--top:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top:hover:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--bottom:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom:before,\n.art-video-player .hint--bottom:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--bottom:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom:hover:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--right:before {\n margin-left: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--right:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--right:before,\n.art-video-player .hint--right:after {\n left: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--right:hover:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--right:hover:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--left:before {\n margin-right: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--left:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--left:before,\n.art-video-player .hint--left:after {\n right: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--left:hover:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--left:hover:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--top-left:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-left:before,\n.art-video-player .hint--top-left:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--top-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--top-left:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--top-right:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-right:before,\n.art-video-player .hint--top-right:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--top-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--top-right:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-right:hover:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--bottom-left:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-left:before,\n.art-video-player .hint--bottom-left:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--bottom-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--bottom-left:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--bottom-right:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-right:before,\n.art-video-player .hint--bottom-right:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--bottom-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--bottom-right:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-right:hover:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--small:after,\n.art-video-player .hint--medium:after,\n.art-video-player .hint--large:after {\n white-space: normal;\n line-height: 1.4em;\n word-wrap: break-word;\n}\n.art-video-player .hint--small:after {\n width: 80px;\n}\n.art-video-player .hint--medium:after {\n width: 150px;\n}\n.art-video-player .hint--large:after {\n width: 300px;\n}\n.art-video-player [class*='hint--'] {\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:after {\n text-shadow: 0 -1px 0px black;\n box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);\n}\n.art-video-player .hint--error:after {\n background-color: #b34e4d;\n text-shadow: 0 -1px 0px #592726;\n}\n.art-video-player .hint--error.hint--top-left:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top-right:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-left:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-right:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--left:before {\n border-left-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--right:before {\n border-right-color: #b34e4d;\n}\n.art-video-player .hint--warning:after {\n background-color: #c09854;\n text-shadow: 0 -1px 0px #6c5328;\n}\n.art-video-player .hint--warning.hint--top-left:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top-right:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-left:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-right:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--left:before {\n border-left-color: #c09854;\n}\n.art-video-player .hint--warning.hint--right:before {\n border-right-color: #c09854;\n}\n.art-video-player .hint--info:after {\n background-color: #3986ac;\n text-shadow: 0 -1px 0px #1a3c4d;\n}\n.art-video-player .hint--info.hint--top-left:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top-right:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-left:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-right:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--left:before {\n border-left-color: #3986ac;\n}\n.art-video-player .hint--info.hint--right:before {\n border-right-color: #3986ac;\n}\n.art-video-player .hint--success:after {\n background-color: #458746;\n text-shadow: 0 -1px 0px #1a321a;\n}\n.art-video-player .hint--success.hint--top-left:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top-right:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-left:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-right:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--left:before {\n border-left-color: #458746;\n}\n.art-video-player .hint--success.hint--right:before {\n border-right-color: #458746;\n}\n.art-video-player .hint--always:after,\n.art-video-player .hint--always:before {\n opacity: 1;\n visibility: visible;\n}\n.art-video-player .hint--always.hint--top:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--bottom:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--left:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--left:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--right:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--always.hint--right:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--rounded:after {\n border-radius: 4px;\n}\n.art-video-player .hint--no-animate:before,\n.art-video-player .hint--no-animate:after {\n -webkit-transition-duration: 0ms;\n -moz-transition-duration: 0ms;\n transition-duration: 0ms;\n}\n.art-video-player .hint--bounce:before,\n.art-video-player .hint--bounce:after {\n -webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n -moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n}\n.art-video-player .hint--no-shadow:before,\n.art-video-player .hint--no-shadow:after {\n text-shadow: initial;\n box-shadow: initial;\n}\n.art-video-player .hint--no-arrow:before {\n display: none;\n}\n.art-video-player.art-mobile {\n --art-bottom-gap: 10px;\n --art-control-height: 38px;\n --art-control-icon-scale: 1;\n --art-state-size: 60px;\n --art-settings-max-height: 180px;\n --art-selector-max-height: 180px;\n --art-indicator-scale: 1;\n --art-control-opacity: 1;\n}\n.art-video-player.art-mobile .art-controls-left {\n margin-left: calc(var(--art-padding) / -1);\n}\n.art-video-player.art-mobile .art-controls-right {\n margin-right: calc(var(--art-padding) / -1);\n}\n"; +const style = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 10px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px, var(--art-subtitle-border) -1px -1px 1px, var(--art-subtitle-border) 1px -1px 1px, var(--art-subtitle-border) -1px 1px 1px;\n}\n.art-video-player.art-subtitle-show .art-subtitle {\n display: flex;\n}\n.art-video-player.art-control-show .art-subtitle {\n bottom: calc(var(--art-control-height) + var(--art-subtitle-bottom));\n}\n.art-danmuku {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n}\n.art-video-player .art-layers {\n position: absolute;\n inset: 0;\n z-index: 40;\n width: 100%;\n height: 100%;\n display: none;\n pointer-events: none;\n}\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n.art-video-player.art-layer-show .art-layers {\n display: flex;\n}\n.art-video-player .art-mask {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player .art-mask .art-state {\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transform: scale(2);\n width: var(--art-state-size);\n height: var(--art-state-size);\n transition: all var(--art-transition-duration) ease;\n}\n.art-video-player.art-mask-show .art-state {\n pointer-events: auto;\n opacity: var(--art-state-opacity);\n transform: scale(1);\n}\n.art-video-player.art-loading-show .art-state {\n display: none;\n}\n.art-video-player .art-loading {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n.art-video-player.art-loading-show .art-mask {\n display: none;\n}\n.art-video-player .art-bottom {\n position: absolute;\n inset: 0;\n z-index: 60;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n padding: 0 var(--art-padding);\n transition: all var(--art-transition-duration) ease;\n background-size: 100% var(--art-bottom-height);\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-video-player .art-bottom .art-controls,\n.art-video-player .art-bottom .art-progress {\n transform: translateY(var(--art-bottom-offset));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player.art-control-show .art-bottom,\n.art-video-player.art-hover .art-bottom {\n opacity: 1;\n}\n.art-video-player.art-control-show .art-bottom .art-controls,\n.art-video-player.art-hover .art-bottom .art-controls,\n.art-video-player.art-control-show .art-bottom .art-progress,\n.art-video-player.art-hover .art-bottom .art-progress {\n transform: translateY(0);\n}\n.art-bottom .art-progress {\n position: relative;\n z-index: 0;\n cursor: pointer;\n pointer-events: auto;\n padding-top: var(--art-progress-top-gap);\n padding-bottom: var(--art-bottom-gap);\n}\n.art-bottom .art-progress .art-control-progress {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--art-progress-height);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n display: flex;\n align-items: center;\n position: relative;\n height: 50%;\n width: 100%;\n transition: height var(--art-transition-duration) ease;\n background-color: var(--art-progress-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-hover-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-loaded-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played {\n position: absolute;\n inset: 0;\n z-index: 20;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-theme);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n right: auto;\n pointer-events: auto;\n width: var(--art-highlight-width) !important;\n transform: translateX(calc(var(--art-highlight-width) / -2));\n background-color: var(--art-highlight-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 40;\n left: 0;\n border-radius: 50%;\n width: var(--art-indicator-size);\n height: var(--art-indicator-size);\n transform: scale(var(--art-indicator-scale));\n margin-left: calc(var(--art-indicator-size) / -2);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon {\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover {\n transform: scale(1.2) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active {\n transform: scale(1) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n z-index: 50;\n top: -25px;\n left: 0;\n padding: 3px 5px;\n line-height: 1;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n white-space: nowrap;\n background-color: var(--art-tip-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-thumbnails {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n bottom: calc(var(--art-bottom-gap) + 10px);\n left: 0;\n border-radius: var(--art-border-radius);\n pointer-events: none;\n background-color: var(--art-widget-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px -1px rgba(0, 0, 0, 0.2);\n}\n.art-bottom .art-progress:hover .art-control-progress .art-control-progress-inner {\n height: 100%;\n}\n.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n transform: scale(1);\n}\n.art-progress-hover .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip,\n.art-progress-hover .art-bottom .art-progress .art-control-thumbnails {\n transform: scale(1);\n opacity: 1;\n}\n.art-video-player .art-controls {\n position: relative;\n z-index: 10;\n pointer-events: auto;\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: var(--art-control-height);\n}\n.art-video-player .art-controls .art-controls-left,\n.art-video-player .art-controls .art-controls-right {\n display: flex;\n height: 100%;\n}\n.art-video-player .art-controls .art-controls-center {\n display: none;\n justify-content: center;\n align-items: center;\n flex: 1;\n height: 100%;\n padding: 0 10px;\n}\n.art-video-player .art-controls .art-controls-right {\n justify-content: flex-end;\n}\n.art-video-player .art-controls .art-control {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n white-space: nowrap;\n opacity: var(--art-control-opacity);\n min-height: var(--art-control-height);\n min-width: var(--art-control-height);\n transition: opacity var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon {\n height: var(--art-control-icon-size);\n width: var(--art-control-icon-size);\n transform: scale(var(--art-control-icon-scale));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon:active {\n transform: scale(calc(var(--art-control-icon-scale) * 0.8));\n}\n.art-video-player .art-controls .art-control:hover {\n opacity: 1;\n}\n.art-control-volume {\n position: relative;\n}\n.art-control-volume .art-volume-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n left: 0;\n right: 0;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n cursor: default;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n width: var(--art-control-height);\n height: var(--art-volume-height);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n height: 100%;\n width: 100%;\n padding: 10px 0 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider {\n flex: 1;\n width: 100%;\n display: flex;\n cursor: pointer;\n position: relative;\n justify-content: center;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle {\n position: relative;\n display: flex;\n justify-content: center;\n width: 2px;\n border-radius: var(--art-border-radius);\n overflow: hidden;\n background-color: rgba(255, 255, 255, 0.25);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n background-color: var(--art-theme);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator {\n position: absolute;\n width: var(--art-volume-handle-size);\n height: var(--art-volume-handle-size);\n margin-top: calc(var(--art-volume-handle-size) / -2);\n flex-shrink: 0;\n transform: scale(1);\n border-radius: 100%;\n background-color: var(--art-theme);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator {\n transform: scale(0.9);\n}\n.art-control-volume:hover .art-volume-panel {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player .art-notice {\n display: none;\n position: absolute;\n inset: 0;\n z-index: 80;\n width: 100%;\n height: 100%;\n height: auto;\n bottom: auto;\n padding: var(--art-padding);\n pointer-events: none;\n}\n.art-video-player .art-notice .art-notice-inner {\n display: inline-flex;\n padding: 5px;\n line-height: 1;\n border-radius: var(--art-border-radius);\n background-color: var(--art-tip-background);\n}\n.art-video-player.art-notice-show .art-notice {\n display: flex;\n}\n.art-video-player .art-contextmenus {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 120;\n padding: 5px 0;\n border-radius: var(--art-border-radius);\n font-size: 12px;\n background-color: var(--art-widget-background);\n min-width: var(--art-contextmenus-min-width);\n}\n.art-video-player .art-contextmenus .art-contextmenu {\n cursor: pointer;\n display: flex;\n padding: 10px 15px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu span {\n padding: 0 8px;\n}\n.art-video-player .art-contextmenus .art-contextmenu span:hover,\n.art-video-player .art-contextmenus .art-contextmenu span.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-contextmenus .art-contextmenu:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu:last-child {\n border-bottom: none;\n}\n.art-video-player.art-contextmenu-show .art-contextmenus {\n display: flex;\n}\n.art-video-player .art-settings {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 90;\n left: auto;\n overflow-y: auto;\n overflow-x: hidden;\n border-radius: var(--art-border-radius);\n max-height: var(--art-settings-max-height);\n right: var(--art-padding);\n bottom: var(--art-control-height);\n transition: all var(--art-transition-duration) ease;\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-settings .art-setting-panel {\n display: none;\n flex-direction: column;\n}\n.art-video-player .art-settings .art-setting-panel.art-current {\n display: flex;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 5px;\n cursor: pointer;\n overflow: hidden;\n transition: background-color var(--art-transition-duration) ease;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check {\n visibility: hidden;\n height: 15px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check {\n visibility: visible;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n gap: 5px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--art-settings-icon-size);\n width: var(--art-settings-icon-size);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip {\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.5);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 32px;\n height: 24px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range {\n height: 3px;\n width: 80px;\n outline: none;\n appearance: none;\n background-color: rgba(255, 255, 255, 0.2);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item-back {\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player.art-setting-show .art-settings {\n display: flex;\n}\n.art-video-player .art-info {\n display: none;\n position: absolute;\n left: var(--art-padding);\n top: var(--art-padding);\n z-index: 100;\n padding: 10px;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-info .art-info-panel {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-title {\n width: 100px;\n text-align: right;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-content {\n width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: all;\n}\n.art-video-player .art-info .art-info-close {\n position: absolute;\n top: 5px;\n right: 5px;\n cursor: pointer;\n}\n.art-video-player.art-info-show .art-info {\n display: flex;\n}\n.art-hide-cursor * {\n cursor: none !important;\n}\n.art-video-player[data-aspect-ratio] {\n overflow: hidden;\n}\n.art-video-player[data-aspect-ratio] .art-video {\n object-fit: fill;\n box-sizing: content-box;\n}\n.art-fullscreen {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n}\n.art-fullscreen-web {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n position: fixed;\n inset: 0;\n z-index: var(--art-fullscreen-web-index);\n width: 100%;\n height: 100%;\n}\n.art-mini-popup {\n position: fixed;\n z-index: 9999;\n width: 320px;\n height: 180px;\n background: #000;\n border-radius: var(--art-border-radius);\n cursor: move;\n user-select: none;\n overflow: hidden;\n transition: opacity 0.2s ease;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n}\n.art-mini-popup svg {\n fill: #fff;\n}\n.art-mini-popup .art-video {\n pointer-events: none;\n}\n.art-mini-popup .art-mini-close {\n position: absolute;\n z-index: 20;\n right: 10px;\n top: 10px;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n.art-mini-popup .art-mini-state {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease;\n background-color: rgba(0, 0, 0, 0.25);\n}\n.art-mini-popup .art-mini-state .art-icon {\n opacity: 0.75;\n cursor: pointer;\n transform: scale(3);\n pointer-events: auto;\n transition: transform 0.2s ease;\n}\n.art-mini-popup .art-mini-state .art-icon:active {\n transform: scale(2.5);\n}\n.art-mini-popup.art-mini-dragging {\n opacity: 0.9;\n}\n.art-mini-popup:hover .art-mini-close,\n.art-mini-popup:hover .art-mini-state {\n opacity: 1;\n}\n.art-video-player[data-flip='horizontal'] .art-video {\n transform: scaleX(-1);\n}\n.art-video-player[data-flip='vertical'] .art-video {\n transform: scaleY(-1);\n}\n.art-video-player .art-layer-lock {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n border-radius: 50%;\n transform: translateY(-50%);\n height: var(--art-lock-size);\n width: var(--art-lock-size);\n left: var(--art-padding);\n background-color: var(--art-tip-background);\n}\n.art-video-player .art-layer-auto-playback {\n display: none;\n gap: 10px;\n align-items: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n padding: 10px;\n line-height: 1;\n left: var(--art-padding);\n bottom: calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close svg {\n width: 15px;\n height: 15px;\n fill: var(--art-theme);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-jump {\n color: var(--art-theme);\n cursor: pointer;\n}\n.art-video-player.art-lock .art-subtitle {\n bottom: var(--art-subtitle-bottom) !important;\n}\n.art-video-player.art-mini-progress-bar .art-bottom,\n.art-video-player.art-lock .art-bottom {\n opacity: 1;\n padding: 0;\n background-image: none;\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-controls,\n.art-video-player.art-lock .art-bottom .art-controls,\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress,\n.art-video-player.art-lock .art-bottom .art-progress {\n transform: translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height) / 4));\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,\n.art-video-player.art-lock .art-bottom .art-progress-indicator {\n display: none !important;\n}\n.art-video-player.art-control-show .art-layer-lock {\n display: flex;\n}\n.art-control-selector {\n position: relative;\n display: flex;\n justify-content: center;\n}\n.art-control-selector .art-selector-list {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n overflow-y: auto;\n overflow-x: hidden;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n max-height: var(--art-selector-max-height);\n background-color: var(--art-widget-background);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-selector .art-selector-list .art-selector-item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n padding: 10px 15px;\n flex-shrink: 0;\n line-height: 1;\n}\n.art-control-selector .art-selector-list .art-selector-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-control-selector .art-selector-list .art-selector-item:hover,\n.art-control-selector .art-selector-list .art-selector-item.art-current {\n color: var(--art-theme);\n}\n.art-control-selector:hover .art-selector-list {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player {\n /*! Hint.css - v2.7.0 - 2021-10-01\n * https://kushagra.dev/lab/hint/\n * Copyright (c) 2021 Kushagra Gour */\n /*-------------------------------------*\\\n HINT.css - A CSS tooltip library\n \\*-------------------------------------*/\n /**\n * HINT.css is a tooltip library made in pure CSS.\n *\n * Source: https://github.com/chinchang/hint.css\n * Demo: http://kushagragour.in/lab/hint/\n *\n */\n /**\n * source: hint-core.scss\n *\n * Defines the basic styling for the tooltip.\n * Each tooltip is made of 2 parts:\n * 1) body (:after)\n * 2) arrow (:before)\n *\n * Classes added:\n * 1) hint\n */\n /**\n * source: hint-position.scss\n *\n * Defines the positoning logic for the tooltips.\n *\n * Classes added:\n * 1) hint--top\n * 2) hint--bottom\n * 3) hint--left\n * 4) hint--right\n */\n /**\n * set default color for tooltip arrows\n */\n /**\n * top tooltip\n */\n /**\n * bottom tooltip\n */\n /**\n * right tooltip\n */\n /**\n * left tooltip\n */\n /**\n * top-left tooltip\n */\n /**\n * top-right tooltip\n */\n /**\n * bottom-left tooltip\n */\n /**\n * bottom-right tooltip\n */\n /**\n * source: hint-sizes.scss\n *\n * Defines width restricted tooltips that can span\n * across multiple lines.\n *\n * Classes added:\n * 1) hint--small\n * 2) hint--medium\n * 3) hint--large\n *\n */\n /**\n * source: hint-theme.scss\n *\n * Defines basic theme for tooltips.\n *\n */\n /**\n * source: hint-color-types.scss\n *\n * Contains tooltips of various types based on color differences.\n *\n * Classes added:\n * 1) hint--error\n * 2) hint--warning\n * 3) hint--info\n * 4) hint--success\n *\n */\n /**\n * Error\n */\n /**\n * Warning\n */\n /**\n * Info\n */\n /**\n * Success\n */\n /**\n * source: hint-always.scss\n *\n * Defines a persisted tooltip which shows always.\n *\n * Classes added:\n * 1) hint--always\n *\n */\n /**\n * source: hint-rounded.scss\n *\n * Defines rounded corner tooltips.\n *\n * Classes added:\n * 1) hint--rounded\n *\n */\n /**\n * source: hint-effects.scss\n *\n * Defines various transition effects for the tooltips.\n *\n * Classes added:\n * 1) hint--no-animate\n * 2) hint--bounce\n *\n */\n}\n.art-video-player [class*='hint--'] {\n position: relative;\n display: inline-block;\n font-style: normal;\n /**\n * tooltip arrow\n */\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:before,\n.art-video-player [class*='hint--']:after {\n position: absolute;\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n visibility: hidden;\n opacity: 0;\n z-index: 1000000;\n pointer-events: none;\n -webkit-transition: 0.3s ease;\n -moz-transition: 0.3s ease;\n transition: 0.3s ease;\n -webkit-transition-delay: 0ms;\n -moz-transition-delay: 0ms;\n transition-delay: 0ms;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n visibility: visible;\n opacity: 1;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n -webkit-transition-delay: 100ms;\n -moz-transition-delay: 100ms;\n transition-delay: 100ms;\n}\n.art-video-player [class*='hint--']:before {\n content: '';\n position: absolute;\n background: transparent;\n border: 6px solid transparent;\n z-index: 1000001;\n}\n.art-video-player [class*='hint--']:after {\n background: #000000;\n color: white;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n line-height: 12px;\n white-space: nowrap;\n}\n.art-video-player [class*='hint--'][aria-label]:after {\n content: attr(aria-label);\n}\n.art-video-player [class*='hint--'][data-hint]:after {\n content: attr(data-hint);\n}\n.art-video-player [aria-label='']:before,\n.art-video-player [aria-label='']:after,\n.art-video-player [data-hint='']:before,\n.art-video-player [data-hint='']:after {\n display: none !important;\n}\n.art-video-player .hint--top-left:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top-right:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--bottom-left:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom-right:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--left:before {\n border-left-color: #000000;\n}\n.art-video-player .hint--right:before {\n border-right-color: #000000;\n}\n.art-video-player .hint--top:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top:before,\n.art-video-player .hint--top:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--top:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top:hover:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--bottom:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom:before,\n.art-video-player .hint--bottom:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--bottom:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom:hover:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--right:before {\n margin-left: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--right:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--right:before,\n.art-video-player .hint--right:after {\n left: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--right:hover:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--right:hover:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--left:before {\n margin-right: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--left:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--left:before,\n.art-video-player .hint--left:after {\n right: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--left:hover:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--left:hover:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--top-left:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-left:before,\n.art-video-player .hint--top-left:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--top-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--top-left:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--top-right:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-right:before,\n.art-video-player .hint--top-right:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--top-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--top-right:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-right:hover:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--bottom-left:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-left:before,\n.art-video-player .hint--bottom-left:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--bottom-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--bottom-left:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--bottom-right:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-right:before,\n.art-video-player .hint--bottom-right:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--bottom-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--bottom-right:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-right:hover:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--small:after,\n.art-video-player .hint--medium:after,\n.art-video-player .hint--large:after {\n white-space: normal;\n line-height: 1.4em;\n word-wrap: break-word;\n}\n.art-video-player .hint--small:after {\n width: 80px;\n}\n.art-video-player .hint--medium:after {\n width: 150px;\n}\n.art-video-player .hint--large:after {\n width: 300px;\n}\n.art-video-player [class*='hint--'] {\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:after {\n text-shadow: 0 -1px 0px black;\n box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);\n}\n.art-video-player .hint--error:after {\n background-color: #b34e4d;\n text-shadow: 0 -1px 0px #592726;\n}\n.art-video-player .hint--error.hint--top-left:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top-right:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-left:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-right:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--left:before {\n border-left-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--right:before {\n border-right-color: #b34e4d;\n}\n.art-video-player .hint--warning:after {\n background-color: #c09854;\n text-shadow: 0 -1px 0px #6c5328;\n}\n.art-video-player .hint--warning.hint--top-left:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top-right:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-left:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-right:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--left:before {\n border-left-color: #c09854;\n}\n.art-video-player .hint--warning.hint--right:before {\n border-right-color: #c09854;\n}\n.art-video-player .hint--info:after {\n background-color: #3986ac;\n text-shadow: 0 -1px 0px #1a3c4d;\n}\n.art-video-player .hint--info.hint--top-left:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top-right:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-left:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-right:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--left:before {\n border-left-color: #3986ac;\n}\n.art-video-player .hint--info.hint--right:before {\n border-right-color: #3986ac;\n}\n.art-video-player .hint--success:after {\n background-color: #458746;\n text-shadow: 0 -1px 0px #1a321a;\n}\n.art-video-player .hint--success.hint--top-left:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top-right:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-left:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-right:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--left:before {\n border-left-color: #458746;\n}\n.art-video-player .hint--success.hint--right:before {\n border-right-color: #458746;\n}\n.art-video-player .hint--always:after,\n.art-video-player .hint--always:before {\n opacity: 1;\n visibility: visible;\n}\n.art-video-player .hint--always.hint--top:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--bottom:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--left:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--left:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--right:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--always.hint--right:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--rounded:after {\n border-radius: 4px;\n}\n.art-video-player .hint--no-animate:before,\n.art-video-player .hint--no-animate:after {\n -webkit-transition-duration: 0ms;\n -moz-transition-duration: 0ms;\n transition-duration: 0ms;\n}\n.art-video-player .hint--bounce:before,\n.art-video-player .hint--bounce:after {\n -webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n -moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n}\n.art-video-player .hint--no-shadow:before,\n.art-video-player .hint--no-shadow:after {\n text-shadow: initial;\n box-shadow: initial;\n}\n.art-video-player .hint--no-arrow:before {\n display: none;\n}\n.art-video-player.art-mobile {\n --art-bottom-gap: 10px;\n --art-control-height: 38px;\n --art-control-icon-scale: 1;\n --art-state-size: 60px;\n --art-settings-max-height: 180px;\n --art-selector-max-height: 180px;\n --art-indicator-scale: 1;\n --art-control-opacity: 1;\n}\n.art-video-player.art-mobile .art-controls-left {\n margin-left: calc(var(--art-padding) / -1);\n}\n.art-video-player.art-mobile .art-controls-right {\n margin-right: calc(var(--art-padding) / -1);\n}\n"; class Subtitle extends Component { constructor(art) { super(art); diff --git a/docs/document/404.html b/docs/document/404.html index 25efc9eb5..146d6940c 100644 --- a/docs/document/404.html +++ b/docs/document/404.html @@ -9,7 +9,7 @@ - + @@ -21,7 +21,7 @@
- + \ No newline at end of file diff --git a/docs/document/advanced/built-in.html b/docs/document/advanced/built-in.html index 646e33aab..fdfd5160b 100644 --- a/docs/document/advanced/built-in.html +++ b/docs/document/advanced/built-in.html @@ -9,9 +9,9 @@ - + - + @@ -217,7 +217,7 @@ art.on('ready', () => { art.plugins.add(myPlugin); }); - + \ No newline at end of file diff --git a/docs/document/advanced/class.html b/docs/document/advanced/class.html index 7b6268da6..4cddf95ab 100644 --- a/docs/document/advanced/class.html +++ b/docs/document/advanced/class.html @@ -9,9 +9,9 @@ - + - + @@ -31,7 +31,7 @@ }); console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

▶ Run Code
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

▶ Run Code
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

▶ Run Code
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

▶ Run Code
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

▶ Run Code
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

▶ Run Code
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

▶ Run Code
js
console.info(Artplayer.option);
- + \ No newline at end of file diff --git a/docs/document/advanced/event.html b/docs/document/advanced/event.html index e6589498a..ab5198b48 100644 --- a/docs/document/advanced/event.html +++ b/docs/document/advanced/event.html @@ -9,9 +9,9 @@ - + - + @@ -385,7 +385,7 @@ art.on('keydown', (event) => { console.log(event.code); });

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

- + \ No newline at end of file diff --git a/docs/document/advanced/global.html b/docs/document/advanced/global.html index 29afaad0b..034c3730e 100644 --- a/docs/document/advanced/global.html +++ b/docs/document/advanced/global.html @@ -9,9 +9,9 @@ - + - + @@ -248,7 +248,7 @@ // 只销毁界面,不主动清空 src art.destroy(); - + \ No newline at end of file diff --git a/docs/document/advanced/plugin.html b/docs/document/advanced/plugin.html index f1d81d84f..e96ba73fb 100644 --- a/docs/document/advanced/plugin.html +++ b/docs/document/advanced/plugin.html @@ -9,9 +9,9 @@ - + - + @@ -122,7 +122,7 @@ }) ], }); - + \ No newline at end of file diff --git a/docs/document/advanced/property.html b/docs/document/advanced/property.html index 99151927a..04bb2a885 100644 --- a/docs/document/advanced/property.html +++ b/docs/document/advanced/property.html @@ -9,9 +9,9 @@ - + - + @@ -457,7 +457,7 @@ art.on('ready', () => { art.subtitleOffset = 1; }); - + \ No newline at end of file diff --git a/docs/document/assets/app.BhL53TUc.js b/docs/document/assets/app.CDNxlRra.js similarity index 95% rename from docs/document/assets/app.BhL53TUc.js rename to docs/document/assets/app.CDNxlRra.js index 6f6743eef..cb20c6c86 100644 --- a/docs/document/assets/app.BhL53TUc.js +++ b/docs/document/assets/app.CDNxlRra.js @@ -1 +1 @@ -import{t as p}from"./chunks/theme.C-3sZAdL.js";import{R as s,a6 as i,a7 as u,a8 as c,a9 as l,aa as f,ab as d,ac as m,ad as h,ae as g,af as A,d as v,u as y,v as C,s as P,ag as b,ah as w,ai as R,aj as E}from"./chunks/framework.xxfEszSJ.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=D(),a=j();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return A(S)}function D(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp}; +import{t as p}from"./chunks/theme.DA2WZC55.js";import{R as s,a6 as i,a7 as u,a8 as c,a9 as l,aa as f,ab as d,ac as m,ad as h,ae as g,af as A,d as v,u as y,v as C,s as P,ag as b,ah as w,ai as R,aj as E}from"./chunks/framework.xxfEszSJ.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=D(),a=j();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return A(S)}function D(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp}; diff --git a/docs/document/assets/chunks/theme.C-3sZAdL.js b/docs/document/assets/chunks/theme.DA2WZC55.js similarity index 99% rename from docs/document/assets/chunks/theme.C-3sZAdL.js rename to docs/document/assets/chunks/theme.DA2WZC55.js index 61021ef08..d1ecaf8ba 100644 --- a/docs/document/assets/chunks/theme.C-3sZAdL.js +++ b/docs/document/assets/chunks/theme.DA2WZC55.js @@ -1 +1 @@ -import{d as k,c as h,r as p,n as A,o as i,a as ee,t as C,b as P,w as f,T as we,e as g,_ as V,u as Re,i as it,f as lt,g as he,h as S,j as d,k as c,l as te,m as Pe,p as T,q as J,s as fe,v as Q,x as Me,y as Ne,z as ct,A as ut,F as H,B as z,C as Z,D as We,E as ve,G as y,H as W,I as Ke,J as me,K as Y,L as _e,M as dt,N as Je,O as pt,P as Ie,Q as xe,R as ge,S as ht,U as ft,V as vt,W as Fe,X as mt,Y as Xe,Z as _t,$ as gt,a0 as Ye,a1 as Qe,a2 as kt,a3 as bt,a4 as $t,a5 as yt}from"./framework.xxfEszSJ.js";const Pt=k({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(n){return(e,t)=>(i(),h("span",{class:A(["VPBadge",e.type])},[p(e.$slots,"default",{},()=>[ee(C(e.text),1)])],2))}}),Lt={key:0,class:"VPBackdrop"},Vt=k({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(n){return(e,t)=>(i(),P(we,{name:"fade"},{default:f(()=>[e.show?(i(),h("div",Lt)):g("",!0)]),_:1}))}}),St=V(Vt,[["__scopeId","data-v-b2600058"]]),M=Re;function Tt(n,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(n,e):(n(),(s=!0)&&setTimeout(()=>s=!1,e))}}function Le(n){return n.startsWith("/")?n:`/${n}`}function Ce(n){const{pathname:e,search:t,hash:s,protocol:o}=new URL(n,"http://a.com");if(it(n)||n.startsWith("#")||!o.startsWith("http")||!lt(e))return n;const{site:a}=M(),r=e.endsWith("/")||e.endsWith(".html")?n:n.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${t}${s}`);return he(r)}function ae({correspondingLink:n=!1}={}){const{site:e,localeIndex:t,page:s,theme:o,hash:a}=M(),r=S(()=>{var u,v;return{label:(u=e.value.locales[t.value])==null?void 0:u.label,link:((v=e.value.locales[t.value])==null?void 0:v.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:S(()=>Object.entries(e.value.locales).flatMap(([u,v])=>r.value.label===v.label?[]:{text:v.label,link:wt(v.link||(u==="root"?"/":`/${u}/`),o.value.i18nRouting!==!1&&n,s.value.relativePath.slice(r.value.link.length-1),!e.value.cleanUrls)+a.value})),currentLang:r}}function wt(n,e,t,s){return e?n.replace(/\/$/,"")+Le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):n}const Mt={class:"NotFound"},Nt={class:"code"},It={class:"title"},Ct={class:"quote"},At={class:"action"},Ht=["href","aria-label"],Bt=k({__name:"NotFound",setup(n){const{theme:e}=M(),{currentLang:t}=ae();return(s,o)=>{var a,r,l,u,v;return i(),h("div",Mt,[d("p",Nt,C(((a=c(e).notFound)==null?void 0:a.code)??"404"),1),d("h1",It,C(((r=c(e).notFound)==null?void 0:r.title)??"PAGE NOT FOUND"),1),o[0]||(o[0]=d("div",{class:"divider"},null,-1)),d("blockquote",Ct,C(((l=c(e).notFound)==null?void 0:l.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",At,[d("a",{class:"link",href:c(he)(c(t).link),"aria-label":((u=c(e).notFound)==null?void 0:u.linkLabel)??"go to home"},C(((v=c(e).notFound)==null?void 0:v.linkText)??"Take me home"),9,Ht)])])}}}),Et=V(Bt,[["__scopeId","data-v-93fd8736"]]);function Ze(n,e){if(Array.isArray(n))return le(n);if(n==null)return[];e=Le(e);const t=Object.keys(n).sort((o,a)=>a.split("/").length-o.split("/").length).find(o=>e.startsWith(Le(o))),s=t?n[t]:[];return Array.isArray(s)?le(s):le(s.items,s.base)}function Ot(n){const e=[];let t=0;for(const s in n){const o=n[s];if(o.items){t=e.push(o);continue}e[t]||e.push({items:[]}),e[t].items.push(o)}return e}function Dt(n){const e=[];function t(s){for(const o of s)o.text&&o.link&&e.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&t(o.items)}return t(n),e}function Ve(n,e){return Array.isArray(e)?e.some(t=>Ve(n,t)):te(n,e.link)?!0:e.items?Ve(n,e.items):!1}function le(n,e){return[...n].map(t=>{const s={...t},o=s.base||e;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=le(s.items,o)),s})}function x(){const{frontmatter:n,page:e,theme:t}=M(),s=Pe("(min-width: 960px)"),o=T(!1),a=S(()=>{const N=t.value.sidebar,w=e.value.relativePath;return N?Ze(N,w):[]}),r=T(a.value);J(a,(N,w)=>{JSON.stringify(N)!==JSON.stringify(w)&&(r.value=a.value)});const l=S(()=>n.value.sidebar!==!1&&r.value.length>0&&n.value.layout!=="home"),u=S(()=>v?n.value.aside==null?t.value.aside==="left":n.value.aside==="left":!1),v=S(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),_=S(()=>l.value&&s.value),m=S(()=>l.value?Ot(r.value):[]);function L(){o.value=!0}function b(){o.value=!1}function $(){o.value?b():L()}return{isOpen:o,sidebar:r,sidebarGroups:m,hasSidebar:l,hasAside:v,leftAside:u,isSidebarEnabled:_,open:L,close:b,toggle:$}}function Ft(n,e){let t;fe(()=>{t=n.value?document.activeElement:void 0}),Q(()=>{window.addEventListener("keyup",s)}),Me(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&n.value&&(e(),t==null||t.focus())}}function zt(n){const{page:e,hash:t}=M(),s=T(!1),o=S(()=>n.value.collapsed!=null),a=S(()=>!!n.value.link),r=T(!1),l=()=>{r.value=te(e.value.relativePath,n.value.link)};J([e,n,t],l),Q(l);const u=S(()=>r.value?!0:n.value.items?Ve(e.value.relativePath,n.value.items):!1),v=S(()=>!!(n.value.items&&n.value.items.length));fe(()=>{s.value=!!(o.value&&n.value.collapsed)}),Ne(()=>{(r.value||u.value)&&(s.value=!1)});function _(){o.value&&(s.value=!s.value)}return{collapsed:s,collapsible:o,isLink:a,isActiveLink:r,hasActiveLink:u,hasChildren:v,toggle:_}}function jt(){const{hasSidebar:n}=x(),e=Pe("(min-width: 960px)"),t=Pe("(min-width: 1280px)");return{isAsideEnabled:S(()=>!t.value&&!e.value?!1:n.value?t.value:e.value)}}const Ut=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,Se=[];function et(n){return typeof n.outline=="object"&&!Array.isArray(n.outline)&&n.outline.label||n.outlineTitle||"On this page"}function Ae(n){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:qt(t),link:"#"+t.id,level:s}});return Gt(e,n)}function qt(n){let e="";for(const t of n.childNodes)if(t.nodeType===1){if(Ut.test(t.className))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Gt(n,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,o]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return Kt(n,s,o)}function Rt(n,e){const{isAsideEnabled:t}=jt(),s=Tt(a,100);let o=null;Q(()=>{requestAnimationFrame(a),window.addEventListener("scroll",s)}),ct(()=>{r(location.hash)}),Me(()=>{window.removeEventListener("scroll",s)});function a(){if(!t.value)return;const l=window.scrollY,u=window.innerHeight,v=document.body.offsetHeight,_=Math.abs(l+u-v)<1,m=Se.map(({element:b,link:$})=>({link:$,top:Wt(b)})).filter(({top:b})=>!Number.isNaN(b)).sort((b,$)=>b.top-$.top);if(!m.length){r(null);return}if(l<1){r(null);return}if(_){r(m[m.length-1].link);return}let L=null;for(const{link:b,top:$}of m){if($>l+ut()+4)break;L=b}r(L)}function r(l){o&&o.classList.remove("active"),l==null?o=null:o=n.value.querySelector(`a[href="${decodeURIComponent(l)}"]`);const u=o;u?(u.classList.add("active"),e.value.style.top=u.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Wt(n){let e=0;for(;n!==document.body;){if(n===null)return NaN;e+=n.offsetTop,n=n.offsetParent}return e}function Kt(n,e,t){Se.length=0;const s=[],o=[];return n.forEach(a=>{const r={...a,children:[]};let l=o[o.length-1];for(;l&&l.level>=r.level;)o.pop(),l=o[o.length-1];if(r.element.classList.contains("ignore-header")||l&&"shouldIgnore"in l){o.push({level:r.level,shouldIgnore:!0});return}r.level>t||r.level{const o=Z("VPDocOutlineItem",!0);return i(),h("ul",{class:A(["VPDocOutlineItem",t.root?"root":"nested"])},[(i(!0),h(H,null,z(t.headers,({children:a,link:r,title:l})=>(i(),h("li",null,[d("a",{class:"outline-link",href:r,onClick:e,title:l},C(l),9,Jt),a!=null&&a.length?(i(),P(o,{key:0,headers:a},null,8,["headers"])):g("",!0)]))),256))],2)}}}),tt=V(xt,[["__scopeId","data-v-da421f78"]]),Xt={class:"content"},Yt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Qt=k({__name:"VPDocAsideOutline",setup(n){const{frontmatter:e,theme:t}=M(),s=We([]);ve(()=>{s.value=Ae(e.value.outline??t.value.outline)});const o=T(),a=T();return Rt(o,a),(r,l)=>(i(),h("nav",{"aria-labelledby":"doc-outline-aria-label",class:A(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:o},[d("div",Xt,[d("div",{class:"outline-marker",ref_key:"marker",ref:a},null,512),d("div",Yt,C(c(et)(c(t))),1),y(tt,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),Zt=V(Qt,[["__scopeId","data-v-dfbd9fb8"]]),en={class:"VPDocAsideCarbonAds"},tn=k({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(n){const e=()=>null;return(t,s)=>(i(),h("div",en,[y(c(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),nn={class:"VPDocAside"},sn=k({__name:"VPDocAside",setup(n){const{theme:e}=M();return(t,s)=>(i(),h("div",nn,[p(t.$slots,"aside-top",{},void 0,!0),p(t.$slots,"aside-outline-before",{},void 0,!0),y(Zt),p(t.$slots,"aside-outline-after",{},void 0,!0),s[0]||(s[0]=d("div",{class:"spacer"},null,-1)),p(t.$slots,"aside-ads-before",{},void 0,!0),c(e).carbonAds?(i(),P(tn,{key:0,"carbon-ads":c(e).carbonAds},null,8,["carbon-ads"])):g("",!0),p(t.$slots,"aside-ads-after",{},void 0,!0),p(t.$slots,"aside-bottom",{},void 0,!0)]))}}),on=V(sn,[["__scopeId","data-v-79cae1a0"]]);function an(){const{theme:n,page:e}=M();return S(()=>{const{text:t="Edit this page",pattern:s=""}=n.value.editLink||{};let o;return typeof s=="function"?o=s(e.value):o=s.replace(/:path/g,e.value.filePath),{url:o,text:t}})}function rn(){const{page:n,theme:e,frontmatter:t}=M();return S(()=>{var v,_,m,L,b,$,N,w;const s=Ze(e.value.sidebar,n.value.relativePath),o=Dt(s),a=ln(o,O=>O.link.replace(/[?#].*$/,"")),r=a.findIndex(O=>te(n.value.relativePath,O.link)),l=((v=e.value.docFooter)==null?void 0:v.prev)===!1&&!t.value.prev||t.value.prev===!1,u=((_=e.value.docFooter)==null?void 0:_.next)===!1&&!t.value.next||t.value.next===!1;return{prev:l?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((m=a[r-1])==null?void 0:m.docFooterText)??((L=a[r-1])==null?void 0:L.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((b=a[r-1])==null?void 0:b.link)},next:u?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??(($=a[r+1])==null?void 0:$.docFooterText)??((N=a[r+1])==null?void 0:N.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((w=a[r+1])==null?void 0:w.link)}}})}function ln(n,e){const t=new Set;return n.filter(s=>{const o=e(s);return t.has(o)?!1:t.add(o)})}const K=k({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(n){const e=n,t=S(()=>e.tag??(e.href?"a":"span")),s=S(()=>e.href&&Ke.test(e.href)||e.target==="_blank");return(o,a)=>(i(),P(W(t.value),{class:A(["VPLink",{link:o.href,"vp-external-link-icon":s.value,"no-icon":o.noIcon}]),href:o.href?c(Ce)(o.href):void 0,target:o.target??(s.value?"_blank":void 0),rel:o.rel??(s.value?"noreferrer":void 0)},{default:f(()=>[p(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),cn={class:"VPLastUpdated"},un=["datetime"],dn=k({__name:"VPDocFooterLastUpdated",setup(n){const{theme:e,page:t,lang:s}=M(),o=S(()=>new Date(t.value.lastUpdated)),a=S(()=>o.value.toISOString()),r=T("");return Q(()=>{fe(()=>{var l,u,v;r.value=new Intl.DateTimeFormat((u=(l=e.value.lastUpdated)==null?void 0:l.formatOptions)!=null&&u.forceLocale?s.value:void 0,((v=e.value.lastUpdated)==null?void 0:v.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(o.value)})}),(l,u)=>{var v;return i(),h("p",cn,[ee(C(((v=c(e).lastUpdated)==null?void 0:v.text)||c(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:a.value},C(r.value),9,un)])}}}),pn=V(dn,[["__scopeId","data-v-e95db471"]]),hn={key:0,class:"VPDocFooter"},fn={key:0,class:"edit-info"},vn={key:0,class:"edit-link"},mn={key:1,class:"last-updated"},_n={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},gn={class:"pager"},kn=["innerHTML"],bn=["innerHTML"],$n={class:"pager"},yn=["innerHTML"],Pn=["innerHTML"],Ln=k({__name:"VPDocFooter",setup(n){const{theme:e,page:t,frontmatter:s}=M(),o=an(),a=rn(),r=S(()=>e.value.editLink&&s.value.editLink!==!1),l=S(()=>t.value.lastUpdated),u=S(()=>r.value||l.value||a.value.prev||a.value.next);return(v,_)=>{var m,L,b,$;return u.value?(i(),h("footer",hn,[p(v.$slots,"doc-footer-before",{},void 0,!0),r.value||l.value?(i(),h("div",fn,[r.value?(i(),h("div",vn,[y(K,{class:"edit-link-button",href:c(o).url,"no-icon":!0},{default:f(()=>[_[0]||(_[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),ee(" "+C(c(o).text),1)]),_:1},8,["href"])])):g("",!0),l.value?(i(),h("div",mn,[y(pn)])):g("",!0)])):g("",!0),(m=c(a).prev)!=null&&m.link||(L=c(a).next)!=null&&L.link?(i(),h("nav",_n,[_[1]||(_[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",gn,[(b=c(a).prev)!=null&&b.link?(i(),P(K,{key:0,class:"pager-link prev",href:c(a).prev.link},{default:f(()=>{var N;return[d("span",{class:"desc",innerHTML:((N=c(e).docFooter)==null?void 0:N.prev)||"Previous page"},null,8,kn),d("span",{class:"title",innerHTML:c(a).prev.text},null,8,bn)]}),_:1},8,["href"])):g("",!0)]),d("div",$n,[($=c(a).next)!=null&&$.link?(i(),P(K,{key:0,class:"pager-link next",href:c(a).next.link},{default:f(()=>{var N;return[d("span",{class:"desc",innerHTML:((N=c(e).docFooter)==null?void 0:N.next)||"Next page"},null,8,yn),d("span",{class:"title",innerHTML:c(a).next.text},null,8,Pn)]}),_:1},8,["href"])):g("",!0)])])):g("",!0)])):g("",!0)}}}),Vn=V(Ln,[["__scopeId","data-v-07d71ff1"]]),Sn={class:"container"},Tn={class:"aside-container"},wn={class:"aside-content"},Mn={class:"content"},Nn={class:"content-container"},In={class:"main"},Cn=k({__name:"VPDoc",setup(n){const{theme:e}=M(),t=me(),{hasSidebar:s,hasAside:o,leftAside:a}=x(),r=S(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(l,u)=>{const v=Z("Content");return i(),h("div",{class:A(["VPDoc",{"has-sidebar":c(s),"has-aside":c(o)}])},[p(l.$slots,"doc-top",{},void 0,!0),d("div",Sn,[c(o)?(i(),h("div",{key:0,class:A(["aside",{"left-aside":c(a)}])},[u[0]||(u[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Tn,[d("div",wn,[y(on,null,{"aside-top":f(()=>[p(l.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[p(l.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[p(l.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(l.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(l.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(l.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):g("",!0),d("div",Mn,[d("div",Nn,[p(l.$slots,"doc-before",{},void 0,!0),d("main",In,[y(v,{class:A(["vp-doc",[r.value,c(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),y(Vn,null,{"doc-footer-before":f(()=>[p(l.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),p(l.$slots,"doc-after",{},void 0,!0)])])]),p(l.$slots,"doc-bottom",{},void 0,!0)],2)}}}),An=V(Cn,[["__scopeId","data-v-ef3a4dda"]]),Hn=k({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(n){const e=n,t=S(()=>e.href&&Ke.test(e.href)),s=S(()=>e.tag||(e.href?"a":"button"));return(o,a)=>(i(),P(W(s.value),{class:A(["VPButton",[o.size,o.theme]]),href:o.href?c(Ce)(o.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:f(()=>[ee(C(o.text),1)]),_:1},8,["class","href","target","rel"]))}}),Bn=V(Hn,[["__scopeId","data-v-b20c43c2"]]),En=["src","alt"],On=k({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(n){return(e,t)=>{const s=Z("VPImage",!0);return e.image?(i(),h(H,{key:0},[typeof e.image=="string"||"src"in e.image?(i(),h("img",Y({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:c(he)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,En)):(i(),h(H,{key:1},[y(s,Y({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),y(s,Y({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):g("",!0)}}}),ue=V(On,[["__scopeId","data-v-4d414b82"]]),Dn={class:"container"},Fn={class:"main"},zn={class:"heading"},jn=["innerHTML"],Un=["innerHTML"],qn=["innerHTML"],Gn={key:0,class:"actions"},Rn={key:0,class:"image"},Wn={class:"image-container"},Kn=k({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(n){const e=_e("hero-image-slot-exists");return(t,s)=>(i(),h("div",{class:A(["VPHero",{"has-image":t.image||c(e)}])},[d("div",Dn,[d("div",Fn,[p(t.$slots,"home-hero-info-before",{},void 0,!0),p(t.$slots,"home-hero-info",{},()=>[d("h1",zn,[t.name?(i(),h("span",{key:0,innerHTML:t.name,class:"name clip"},null,8,jn)):g("",!0),t.text?(i(),h("span",{key:1,innerHTML:t.text,class:"text"},null,8,Un)):g("",!0)]),t.tagline?(i(),h("p",{key:0,innerHTML:t.tagline,class:"tagline"},null,8,qn)):g("",!0)],!0),p(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(i(),h("div",Gn,[(i(!0),h(H,null,z(t.actions,o=>(i(),h("div",{key:o.link,class:"action"},[y(Bn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):g("",!0),p(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||c(e)?(i(),h("div",Rn,[d("div",Wn,[s[0]||(s[0]=d("div",{class:"image-bg"},null,-1)),p(t.$slots,"home-hero-image",{},()=>[t.image?(i(),P(ue,{key:0,class:"image-src",image:t.image},null,8,["image"])):g("",!0)],!0)])])):g("",!0)])],2))}}),Jn=V(Kn,[["__scopeId","data-v-d266baba"]]),xn=k({__name:"VPHomeHero",setup(n){const{frontmatter:e}=M();return(t,s)=>c(e).hero?(i(),P(Jn,{key:0,class:"VPHomeHero",name:c(e).hero.name,text:c(e).hero.text,tagline:c(e).hero.tagline,image:c(e).hero.image,actions:c(e).hero.actions},{"home-hero-info-before":f(()=>[p(t.$slots,"home-hero-info-before")]),"home-hero-info":f(()=>[p(t.$slots,"home-hero-info")]),"home-hero-info-after":f(()=>[p(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":f(()=>[p(t.$slots,"home-hero-actions-after")]),"home-hero-image":f(()=>[p(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):g("",!0)}}),Xn={class:"box"},Yn={key:0,class:"icon"},Qn=["innerHTML"],Zn=["innerHTML"],es=["innerHTML"],ts={key:4,class:"link-text"},ns={class:"link-text-value"},ss=k({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(n){return(e,t)=>(i(),P(K,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:f(()=>[d("article",Xn,[typeof e.icon=="object"&&e.icon.wrap?(i(),h("div",Yn,[y(ue,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(i(),P(ue,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(i(),h("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Qn)):g("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Zn),e.details?(i(),h("p",{key:3,class:"details",innerHTML:e.details},null,8,es)):g("",!0),e.linkText?(i(),h("div",ts,[d("p",ns,[ee(C(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):g("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),os=V(ss,[["__scopeId","data-v-95001937"]]),as={key:0,class:"VPFeatures"},rs={class:"container"},is={class:"items"},ls=k({__name:"VPFeatures",props:{features:{}},setup(n){const e=n,t=S(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,o)=>s.features?(i(),h("div",as,[d("div",rs,[d("div",is,[(i(!0),h(H,null,z(s.features,a=>(i(),h("div",{key:a.title,class:A(["item",[t.value]])},[y(os,{icon:a.icon,title:a.title,details:a.details,link:a.link,"link-text":a.linkText,rel:a.rel,target:a.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):g("",!0)}}),cs=V(ls,[["__scopeId","data-v-1da4ff3d"]]),us=k({__name:"VPHomeFeatures",setup(n){const{frontmatter:e}=M();return(t,s)=>c(e).features?(i(),P(cs,{key:0,class:"VPHomeFeatures",features:c(e).features},null,8,["features"])):g("",!0)}}),ds=k({__name:"VPHomeContent",setup(n){const{width:e}=dt({initialWidth:0,includeScrollbar:!1});return(t,s)=>(i(),h("div",{class:"vp-doc container",style:Je(c(e)?{"--vp-offset":`calc(50% - ${c(e)/2}px)`}:{})},[p(t.$slots,"default",{},void 0,!0)],4))}}),ps=V(ds,[["__scopeId","data-v-2498cc33"]]),hs=k({__name:"VPHome",setup(n){const{frontmatter:e,theme:t}=M();return(s,o)=>{const a=Z("Content");return i(),h("div",{class:A(["VPHome",{"external-link-icon-enabled":c(t).externalLinkIcon}])},[p(s.$slots,"home-hero-before",{},void 0,!0),y(xn,null,{"home-hero-info-before":f(()=>[p(s.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(s.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(s.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(s.$slots,"home-hero-image",{},void 0,!0)]),_:3}),p(s.$slots,"home-hero-after",{},void 0,!0),p(s.$slots,"home-features-before",{},void 0,!0),y(us),p(s.$slots,"home-features-after",{},void 0,!0),c(e).markdownStyles!==!1?(i(),P(ps,{key:0},{default:f(()=>[y(a)]),_:1})):(i(),P(a,{key:1}))],2)}}}),fs=V(hs,[["__scopeId","data-v-8b59c434"]]),vs={},ms={class:"VPPage"};function _s(n,e){const t=Z("Content");return i(),h("div",ms,[p(n.$slots,"page-top"),y(t),p(n.$slots,"page-bottom")])}const gs=V(vs,[["render",_s]]),ks=k({__name:"VPContent",setup(n){const{page:e,frontmatter:t}=M(),{hasSidebar:s}=x();return(o,a)=>(i(),h("div",{class:A(["VPContent",{"has-sidebar":c(s),"is-home":c(t).layout==="home"}]),id:"VPContent"},[c(e).isNotFound?p(o.$slots,"not-found",{key:0},()=>[y(Et)],!0):c(t).layout==="page"?(i(),P(gs,{key:1},{"page-top":f(()=>[p(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[p(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):c(t).layout==="home"?(i(),P(fs,{key:2},{"home-hero-before":f(()=>[p(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[p(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[p(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[p(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[p(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):c(t).layout&&c(t).layout!=="doc"?(i(),P(W(c(t).layout),{key:3})):(i(),P(An,{key:4},{"doc-top":f(()=>[p(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[p(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":f(()=>[p(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[p(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[p(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":f(()=>[p(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":f(()=>[p(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":f(()=>[p(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),bs=V(ks,[["__scopeId","data-v-d2aef184"]]),$s={class:"container"},ys=["innerHTML"],Ps=["innerHTML"],Ls=k({__name:"VPFooter",setup(n){const{theme:e,frontmatter:t}=M(),{hasSidebar:s}=x();return(o,a)=>c(e).footer&&c(t).footer!==!1?(i(),h("footer",{key:0,class:A(["VPFooter",{"has-sidebar":c(s)}])},[d("div",$s,[c(e).footer.message?(i(),h("p",{key:0,class:"message",innerHTML:c(e).footer.message},null,8,ys)):g("",!0),c(e).footer.copyright?(i(),h("p",{key:1,class:"copyright",innerHTML:c(e).footer.copyright},null,8,Ps)):g("",!0)])],2)):g("",!0)}}),Vs=V(Ls,[["__scopeId","data-v-e3157d6d"]]);function Ss(){const{theme:n,frontmatter:e}=M(),t=We([]),s=S(()=>t.value.length>0);return ve(()=>{t.value=Ae(e.value.outline??n.value.outline)}),{headers:t,hasLocalNav:s}}const Ts={class:"menu-text"},ws={class:"header"},Ms={class:"outline"},Ns=k({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(n){const e=n,{theme:t}=M(),s=T(!1),o=T(0),a=T(),r=T();function l(m){var L;(L=a.value)!=null&&L.contains(m.target)||(s.value=!1)}J(s,m=>{if(m){document.addEventListener("click",l);return}document.removeEventListener("click",l)}),pt("Escape",()=>{s.value=!1}),ve(()=>{s.value=!1});function u(){s.value=!s.value,o.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function v(m){m.target.classList.contains("outline-link")&&(r.value&&(r.value.style.transition="none"),Ie(()=>{s.value=!1}))}function _(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(m,L)=>(i(),h("div",{class:"VPLocalNavOutlineDropdown",style:Je({"--vp-vh":o.value+"px"}),ref_key:"main",ref:a},[m.headers.length>0?(i(),h("button",{key:0,onClick:u,class:A({open:s.value})},[d("span",Ts,C(c(et)(c(t))),1),L[0]||(L[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(i(),h("button",{key:1,onClick:_},C(c(t).returnToTopLabel||"Return to top"),1)),y(we,{name:"flyout"},{default:f(()=>[s.value?(i(),h("div",{key:0,ref_key:"items",ref:r,class:"items",onClick:v},[d("div",ws,[d("a",{class:"top-link",href:"#",onClick:_},C(c(t).returnToTopLabel||"Return to top"),1)]),d("div",Ms,[y(tt,{headers:m.headers},null,8,["headers"])])],512)):g("",!0)]),_:1})],4))}}),Is=V(Ns,[["__scopeId","data-v-d61422fe"]]),Cs={class:"container"},As=["aria-expanded"],Hs={class:"menu-text"},Bs=k({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(n){const{theme:e,frontmatter:t}=M(),{hasSidebar:s}=x(),{headers:o}=Ss(),{y:a}=xe(),r=T(0);Q(()=>{r.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),ve(()=>{o.value=Ae(t.value.outline??e.value.outline)});const l=S(()=>o.value.length===0),u=S(()=>l.value&&!s.value),v=S(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:l.value,fixed:u.value}));return(_,m)=>c(t).layout!=="home"&&(!u.value||c(a)>=r.value)?(i(),h("div",{key:0,class:A(v.value)},[d("div",Cs,[c(s)?(i(),h("button",{key:0,class:"menu","aria-expanded":_.open,"aria-controls":"VPSidebarNav",onClick:m[0]||(m[0]=L=>_.$emit("open-menu"))},[m[1]||(m[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",Hs,C(c(e).sidebarMenuLabel||"Menu"),1)],8,As)):g("",!0),y(Is,{headers:c(o),navHeight:r.value},null,8,["headers","navHeight"])])],2)):g("",!0)}}),Es=V(Bs,[["__scopeId","data-v-9d8129cc"]]);function Os(){const n=T(!1);function e(){n.value=!0,window.addEventListener("resize",o)}function t(){n.value=!1,window.removeEventListener("resize",o)}function s(){n.value?t():e()}function o(){window.outerWidth>=768&&t()}const a=me();return J(()=>a.path,t),{isScreenOpen:n,openScreen:e,closeScreen:t,toggleScreen:s}}const Ds={},Fs={class:"VPSwitch",type:"button",role:"switch"},zs={class:"check"},js={key:0,class:"icon"};function Us(n,e){return i(),h("button",Fs,[d("span",zs,[n.$slots.default?(i(),h("span",js,[p(n.$slots,"default",{},void 0,!0)])):g("",!0)])])}const qs=V(Ds,[["render",Us],["__scopeId","data-v-7012e5dd"]]),Gs=k({__name:"VPSwitchAppearance",setup(n){const{isDark:e,theme:t}=M(),s=_e("toggle-appearance",()=>{e.value=!e.value}),o=T("");return Ne(()=>{o.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(a,r)=>(i(),P(qs,{title:o.value,class:"VPSwitchAppearance","aria-checked":c(e),onClick:c(s)},{default:f(()=>r[0]||(r[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1},8,["title","aria-checked","onClick"]))}}),He=V(Gs,[["__scopeId","data-v-fa1daf57"]]),Rs={key:0,class:"VPNavBarAppearance"},Ws=k({__name:"VPNavBarAppearance",setup(n){const{site:e}=M();return(t,s)=>c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",Rs,[y(He)])):g("",!0)}}),Ks=V(Ws,[["__scopeId","data-v-123fcb2f"]]),Be=T();let nt=!1,be=0;function Js(n){const e=T(!1);if(ge){!nt&&xs(),be++;const t=J(Be,s=>{var o,a,r;s===n.el.value||(o=n.el.value)!=null&&o.contains(s)?(e.value=!0,(a=n.onFocus)==null||a.call(n)):(e.value=!1,(r=n.onBlur)==null||r.call(n))});Me(()=>{t(),be--,be||Xs()})}return ht(e)}function xs(){document.addEventListener("focusin",st),nt=!0,Be.value=document.activeElement}function Xs(){document.removeEventListener("focusin",st)}function st(){Be.value=document.activeElement}const Ys={class:"VPMenuLink"},Qs=["innerHTML"],Zs=k({__name:"VPMenuLink",props:{item:{}},setup(n){const{page:e}=M();return(t,s)=>(i(),h("div",Ys,[y(K,{class:A({active:c(te)(c(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Qs)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),ke=V(Zs,[["__scopeId","data-v-65e4a6b1"]]),eo={class:"VPMenuGroup"},to={key:0,class:"title"},no=k({__name:"VPMenuGroup",props:{text:{},items:{}},setup(n){return(e,t)=>(i(),h("div",eo,[e.text?(i(),h("p",to,C(e.text),1)):g("",!0),(i(!0),h(H,null,z(e.items,s=>(i(),h(H,null,["link"in s?(i(),P(ke,{key:0,item:s},null,8,["item"])):g("",!0)],64))),256))]))}}),so=V(no,[["__scopeId","data-v-2bec9359"]]),oo={class:"VPMenu"},ao={key:0,class:"items"},ro=k({__name:"VPMenu",props:{items:{}},setup(n){return(e,t)=>(i(),h("div",oo,[e.items?(i(),h("div",ao,[(i(!0),h(H,null,z(e.items,s=>(i(),h(H,{key:JSON.stringify(s)},["link"in s?(i(),P(ke,{key:0,item:s},null,8,["item"])):"component"in s?(i(),P(W(s.component),Y({key:1,ref_for:!0},s.props),null,16)):(i(),P(so,{key:2,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):g("",!0),p(e.$slots,"default",{},void 0,!0)]))}}),io=V(ro,[["__scopeId","data-v-39eca401"]]),lo=["aria-expanded","aria-label"],co={key:0,class:"text"},uo=["innerHTML"],po={key:1,class:"vpi-more-horizontal icon"},ho={class:"menu"},fo=k({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(n){const e=T(!1),t=T();Js({el:t,onBlur:s});function s(){e.value=!1}return(o,a)=>(i(),h("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:a[1]||(a[1]=r=>e.value=!0),onMouseleave:a[2]||(a[2]=r=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":o.label,onClick:a[0]||(a[0]=r=>e.value=!e.value)},[o.button||o.icon?(i(),h("span",co,[o.icon?(i(),h("span",{key:0,class:A([o.icon,"option-icon"])},null,2)):g("",!0),o.button?(i(),h("span",{key:1,innerHTML:o.button},null,8,uo)):g("",!0),a[3]||(a[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(i(),h("span",po))],8,lo),d("div",ho,[y(io,{items:o.items},{default:f(()=>[p(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),Ee=V(fo,[["__scopeId","data-v-40e55da0"]]),vo=["href","aria-label","innerHTML"],mo=k({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(n){const e=n,t=T();Q(async()=>{var a;await Ie();const o=(a=t.value)==null?void 0:a.children[0];o instanceof HTMLElement&&o.className.startsWith("vpi-social-")&&(getComputedStyle(o).maskImage||getComputedStyle(o).webkitMaskImage)==="none"&&o.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const s=S(()=>typeof e.icon=="object"?e.icon.svg:``);return(o,a)=>(i(),h("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:o.link,"aria-label":o.ariaLabel??(typeof o.icon=="string"?o.icon:""),target:"_blank",rel:"noopener",innerHTML:s.value},null,8,vo))}}),_o=V(mo,[["__scopeId","data-v-fbf39218"]]),go={class:"VPSocialLinks"},ko=k({__name:"VPSocialLinks",props:{links:{}},setup(n){return(e,t)=>(i(),h("div",go,[(i(!0),h(H,null,z(e.links,({link:s,icon:o,ariaLabel:a})=>(i(),P(_o,{key:s,icon:o,link:s,ariaLabel:a},null,8,["icon","link","ariaLabel"]))),128))]))}}),Oe=V(ko,[["__scopeId","data-v-f2234a39"]]),bo={key:0,class:"group translations"},$o={class:"trans-title"},yo={key:1,class:"group"},Po={class:"item appearance"},Lo={class:"label"},Vo={class:"appearance-action"},So={key:2,class:"group"},To={class:"item social-links"},wo=k({__name:"VPNavBarExtra",setup(n){const{site:e,theme:t}=M(),{localeLinks:s,currentLang:o}=ae({correspondingLink:!0}),a=S(()=>s.value.length&&o.value.label||e.value.appearance||t.value.socialLinks);return(r,l)=>a.value?(i(),P(Ee,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:f(()=>[c(s).length&&c(o).label?(i(),h("div",bo,[d("p",$o,C(c(o).label),1),(i(!0),h(H,null,z(c(s),u=>(i(),P(ke,{key:u.link,item:u},null,8,["item"]))),128))])):g("",!0),c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",yo,[d("div",Po,[d("p",Lo,C(c(t).darkModeSwitchLabel||"Appearance"),1),d("div",Vo,[y(He)])])])):g("",!0),c(t).socialLinks?(i(),h("div",So,[d("div",To,[y(Oe,{class:"social-links-list",links:c(t).socialLinks},null,8,["links"])])])):g("",!0)]),_:1})):g("",!0)}}),Mo=V(wo,[["__scopeId","data-v-0c845e5d"]]),No=["aria-expanded"],Io=k({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(n){return(e,t)=>(i(),h("button",{type:"button",class:A(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,No))}}),Co=V(Io,[["__scopeId","data-v-670493dd"]]),Ao=["innerHTML"],Ho=k({__name:"VPNavBarMenuLink",props:{item:{}},setup(n){const{page:e}=M();return(t,s)=>(i(),P(K,{class:A({VPNavBarMenuLink:!0,active:c(te)(c(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ao)]),_:1},8,["class","href","target","rel","no-icon"]))}}),Bo=V(Ho,[["__scopeId","data-v-8dbce4d0"]]),Eo=k({__name:"VPNavBarMenuGroup",props:{item:{}},setup(n){const e=n,{page:t}=M(),s=a=>"component"in a?!1:"link"in a?te(t.value.relativePath,a.link,!!e.item.activeMatch):a.items.some(s),o=S(()=>s(e.item));return(a,r)=>(i(),P(Ee,{class:A({VPNavBarMenuGroup:!0,active:c(te)(c(t).relativePath,a.item.activeMatch,!!a.item.activeMatch)||o.value}),button:a.item.text,items:a.item.items},null,8,["class","button","items"]))}}),Oo={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Do=k({__name:"VPNavBarMenu",setup(n){const{theme:e}=M();return(t,s)=>c(e).nav?(i(),h("nav",Oo,[s[0]||(s[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(i(!0),h(H,null,z(c(e).nav,o=>(i(),h(H,{key:JSON.stringify(o)},["link"in o?(i(),P(Bo,{key:0,item:o},null,8,["item"])):"component"in o?(i(),P(W(o.component),Y({key:1,ref_for:!0},o.props),null,16)):(i(),P(Eo,{key:2,item:o},null,8,["item"]))],64))),128))])):g("",!0)}}),Fo=V(Do,[["__scopeId","data-v-5bacfe89"]]),zo="/document/assets/flex-logo.BJA2J7hW.svg";function $e(n,e){return typeof n>"u"?e:n}function ze(n){const e=Array(n);for(let t=0;t=this.minlength&&(l||!r[_])){let L=ie(u,o,v),b="";switch(this.tokenize){case"full":if(3$;N--)if(N-$>=this.minlength){const w=ie(u,o,v,m,$);b=_.substring($,N),this.push_index(r,b,w,n,t)}break}case"reverse":if(2=this.minlength){const N=ie(u,o,v,m,$);this.push_index(r,b,N,n,t)}b=""}case"forward":if(1=this.minlength&&this.push_index(r,b,L,n,t);break}default:if(this.boost&&(L=Math.min(0|L/this.boost(e,_,v),u-1)),this.push_index(r,_,L,n,t),l&&1=this.minlength&&!$[_]){$[_]=1;const R=ie(N+(o/2>N?0:1),o,v,O-1,F-1),X=this.bidirectional&&_>w;this.push_index(a,X?w:_,R,n,t,X?_:w)}}}}}this.fastupdate||(this.register[n]=1)}}return this};function ie(n,e,t,s,o){return t&&1=this.minlength&&!m[b]){if(!this.optimize&&!a&&!this.map[b])return r;L[N++]=b,m[b]=1}n=L,s=n.length}if(!s)return r;e||(e=100);let u,v=this.depth&&1=t)))));b++);if(v)return o?qe(l,t,0):void(n[n.length]=l)}return!e&&l};function qe(n,e,t){return n=n.length===1?n[0]:Uo(n),t||n.length>e?n.slice(t,t+e):n}function Ge(n,e,t,s){if(t){const o=s&&e>t;n=n[o?e:t],n=n&&n[o?t:e]}else n=n[e];return n}q.prototype.contain=function(n){return!!this.register[n]},q.prototype.update=function(n,e){return this.remove(n).add(n,e)},q.prototype.remove=function(n,e){const t=this.register[n];if(t){if(this.fastupdate)for(let s,o=0;o{if(a.value){for(var B=m.value.search(a.value,{enrich:!0}),I=[],j=0;j!B||!B.length?[]:B.reduce((j,E)=>(j[I(E)]||(j[I(E)]=[]),j[I(E)].push(E),j),{}),R=()=>{setTimeout(()=>{l.value&&l.value.focus()},100),De(),o.value=!0};Q(async()=>{var E,D;const B=await vt(()=>import("./virtual_search-data.LxkiP9ls.js"),[]);u.value=B.default.INDEX_DATA,v.value=B.default.PREVIEW_LOOKUP,_.value=B.default.Options,r.value=window.location.origin+he(t.value==="root"?"/":t.value),L.value=((E=_.value)==null?void 0:E.buttonLabel)||L.value,b.value=((D=_.value)==null?void 0:D.placeholder)||b.value;var I=new q(_.value);I.import("reg",u.value.reg),I.import("cfg",u.value.cfg),I.import("map",u.value.map),I.import("ctx",u.value.ctx),m.value=I,s.value.innerHTML=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl";const j=U=>{var se;U.key==="k"&&(U.ctrlKey||U.metaKey)&&(U.preventDefault(),R()),U.key==="Escape"&&((se=a.value)==null?void 0:se.length)==0&&o.value&&(o.value=!1)};window.addEventListener("keydown",j)});const X=S(()=>F(O.value,B=>B.link.split("/").slice(0,-1).join("-"))),ne=S(()=>Object.values(X.value).flat().map(B=>B.id));function De(){o.value=!1,a.value=""}const at=B=>{var I,j;if(document.getElementsByClassName("search-group")[0]){if(B.key=="ArrowUp"||B.key=="ArrowDown"){const E=ne.value.indexOf($.value);if(B.key=="ArrowUp"){const D=E==0?ne.value.length-1:E-1;$.value=ne.value[D]}if(B.key=="ArrowDown"){const D=E>ne.value.length-2?0:E+1;$.value=ne.value[D]}if(E<5){const D=N.value.getElementsByClassName("VPPluginSearch-search-group")[0];D==null||D.scrollIntoView(!0)}else(I=document.getElementById(ne.value[$.value]))==null||I.scrollIntoView(!0);Ie()}B.key=="Enter"&&w.go(e.site.value.base+((j=N.value.getElementsByClassName("link-focused")[0].getAttribute("href"))==null?void 0:j.replace(r.value,"")))}};return(B,I)=>{const j=Z("ClientOnly");return i(),h("div",la,[y(j,null,{default:f(()=>[(i(),P(gt,{to:"body"},[Fe(d("div",{class:"VPPluginSearch-modal-back",onClick:I[2]||(I[2]=E=>o.value=!1),onKeydown:at},[d("div",{class:"VPPluginSearch-modal",onClick:I[1]||(I[1]=Xe(()=>{},["stop"])),ref_key:"modal",ref:N},[d("form",ca,[I[4]||(I[4]=d("label",{class:"DocSearch-MagnifierLabel",for:"docsearch-input",id:"docsearch-label"},[d("svg",{width:"20",height:"20",class:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},[d("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),Fe(d("input",{class:"DocSearch-Input","aria-autocomplete":"both","aria-labelledby":"docsearch-label",id:"docsearch-input",autocomplete:"off",autocorrect:"off",autocapitalize:"off",enterkeyhint:"search",spellcheck:"false",autofocus:"true","onUpdate:modelValue":I[0]||(I[0]=E=>a.value=E),placeholder:b.value,maxlength:"64",type:"search",ref_key:"input",ref:l},null,8,ua),[[_t,a.value]])]),d("div",da,[(i(!0),h(H,null,z(X.value,(E,D)=>(i(),h("div",{class:"search-group",key:D},[d("span",pa,C(D?D.toString()[0].toUpperCase()+D.toString().slice(1):"Home"),1),(i(!0),h(H,null,z(E,(U,se)=>(i(),h("a",{href:r.value+U.link,key:U.id,onClick:De,onMouseenter:re=>$.value=U.id,class:A({"link-focused":$.value==U.id}),id:se.toString()},[d("div",fa,[d("span",va,C(U.link.includes("#")?"#":"▤"),1),d("div",ma,[d("h3",null,C(U.title),1),d("p",null,[d("div",{innerHTML:U.preview},null,8,_a)])]),I[5]||(I[5]=d("span",{class:"VPPluginSearch-search-item-icon"},"↪",-1))])],42,ha))),128))]))),128))]),I[6]||(I[6]=d("img",{class:"VPPluginSearch-flex-logo",src:zo,alt:"flex logo"},null,-1))],512)],544),[[mt,o.value]])]))]),_:1}),d("div",{id:"docsearch",onClick:I[3]||(I[3]=E=>R())},[d("button",ga,[d("span",ka,[I[7]||(I[7]=d("svg",{width:"20",height:"20",class:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},[d("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),d("span",ba,C(L.value),1)]),d("span",$a,[d("span",{class:"DocSearch-Button-Key",ref_key:"metaKey",ref:s},"Meta",512),I[8]||(I[8]=d("span",{class:"DocSearch-Button-Key"},"K",-1))])])])])}}}),Pa=k({__name:"VPNavBarSocialLinks",setup(n){const{theme:e}=M();return(t,s)=>c(e).socialLinks?(i(),P(Oe,{key:0,class:"VPNavBarSocialLinks",links:c(e).socialLinks},null,8,["links"])):g("",!0)}}),La=V(Pa,[["__scopeId","data-v-08b35e6f"]]),Va=["href","rel","target"],Sa=["innerHTML"],Ta={key:2},wa=k({__name:"VPNavBarTitle",setup(n){const{site:e,theme:t}=M(),{hasSidebar:s}=x(),{currentLang:o}=ae(),a=S(()=>{var u;return typeof t.value.logoLink=="string"?t.value.logoLink:(u=t.value.logoLink)==null?void 0:u.link}),r=S(()=>{var u;return typeof t.value.logoLink=="string"||(u=t.value.logoLink)==null?void 0:u.rel}),l=S(()=>{var u;return typeof t.value.logoLink=="string"||(u=t.value.logoLink)==null?void 0:u.target});return(u,v)=>(i(),h("div",{class:A(["VPNavBarTitle",{"has-sidebar":c(s)}])},[d("a",{class:"title",href:a.value??c(Ce)(c(o).link),rel:r.value,target:l.value},[p(u.$slots,"nav-bar-title-before",{},void 0,!0),c(t).logo?(i(),P(ue,{key:0,class:"logo",image:c(t).logo},null,8,["image"])):g("",!0),c(t).siteTitle?(i(),h("span",{key:1,innerHTML:c(t).siteTitle},null,8,Sa)):c(t).siteTitle===void 0?(i(),h("span",Ta,C(c(e).title),1)):g("",!0),p(u.$slots,"nav-bar-title-after",{},void 0,!0)],8,Va)],2))}}),Ma=V(wa,[["__scopeId","data-v-5622a072"]]),Na={class:"items"},Ia={class:"title"},Ca=k({__name:"VPNavBarTranslations",setup(n){const{theme:e}=M(),{localeLinks:t,currentLang:s}=ae({correspondingLink:!0});return(o,a)=>c(t).length&&c(s).label?(i(),P(Ee,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:c(e).langMenuLabel||"Change language"},{default:f(()=>[d("div",Na,[d("p",Ia,C(c(s).label),1),(i(!0),h(H,null,z(c(t),r=>(i(),P(ke,{key:r.link,item:r},null,8,["item"]))),128))])]),_:1},8,["label"])):g("",!0)}}),Aa=V(Ca,[["__scopeId","data-v-dac637f3"]]),Ha={class:"wrapper"},Ba={class:"container"},Ea={class:"title"},Oa={class:"content"},Da={class:"content-body"},Fa=k({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(n){const e=n,{y:t}=xe(),{hasSidebar:s}=x(),{frontmatter:o}=M(),a=T({});return Ne(()=>{a.value={"has-sidebar":s.value,home:o.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(r,l)=>(i(),h("div",{class:A(["VPNavBar",a.value])},[d("div",Ha,[d("div",Ba,[d("div",Ea,[y(Ma,null,{"nav-bar-title-before":f(()=>[p(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(r.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Oa,[d("div",Da,[p(r.$slots,"nav-bar-content-before",{},void 0,!0),y(ya,{class:"search"}),y(Fo,{class:"menu"}),y(Aa,{class:"translations"}),y(Ks,{class:"appearance"}),y(La,{class:"social-links"}),y(Mo,{class:"extra"}),p(r.$slots,"nav-bar-content-after",{},void 0,!0),y(Co,{class:"hamburger",active:r.isScreenOpen,onClick:l[0]||(l[0]=u=>r.$emit("toggle-screen"))},null,8,["active"])])])])]),l[1]||(l[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),za=V(Fa,[["__scopeId","data-v-bb7529ee"]]),ja={key:0,class:"VPNavScreenAppearance"},Ua={class:"text"},qa=k({__name:"VPNavScreenAppearance",setup(n){const{site:e,theme:t}=M();return(s,o)=>c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",ja,[d("p",Ua,C(c(t).darkModeSwitchLabel||"Appearance"),1),y(He)])):g("",!0)}}),Ga=V(qa,[["__scopeId","data-v-774971f8"]]),Ra=["innerHTML"],Wa=k({__name:"VPNavScreenMenuLink",props:{item:{}},setup(n){const e=_e("close-screen");return(t,s)=>(i(),P(K,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:c(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ra)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ka=V(Wa,[["__scopeId","data-v-29871565"]]),Ja=["innerHTML"],xa=k({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(n){const e=_e("close-screen");return(t,s)=>(i(),P(K,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:c(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ja)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),ot=V(xa,[["__scopeId","data-v-581896e9"]]),Xa={class:"VPNavScreenMenuGroupSection"},Ya={key:0,class:"title"},Qa=k({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(n){return(e,t)=>(i(),h("div",Xa,[e.text?(i(),h("p",Ya,C(e.text),1)):g("",!0),(i(!0),h(H,null,z(e.items,s=>(i(),P(ot,{key:s.text,item:s},null,8,["item"]))),128))]))}}),Za=V(Qa,[["__scopeId","data-v-836cddb8"]]),er=["aria-controls","aria-expanded"],tr=["innerHTML"],nr=["id"],sr={key:0,class:"item"},or={key:1,class:"item"},ar={key:2,class:"group"},rr=k({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(n){const e=n,t=T(!1),s=S(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function o(){t.value=!t.value}return(a,r)=>(i(),h("div",{class:A(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:o},[d("span",{class:"button-text",innerHTML:a.text},null,8,tr),r[0]||(r[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,er),d("div",{id:s.value,class:"items"},[(i(!0),h(H,null,z(a.items,l=>(i(),h(H,{key:JSON.stringify(l)},["link"in l?(i(),h("div",sr,[y(ot,{item:l},null,8,["item"])])):"component"in l?(i(),h("div",or,[(i(),P(W(l.component),Y({ref_for:!0},l.props,{"screen-menu":""}),null,16))])):(i(),h("div",ar,[y(Za,{text:l.text,items:l.items},null,8,["text","items"])]))],64))),128))],8,nr)],2))}}),ir=V(rr,[["__scopeId","data-v-a8d3502a"]]),lr={key:0,class:"VPNavScreenMenu"},cr=k({__name:"VPNavScreenMenu",setup(n){const{theme:e}=M();return(t,s)=>c(e).nav?(i(),h("nav",lr,[(i(!0),h(H,null,z(c(e).nav,o=>(i(),h(H,{key:JSON.stringify(o)},["link"in o?(i(),P(Ka,{key:0,item:o},null,8,["item"])):"component"in o?(i(),P(W(o.component),Y({key:1,ref_for:!0},o.props,{"screen-menu":""}),null,16)):(i(),P(ir,{key:2,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):g("",!0)}}),ur=k({__name:"VPNavScreenSocialLinks",setup(n){const{theme:e}=M();return(t,s)=>c(e).socialLinks?(i(),P(Oe,{key:0,class:"VPNavScreenSocialLinks",links:c(e).socialLinks},null,8,["links"])):g("",!0)}}),dr={class:"list"},pr=k({__name:"VPNavScreenTranslations",setup(n){const{localeLinks:e,currentLang:t}=ae({correspondingLink:!0}),s=T(!1);function o(){s.value=!s.value}return(a,r)=>c(e).length&&c(t).label?(i(),h("div",{key:0,class:A(["VPNavScreenTranslations",{open:s.value}])},[d("button",{class:"title",onClick:o},[r[0]||(r[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),ee(" "+C(c(t).label)+" ",1),r[1]||(r[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",dr,[(i(!0),h(H,null,z(c(e),l=>(i(),h("li",{key:l.link,class:"item"},[y(K,{class:"link",href:l.link},{default:f(()=>[ee(C(l.text),1)]),_:2},1032,["href"])]))),128))])],2)):g("",!0)}}),hr=V(pr,[["__scopeId","data-v-0d43316b"]]),fr={class:"container"},vr=k({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(n){const e=T(null),t=Ye(ge?document.body:null);return(s,o)=>(i(),P(we,{name:"fade",onEnter:o[0]||(o[0]=a=>t.value=!0),onAfterLeave:o[1]||(o[1]=a=>t.value=!1)},{default:f(()=>[s.open?(i(),h("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",fr,[p(s.$slots,"nav-screen-content-before",{},void 0,!0),y(cr,{class:"menu"}),y(hr,{class:"translations"}),y(Ga,{class:"appearance"}),y(ur,{class:"social-links"}),p(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):g("",!0)]),_:3}))}}),mr=V(vr,[["__scopeId","data-v-34fa79a7"]]),_r={key:0,class:"VPNav"},gr=k({__name:"VPNav",setup(n){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=Os(),{frontmatter:o}=M(),a=S(()=>o.value.navbar!==!1);return Qe("close-screen",t),fe(()=>{ge&&document.documentElement.classList.toggle("hide-nav",!a.value)}),(r,l)=>a.value?(i(),h("header",_r,[y(za,{"is-screen-open":c(e),onToggleScreen:c(s)},{"nav-bar-title-before":f(()=>[p(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(r.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[p(r.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[p(r.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),y(mr,{open:c(e)},{"nav-screen-content-before":f(()=>[p(r.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[p(r.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):g("",!0)}}),kr=V(gr,[["__scopeId","data-v-a46e73f0"]]),br=["role","tabindex"],$r={key:1,class:"items"},yr=k({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(n){const e=n,{collapsed:t,collapsible:s,isLink:o,isActiveLink:a,hasActiveLink:r,hasChildren:l,toggle:u}=zt(S(()=>e.item)),v=S(()=>l.value?"section":"div"),_=S(()=>o.value?"a":"div"),m=S(()=>l.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),L=S(()=>o.value?void 0:"button"),b=S(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":o.value},{"is-active":a.value},{"has-active":r.value}]);function $(w){"key"in w&&w.key!=="Enter"||!e.item.link&&u()}function N(){e.item.link&&u()}return(w,O)=>{const F=Z("VPSidebarItem",!0);return i(),P(W(v.value),{class:A(["VPSidebarItem",b.value])},{default:f(()=>[w.item.text?(i(),h("div",Y({key:0,class:"item",role:L.value},kt(w.item.items?{click:$,keydown:$}:{},!0),{tabindex:w.item.items&&0}),[O[1]||(O[1]=d("div",{class:"indicator"},null,-1)),w.item.link?(i(),P(K,{key:0,tag:_.value,class:"link",href:w.item.link,rel:w.item.rel,target:w.item.target},{default:f(()=>[(i(),P(W(m.value),{class:"text",innerHTML:w.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(i(),P(W(m.value),{key:1,class:"text",innerHTML:w.item.text},null,8,["innerHTML"])),w.item.collapsed!=null&&w.item.items&&w.item.items.length?(i(),h("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:N,onKeydown:bt(N,["enter"]),tabindex:"0"},O[0]||(O[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):g("",!0)],16,br)):g("",!0),w.item.items&&w.item.items.length?(i(),h("div",$r,[w.depth<5?(i(!0),h(H,{key:0},z(w.item.items,R=>(i(),P(F,{key:R.text,item:R,depth:w.depth+1},null,8,["item","depth"]))),128)):g("",!0)])):g("",!0)]),_:1},8,["class"])}}}),Pr=V(yr,[["__scopeId","data-v-2e0476bc"]]),Lr=k({__name:"VPSidebarGroup",props:{items:{}},setup(n){const e=T(!0);let t=null;return Q(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),$t(()=>{t!=null&&(clearTimeout(t),t=null)}),(s,o)=>(i(!0),h(H,null,z(s.items,a=>(i(),h("div",{key:a.text,class:A(["group",{"no-transition":e.value}])},[y(Pr,{item:a,depth:0},null,8,["item"])],2))),128))}}),Vr=V(Lr,[["__scopeId","data-v-ec086cd5"]]),Sr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Tr=k({__name:"VPSidebar",props:{open:{type:Boolean}},setup(n){const{sidebarGroups:e,hasSidebar:t}=x(),s=n,o=T(null),a=Ye(ge?document.body:null);J([s,o],()=>{var l;s.open?(a.value=!0,(l=o.value)==null||l.focus()):a.value=!1},{immediate:!0,flush:"post"});const r=T(0);return J(e,()=>{r.value+=1},{deep:!0}),(l,u)=>c(t)?(i(),h("aside",{key:0,class:A(["VPSidebar",{open:l.open}]),ref_key:"navEl",ref:o,onClick:u[0]||(u[0]=Xe(()=>{},["stop"]))},[u[2]||(u[2]=d("div",{class:"curtain"},null,-1)),d("nav",Sr,[u[1]||(u[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),p(l.$slots,"sidebar-nav-before",{},void 0,!0),(i(),P(Vr,{items:c(e),key:r.value},null,8,["items"])),p(l.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):g("",!0)}}),wr=V(Tr,[["__scopeId","data-v-12a40e3d"]]),Mr=k({__name:"VPSkipLink",setup(n){const{theme:e}=M(),t=me(),s=T();J(()=>t.path,()=>s.value.focus());function o({target:a}){const r=document.getElementById(decodeURIComponent(a.hash).slice(1));if(r){const l=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",l)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",l),r.focus(),window.scrollTo(0,0)}}return(a,r)=>(i(),h(H,null,[d("span",{ref_key:"backToTop",ref:s,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o},C(c(e).skipToContentLabel||"Skip to content"),1)],64))}}),Nr=V(Mr,[["__scopeId","data-v-17ad389b"]]),Ir=k({__name:"Layout",setup(n){const{isOpen:e,open:t,close:s}=x(),o=me();J(()=>o.path,s),Ft(e,s);const{frontmatter:a}=M(),r=yt(),l=S(()=>!!r["home-hero-image"]);return Qe("hero-image-slot-exists",l),(u,v)=>{const _=Z("Content");return c(a).layout!==!1?(i(),h("div",{key:0,class:A(["Layout",c(a).pageClass])},[p(u.$slots,"layout-top",{},void 0,!0),y(Nr),y(St,{class:"backdrop",show:c(e),onClick:c(s)},null,8,["show","onClick"]),y(kr,null,{"nav-bar-title-before":f(()=>[p(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[p(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[p(u.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":f(()=>[p(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[p(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),y(Es,{open:c(e),onOpenMenu:c(t)},null,8,["open","onOpenMenu"]),y(wr,{open:c(e)},{"sidebar-nav-before":f(()=>[p(u.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":f(()=>[p(u.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),y(bs,null,{"page-top":f(()=>[p(u.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[p(u.$slots,"page-bottom",{},void 0,!0)]),"not-found":f(()=>[p(u.$slots,"not-found",{},void 0,!0)]),"home-hero-before":f(()=>[p(u.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[p(u.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(u.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(u.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(u.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(u.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[p(u.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[p(u.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[p(u.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":f(()=>[p(u.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[p(u.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[p(u.$slots,"doc-after",{},void 0,!0)]),"doc-top":f(()=>[p(u.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[p(u.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":f(()=>[p(u.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[p(u.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[p(u.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(u.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(u.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(u.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),y(Vs),p(u.$slots,"layout-bottom",{},void 0,!0)],2)):(i(),P(_,{key:1}))}}}),Cr=V(Ir,[["__scopeId","data-v-c4daae71"]]),Hr={Layout:Cr,enhanceApp:({app:n})=>{n.component("Badge",Pt)}};export{Hr as t}; +import{d as k,c as h,r as p,n as A,o as i,a as ee,t as C,b as P,w as f,T as we,e as g,_ as V,u as Re,i as it,f as lt,g as he,h as S,j as d,k as c,l as te,m as Pe,p as T,q as J,s as fe,v as Q,x as Me,y as Ne,z as ct,A as ut,F as H,B as z,C as Z,D as We,E as ve,G as y,H as W,I as Ke,J as me,K as Y,L as _e,M as dt,N as Je,O as pt,P as Ie,Q as xe,R as ge,S as ht,U as ft,V as vt,W as Fe,X as mt,Y as Xe,Z as _t,$ as gt,a0 as Ye,a1 as Qe,a2 as kt,a3 as bt,a4 as $t,a5 as yt}from"./framework.xxfEszSJ.js";const Pt=k({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(n){return(e,t)=>(i(),h("span",{class:A(["VPBadge",e.type])},[p(e.$slots,"default",{},()=>[ee(C(e.text),1)])],2))}}),Lt={key:0,class:"VPBackdrop"},Vt=k({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(n){return(e,t)=>(i(),P(we,{name:"fade"},{default:f(()=>[e.show?(i(),h("div",Lt)):g("",!0)]),_:1}))}}),St=V(Vt,[["__scopeId","data-v-b2600058"]]),M=Re;function Tt(n,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(n,e):(n(),(s=!0)&&setTimeout(()=>s=!1,e))}}function Le(n){return n.startsWith("/")?n:`/${n}`}function Ce(n){const{pathname:e,search:t,hash:s,protocol:o}=new URL(n,"http://a.com");if(it(n)||n.startsWith("#")||!o.startsWith("http")||!lt(e))return n;const{site:a}=M(),r=e.endsWith("/")||e.endsWith(".html")?n:n.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${t}${s}`);return he(r)}function ae({correspondingLink:n=!1}={}){const{site:e,localeIndex:t,page:s,theme:o,hash:a}=M(),r=S(()=>{var u,v;return{label:(u=e.value.locales[t.value])==null?void 0:u.label,link:((v=e.value.locales[t.value])==null?void 0:v.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:S(()=>Object.entries(e.value.locales).flatMap(([u,v])=>r.value.label===v.label?[]:{text:v.label,link:wt(v.link||(u==="root"?"/":`/${u}/`),o.value.i18nRouting!==!1&&n,s.value.relativePath.slice(r.value.link.length-1),!e.value.cleanUrls)+a.value})),currentLang:r}}function wt(n,e,t,s){return e?n.replace(/\/$/,"")+Le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):n}const Mt={class:"NotFound"},Nt={class:"code"},It={class:"title"},Ct={class:"quote"},At={class:"action"},Ht=["href","aria-label"],Bt=k({__name:"NotFound",setup(n){const{theme:e}=M(),{currentLang:t}=ae();return(s,o)=>{var a,r,l,u,v;return i(),h("div",Mt,[d("p",Nt,C(((a=c(e).notFound)==null?void 0:a.code)??"404"),1),d("h1",It,C(((r=c(e).notFound)==null?void 0:r.title)??"PAGE NOT FOUND"),1),o[0]||(o[0]=d("div",{class:"divider"},null,-1)),d("blockquote",Ct,C(((l=c(e).notFound)==null?void 0:l.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",At,[d("a",{class:"link",href:c(he)(c(t).link),"aria-label":((u=c(e).notFound)==null?void 0:u.linkLabel)??"go to home"},C(((v=c(e).notFound)==null?void 0:v.linkText)??"Take me home"),9,Ht)])])}}}),Et=V(Bt,[["__scopeId","data-v-93fd8736"]]);function Ze(n,e){if(Array.isArray(n))return le(n);if(n==null)return[];e=Le(e);const t=Object.keys(n).sort((o,a)=>a.split("/").length-o.split("/").length).find(o=>e.startsWith(Le(o))),s=t?n[t]:[];return Array.isArray(s)?le(s):le(s.items,s.base)}function Ot(n){const e=[];let t=0;for(const s in n){const o=n[s];if(o.items){t=e.push(o);continue}e[t]||e.push({items:[]}),e[t].items.push(o)}return e}function Dt(n){const e=[];function t(s){for(const o of s)o.text&&o.link&&e.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&t(o.items)}return t(n),e}function Ve(n,e){return Array.isArray(e)?e.some(t=>Ve(n,t)):te(n,e.link)?!0:e.items?Ve(n,e.items):!1}function le(n,e){return[...n].map(t=>{const s={...t},o=s.base||e;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=le(s.items,o)),s})}function x(){const{frontmatter:n,page:e,theme:t}=M(),s=Pe("(min-width: 960px)"),o=T(!1),a=S(()=>{const N=t.value.sidebar,w=e.value.relativePath;return N?Ze(N,w):[]}),r=T(a.value);J(a,(N,w)=>{JSON.stringify(N)!==JSON.stringify(w)&&(r.value=a.value)});const l=S(()=>n.value.sidebar!==!1&&r.value.length>0&&n.value.layout!=="home"),u=S(()=>v?n.value.aside==null?t.value.aside==="left":n.value.aside==="left":!1),v=S(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),_=S(()=>l.value&&s.value),m=S(()=>l.value?Ot(r.value):[]);function L(){o.value=!0}function b(){o.value=!1}function $(){o.value?b():L()}return{isOpen:o,sidebar:r,sidebarGroups:m,hasSidebar:l,hasAside:v,leftAside:u,isSidebarEnabled:_,open:L,close:b,toggle:$}}function Ft(n,e){let t;fe(()=>{t=n.value?document.activeElement:void 0}),Q(()=>{window.addEventListener("keyup",s)}),Me(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&n.value&&(e(),t==null||t.focus())}}function zt(n){const{page:e,hash:t}=M(),s=T(!1),o=S(()=>n.value.collapsed!=null),a=S(()=>!!n.value.link),r=T(!1),l=()=>{r.value=te(e.value.relativePath,n.value.link)};J([e,n,t],l),Q(l);const u=S(()=>r.value?!0:n.value.items?Ve(e.value.relativePath,n.value.items):!1),v=S(()=>!!(n.value.items&&n.value.items.length));fe(()=>{s.value=!!(o.value&&n.value.collapsed)}),Ne(()=>{(r.value||u.value)&&(s.value=!1)});function _(){o.value&&(s.value=!s.value)}return{collapsed:s,collapsible:o,isLink:a,isActiveLink:r,hasActiveLink:u,hasChildren:v,toggle:_}}function jt(){const{hasSidebar:n}=x(),e=Pe("(min-width: 960px)"),t=Pe("(min-width: 1280px)");return{isAsideEnabled:S(()=>!t.value&&!e.value?!1:n.value?t.value:e.value)}}const Ut=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,Se=[];function et(n){return typeof n.outline=="object"&&!Array.isArray(n.outline)&&n.outline.label||n.outlineTitle||"On this page"}function Ae(n){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:qt(t),link:"#"+t.id,level:s}});return Gt(e,n)}function qt(n){let e="";for(const t of n.childNodes)if(t.nodeType===1){if(Ut.test(t.className))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Gt(n,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,o]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return Kt(n,s,o)}function Rt(n,e){const{isAsideEnabled:t}=jt(),s=Tt(a,100);let o=null;Q(()=>{requestAnimationFrame(a),window.addEventListener("scroll",s)}),ct(()=>{r(location.hash)}),Me(()=>{window.removeEventListener("scroll",s)});function a(){if(!t.value)return;const l=window.scrollY,u=window.innerHeight,v=document.body.offsetHeight,_=Math.abs(l+u-v)<1,m=Se.map(({element:b,link:$})=>({link:$,top:Wt(b)})).filter(({top:b})=>!Number.isNaN(b)).sort((b,$)=>b.top-$.top);if(!m.length){r(null);return}if(l<1){r(null);return}if(_){r(m[m.length-1].link);return}let L=null;for(const{link:b,top:$}of m){if($>l+ut()+4)break;L=b}r(L)}function r(l){o&&o.classList.remove("active"),l==null?o=null:o=n.value.querySelector(`a[href="${decodeURIComponent(l)}"]`);const u=o;u?(u.classList.add("active"),e.value.style.top=u.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Wt(n){let e=0;for(;n!==document.body;){if(n===null)return NaN;e+=n.offsetTop,n=n.offsetParent}return e}function Kt(n,e,t){Se.length=0;const s=[],o=[];return n.forEach(a=>{const r={...a,children:[]};let l=o[o.length-1];for(;l&&l.level>=r.level;)o.pop(),l=o[o.length-1];if(r.element.classList.contains("ignore-header")||l&&"shouldIgnore"in l){o.push({level:r.level,shouldIgnore:!0});return}r.level>t||r.level{const o=Z("VPDocOutlineItem",!0);return i(),h("ul",{class:A(["VPDocOutlineItem",t.root?"root":"nested"])},[(i(!0),h(H,null,z(t.headers,({children:a,link:r,title:l})=>(i(),h("li",null,[d("a",{class:"outline-link",href:r,onClick:e,title:l},C(l),9,Jt),a!=null&&a.length?(i(),P(o,{key:0,headers:a},null,8,["headers"])):g("",!0)]))),256))],2)}}}),tt=V(xt,[["__scopeId","data-v-da421f78"]]),Xt={class:"content"},Yt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Qt=k({__name:"VPDocAsideOutline",setup(n){const{frontmatter:e,theme:t}=M(),s=We([]);ve(()=>{s.value=Ae(e.value.outline??t.value.outline)});const o=T(),a=T();return Rt(o,a),(r,l)=>(i(),h("nav",{"aria-labelledby":"doc-outline-aria-label",class:A(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:o},[d("div",Xt,[d("div",{class:"outline-marker",ref_key:"marker",ref:a},null,512),d("div",Yt,C(c(et)(c(t))),1),y(tt,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),Zt=V(Qt,[["__scopeId","data-v-dfbd9fb8"]]),en={class:"VPDocAsideCarbonAds"},tn=k({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(n){const e=()=>null;return(t,s)=>(i(),h("div",en,[y(c(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),nn={class:"VPDocAside"},sn=k({__name:"VPDocAside",setup(n){const{theme:e}=M();return(t,s)=>(i(),h("div",nn,[p(t.$slots,"aside-top",{},void 0,!0),p(t.$slots,"aside-outline-before",{},void 0,!0),y(Zt),p(t.$slots,"aside-outline-after",{},void 0,!0),s[0]||(s[0]=d("div",{class:"spacer"},null,-1)),p(t.$slots,"aside-ads-before",{},void 0,!0),c(e).carbonAds?(i(),P(tn,{key:0,"carbon-ads":c(e).carbonAds},null,8,["carbon-ads"])):g("",!0),p(t.$slots,"aside-ads-after",{},void 0,!0),p(t.$slots,"aside-bottom",{},void 0,!0)]))}}),on=V(sn,[["__scopeId","data-v-79cae1a0"]]);function an(){const{theme:n,page:e}=M();return S(()=>{const{text:t="Edit this page",pattern:s=""}=n.value.editLink||{};let o;return typeof s=="function"?o=s(e.value):o=s.replace(/:path/g,e.value.filePath),{url:o,text:t}})}function rn(){const{page:n,theme:e,frontmatter:t}=M();return S(()=>{var v,_,m,L,b,$,N,w;const s=Ze(e.value.sidebar,n.value.relativePath),o=Dt(s),a=ln(o,O=>O.link.replace(/[?#].*$/,"")),r=a.findIndex(O=>te(n.value.relativePath,O.link)),l=((v=e.value.docFooter)==null?void 0:v.prev)===!1&&!t.value.prev||t.value.prev===!1,u=((_=e.value.docFooter)==null?void 0:_.next)===!1&&!t.value.next||t.value.next===!1;return{prev:l?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((m=a[r-1])==null?void 0:m.docFooterText)??((L=a[r-1])==null?void 0:L.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((b=a[r-1])==null?void 0:b.link)},next:u?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??(($=a[r+1])==null?void 0:$.docFooterText)??((N=a[r+1])==null?void 0:N.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((w=a[r+1])==null?void 0:w.link)}}})}function ln(n,e){const t=new Set;return n.filter(s=>{const o=e(s);return t.has(o)?!1:t.add(o)})}const K=k({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(n){const e=n,t=S(()=>e.tag??(e.href?"a":"span")),s=S(()=>e.href&&Ke.test(e.href)||e.target==="_blank");return(o,a)=>(i(),P(W(t.value),{class:A(["VPLink",{link:o.href,"vp-external-link-icon":s.value,"no-icon":o.noIcon}]),href:o.href?c(Ce)(o.href):void 0,target:o.target??(s.value?"_blank":void 0),rel:o.rel??(s.value?"noreferrer":void 0)},{default:f(()=>[p(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),cn={class:"VPLastUpdated"},un=["datetime"],dn=k({__name:"VPDocFooterLastUpdated",setup(n){const{theme:e,page:t,lang:s}=M(),o=S(()=>new Date(t.value.lastUpdated)),a=S(()=>o.value.toISOString()),r=T("");return Q(()=>{fe(()=>{var l,u,v;r.value=new Intl.DateTimeFormat((u=(l=e.value.lastUpdated)==null?void 0:l.formatOptions)!=null&&u.forceLocale?s.value:void 0,((v=e.value.lastUpdated)==null?void 0:v.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(o.value)})}),(l,u)=>{var v;return i(),h("p",cn,[ee(C(((v=c(e).lastUpdated)==null?void 0:v.text)||c(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:a.value},C(r.value),9,un)])}}}),pn=V(dn,[["__scopeId","data-v-e95db471"]]),hn={key:0,class:"VPDocFooter"},fn={key:0,class:"edit-info"},vn={key:0,class:"edit-link"},mn={key:1,class:"last-updated"},_n={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},gn={class:"pager"},kn=["innerHTML"],bn=["innerHTML"],$n={class:"pager"},yn=["innerHTML"],Pn=["innerHTML"],Ln=k({__name:"VPDocFooter",setup(n){const{theme:e,page:t,frontmatter:s}=M(),o=an(),a=rn(),r=S(()=>e.value.editLink&&s.value.editLink!==!1),l=S(()=>t.value.lastUpdated),u=S(()=>r.value||l.value||a.value.prev||a.value.next);return(v,_)=>{var m,L,b,$;return u.value?(i(),h("footer",hn,[p(v.$slots,"doc-footer-before",{},void 0,!0),r.value||l.value?(i(),h("div",fn,[r.value?(i(),h("div",vn,[y(K,{class:"edit-link-button",href:c(o).url,"no-icon":!0},{default:f(()=>[_[0]||(_[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),ee(" "+C(c(o).text),1)]),_:1},8,["href"])])):g("",!0),l.value?(i(),h("div",mn,[y(pn)])):g("",!0)])):g("",!0),(m=c(a).prev)!=null&&m.link||(L=c(a).next)!=null&&L.link?(i(),h("nav",_n,[_[1]||(_[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",gn,[(b=c(a).prev)!=null&&b.link?(i(),P(K,{key:0,class:"pager-link prev",href:c(a).prev.link},{default:f(()=>{var N;return[d("span",{class:"desc",innerHTML:((N=c(e).docFooter)==null?void 0:N.prev)||"Previous page"},null,8,kn),d("span",{class:"title",innerHTML:c(a).prev.text},null,8,bn)]}),_:1},8,["href"])):g("",!0)]),d("div",$n,[($=c(a).next)!=null&&$.link?(i(),P(K,{key:0,class:"pager-link next",href:c(a).next.link},{default:f(()=>{var N;return[d("span",{class:"desc",innerHTML:((N=c(e).docFooter)==null?void 0:N.next)||"Next page"},null,8,yn),d("span",{class:"title",innerHTML:c(a).next.text},null,8,Pn)]}),_:1},8,["href"])):g("",!0)])])):g("",!0)])):g("",!0)}}}),Vn=V(Ln,[["__scopeId","data-v-07d71ff1"]]),Sn={class:"container"},Tn={class:"aside-container"},wn={class:"aside-content"},Mn={class:"content"},Nn={class:"content-container"},In={class:"main"},Cn=k({__name:"VPDoc",setup(n){const{theme:e}=M(),t=me(),{hasSidebar:s,hasAside:o,leftAside:a}=x(),r=S(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(l,u)=>{const v=Z("Content");return i(),h("div",{class:A(["VPDoc",{"has-sidebar":c(s),"has-aside":c(o)}])},[p(l.$slots,"doc-top",{},void 0,!0),d("div",Sn,[c(o)?(i(),h("div",{key:0,class:A(["aside",{"left-aside":c(a)}])},[u[0]||(u[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Tn,[d("div",wn,[y(on,null,{"aside-top":f(()=>[p(l.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[p(l.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[p(l.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(l.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(l.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(l.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):g("",!0),d("div",Mn,[d("div",Nn,[p(l.$slots,"doc-before",{},void 0,!0),d("main",In,[y(v,{class:A(["vp-doc",[r.value,c(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),y(Vn,null,{"doc-footer-before":f(()=>[p(l.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),p(l.$slots,"doc-after",{},void 0,!0)])])]),p(l.$slots,"doc-bottom",{},void 0,!0)],2)}}}),An=V(Cn,[["__scopeId","data-v-ef3a4dda"]]),Hn=k({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(n){const e=n,t=S(()=>e.href&&Ke.test(e.href)),s=S(()=>e.tag||(e.href?"a":"button"));return(o,a)=>(i(),P(W(s.value),{class:A(["VPButton",[o.size,o.theme]]),href:o.href?c(Ce)(o.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:f(()=>[ee(C(o.text),1)]),_:1},8,["class","href","target","rel"]))}}),Bn=V(Hn,[["__scopeId","data-v-b20c43c2"]]),En=["src","alt"],On=k({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(n){return(e,t)=>{const s=Z("VPImage",!0);return e.image?(i(),h(H,{key:0},[typeof e.image=="string"||"src"in e.image?(i(),h("img",Y({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:c(he)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,En)):(i(),h(H,{key:1},[y(s,Y({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),y(s,Y({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):g("",!0)}}}),ue=V(On,[["__scopeId","data-v-4d414b82"]]),Dn={class:"container"},Fn={class:"main"},zn={class:"heading"},jn=["innerHTML"],Un=["innerHTML"],qn=["innerHTML"],Gn={key:0,class:"actions"},Rn={key:0,class:"image"},Wn={class:"image-container"},Kn=k({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(n){const e=_e("hero-image-slot-exists");return(t,s)=>(i(),h("div",{class:A(["VPHero",{"has-image":t.image||c(e)}])},[d("div",Dn,[d("div",Fn,[p(t.$slots,"home-hero-info-before",{},void 0,!0),p(t.$slots,"home-hero-info",{},()=>[d("h1",zn,[t.name?(i(),h("span",{key:0,innerHTML:t.name,class:"name clip"},null,8,jn)):g("",!0),t.text?(i(),h("span",{key:1,innerHTML:t.text,class:"text"},null,8,Un)):g("",!0)]),t.tagline?(i(),h("p",{key:0,innerHTML:t.tagline,class:"tagline"},null,8,qn)):g("",!0)],!0),p(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(i(),h("div",Gn,[(i(!0),h(H,null,z(t.actions,o=>(i(),h("div",{key:o.link,class:"action"},[y(Bn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):g("",!0),p(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||c(e)?(i(),h("div",Rn,[d("div",Wn,[s[0]||(s[0]=d("div",{class:"image-bg"},null,-1)),p(t.$slots,"home-hero-image",{},()=>[t.image?(i(),P(ue,{key:0,class:"image-src",image:t.image},null,8,["image"])):g("",!0)],!0)])])):g("",!0)])],2))}}),Jn=V(Kn,[["__scopeId","data-v-d266baba"]]),xn=k({__name:"VPHomeHero",setup(n){const{frontmatter:e}=M();return(t,s)=>c(e).hero?(i(),P(Jn,{key:0,class:"VPHomeHero",name:c(e).hero.name,text:c(e).hero.text,tagline:c(e).hero.tagline,image:c(e).hero.image,actions:c(e).hero.actions},{"home-hero-info-before":f(()=>[p(t.$slots,"home-hero-info-before")]),"home-hero-info":f(()=>[p(t.$slots,"home-hero-info")]),"home-hero-info-after":f(()=>[p(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":f(()=>[p(t.$slots,"home-hero-actions-after")]),"home-hero-image":f(()=>[p(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):g("",!0)}}),Xn={class:"box"},Yn={key:0,class:"icon"},Qn=["innerHTML"],Zn=["innerHTML"],es=["innerHTML"],ts={key:4,class:"link-text"},ns={class:"link-text-value"},ss=k({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(n){return(e,t)=>(i(),P(K,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:f(()=>[d("article",Xn,[typeof e.icon=="object"&&e.icon.wrap?(i(),h("div",Yn,[y(ue,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(i(),P(ue,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(i(),h("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Qn)):g("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Zn),e.details?(i(),h("p",{key:3,class:"details",innerHTML:e.details},null,8,es)):g("",!0),e.linkText?(i(),h("div",ts,[d("p",ns,[ee(C(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):g("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),os=V(ss,[["__scopeId","data-v-95001937"]]),as={key:0,class:"VPFeatures"},rs={class:"container"},is={class:"items"},ls=k({__name:"VPFeatures",props:{features:{}},setup(n){const e=n,t=S(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,o)=>s.features?(i(),h("div",as,[d("div",rs,[d("div",is,[(i(!0),h(H,null,z(s.features,a=>(i(),h("div",{key:a.title,class:A(["item",[t.value]])},[y(os,{icon:a.icon,title:a.title,details:a.details,link:a.link,"link-text":a.linkText,rel:a.rel,target:a.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):g("",!0)}}),cs=V(ls,[["__scopeId","data-v-1da4ff3d"]]),us=k({__name:"VPHomeFeatures",setup(n){const{frontmatter:e}=M();return(t,s)=>c(e).features?(i(),P(cs,{key:0,class:"VPHomeFeatures",features:c(e).features},null,8,["features"])):g("",!0)}}),ds=k({__name:"VPHomeContent",setup(n){const{width:e}=dt({initialWidth:0,includeScrollbar:!1});return(t,s)=>(i(),h("div",{class:"vp-doc container",style:Je(c(e)?{"--vp-offset":`calc(50% - ${c(e)/2}px)`}:{})},[p(t.$slots,"default",{},void 0,!0)],4))}}),ps=V(ds,[["__scopeId","data-v-2498cc33"]]),hs=k({__name:"VPHome",setup(n){const{frontmatter:e,theme:t}=M();return(s,o)=>{const a=Z("Content");return i(),h("div",{class:A(["VPHome",{"external-link-icon-enabled":c(t).externalLinkIcon}])},[p(s.$slots,"home-hero-before",{},void 0,!0),y(xn,null,{"home-hero-info-before":f(()=>[p(s.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(s.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(s.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(s.$slots,"home-hero-image",{},void 0,!0)]),_:3}),p(s.$slots,"home-hero-after",{},void 0,!0),p(s.$slots,"home-features-before",{},void 0,!0),y(us),p(s.$slots,"home-features-after",{},void 0,!0),c(e).markdownStyles!==!1?(i(),P(ps,{key:0},{default:f(()=>[y(a)]),_:1})):(i(),P(a,{key:1}))],2)}}}),fs=V(hs,[["__scopeId","data-v-8b59c434"]]),vs={},ms={class:"VPPage"};function _s(n,e){const t=Z("Content");return i(),h("div",ms,[p(n.$slots,"page-top"),y(t),p(n.$slots,"page-bottom")])}const gs=V(vs,[["render",_s]]),ks=k({__name:"VPContent",setup(n){const{page:e,frontmatter:t}=M(),{hasSidebar:s}=x();return(o,a)=>(i(),h("div",{class:A(["VPContent",{"has-sidebar":c(s),"is-home":c(t).layout==="home"}]),id:"VPContent"},[c(e).isNotFound?p(o.$slots,"not-found",{key:0},()=>[y(Et)],!0):c(t).layout==="page"?(i(),P(gs,{key:1},{"page-top":f(()=>[p(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[p(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):c(t).layout==="home"?(i(),P(fs,{key:2},{"home-hero-before":f(()=>[p(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[p(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[p(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[p(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[p(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):c(t).layout&&c(t).layout!=="doc"?(i(),P(W(c(t).layout),{key:3})):(i(),P(An,{key:4},{"doc-top":f(()=>[p(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[p(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":f(()=>[p(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[p(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[p(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":f(()=>[p(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":f(()=>[p(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":f(()=>[p(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),bs=V(ks,[["__scopeId","data-v-d2aef184"]]),$s={class:"container"},ys=["innerHTML"],Ps=["innerHTML"],Ls=k({__name:"VPFooter",setup(n){const{theme:e,frontmatter:t}=M(),{hasSidebar:s}=x();return(o,a)=>c(e).footer&&c(t).footer!==!1?(i(),h("footer",{key:0,class:A(["VPFooter",{"has-sidebar":c(s)}])},[d("div",$s,[c(e).footer.message?(i(),h("p",{key:0,class:"message",innerHTML:c(e).footer.message},null,8,ys)):g("",!0),c(e).footer.copyright?(i(),h("p",{key:1,class:"copyright",innerHTML:c(e).footer.copyright},null,8,Ps)):g("",!0)])],2)):g("",!0)}}),Vs=V(Ls,[["__scopeId","data-v-e3157d6d"]]);function Ss(){const{theme:n,frontmatter:e}=M(),t=We([]),s=S(()=>t.value.length>0);return ve(()=>{t.value=Ae(e.value.outline??n.value.outline)}),{headers:t,hasLocalNav:s}}const Ts={class:"menu-text"},ws={class:"header"},Ms={class:"outline"},Ns=k({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(n){const e=n,{theme:t}=M(),s=T(!1),o=T(0),a=T(),r=T();function l(m){var L;(L=a.value)!=null&&L.contains(m.target)||(s.value=!1)}J(s,m=>{if(m){document.addEventListener("click",l);return}document.removeEventListener("click",l)}),pt("Escape",()=>{s.value=!1}),ve(()=>{s.value=!1});function u(){s.value=!s.value,o.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function v(m){m.target.classList.contains("outline-link")&&(r.value&&(r.value.style.transition="none"),Ie(()=>{s.value=!1}))}function _(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(m,L)=>(i(),h("div",{class:"VPLocalNavOutlineDropdown",style:Je({"--vp-vh":o.value+"px"}),ref_key:"main",ref:a},[m.headers.length>0?(i(),h("button",{key:0,onClick:u,class:A({open:s.value})},[d("span",Ts,C(c(et)(c(t))),1),L[0]||(L[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(i(),h("button",{key:1,onClick:_},C(c(t).returnToTopLabel||"Return to top"),1)),y(we,{name:"flyout"},{default:f(()=>[s.value?(i(),h("div",{key:0,ref_key:"items",ref:r,class:"items",onClick:v},[d("div",ws,[d("a",{class:"top-link",href:"#",onClick:_},C(c(t).returnToTopLabel||"Return to top"),1)]),d("div",Ms,[y(tt,{headers:m.headers},null,8,["headers"])])],512)):g("",!0)]),_:1})],4))}}),Is=V(Ns,[["__scopeId","data-v-d61422fe"]]),Cs={class:"container"},As=["aria-expanded"],Hs={class:"menu-text"},Bs=k({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(n){const{theme:e,frontmatter:t}=M(),{hasSidebar:s}=x(),{headers:o}=Ss(),{y:a}=xe(),r=T(0);Q(()=>{r.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),ve(()=>{o.value=Ae(t.value.outline??e.value.outline)});const l=S(()=>o.value.length===0),u=S(()=>l.value&&!s.value),v=S(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:l.value,fixed:u.value}));return(_,m)=>c(t).layout!=="home"&&(!u.value||c(a)>=r.value)?(i(),h("div",{key:0,class:A(v.value)},[d("div",Cs,[c(s)?(i(),h("button",{key:0,class:"menu","aria-expanded":_.open,"aria-controls":"VPSidebarNav",onClick:m[0]||(m[0]=L=>_.$emit("open-menu"))},[m[1]||(m[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",Hs,C(c(e).sidebarMenuLabel||"Menu"),1)],8,As)):g("",!0),y(Is,{headers:c(o),navHeight:r.value},null,8,["headers","navHeight"])])],2)):g("",!0)}}),Es=V(Bs,[["__scopeId","data-v-9d8129cc"]]);function Os(){const n=T(!1);function e(){n.value=!0,window.addEventListener("resize",o)}function t(){n.value=!1,window.removeEventListener("resize",o)}function s(){n.value?t():e()}function o(){window.outerWidth>=768&&t()}const a=me();return J(()=>a.path,t),{isScreenOpen:n,openScreen:e,closeScreen:t,toggleScreen:s}}const Ds={},Fs={class:"VPSwitch",type:"button",role:"switch"},zs={class:"check"},js={key:0,class:"icon"};function Us(n,e){return i(),h("button",Fs,[d("span",zs,[n.$slots.default?(i(),h("span",js,[p(n.$slots,"default",{},void 0,!0)])):g("",!0)])])}const qs=V(Ds,[["render",Us],["__scopeId","data-v-7012e5dd"]]),Gs=k({__name:"VPSwitchAppearance",setup(n){const{isDark:e,theme:t}=M(),s=_e("toggle-appearance",()=>{e.value=!e.value}),o=T("");return Ne(()=>{o.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(a,r)=>(i(),P(qs,{title:o.value,class:"VPSwitchAppearance","aria-checked":c(e),onClick:c(s)},{default:f(()=>r[0]||(r[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1},8,["title","aria-checked","onClick"]))}}),He=V(Gs,[["__scopeId","data-v-fa1daf57"]]),Rs={key:0,class:"VPNavBarAppearance"},Ws=k({__name:"VPNavBarAppearance",setup(n){const{site:e}=M();return(t,s)=>c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",Rs,[y(He)])):g("",!0)}}),Ks=V(Ws,[["__scopeId","data-v-123fcb2f"]]),Be=T();let nt=!1,be=0;function Js(n){const e=T(!1);if(ge){!nt&&xs(),be++;const t=J(Be,s=>{var o,a,r;s===n.el.value||(o=n.el.value)!=null&&o.contains(s)?(e.value=!0,(a=n.onFocus)==null||a.call(n)):(e.value=!1,(r=n.onBlur)==null||r.call(n))});Me(()=>{t(),be--,be||Xs()})}return ht(e)}function xs(){document.addEventListener("focusin",st),nt=!0,Be.value=document.activeElement}function Xs(){document.removeEventListener("focusin",st)}function st(){Be.value=document.activeElement}const Ys={class:"VPMenuLink"},Qs=["innerHTML"],Zs=k({__name:"VPMenuLink",props:{item:{}},setup(n){const{page:e}=M();return(t,s)=>(i(),h("div",Ys,[y(K,{class:A({active:c(te)(c(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Qs)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),ke=V(Zs,[["__scopeId","data-v-65e4a6b1"]]),eo={class:"VPMenuGroup"},to={key:0,class:"title"},no=k({__name:"VPMenuGroup",props:{text:{},items:{}},setup(n){return(e,t)=>(i(),h("div",eo,[e.text?(i(),h("p",to,C(e.text),1)):g("",!0),(i(!0),h(H,null,z(e.items,s=>(i(),h(H,null,["link"in s?(i(),P(ke,{key:0,item:s},null,8,["item"])):g("",!0)],64))),256))]))}}),so=V(no,[["__scopeId","data-v-2bec9359"]]),oo={class:"VPMenu"},ao={key:0,class:"items"},ro=k({__name:"VPMenu",props:{items:{}},setup(n){return(e,t)=>(i(),h("div",oo,[e.items?(i(),h("div",ao,[(i(!0),h(H,null,z(e.items,s=>(i(),h(H,{key:JSON.stringify(s)},["link"in s?(i(),P(ke,{key:0,item:s},null,8,["item"])):"component"in s?(i(),P(W(s.component),Y({key:1,ref_for:!0},s.props),null,16)):(i(),P(so,{key:2,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):g("",!0),p(e.$slots,"default",{},void 0,!0)]))}}),io=V(ro,[["__scopeId","data-v-39eca401"]]),lo=["aria-expanded","aria-label"],co={key:0,class:"text"},uo=["innerHTML"],po={key:1,class:"vpi-more-horizontal icon"},ho={class:"menu"},fo=k({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(n){const e=T(!1),t=T();Js({el:t,onBlur:s});function s(){e.value=!1}return(o,a)=>(i(),h("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:a[1]||(a[1]=r=>e.value=!0),onMouseleave:a[2]||(a[2]=r=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":o.label,onClick:a[0]||(a[0]=r=>e.value=!e.value)},[o.button||o.icon?(i(),h("span",co,[o.icon?(i(),h("span",{key:0,class:A([o.icon,"option-icon"])},null,2)):g("",!0),o.button?(i(),h("span",{key:1,innerHTML:o.button},null,8,uo)):g("",!0),a[3]||(a[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(i(),h("span",po))],8,lo),d("div",ho,[y(io,{items:o.items},{default:f(()=>[p(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),Ee=V(fo,[["__scopeId","data-v-40e55da0"]]),vo=["href","aria-label","innerHTML"],mo=k({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(n){const e=n,t=T();Q(async()=>{var a;await Ie();const o=(a=t.value)==null?void 0:a.children[0];o instanceof HTMLElement&&o.className.startsWith("vpi-social-")&&(getComputedStyle(o).maskImage||getComputedStyle(o).webkitMaskImage)==="none"&&o.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const s=S(()=>typeof e.icon=="object"?e.icon.svg:``);return(o,a)=>(i(),h("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:o.link,"aria-label":o.ariaLabel??(typeof o.icon=="string"?o.icon:""),target:"_blank",rel:"noopener",innerHTML:s.value},null,8,vo))}}),_o=V(mo,[["__scopeId","data-v-fbf39218"]]),go={class:"VPSocialLinks"},ko=k({__name:"VPSocialLinks",props:{links:{}},setup(n){return(e,t)=>(i(),h("div",go,[(i(!0),h(H,null,z(e.links,({link:s,icon:o,ariaLabel:a})=>(i(),P(_o,{key:s,icon:o,link:s,ariaLabel:a},null,8,["icon","link","ariaLabel"]))),128))]))}}),Oe=V(ko,[["__scopeId","data-v-f2234a39"]]),bo={key:0,class:"group translations"},$o={class:"trans-title"},yo={key:1,class:"group"},Po={class:"item appearance"},Lo={class:"label"},Vo={class:"appearance-action"},So={key:2,class:"group"},To={class:"item social-links"},wo=k({__name:"VPNavBarExtra",setup(n){const{site:e,theme:t}=M(),{localeLinks:s,currentLang:o}=ae({correspondingLink:!0}),a=S(()=>s.value.length&&o.value.label||e.value.appearance||t.value.socialLinks);return(r,l)=>a.value?(i(),P(Ee,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:f(()=>[c(s).length&&c(o).label?(i(),h("div",bo,[d("p",$o,C(c(o).label),1),(i(!0),h(H,null,z(c(s),u=>(i(),P(ke,{key:u.link,item:u},null,8,["item"]))),128))])):g("",!0),c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",yo,[d("div",Po,[d("p",Lo,C(c(t).darkModeSwitchLabel||"Appearance"),1),d("div",Vo,[y(He)])])])):g("",!0),c(t).socialLinks?(i(),h("div",So,[d("div",To,[y(Oe,{class:"social-links-list",links:c(t).socialLinks},null,8,["links"])])])):g("",!0)]),_:1})):g("",!0)}}),Mo=V(wo,[["__scopeId","data-v-0c845e5d"]]),No=["aria-expanded"],Io=k({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(n){return(e,t)=>(i(),h("button",{type:"button",class:A(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,No))}}),Co=V(Io,[["__scopeId","data-v-670493dd"]]),Ao=["innerHTML"],Ho=k({__name:"VPNavBarMenuLink",props:{item:{}},setup(n){const{page:e}=M();return(t,s)=>(i(),P(K,{class:A({VPNavBarMenuLink:!0,active:c(te)(c(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ao)]),_:1},8,["class","href","target","rel","no-icon"]))}}),Bo=V(Ho,[["__scopeId","data-v-8dbce4d0"]]),Eo=k({__name:"VPNavBarMenuGroup",props:{item:{}},setup(n){const e=n,{page:t}=M(),s=a=>"component"in a?!1:"link"in a?te(t.value.relativePath,a.link,!!e.item.activeMatch):a.items.some(s),o=S(()=>s(e.item));return(a,r)=>(i(),P(Ee,{class:A({VPNavBarMenuGroup:!0,active:c(te)(c(t).relativePath,a.item.activeMatch,!!a.item.activeMatch)||o.value}),button:a.item.text,items:a.item.items},null,8,["class","button","items"]))}}),Oo={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Do=k({__name:"VPNavBarMenu",setup(n){const{theme:e}=M();return(t,s)=>c(e).nav?(i(),h("nav",Oo,[s[0]||(s[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(i(!0),h(H,null,z(c(e).nav,o=>(i(),h(H,{key:JSON.stringify(o)},["link"in o?(i(),P(Bo,{key:0,item:o},null,8,["item"])):"component"in o?(i(),P(W(o.component),Y({key:1,ref_for:!0},o.props),null,16)):(i(),P(Eo,{key:2,item:o},null,8,["item"]))],64))),128))])):g("",!0)}}),Fo=V(Do,[["__scopeId","data-v-5bacfe89"]]),zo="/document/assets/flex-logo.BJA2J7hW.svg";function $e(n,e){return typeof n>"u"?e:n}function ze(n){const e=Array(n);for(let t=0;t=this.minlength&&(l||!r[_])){let L=ie(u,o,v),b="";switch(this.tokenize){case"full":if(3$;N--)if(N-$>=this.minlength){const w=ie(u,o,v,m,$);b=_.substring($,N),this.push_index(r,b,w,n,t)}break}case"reverse":if(2=this.minlength){const N=ie(u,o,v,m,$);this.push_index(r,b,N,n,t)}b=""}case"forward":if(1=this.minlength&&this.push_index(r,b,L,n,t);break}default:if(this.boost&&(L=Math.min(0|L/this.boost(e,_,v),u-1)),this.push_index(r,_,L,n,t),l&&1=this.minlength&&!$[_]){$[_]=1;const R=ie(N+(o/2>N?0:1),o,v,O-1,F-1),X=this.bidirectional&&_>w;this.push_index(a,X?w:_,R,n,t,X?_:w)}}}}}this.fastupdate||(this.register[n]=1)}}return this};function ie(n,e,t,s,o){return t&&1=this.minlength&&!m[b]){if(!this.optimize&&!a&&!this.map[b])return r;L[N++]=b,m[b]=1}n=L,s=n.length}if(!s)return r;e||(e=100);let u,v=this.depth&&1=t)))));b++);if(v)return o?qe(l,t,0):void(n[n.length]=l)}return!e&&l};function qe(n,e,t){return n=n.length===1?n[0]:Uo(n),t||n.length>e?n.slice(t,t+e):n}function Ge(n,e,t,s){if(t){const o=s&&e>t;n=n[o?e:t],n=n&&n[o?t:e]}else n=n[e];return n}q.prototype.contain=function(n){return!!this.register[n]},q.prototype.update=function(n,e){return this.remove(n).add(n,e)},q.prototype.remove=function(n,e){const t=this.register[n];if(t){if(this.fastupdate)for(let s,o=0;o{if(a.value){for(var B=m.value.search(a.value,{enrich:!0}),I=[],j=0;j!B||!B.length?[]:B.reduce((j,E)=>(j[I(E)]||(j[I(E)]=[]),j[I(E)].push(E),j),{}),R=()=>{setTimeout(()=>{l.value&&l.value.focus()},100),De(),o.value=!0};Q(async()=>{var E,D;const B=await vt(()=>import("./virtual_search-data.B1Wl_n0C.js"),[]);u.value=B.default.INDEX_DATA,v.value=B.default.PREVIEW_LOOKUP,_.value=B.default.Options,r.value=window.location.origin+he(t.value==="root"?"/":t.value),L.value=((E=_.value)==null?void 0:E.buttonLabel)||L.value,b.value=((D=_.value)==null?void 0:D.placeholder)||b.value;var I=new q(_.value);I.import("reg",u.value.reg),I.import("cfg",u.value.cfg),I.import("map",u.value.map),I.import("ctx",u.value.ctx),m.value=I,s.value.innerHTML=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl";const j=U=>{var se;U.key==="k"&&(U.ctrlKey||U.metaKey)&&(U.preventDefault(),R()),U.key==="Escape"&&((se=a.value)==null?void 0:se.length)==0&&o.value&&(o.value=!1)};window.addEventListener("keydown",j)});const X=S(()=>F(O.value,B=>B.link.split("/").slice(0,-1).join("-"))),ne=S(()=>Object.values(X.value).flat().map(B=>B.id));function De(){o.value=!1,a.value=""}const at=B=>{var I,j;if(document.getElementsByClassName("search-group")[0]){if(B.key=="ArrowUp"||B.key=="ArrowDown"){const E=ne.value.indexOf($.value);if(B.key=="ArrowUp"){const D=E==0?ne.value.length-1:E-1;$.value=ne.value[D]}if(B.key=="ArrowDown"){const D=E>ne.value.length-2?0:E+1;$.value=ne.value[D]}if(E<5){const D=N.value.getElementsByClassName("VPPluginSearch-search-group")[0];D==null||D.scrollIntoView(!0)}else(I=document.getElementById(ne.value[$.value]))==null||I.scrollIntoView(!0);Ie()}B.key=="Enter"&&w.go(e.site.value.base+((j=N.value.getElementsByClassName("link-focused")[0].getAttribute("href"))==null?void 0:j.replace(r.value,"")))}};return(B,I)=>{const j=Z("ClientOnly");return i(),h("div",la,[y(j,null,{default:f(()=>[(i(),P(gt,{to:"body"},[Fe(d("div",{class:"VPPluginSearch-modal-back",onClick:I[2]||(I[2]=E=>o.value=!1),onKeydown:at},[d("div",{class:"VPPluginSearch-modal",onClick:I[1]||(I[1]=Xe(()=>{},["stop"])),ref_key:"modal",ref:N},[d("form",ca,[I[4]||(I[4]=d("label",{class:"DocSearch-MagnifierLabel",for:"docsearch-input",id:"docsearch-label"},[d("svg",{width:"20",height:"20",class:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},[d("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),Fe(d("input",{class:"DocSearch-Input","aria-autocomplete":"both","aria-labelledby":"docsearch-label",id:"docsearch-input",autocomplete:"off",autocorrect:"off",autocapitalize:"off",enterkeyhint:"search",spellcheck:"false",autofocus:"true","onUpdate:modelValue":I[0]||(I[0]=E=>a.value=E),placeholder:b.value,maxlength:"64",type:"search",ref_key:"input",ref:l},null,8,ua),[[_t,a.value]])]),d("div",da,[(i(!0),h(H,null,z(X.value,(E,D)=>(i(),h("div",{class:"search-group",key:D},[d("span",pa,C(D?D.toString()[0].toUpperCase()+D.toString().slice(1):"Home"),1),(i(!0),h(H,null,z(E,(U,se)=>(i(),h("a",{href:r.value+U.link,key:U.id,onClick:De,onMouseenter:re=>$.value=U.id,class:A({"link-focused":$.value==U.id}),id:se.toString()},[d("div",fa,[d("span",va,C(U.link.includes("#")?"#":"▤"),1),d("div",ma,[d("h3",null,C(U.title),1),d("p",null,[d("div",{innerHTML:U.preview},null,8,_a)])]),I[5]||(I[5]=d("span",{class:"VPPluginSearch-search-item-icon"},"↪",-1))])],42,ha))),128))]))),128))]),I[6]||(I[6]=d("img",{class:"VPPluginSearch-flex-logo",src:zo,alt:"flex logo"},null,-1))],512)],544),[[mt,o.value]])]))]),_:1}),d("div",{id:"docsearch",onClick:I[3]||(I[3]=E=>R())},[d("button",ga,[d("span",ka,[I[7]||(I[7]=d("svg",{width:"20",height:"20",class:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},[d("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),d("span",ba,C(L.value),1)]),d("span",$a,[d("span",{class:"DocSearch-Button-Key",ref_key:"metaKey",ref:s},"Meta",512),I[8]||(I[8]=d("span",{class:"DocSearch-Button-Key"},"K",-1))])])])])}}}),Pa=k({__name:"VPNavBarSocialLinks",setup(n){const{theme:e}=M();return(t,s)=>c(e).socialLinks?(i(),P(Oe,{key:0,class:"VPNavBarSocialLinks",links:c(e).socialLinks},null,8,["links"])):g("",!0)}}),La=V(Pa,[["__scopeId","data-v-08b35e6f"]]),Va=["href","rel","target"],Sa=["innerHTML"],Ta={key:2},wa=k({__name:"VPNavBarTitle",setup(n){const{site:e,theme:t}=M(),{hasSidebar:s}=x(),{currentLang:o}=ae(),a=S(()=>{var u;return typeof t.value.logoLink=="string"?t.value.logoLink:(u=t.value.logoLink)==null?void 0:u.link}),r=S(()=>{var u;return typeof t.value.logoLink=="string"||(u=t.value.logoLink)==null?void 0:u.rel}),l=S(()=>{var u;return typeof t.value.logoLink=="string"||(u=t.value.logoLink)==null?void 0:u.target});return(u,v)=>(i(),h("div",{class:A(["VPNavBarTitle",{"has-sidebar":c(s)}])},[d("a",{class:"title",href:a.value??c(Ce)(c(o).link),rel:r.value,target:l.value},[p(u.$slots,"nav-bar-title-before",{},void 0,!0),c(t).logo?(i(),P(ue,{key:0,class:"logo",image:c(t).logo},null,8,["image"])):g("",!0),c(t).siteTitle?(i(),h("span",{key:1,innerHTML:c(t).siteTitle},null,8,Sa)):c(t).siteTitle===void 0?(i(),h("span",Ta,C(c(e).title),1)):g("",!0),p(u.$slots,"nav-bar-title-after",{},void 0,!0)],8,Va)],2))}}),Ma=V(wa,[["__scopeId","data-v-5622a072"]]),Na={class:"items"},Ia={class:"title"},Ca=k({__name:"VPNavBarTranslations",setup(n){const{theme:e}=M(),{localeLinks:t,currentLang:s}=ae({correspondingLink:!0});return(o,a)=>c(t).length&&c(s).label?(i(),P(Ee,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:c(e).langMenuLabel||"Change language"},{default:f(()=>[d("div",Na,[d("p",Ia,C(c(s).label),1),(i(!0),h(H,null,z(c(t),r=>(i(),P(ke,{key:r.link,item:r},null,8,["item"]))),128))])]),_:1},8,["label"])):g("",!0)}}),Aa=V(Ca,[["__scopeId","data-v-dac637f3"]]),Ha={class:"wrapper"},Ba={class:"container"},Ea={class:"title"},Oa={class:"content"},Da={class:"content-body"},Fa=k({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(n){const e=n,{y:t}=xe(),{hasSidebar:s}=x(),{frontmatter:o}=M(),a=T({});return Ne(()=>{a.value={"has-sidebar":s.value,home:o.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(r,l)=>(i(),h("div",{class:A(["VPNavBar",a.value])},[d("div",Ha,[d("div",Ba,[d("div",Ea,[y(Ma,null,{"nav-bar-title-before":f(()=>[p(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(r.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Oa,[d("div",Da,[p(r.$slots,"nav-bar-content-before",{},void 0,!0),y(ya,{class:"search"}),y(Fo,{class:"menu"}),y(Aa,{class:"translations"}),y(Ks,{class:"appearance"}),y(La,{class:"social-links"}),y(Mo,{class:"extra"}),p(r.$slots,"nav-bar-content-after",{},void 0,!0),y(Co,{class:"hamburger",active:r.isScreenOpen,onClick:l[0]||(l[0]=u=>r.$emit("toggle-screen"))},null,8,["active"])])])])]),l[1]||(l[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),za=V(Fa,[["__scopeId","data-v-bb7529ee"]]),ja={key:0,class:"VPNavScreenAppearance"},Ua={class:"text"},qa=k({__name:"VPNavScreenAppearance",setup(n){const{site:e,theme:t}=M();return(s,o)=>c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",ja,[d("p",Ua,C(c(t).darkModeSwitchLabel||"Appearance"),1),y(He)])):g("",!0)}}),Ga=V(qa,[["__scopeId","data-v-774971f8"]]),Ra=["innerHTML"],Wa=k({__name:"VPNavScreenMenuLink",props:{item:{}},setup(n){const e=_e("close-screen");return(t,s)=>(i(),P(K,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:c(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ra)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ka=V(Wa,[["__scopeId","data-v-29871565"]]),Ja=["innerHTML"],xa=k({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(n){const e=_e("close-screen");return(t,s)=>(i(),P(K,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:c(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ja)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),ot=V(xa,[["__scopeId","data-v-581896e9"]]),Xa={class:"VPNavScreenMenuGroupSection"},Ya={key:0,class:"title"},Qa=k({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(n){return(e,t)=>(i(),h("div",Xa,[e.text?(i(),h("p",Ya,C(e.text),1)):g("",!0),(i(!0),h(H,null,z(e.items,s=>(i(),P(ot,{key:s.text,item:s},null,8,["item"]))),128))]))}}),Za=V(Qa,[["__scopeId","data-v-836cddb8"]]),er=["aria-controls","aria-expanded"],tr=["innerHTML"],nr=["id"],sr={key:0,class:"item"},or={key:1,class:"item"},ar={key:2,class:"group"},rr=k({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(n){const e=n,t=T(!1),s=S(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function o(){t.value=!t.value}return(a,r)=>(i(),h("div",{class:A(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:o},[d("span",{class:"button-text",innerHTML:a.text},null,8,tr),r[0]||(r[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,er),d("div",{id:s.value,class:"items"},[(i(!0),h(H,null,z(a.items,l=>(i(),h(H,{key:JSON.stringify(l)},["link"in l?(i(),h("div",sr,[y(ot,{item:l},null,8,["item"])])):"component"in l?(i(),h("div",or,[(i(),P(W(l.component),Y({ref_for:!0},l.props,{"screen-menu":""}),null,16))])):(i(),h("div",ar,[y(Za,{text:l.text,items:l.items},null,8,["text","items"])]))],64))),128))],8,nr)],2))}}),ir=V(rr,[["__scopeId","data-v-a8d3502a"]]),lr={key:0,class:"VPNavScreenMenu"},cr=k({__name:"VPNavScreenMenu",setup(n){const{theme:e}=M();return(t,s)=>c(e).nav?(i(),h("nav",lr,[(i(!0),h(H,null,z(c(e).nav,o=>(i(),h(H,{key:JSON.stringify(o)},["link"in o?(i(),P(Ka,{key:0,item:o},null,8,["item"])):"component"in o?(i(),P(W(o.component),Y({key:1,ref_for:!0},o.props,{"screen-menu":""}),null,16)):(i(),P(ir,{key:2,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):g("",!0)}}),ur=k({__name:"VPNavScreenSocialLinks",setup(n){const{theme:e}=M();return(t,s)=>c(e).socialLinks?(i(),P(Oe,{key:0,class:"VPNavScreenSocialLinks",links:c(e).socialLinks},null,8,["links"])):g("",!0)}}),dr={class:"list"},pr=k({__name:"VPNavScreenTranslations",setup(n){const{localeLinks:e,currentLang:t}=ae({correspondingLink:!0}),s=T(!1);function o(){s.value=!s.value}return(a,r)=>c(e).length&&c(t).label?(i(),h("div",{key:0,class:A(["VPNavScreenTranslations",{open:s.value}])},[d("button",{class:"title",onClick:o},[r[0]||(r[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),ee(" "+C(c(t).label)+" ",1),r[1]||(r[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",dr,[(i(!0),h(H,null,z(c(e),l=>(i(),h("li",{key:l.link,class:"item"},[y(K,{class:"link",href:l.link},{default:f(()=>[ee(C(l.text),1)]),_:2},1032,["href"])]))),128))])],2)):g("",!0)}}),hr=V(pr,[["__scopeId","data-v-0d43316b"]]),fr={class:"container"},vr=k({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(n){const e=T(null),t=Ye(ge?document.body:null);return(s,o)=>(i(),P(we,{name:"fade",onEnter:o[0]||(o[0]=a=>t.value=!0),onAfterLeave:o[1]||(o[1]=a=>t.value=!1)},{default:f(()=>[s.open?(i(),h("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",fr,[p(s.$slots,"nav-screen-content-before",{},void 0,!0),y(cr,{class:"menu"}),y(hr,{class:"translations"}),y(Ga,{class:"appearance"}),y(ur,{class:"social-links"}),p(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):g("",!0)]),_:3}))}}),mr=V(vr,[["__scopeId","data-v-34fa79a7"]]),_r={key:0,class:"VPNav"},gr=k({__name:"VPNav",setup(n){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=Os(),{frontmatter:o}=M(),a=S(()=>o.value.navbar!==!1);return Qe("close-screen",t),fe(()=>{ge&&document.documentElement.classList.toggle("hide-nav",!a.value)}),(r,l)=>a.value?(i(),h("header",_r,[y(za,{"is-screen-open":c(e),onToggleScreen:c(s)},{"nav-bar-title-before":f(()=>[p(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(r.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[p(r.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[p(r.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),y(mr,{open:c(e)},{"nav-screen-content-before":f(()=>[p(r.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[p(r.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):g("",!0)}}),kr=V(gr,[["__scopeId","data-v-a46e73f0"]]),br=["role","tabindex"],$r={key:1,class:"items"},yr=k({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(n){const e=n,{collapsed:t,collapsible:s,isLink:o,isActiveLink:a,hasActiveLink:r,hasChildren:l,toggle:u}=zt(S(()=>e.item)),v=S(()=>l.value?"section":"div"),_=S(()=>o.value?"a":"div"),m=S(()=>l.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),L=S(()=>o.value?void 0:"button"),b=S(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":o.value},{"is-active":a.value},{"has-active":r.value}]);function $(w){"key"in w&&w.key!=="Enter"||!e.item.link&&u()}function N(){e.item.link&&u()}return(w,O)=>{const F=Z("VPSidebarItem",!0);return i(),P(W(v.value),{class:A(["VPSidebarItem",b.value])},{default:f(()=>[w.item.text?(i(),h("div",Y({key:0,class:"item",role:L.value},kt(w.item.items?{click:$,keydown:$}:{},!0),{tabindex:w.item.items&&0}),[O[1]||(O[1]=d("div",{class:"indicator"},null,-1)),w.item.link?(i(),P(K,{key:0,tag:_.value,class:"link",href:w.item.link,rel:w.item.rel,target:w.item.target},{default:f(()=>[(i(),P(W(m.value),{class:"text",innerHTML:w.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(i(),P(W(m.value),{key:1,class:"text",innerHTML:w.item.text},null,8,["innerHTML"])),w.item.collapsed!=null&&w.item.items&&w.item.items.length?(i(),h("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:N,onKeydown:bt(N,["enter"]),tabindex:"0"},O[0]||(O[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):g("",!0)],16,br)):g("",!0),w.item.items&&w.item.items.length?(i(),h("div",$r,[w.depth<5?(i(!0),h(H,{key:0},z(w.item.items,R=>(i(),P(F,{key:R.text,item:R,depth:w.depth+1},null,8,["item","depth"]))),128)):g("",!0)])):g("",!0)]),_:1},8,["class"])}}}),Pr=V(yr,[["__scopeId","data-v-2e0476bc"]]),Lr=k({__name:"VPSidebarGroup",props:{items:{}},setup(n){const e=T(!0);let t=null;return Q(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),$t(()=>{t!=null&&(clearTimeout(t),t=null)}),(s,o)=>(i(!0),h(H,null,z(s.items,a=>(i(),h("div",{key:a.text,class:A(["group",{"no-transition":e.value}])},[y(Pr,{item:a,depth:0},null,8,["item"])],2))),128))}}),Vr=V(Lr,[["__scopeId","data-v-ec086cd5"]]),Sr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Tr=k({__name:"VPSidebar",props:{open:{type:Boolean}},setup(n){const{sidebarGroups:e,hasSidebar:t}=x(),s=n,o=T(null),a=Ye(ge?document.body:null);J([s,o],()=>{var l;s.open?(a.value=!0,(l=o.value)==null||l.focus()):a.value=!1},{immediate:!0,flush:"post"});const r=T(0);return J(e,()=>{r.value+=1},{deep:!0}),(l,u)=>c(t)?(i(),h("aside",{key:0,class:A(["VPSidebar",{open:l.open}]),ref_key:"navEl",ref:o,onClick:u[0]||(u[0]=Xe(()=>{},["stop"]))},[u[2]||(u[2]=d("div",{class:"curtain"},null,-1)),d("nav",Sr,[u[1]||(u[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),p(l.$slots,"sidebar-nav-before",{},void 0,!0),(i(),P(Vr,{items:c(e),key:r.value},null,8,["items"])),p(l.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):g("",!0)}}),wr=V(Tr,[["__scopeId","data-v-12a40e3d"]]),Mr=k({__name:"VPSkipLink",setup(n){const{theme:e}=M(),t=me(),s=T();J(()=>t.path,()=>s.value.focus());function o({target:a}){const r=document.getElementById(decodeURIComponent(a.hash).slice(1));if(r){const l=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",l)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",l),r.focus(),window.scrollTo(0,0)}}return(a,r)=>(i(),h(H,null,[d("span",{ref_key:"backToTop",ref:s,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o},C(c(e).skipToContentLabel||"Skip to content"),1)],64))}}),Nr=V(Mr,[["__scopeId","data-v-17ad389b"]]),Ir=k({__name:"Layout",setup(n){const{isOpen:e,open:t,close:s}=x(),o=me();J(()=>o.path,s),Ft(e,s);const{frontmatter:a}=M(),r=yt(),l=S(()=>!!r["home-hero-image"]);return Qe("hero-image-slot-exists",l),(u,v)=>{const _=Z("Content");return c(a).layout!==!1?(i(),h("div",{key:0,class:A(["Layout",c(a).pageClass])},[p(u.$slots,"layout-top",{},void 0,!0),y(Nr),y(St,{class:"backdrop",show:c(e),onClick:c(s)},null,8,["show","onClick"]),y(kr,null,{"nav-bar-title-before":f(()=>[p(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[p(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[p(u.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":f(()=>[p(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[p(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),y(Es,{open:c(e),onOpenMenu:c(t)},null,8,["open","onOpenMenu"]),y(wr,{open:c(e)},{"sidebar-nav-before":f(()=>[p(u.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":f(()=>[p(u.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),y(bs,null,{"page-top":f(()=>[p(u.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[p(u.$slots,"page-bottom",{},void 0,!0)]),"not-found":f(()=>[p(u.$slots,"not-found",{},void 0,!0)]),"home-hero-before":f(()=>[p(u.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[p(u.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(u.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(u.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(u.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(u.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[p(u.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[p(u.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[p(u.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":f(()=>[p(u.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[p(u.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[p(u.$slots,"doc-after",{},void 0,!0)]),"doc-top":f(()=>[p(u.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[p(u.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":f(()=>[p(u.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[p(u.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[p(u.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(u.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(u.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(u.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),y(Vs),p(u.$slots,"layout-bottom",{},void 0,!0)],2)):(i(),P(_,{key:1}))}}}),Cr=V(Ir,[["__scopeId","data-v-c4daae71"]]),Hr={Layout:Cr,enhanceApp:({app:n})=>{n.component("Badge",Pt)}};export{Hr as t}; diff --git a/docs/document/assets/chunks/virtual_search-data.B1Wl_n0C.js b/docs/document/assets/chunks/virtual_search-data.B1Wl_n0C.js new file mode 100644 index 000000000..0f944ca2c --- /dev/null +++ b/docs/document/assets/chunks/virtual_search-data.B1Wl_n0C.js @@ -0,0 +1,1404 @@ +const e={map:'[{"高级属性":["0.0"],"option":["0.1","1.12","10.1","11.12","20.9","23.9","24.17"],"template":["0.2","10.2"],"events":["0.3","10.3"],"storage":["0.4","10.4"],"icons":["0.5","10.5","22.39","26.39"],"i18n":["0.6","10.6","22.43","26.43"],"notice":["0.7","3.4","10.7","13.4"],"layers":["0.8","10.8","18.0","22.29","26.29"],"controls":["0.9","10.9","17.0","22.32","26.32"],"contextmenu":["0.10","2.37","3.3","10.10","12.37","13.3","22.31","26.31"],"subtitle":["0.11","2.36","10.11","12.36","22.37","26.37"],"info":["0.12","2.32","3.22","10.12","12.32","13.22"],"loading":["0.13","2.34","10.13","12.34"],"hotkey":["0.14","2.5","10.14","12.5","22.19","26.19"],"mask":["0.15","2.35","10.15","12.35"],"setting":["0.16","2.39","3.5","3.6","3.7","10.16","12.39","13.5","13.6","13.7","22.18","26.18"],"plugins":["0.17","10.17","22.35","26.35"],"静态属性":["1.0"],"instances":["1.1","11.1"],"version":["1.2","11.2"],"env":["1.3","11.3"],"build":["1.4","11.4"],"config":["1.5","11.5","24.13"],"utils":["1.6","11.6"],"scheme":["1.7","11.7"],"emitter":["1.8","11.8"],"validator":["1.9","11.9"],"kindof":["1.10","11.10"],"html":["1.11","11.11"],"实例事件":["2.0"],"ready":["2.1","12.1"],"restart":["2.2","12.2"],"pause":["2.3","5.2","12.3","15.2"],"play":["2.4","5.1","12.4","15.1"],"destroy":["2.6","5.4","12.6","15.4"],"focus":["2.7","12.7"],"blur":["2.8","12.8"],"dblclick":["2.9","12.9"],"click":["2.10","12.10"],"error":["2.11","12.11"],"hover":["2.12","12.12"],"mousemove":["2.13","12.13"],"resize":["2.14","3.8","12.14","13.8"],"view":["2.15","12.15"],"lock":["2.16","12.16","22.44","26.44"],"aspectratio":["2.17","5.32","12.17","15.32","22.16","26.16"],"autoheight":["2.18","5.33","12.18","15.33"],"autosize":["2.19","5.27","12.19","15.27","22.11","26.11"],"flip":["2.20","3.30","5.30","12.20","13.30","15.30","22.14","26.14"],"fullscreen":["2.21","3.31","5.20","12.21","13.31","15.20","22.23","26.23"],"fullscreenerror":["2.22","12.22"],"fullscreenweb":["2.23","5.21","12.23","15.21","22.24","26.24"],"mini":["2.24","5.24","12.24","15.24"],"pip":["2.25","5.22","12.25","15.22","22.20","26.20"],"screenshot":["2.26","5.17","12.26","15.17","22.17","26.17"],"seek":["2.27","3.27","5.6","12.27","13.27","15.6"],"subtitleoffset":["2.28","5.47","12.28","15.47","22.25","26.25"],"subtitlebeforeupdate":["2.29","12.29"],"subtitleafterupdate":["2.30","12.30"],"subtitleload":["2.31","12.31"],"layer":["2.33","12.33"],"control":["2.38","3.16","12.38","13.16"],"muted":["2.40","5.14","12.40","15.14","22.9","26.9"],"keydown":["2.41","12.41"],"video":["2.42","2.43","2.44","2.45","2.46","2.47","2.48","2.49","2.50","2.51","2.52","2.53","2.54","2.55","2.56","2.57","2.58","2.59","2.60","2.61","2.62","5.43","12.42","12.43","12.44","12.45","12.46","12.47","12.48","12.49","12.50","12.51","12.52","12.53","12.54","12.55","12.56","12.57","12.58","12.59","12.60","12.61","12.62","15.43"],"全局属性":["3.0"],"debug":["3.1","13.1"],"style":["3.2","13.2"],"scroll":["3.9","3.10","13.9","13.10"],"auto":["3.11","3.12","3.13","3.21","13.11","13.12","13.13","13.21"],"reconnect":["3.14","3.15","13.14","13.15"],"dbclick":["3.17","3.18","13.17","13.18"],"mobile":["3.19","3.20","13.19","13.20"],"fast":["3.23","3.24","13.23","13.24"],"touch":["3.25","13.25"],"volume":["3.26","5.9","13.26","15.9","22.7","26.7"],"playback":["3.28","13.28"],"aspect":["3.29","13.29"],"log":["3.32","13.32"],"use":["3.33","13.33"],"remove":["3.34","13.34","19.8"],"编写插件":["4.0"],"实例属性":["5.0"],"toggle":["5.3","15.3"],"reset":["5.5","15.5","24.15"],"forward":["5.7","15.7"],"backward":["5.8","15.8"],"url":["5.10","15.10","22.2","26.2"],"switch":["5.11","15.11"],"switchurl":["5.12","15.12"],"switchquality":["5.13","15.13"],"currenttime":["5.15","15.15"],"duration":["5.16","15.16"],"getdataurl":["5.18","15.18"],"getbloburl":["5.19","15.19"],"poster":["5.23","15.23","22.5","26.5"],"playing":["5.25","15.25"],"state":["5.26","15.26"],"rect":["5.28","15.28"],"bottom":["5.29","15.29"],"playbackrate":["5.31","15.31","22.15","26.15"],"attr":["5.34","15.34"],"type":["5.35","15.35","22.40","26.40"],"theme":["5.36","15.36","22.6","26.6"],"airplay":["5.37","15.37","22.49","26.49"],"loaded":["5.38","15.38"],"loadedtime":["5.39","15.39"],"played":["5.40","15.40"],"proxy":["5.41","15.41","22.51","26.51"],"query":["5.42","15.42"],"cssvar":["5.44","15.44","22.50","26.50"],"quality":["5.45","15.45","22.33","26.33"],"thumbnails":["5.46","15.46","22.36","26.36"],"右键菜单":["6.0"],"配置":["6.1","7.1","8.1"],"创建":["6.2","7.2","8.2","9.2","9.3","9.4","9.5","9.6"],"添加":["6.3","7.3","8.3","9.7"],"删除":["6.4","7.4","8.4","9.8"],"更新":["6.5","7.5","8.5","9.9"],"控制器":["7.0"],"业务层":["8.0"],"设置面板":["9.0"],"内置":["9.1"],"advanced":["10.0"],"static":["11.0"],"instance":["12.0","15.0"],"global":["13.0"],"writing":["14.0"],"context":["16.0"],"configuration":["16.1","17.1","18.1"],"creation":["16.2","17.2","18.2"],"addition":["16.3","18.3"],"deletion":["16.4"],"update":["16.5","18.5","19.9"],"adding":["17.3","21.3"],"removal":["17.4","18.4"],"updating":["17.5"],"settings":["19.0","22.30","26.30"],"built":["19.1"],"create":["19.2","19.3","19.4","19.5","19.6"],"add":["19.7"],"installation":["20.0","20.1"],"cdn":["20.2","23.2","24.3"],"usage":["20.3"],"vue":["20.4","20.7","23.4","23.7"],"react":["20.5","20.8","23.5","23.8"],"typescript":["20.6","23.6"],"javascript":["20.10","23.10"],"legacy":["20.11"],"ecmascript":["20.12","23.12"],"custom":["20.13"],"language":["21.0"],"default":["21.1"],"importing":["21.2"],"modifying":["21.4"],"basic":["22.0"],"container":["22.1","26.1"],"id":["22.3","26.3"],"onready":["22.4","26.4"],"islive":["22.8","26.8"],"autoplay":["22.10","26.10"],"automini":["22.12","26.12"],"loop":["22.13","26.13"],"mutex":["22.21","26.21"],"backdrop":["22.22","26.22"],"miniprogressbar":["22.26","26.26"],"usessr":["22.27","26.27"],"playsinline":["22.28","26.28"],"highlight":["22.34","26.34"],"morevideoattr":["22.38","26.38"],"customtype":["22.41","26.41"],"lang":["22.42","26.42"],"gesture":["22.45","26.45"],"fastforward":["22.46","26.46"],"autoplayback":["22.47","26.47"],"autoorientation":["22.48","26.48"],"安装使用":["23.0"],"安装":["23.1","24.2"],"使用":["23.3"],"古老的浏览器":["23.11"],"自定义":["23.13"],"弹幕库":["24.0"],"演示":["24.1"],"弹幕结构":["24.4"],"全部选项":["24.5"],"生命周期":["24.6"],"使用弹幕数组":["24.7"],"使用弹幕":["24.8"],"使用异步返回":["24.9"],"hide":["24.10"],"ishide":["24.11"],"emit":["24.12"],"load":["24.14"],"mount":["24.16"],"事件":["24.18"],"语言设置":["25.0"],"默认语言":["25.1"],"导入语言":["25.2"],"新增语言":["25.3"],"修改语言":["25.4"],"基础选项":["26.0"]},{"0":["3.28","5.38","5.40","22.7","26.7"],"1":["23.11","24.5"],"3":["3.29","23.9"],"4":["3.29","25.3"],"5":["3.28","8.2","18.2","24.5"],"7":["8.3","18.3","22.7"],"9":["25.3"],"10":["24.5"],"15":["4.0"],"21":["8.5","9.9","18.5","19.9"],"26":["7.5","17.5"],"27":["9.9","19.9"],"75":["3.28"],"250":["3.5"],"这里的":["0.0","1.0","3.0","5.0"],"播放器的选项":["0.1"],"div":["0.1","0.2","0.4","0.5","0.7","0.14","0.17","1.1","1.6","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","4.0","5.1","5.2","5.3","5.16","5.28","5.33","5.37","5.45","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","10.1","10.2","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.29","22.30","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29","26.30","26.31","26.32"],"classname":["0.1","0.2","0.17","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","4.0","5.45","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","10.2","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.29","22.30","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29","26.30"],"run":["0.1","0.2","2.0","2.2","2.6","2.11","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","4.0","5.45","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.29","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29","26.30"],"管理播放器所有的":["0.2","0.3","0.5"],"dom":["0.2","0.3","5.41","5.42","9.2","9.3","9.5","9.6","10.2","10.3","15.41","15.42","19.2","19.3","19.5","19.6","22.1","26.1"],"元素":["0.2","9.5","9.6"],"事件":["0.3","4.0"],"实质上是代理了":["0.3"],"addeventlistener":["0.3","5.41","10.3","15.41"],"和":["0.3","4.0","5.13","24.8","24.10","26.4"],"removeeventlistener":["0.3","10.3"],"当使用以下方法来处理事件":["0.3"],"播放器销毁时也会自动销毁该事件":["0.3"],"管理播放器的本地存储":["0.4"],"name":["0.4","4.0","10.4","17.1"],"属性用于设置缓存的":["0.4"],"key":["0.4","10.4"],"set":["0.4","10.4","15.9","15.11","15.12","15.44","15.45","22.36","22.37"],"方法用于设置缓存":["0.4"],"get":["0.4","0.6","10.6","15.34","15.44"],"方法用于获取缓存":["0.4"],"del":["0.4"],"方法用于删除缓存":["0.4"],"clear":["0.4"],"方法用于清空缓存":["0.4"],"svg":["0.5","10.5"],"图标":["0.5"],"管理播放器的":["0.6"],"方法用于获取":["0.6"],"的值":["0.6"],"update":["0.6","0.8","0.9","0.10","0.16"],"管理播放器的提示语":["0.7"],"只有一个":["0.7"],"show":["0.7","0.13","0.15","10.13","10.15","24.10"],"属性用于显示提示语":["0.7"],"管理播放器的层":["0.8"],"add":["0.8","0.9","0.10","0.14","0.16","0.17","10.8","10.9","10.10","10.14","10.16"],"方法用于动态添加层":["0.8"],"remove":["0.8","0.9","0.10","0.14","0.16"],"方法用于动态删除层":["0.8"],"管理播放器的控制器":["0.9"],"方法用于动态添加控制器":["0.9"],"方法用于动态删除控制器":["0.9"],"管理播放器的右键菜单":["0.10"],"方法用于动态添加菜单":["0.10"],"方法用于动态删除菜单":["0.10"],"方法用于动态更新菜单":["0.10"],"管理播放器的字幕功能":["0.11"],"url":["0.11","5.12","10.11","15.12","15.18","15.19"],"属性设置和返回当前字幕地址":["0.11"],"style":["0.11"],"方法设置当前字幕的样式":["0.11"],"switch":["0.11"],"管理播放器的信息面板":["0.12"],"常用于查看当前播放器和视频的运行状态":["0.12"],"例如版本号":["0.12"],"分辨率":["0.12"],"时长等":["0.12"],"管理播放器的加载层":["0.13"],"属性用于设置是否显示加载层":["0.13"],"toggle":["0.13","0.15","19.5"],"管理播放器的快捷键功能":["0.14"],"方法用于添加快捷键":["0.14"],"方法用于删除快捷键":["0.14"],"管理播放器的遮罩层":["0.15"],"属性用于设置是否显示遮罩层":["0.15"],"管理播放器的设置面板":["0.16"],"方法用于动态添加设置项":["0.16"],"方法用于动态删除设置项":["0.16"],"方法用于动态更新设置项":["0.16"],"管理播放器的插件功能":["0.17"],"只有一个方法":["0.17"],"用于动态添加插件":["0.17"],"返回全部播放器实例的数组":["1.1"],"假如你想同时管理多个播放器的时候":["1.1"],"可以用到该属性":["1.1"],"返回播放器的版本信息":["1.2"],"返回播放器的环境变量":["1.3"],"返回播放器的打包时间":["1.4"],"返回视频的默认配置":["1.5"],"返回播放器的工具函数集合":["1.6"],"返回播放器选项的校验方案":["1.7"],"返回事件分发器的构造函数":["1.8"],"返回选项的校验函数":["1.9"],"返回类型检测的函数工具":["1.10"],"返回播放器所需的":["1.11"],"返回播放器的默认选项":["1.12"],"播放器的事件分为两种":["2.0"],"一种视频的":["2.0"],"原生事件":["2.0"],"前缀":["2.0"],"video":["2.0","12.0","13.29","13.30","13.34","15.3","15.5","15.11","15.12","15.13","15.16","15.38","15.40","22.2","22.5","22.37","22.40","22.41"],"另外一种是":["2.0"],"自定义事件":["2.0"],"监听事件":["2.0"],"code":["2.0","2.2","2.28","4.0","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","20.1","20.2","20.3","20.4","20.5","22.2","22.29","23.1","23.2","23.3","23.4","23.5","24.2","24.3","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29"],"js":["2.0","4.0","6.5","7.2","7.3","7.5","8.2","8.3","8.5","9.4","9.8","9.9","16.5","17.2","17.3","17.5","18.2","18.3","18.5","19.4","19.8","19.9","20.4","20.5","20.7","20.8","20.10","20.11","21.2","21.4","23.4","23.5","23.7","23.8","23.10","23.11","24.5","24.18","25.2","25.3","25.4"],"当播放器首次可以播放器时触发":["2.1"],"当播放器切换地址后并可以播放时触发":["2.2"],"当播放器暂停时触发":["2.3"],"当播放器播放时触发":["2.4"],"当播放器热键被按下时触发":["2.5"],"当播放器销毁时触发":["2.6"],"当播放器获得焦点时触发":["2.7"],"当播放器失去焦点时触发":["2.8"],"当播放器被双击时触发":["2.9"],"当播放器被单击时触发":["2.10"],"当播放器加载视频发生错误时触发":["2.11"],"当播放器被鼠标移出或者移入时触发":["2.12"],"当播放器被鼠标经过时触发":["2.13"],"当播放器尺寸变化时触发":["2.14"],"当播放器出现在视口时触发":["2.15"],"在移动端":["2.16","3.19","3.20","3.21","3.23","3.24","3.25"],"当锁定的状态发生变化时触发":["2.16"],"当播放器长宽比变化时触发":["2.17"],"当播放器自动设置高度时触发":["2.18"],"当播放器自动设置尺寸时触发":["2.19"],"当播放器发生翻转时触发":["2.20"],"当播放器发生窗口全屏时触发":["2.21"],"当播放器发生窗口全屏错误时触发":["2.22"],"当播放器发生网页全屏时触发":["2.23"],"当播放器进入迷你模式时触发":["2.24"],"当播放器进入画中画时触发":["2.25"],"当播放器被截图时触发":["2.26"],"当播放器发生时间跳转时触发":["2.27"],"当播放器发生字幕偏移时触发":["2.28"],"当字幕更新前触发":["2.29"],"当字幕更新后触发":["2.30"],"当字幕加载时触发":["2.31"],"当信息面板显示或隐藏时触发":["2.32"],"当自定义层显示或隐藏时触发":["2.33"],"当加载器显示或隐藏时触发":["2.34"],"当遮罩层显示或隐藏时触发":["2.35"],"当字幕层显示或隐藏时触发":["2.36"],"当右键菜单显示或隐藏时触发":["2.37"],"当控制器显示或隐藏时触发":["2.38"],"当设置面板显示或隐藏时触发":["2.39"],"当静音的状态变化时触发":["2.40"],"监听来自":["2.41"],"document":["2.41"],"的":["2.41"],"canplay":["2.42","12.42"],"canplaythrough":["2.43","12.43"],"complete":["2.44","12.44"],"durationchange":["2.45","12.45"],"emptied":["2.46","12.46"],"ended":["2.47","12.47"],"error":["2.48","12.48"],"loadeddata":["2.49","12.49"],"loadedmetadata":["2.50","12.50"],"pause":["2.51","12.51"],"play":["2.52","3.19","3.20","12.52","13.19","13.20","15.3"],"playing":["2.53","12.53"],"progress":["2.54","12.54","22.36"],"ratechange":["2.55","12.55"],"seeked":["2.56","12.56"],"seeking":["2.57","12.57"],"stalled":["2.58","12.58"],"suspend":["2.59","12.59"],"timeupdate":["2.60","12.60"],"volumechange":["2.61","12.61"],"waiting":["2.62","12.62"],"是否开始":["3.1"],"模式":["3.1"],"返回播放器样式文本":["3.2"],"是否开启右键菜单":["3.3"],"默认开启":["3.3"],"time":["3.4","3.8","3.9","3.14","3.15","3.16","3.17","3.21","3.22","3.24","13.4","13.8","13.9","13.14","13.15","13.16","13.17","13.21","13.22","13.24","22.25"],"提示信息的显示时长":["3.4"],"单位为毫秒":["3.4","3.8","3.9","3.13","3.16","3.17","3.22"],"width":["3.5","3.6","5.29","9.3","13.5","13.6","15.29","15.33"],"设置面板的默认宽度":["3.5"],"单位为像素":["3.5","3.6","3.7","3.10"],"默认为":["3.5","3.6","3.7","3.11","3.17","3.26","3.28","3.29","3.30","3.32","3.33"],"item":["3.6","3.7","13.6","13.7","19.6"],"设置面板的设置项的默认宽度":["3.6"],"height":["3.7","5.29","13.7","15.29"],"设置面板的设置项的默认高度":["3.7"],"事件的节流时间":["3.8","3.9"],"gap":["3.10","13.10"],"view":["3.10","10.12"],"事件的边界容差距离":["3.10"],"playback":["3.11","3.12","3.13","12.53","13.11","13.12","13.13","22.47"],"max":["3.11","3.14","13.11","13.14"],"自动回放功能的最大记录数":["3.11"],"min":["3.12","13.12"],"自动回放功能的最小记录时长":["3.12"],"单位为秒":["3.12","3.27","5.39"],"timeout":["3.13","13.13"],"自动回放功能的隐藏延迟时长":["3.13"],"发生连接错误时":["3.14","3.15"],"自动连接的最大次数":["3.14"],"sleep":["3.15","13.15"],"自动连接的延迟时间":["3.15"],"hide":["3.16","13.13","13.16"],"底部控制栏的自动隐藏的延迟时间":["3.16"],"双击事件的延迟事件":["3.17"],"fullscreen":["3.18","12.22","13.18"],"在桌面端":["3.18"],"是否双击切换全屏":["3.18"],"dbclick":["3.19","13.19"],"是否双击切换播放暂停":["3.19"],"click":["3.20","13.20"],"是否单击切换播放暂停":["3.20"],"orientation":["3.21","13.21"],"自动旋屏的延迟时间":["3.21"],"loop":["3.22","13.22"],"信息面板的刷新时间":["3.22"],"forward":["3.23","3.24","13.23","13.24"],"value":["3.23","13.23"],"长按加速的速率倍数":["3.23"],"长按加速的延迟时间":["3.24"],"move":["3.25","13.25"],"ratio":["3.25","3.29","13.25","13.29"],"左右滑动进度的速率倍数":["3.25"],"step":["3.26","3.27","13.26","13.27"],"快捷键调节音量的幅度比例":["3.26"],"快捷键调节播放进度的幅度":["3.27"],"rate":["3.28","13.28"],"内置播放速率的列表":["3.28"],"内置视频长宽比的列表":["3.29"],"default":["3.29","13.5","13.6","13.7","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.39","22.40","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","22.50","22.51","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.39","26.40","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49","26.50","26.51"],"内置视频翻转的列表":["3.30"],"normal":["3.30"],"horizontal":["3.30"],"vertical":["3.30"],"web":["3.31","13.31"],"in":["3.31","13.28","13.29","13.30","13.31","19.1","20.10"],"body":["3.31","13.31"],"网页全屏时":["3.31"],"version":["3.32","13.32"],"设置是否打印播放器版本":["3.32"],"raf":["3.33","13.33"],"设置是否使用":["3.33"],"requestanimationframe":["3.33"],"src":["3.34","5.5","13.34","21.2","25.2"],"when":["3.34","10.3","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.34","15.33"],"destroy":["3.34","13.34"],"在销毁播放器时":["3.34"],"是否同时移除视频的":["3.34"],"但你已经知道播放器的":["4.0"],"属性":["4.0","6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.33","26.34","26.36","26.37"],"方法":["4.0"],"后":["4.0"],"再编写插件是非常简单的事":["4.0"],"可以在实例化的时候加载插件的函数":["4.0"],"function":["4.0","5.1","5.2","5.3","5.4","5.5","5.12","5.13","5.17","5.18","5.19","5.27","5.33","5.34","5.37","5.41","5.42","5.44","9.3","14.0","15.1","15.2","15.3","15.4","15.5","15.12","15.13","15.17","15.18","15.19","15.27","15.33","15.34","15.37","15.41","15.42","15.44","22.4","22.51","26.4","26.51"],"myplugin":["4.0"],"art":["4.0","5.12","7.2","15.12","17.2"],"console":["4.0"],"info":["4.0"],"return":["4.0"],"something":["4.0"],"type":["5.1","5.2","5.3","5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.27","5.28","5.30","5.31","5.32","5.33","5.34","5.36","5.37","5.38","5.39","5.40","5.41","5.42","5.43","5.44","5.45","5.46","5.47","15.1","15.2","15.3","15.4","15.5","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.15","15.16","15.17","15.18","15.19","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.27","15.28","15.29","15.30","15.31","15.32","15.33","15.34","15.36","15.37","15.38","15.39","15.40","15.41","15.42","15.43","15.44","15.45","15.46","15.47","16.1","17.1","18.1","19.2","19.3","19.5","19.6","20.10","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.39","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","22.50","22.51","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.39","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49","26.50","26.51"],"播放视频":["5.1"],"暂停视频":["5.2"],"切换视频的播放和暂停":["5.3"],"parameter":["5.4","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.30","5.31","5.32","5.34","5.35","5.36","5.45","5.46","5.47","15.4","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.15","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.30","15.31","15.32","15.34","15.35","15.36","15.45","15.46","15.47","22.4"],"boolean":["5.4","5.14","5.20","5.21","5.22","5.25","7.1","15.4","15.14","15.20","15.21","15.22","15.24","15.25","16.1","17.1","18.1","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.44","22.45","22.46","22.47","22.48","22.49","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.44","26.45","26.46","26.47","26.48","26.49"],"重置播放器的视频元素":["5.5"],"会移除当前":["5.5"],"并调用一次":["5.5"],"setter":["5.6","5.7","5.8","5.9","5.10","5.11","5.14","5.15","5.20","5.21","5.22","5.23","5.24","5.26","5.30","5.31","5.32","5.35","5.36","5.45","5.46","5.47","15.6","15.7","15.8","15.9","15.10","15.11","15.14","15.15","15.20","15.21","15.22","15.23","15.24","15.26","15.30","15.31","15.32","15.35","15.36","15.45","15.46","15.47"],"number":["5.6","5.7","5.8","5.9","5.15","5.31","13.14","15.6","15.7","15.8","15.9","15.15","15.31","15.47","21.0","22.7","26.7"],"getter":["5.9","5.10","5.14","5.15","5.16","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.28","5.30","5.31","5.32","5.35","5.36","5.38","5.39","5.40","5.46","5.47","15.9","15.10","15.14","15.15","15.16","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.28","15.29","15.30","15.31","15.32","15.35","15.36","15.38","15.39","15.40","15.46","15.47"],"string":["5.11","5.12","5.13","5.23","5.26","5.30","5.32","5.34","5.35","5.36","9.2","9.3","9.5","9.6","15.10","15.11","15.12","15.13","15.23","15.26","15.30","15.32","15.34","15.35","15.36","17.1","19.2","19.3","19.5","19.6","22.1","22.2","22.3","22.5","22.6","22.40","22.42","26.1","26.2","26.3","26.5","26.6","26.40","26.42"],"设置视频地址":["5.11","5.12"],"设置时和":["5.11","5.12"],"设置视频画质地址":["5.13"],"获取视频时长":["5.16"],"下载当前视频帧的截图":["5.17"],"可选参数为截图名字":["5.17"],"获取当前视频帧的截图的":["5.18","5.19"],"base64":["5.18","15.18"],"地址":["5.18","5.19"],"blob":["5.19","15.19"],"设置和获取视频海报":["5.23"],"获取或设置播放器当前状态":["5.26"],"设置视频是否自适应尺寸":["5.27"],"获取播放器的尺寸和坐标信息":["5.28"],"top":["5.29","15.29"],"left":["5.29","15.29"],"right":["5.29","15.29"],"x":["5.29","15.29"],"y":["5.29","15.29"],"当容器只有宽度":["5.33"],"该属性可以自动计算出并设置视频的高度":["5.33"],"动态获取和设置":["5.34"],"开启隔空播放":["5.37"],"视频缓存的比例":["5.38"],"范围是":["5.38","5.40"],"已缓存的媒体时长":["5.39"],"视频播放的比例":["5.40"],"事件的代理函数":["5.41"],"实质上代理了":["5.41"],"的查询函数":["5.42"],"element":["5.43","9.2","9.3","9.5","9.6","15.5","15.43","19.2","19.3","19.5","19.6","22.1","26.1"],"快捷返回播放器的":["5.43"],"动态获取或设置":["5.44"],"css":["5.44"],"变量":["5.44","23.10"],"array":["5.45","9.3","11.1","15.45","19.3","22.29","22.30","22.31","22.32","22.33","22.34","22.35","26.29","26.30","26.31","26.32","26.33","26.34","26.35"],"动态设置画质列表":["5.45"],"object":["5.46","15.46","22.36","22.37","22.38","22.39","22.41","22.43","22.50","26.36","26.37","26.38","26.39","26.41","26.43","26.50"],"类型":["6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.34","26.36","26.37"],"描述":["6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.36"],"disable":["6.1","7.1","8.1","16.1","17.1","18.1"],"var":["7.2","9.4","17.2"],"new":["7.2","17.2","21.3"],"artplayer":["7.2","17.2","20.4","20.5","20.11","20.12","21.2","22.1","23.5","23.11","23.12","24.18","25.2","25.4","26.1"],"container":["7.2","15.33","17.2"],"须先打开设置面板":["9.1"],"然后自带四个内置项":["9.1"],"flip":["9.1"],"playbackrate":["9.1"],"按钮":["9.2"],"html":["9.2","9.3","9.5","9.6","19.2","19.3","19.5","19.6","20.3","23.3","26.39"],"元素的":["9.2","9.3","9.5","9.6"],"选择列表":["9.3"],"icon":["9.3","9.5","9.6","19.3","19.6"],"元素的图标":["9.3"],"selector":["9.3","19.3"],"元素列表":["9.3"],"onselect":["9.3"],"元素点击事件":["9.3"],"列表嵌套":["9.4"],"切换按钮":["9.5"],"范围滑块":["9.6"],"properties":["10.0","11.0","13.0","14.0","15.0"],"the":["10.0","10.1","10.2","10.3","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17","11.2","11.3","11.4","11.5","11.6","11.7","11.8","11.9","11.10","11.11","11.12","12.0","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","12.42","12.43","12.46","12.58","13.0","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.17","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.28","13.29","13.30","13.34","14.0","15.1","15.2","15.4","15.5","15.11","15.12","15.13","15.16","15.18","15.19","15.22","15.28","15.33","15.38","15.39","15.40","15.45","17.1","19.2","19.3","19.5","19.6","20.6","20.9","20.11","20.13","21.0","21.1","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.11","22.22","22.33","22.34","22.36","22.40","22.41","22.47","22.51"],"player":["10.1","10.2","10.3","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17","11.1","12.0","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.14","12.15","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","14.0","15.5","15.28","22.7"],"s":["10.1","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17","12.17","12.18","13.34","14.0","15.5","15.28"],"options":["10.1","22.0"],"manages":["10.2","10.3","10.4","10.5","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17"],"all":["10.2","10.3","10.5","11.1"],"elements":["10.2"],"of":["10.2","11.1","11.6","12.0","13.5","13.6","13.7","13.28","13.29","13.30","15.16","15.38","15.40","20.13","21.0"],"for":["10.3","10.5","12.41","13.8","13.9","13.17","13.26","15.41","19.5","19.6"],"it":["10.3","10.7","22.40"],"essentially":["10.3","15.41"],"proxies":["10.3"],"and":["10.3","10.11","12.0","13.34","14.0","15.23","20.0"],"using":["10.3"],"local":["10.4"],"property":["10.4","10.11","16.1","17.1","18.1","19.2","19.3","19.5","19.6"],"is":["10.4","10.6","10.8","10.9","10.10","10.14","10.16","12.20","20.13"],"used":["10.4","10.6","10.8","10.9","10.10","10.12","10.16","22.39","22.40","22.50"],"to":["10.4","10.6","10.8","10.9","10.10","10.12","10.16","13.1","13.3","13.31","13.32","13.33","13.34","15.12","16.1","17.1","19.1","21.0","22.10","22.15","22.16","22.17","22.19","22.22","22.27","22.33","22.39","22.40","22.47","22.50"],"cache":["10.4"],"method":["10.4","10.6","10.8","10.9","10.10","10.14","10.16"],"notifications":["10.7"],"only":["10.7","15.33","20.11"],"dynamically":["10.8","10.9","10.10","10.16","15.34","15.35","15.36","15.44","15.45"],"context":["10.10","12.37","22.31"],"menu":["10.10","16.0"],"functionality":["10.11","10.14","10.17"],"sets":["10.11","13.32","13.33","15.13","15.14","15.15","15.20","15.21","15.22","15.23","15.26","15.27","15.30","15.31","15.32"],"information":["10.12","22.34"],"panel":["10.12","10.16","12.39","19.0"],"commonly":["10.12"],"layer":["10.13","10.15"],"settings":["10.16","12.39","21.0"],"plugin":["10.17","14.0","24.18"],"with":["10.17","12.0","14.0"],"here":["11.0","15.0"],"returns":["11.1","11.2","11.3","11.4","11.5","11.6","11.7","11.8","11.9","11.10","11.11","11.12","13.2","15.43"],"an":["11.1","12.11","12.48"],"collection":["11.6"],"events":["12.0","14.0","15.41"],"are":["12.0","12.29","12.30","12.31","14.0","21.2"],"divided":["12.0"],"into":["12.0"],"two":["12.0"],"types":["12.0"],"native":["12.0"],"prefixed":["12.0"],"custom":["12.0","12.33","22.29","22.30","22.31","22.32","22.35","22.43"],"listening":["12.0"],"triggered":["12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40"],"switches":["12.2"],"urls":["12.2"],"a":["12.5","12.22","12.33","14.0","15.17","15.33","15.41","15.42","20.13","21.3","21.4","22.4","22.26"],"occurs":["12.11"],"mouse":["12.12","12.13"],"enters":["12.12","12.21","12.23","12.24","12.25"],"state":["12.16"],"windowed":["12.22"],"subtitle":["12.28","22.25"],"offset":["12.28"],"changes":["12.28"],"before":["12.29","21.2"],"subtitles":["12.29","12.30","12.31","22.37"],"updated":["12.29","12.30"],"after":["12.30"],"loaded":["12.31"],"loader":["12.34"],"listens":["12.41"],"browser":["12.42"],"media":["12.46","15.39"],"has":["12.46","15.33"],"whether":["13.1","13.3","13.18","13.31","13.32","13.33","13.34","15.27","16.1","17.1","18.1","20.13","22.10","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.22","22.23","22.24","22.27","22.33","22.44","22.45","22.46","22.47","22.48","22.49"],"enable":["13.1","13.3","22.8","22.22"],"mode":["13.1"],"display":["13.4","22.17","22.33","22.34"],"duration":["13.4"],"throttle":["13.8","13.9"],"boundary":["13.10"],"tolerance":["13.10"],"distance":["13.10"],"maximum":["13.11","13.14"],"record":["13.11","13.12"],"minimum":["13.12"],"delay":["13.13","13.15","13.17"],"auto":["13.16"],"on":["13.18","13.19","13.20","13.21","13.23","13.24","13.25","22.34","22.36","22.41"],"desktop":["13.18"],"mobile":["13.21","13.23","13.24","13.25","20.13"],"refresh":["13.22"],"interval":["13.22"],"size":["13.26","13.27"],"built":["13.28","13.29","13.30"],"list":["13.28","13.29","13.30","15.45","19.3","19.4"],"mount":["13.31"],"attribute":["13.34"],"call":["13.34"],"plugins":["14.0"],"once":["14.0"],"you":["14.0","19.1","20.9"],"familiar":["14.0"],"methods":["14.0"],"becomes":["14.0"],"very":["14.0"],"straightforward":["14.0"],"task":["14.0"],"can":["14.0","20.9"],"load":["14.0"],"during":["14.0"],"instantiation":["14.0"],"removes":["15.5"],"rewind":["15.8"],"similar":["15.12"],"or":["15.15","15.20","15.22","15.26","15.44"],"gets":["15.15","15.16","15.18","15.19","15.20","15.22","15.23","15.25","15.26","15.28"],"downloads":["15.17"],"defined":["15.33"],"this":["15.33","22.4","22.43"],"initiate":["15.37"],"proportion":["15.38","15.40"],"buffered":["15.39"],"proxying":["15.41"],"quickly":["15.43"],"description":["16.1","17.1","18.1","19.2","19.3","19.5","19.6"],"control":["17.1","22.32"],"first":["19.1"],"need":["19.1"],"open":["19.1"],"button":["19.2","19.5"],"selection":["19.3","22.33"],"nested":["19.4"],"range":["19.6"],"slider":["19.6"],"group":["20.1","20.2","20.3","20.4","20.5","23.1","23.2","23.3","23.4","23.5","24.2","24.3"],"bash":["20.2","23.2","24.2","24.3"],"index":["20.3","23.3","24.18"],"jsx":["20.5","20.8","23.5","23.8"],"import":["20.5","21.4","23.5","23.9","25.4"],"from":["20.5","23.5","25.4"],"useeffect":["20.5","23.5"],"useref":["20.5"],"also":["20.9"],"use":["20.9","22.19","22.27","22.47"],"sometimes":["20.10"],"your":["20.10"],"files":["20.10","21.2"],"may":["20.10"],"lose":["20.10"],"typescript":["20.10","23.10"],"hints":["20.10"],"browsers":["20.11"],"production":["20.11"],"build":["20.11"],"supports":["20.11"],"latest":["20.11"],"major":["20.11"],"module":["20.12","23.12"],"tip":["20.12","23.12"],"esm":["20.12","23.12"],"demo":["20.12","23.12"],"https":["20.12","23.12"],"org":["20.12","23.12"],"useragent":["20.13","23.13"],"currently":["20.13"],"detection":["20.13"],"device":["20.13"],"danger":["21.0","25.0"],"due":["21.0"],"increasing":["21.0"],"languages":["21.1","21.2"],"language":["21.2","21.3","21.4","22.42","26.42"],"bundling":["21.2"],"located":["21.2"],"at":["21.2"],"i18n":["21.2","25.2"],"zhtw":["21.4","25.4"],"where":["22.1"],"source":["22.2"],"unique":["22.3"],"undefined":["22.4","22.51","26.4","26.51"],"constructor":["22.4"],"accepts":["22.4"],"as":["22.4"],"second":["22.4"],"f00":["22.6","26.6"],"false":["22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.20","22.23","22.24","22.25","22.26","22.27","22.38","22.44","22.46","22.47","22.48","22.49","26.10","26.11","26.12","26.14","26.15","26.16","26.17","26.25","26.27","26.38","26.44","26.47","26.49"],"by":["22.11"],"automatically":["22.12"],"true":["22.19","22.21","22.22","22.28","22.45","26.19","26.22"],"hotkeys":["22.19"],"if":["22.21"],"blur":["22.22"],"ssr":["22.27","26.27"],"server":["22.27"],"initialize":["22.29","22.30","22.31","22.32","22.35"],"panels":["22.30"],"bottom":["22.32"],"preview":["22.36"],"bar":["22.36"],"supported":["22.37"],"formats":["22.37"],"vtt":["22.37","26.37"],"srt":["22.37","26.37"],"ass":["22.37","26.37"],"controls":["22.38","26.38"],"preload":["22.38"],"metadata":["22.38"],"replace":["22.39"],"specify":["22.40"],"format":["22.40"],"needs":["22.40"],"be":["22.40","22.43"],"matches":["22.41"],"based":["22.41"],"navigator":["22.42","26.42"],"configuration":["22.43"],"will":["22.43"],"deeply":["22.43"],"merged":["22.43"],"automatic":["22.47"],"导入":["23.6"],"你也可以使用选项的类型":["23.9"],"ts":["23.9"],"有时你的":["23.10"],"文件会丢失":["23.10"],"的类型提示":["23.10"],"这时候你可以手动导入类型":["23.10"],"生产构建的":["23.11"],"只兼容最新一个主版本的":["23.11"],"chrome":["23.11"],"last":["23.11"],"目前对于是否移动设备的判断并不准确":["23.13"],"有时候希望通过改变":["23.13"],"来调整播放器的ui":["23.13"],"查看完整演示":["24.1"],"jsdelivr":["24.3"],"每一个弹幕是一个对象":["24.4"],"多个弹幕组成的数组就是弹幕库":["24.4"],"通常只需要":["24.4"],"text":["24.4"],"只有":["24.5"],"danmuku":["24.5","24.18"],"是必须的参数":["24.5"],"其余都是非必填":["24.5"],"弹幕数据":["24.5"],"speed":["24.5"],"弹幕持续时间":["24.5"],"范围在":["24.5"],"margin":["24.5"],"来自用户输入的弹幕":["24.6"],"beforeemit":["24.6"],"filter":["24.6"],"beforevisible":["24.6"],"artplayerplugindanmuku":["24.6"],"visible":["24.6"],"来自服务器的弹幕":["24.6"],"xml":["24.8"],"弹幕":["24.8"],"文件":["24.8"],"data":["24.9","24.11","24.12","24.13","24.14","24.18"],"通过方法":["24.10","24.12","24.13"],"进行隐藏或者显示弹幕":["24.10"],"通过属性":["24.11"],"判断当前弹幕是隐藏或者显示":["24.11"],"发送一条实时弹幕":["24.12"],"libs":["24.12","24.13","24.14","24.18"],"实时改变弹幕配置":["24.13"],"uncompiled":["24.13","24.14","24.18"],"通过":["24.14"],"方法可以重载弹幕库":["24.14"],"或者切换新弹幕库":["24.14"],"或者追加新的弹幕库":["24.14"],"用于清空当前显示的弹幕":["24.15"],"在初始化弹幕插件的时候":["24.16"],"是可以指定弹幕发射器的挂载位置的":["24.16"],"默认是挂载在控制栏的中部":["24.16"],"你也可以把它挂载在播放器以外的地方":["24.16"],"当播放器全屏的时候":["24.16"],"发射器会自动回到控制栏的中部":["24.16"],"假如你挂载的地方是亮色的话":["24.16"],"建议把":["24.16"],"用于获取当前弹幕配置":["24.17"],"鉴于捆绑的多国语言越来越多":["25.0"],"从":["25.0"],"默认语言有":["25.1"],"en":["25.1"],"zh":["25.1"],"打包前的语言文件存放于":["25.2"],"欢迎来添加你的语言":["25.2"],"打包后的语言文件存放于":["25.2"],"dist":["25.2"],"播放器挂载的":["26.1"],"视频源地址":["26.2"],"播放器的唯一标识":["26.3"],"构造函数接受一个函数作为第二个参数":["26.4"],"播放器初始化成功且视频可以播放时触发":["26.4"],"ready":["26.4"],"视频的海报":["26.5"],"是否自动播放":["26.10"],"是否使用快捷键":["26.19"],"是否开启播放器":["26.22"],"字幕时间偏移":["26.25"],"是否使用":["26.27"],"初始化自定义的":["26.29","26.30","26.31","26.35"],"层":["26.29"],"设置面板":["26.30"],"右键菜单":["26.31"],"初始化自定义的底部":["26.32"],"控制栏":["26.32"],"是否在底部控制栏里显示":["26.33"],"画质选择":["26.33"],"列表":["26.33"],"在进度条上显示":["26.34"],"高亮信息":["26.34"],"插件":["26.35"],"在进度条上设置":["26.36"],"预览图":["26.36"],"设置视频的字幕":["26.37"],"支持字幕格式":["26.37"],"用于替换默认图标":["26.39"],"支持":["26.39"],"用于指明视频的格式":["26.40"],"需要配合":["26.40"],"customtype":["26.40"],"通过视频的":["26.41"],"自定义":["26.43"],"配置":["26.43"],"该配置会和自带的":["26.43"],"进行深度合并":["26.43"],"新增你的语言":["26.43"],"是否使用自动":["26.47"],"回放功能":["26.47"],"用于改变内置的css变量":["26.50"]},{"0":["3.25","3.26","5.9","13.28","15.38","15.40","21.0","24.5","25.0"],"1":["3.26","3.28","5.9","5.38","5.40","13.28","15.38","15.40","20.11","21.0","23.10","25.0"],"2":["3.28","20.8","20.12","23.8","23.12","23.13"],"3":["3.23","13.29","20.9","22.2","23.10","26.2"],"4":["6.2","13.29","16.2","21.3","22.47","23.13","26.43"],"5":["3.12","3.14","3.25","3.27","13.28","20.12","21.0","22.29","22.30","23.12","23.13","25.0","26.29","26.30"],"6":["2.0","6.3","7.3","12.0","16.3","17.3","20.12","23.12"],"7":["26.7"],"9":["3.29","9.7","19.7","21.3","26.43"],"10":["2.2","3.11","7.2","17.2"],"11":["2.28"],"13":["6.2","6.3","16.2","16.3"],"14":["9.7","19.7"],"15":["14.0"],"16":["3.29","13.29"],"19":["5.45","15.45"],"21":["6.4","6.5","7.3","7.4","8.4","16.4","16.5","17.3","17.4","18.4"],"22":["8.2","8.3","9.8","18.2","18.3","19.8"],"23":["22.29","26.29"],"24":["6.5","16.5"],"25":["3.28","24.5"],"29":["5.45","8.5","18.5"],"34":["22.30","26.30"],"35":["3.7"],"40":["7.5","17.5"],"50":["3.10"],"75":["13.28"],"200":["3.6","3.8","3.9","3.21"],"300":["3.17"],"1000":["3.15","3.22","3.24"],"2000":["3.4"],"3000":["3.13","3.16"],"code":["0.1","0.2","0.4","0.5","0.6","0.7","0.13","0.14","0.15","0.16","0.17","1.1","1.6","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","3.5","3.6","3.7","3.17","3.29","3.30","5.1","5.2","5.3","5.12","5.14","5.16","5.17","5.20","5.21","5.22","5.23","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.44","5.45","5.46","9.3","10.1","10.2","10.5","12.0","12.20","12.29","12.30","12.31","15.2","15.12","15.16","15.37","15.44","15.45","19.3","22.1","22.7","22.10","22.19","22.30","22.31","22.32","22.35","22.43","22.47","24.10","24.16","25.2","26.1","26.4","26.10","26.19","26.30","26.31","26.32","26.35","26.39","26.43","26.47","26.50"],"js":["0.2","0.4","0.14","0.17","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.45","6.2","6.3","6.4","7.4","8.4","9.3","9.6","9.7","10.2","12.0","14.0","15.16","15.45","16.2","16.3","16.4","17.4","18.4","19.7","21.3","22.2","22.10","22.19","22.29","22.30","22.47","24.4","24.6","24.11","24.12","24.13","24.14","25.1","26.2","26.4","26.29","26.30","26.32","26.43"],"var":["0.2","0.4","2.0","4.0","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.7","9.8","9.9","10.2","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","21.3","22.2","22.29","22.30","24.13","24.14","24.18","25.3","25.4","26.2","26.29","26.30"],"proxy":["0.3"],"方法用于代理":["0.3"],"hover":["0.3"],"方法用于代理自定义的":["0.3"],"div":["0.3","0.6","0.8","0.9","0.10","0.13","0.15","0.16","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","2.41","3.1","3.2","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.30","3.32","3.33","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.27","5.30","5.31","5.32","5.34","5.35","5.36","5.39","5.41","5.43","5.44","5.46","5.47","9.1","9.3","10.5","12.0","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.20","12.22","12.24","12.26","12.27","12.28","12.29","12.30","12.31","12.34","12.39","12.40","12.41","15.1","15.2","15.3","15.12","15.16","15.20","15.22","15.28","15.33","15.37","15.44","15.45","15.46","15.47","19.3","20.4","22.1","22.7","22.10","22.19","22.31","22.32","22.35","22.39","22.43","22.47","23.4","24.8","24.16","26.1","26.3","26.4","26.5","26.7","26.8","26.9","26.10","26.13","26.17","26.19","26.21","26.26","26.35","26.39","26.43","26.45","26.46","26.47","26.50"],"classname":["0.4","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.14","0.15","0.16","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.3","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.16","3.17","3.18","3.19","3.20","3.22","3.23","3.26","3.27","3.29","3.30","3.32","3.33","5.1","5.2","5.3","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.43","5.44","5.46","5.47","9.1","9.3","10.1","10.5","12.0","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.15","12.17","12.18","12.20","12.22","12.24","12.26","12.28","12.29","12.30","12.31","12.40","15.1","15.2","15.3","15.12","15.16","15.20","15.22","15.28","15.37","15.44","15.45","15.46","19.3","22.1","22.7","22.10","22.19","22.31","22.32","22.35","22.39","22.43","22.47","24.8","24.10","24.16","26.1","26.3","26.4","26.5","26.7","26.9","26.10","26.13","26.17","26.19","26.31","26.32","26.35","26.39","26.43","26.45","26.46","26.47","26.50"],"run":["0.4","0.5","0.6","0.7","0.10","0.13","0.14","0.15","0.16","0.17","1.1","1.6","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.29","3.30","3.32","5.1","5.2","5.3","5.8","5.10","5.12","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.44","5.46","5.47","9.1","9.3","10.1","10.2","10.5","12.0","12.6","12.7","12.8","12.10","12.20","12.22","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.12","15.16","15.20","15.28","15.37","15.44","15.45","19.3","22.1","22.7","22.10","22.19","22.30","22.31","22.32","22.35","22.43","22.47","24.8","24.10","24.16","26.1","26.4","26.5","26.7","26.10","26.19","26.31","26.32","26.35","26.39","26.43","26.47","26.50"],"art":["0.4","0.12","2.0","5.11","5.13","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.5","9.3","9.4","9.7","9.8","9.9","10.2","12.0","14.0","15.11","15.13","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.5","19.4","19.7","19.8","19.9","22.2","23.10","24.14","24.18","25.3","25.4","26.2"],"new":["0.4","2.0","4.0","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.3","9.3","9.4","9.7","9.8","9.9","10.2","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.3","19.4","19.7","19.8","19.9","21.2","22.2","24.14","24.18","25.3","26.2"],"artplayer":["0.4","2.0","4.0","5.5","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.4","9.8","9.9","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.4","19.8","19.9","20.3","20.6","21.4","22.2","23.3","23.4","23.6","23.9","23.10","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","26.2"],"container":["0.4","2.0","4.0","6.4","6.5","7.3","7.5","9.3","9.4","9.8","9.9","12.0","14.0","16.4","16.5","17.3","17.5","19.4","19.8","19.9","20.4","20.5","22.2","22.11","23.5","24.18","26.11"],"方法用于更新":["0.6"],"对象":["0.6"],"方法用于动态更新层":["0.8"],"show":["0.8","0.9","0.10","0.12","0.16","10.7"],"属性用于设置是否显示全部层":["0.8"],"toggle":["0.8","0.9","0.10","0.16","22.18"],"方法用于切换是否显示全部层":["0.8"],"方法用于动态更新控制器":["0.9"],"属性用于设置是否显示全部控制器":["0.9"],"方法用于切换是否显示全部控制器":["0.9"],"属性用于设置是否显示全部菜单":["0.10"],"方法用于切换是否显示全部菜单":["0.10"],"方法设置当前字幕地址和选项":["0.11"],"texttrack":["0.11"],"获取当前字幕轨":["0.11"],"activecues":["0.11"],"获取当前活跃的字幕列表":["0.11"],"cues":["0.11"],"通过":["0.12"],"控制面板的显示与隐藏":["0.12"],"触发的事件名为":["0.12"],"属性用于切换是否显示加载层":["0.13"],"属性用于切换是否显示遮罩层":["0.15"],"属性用于设置是否显示全部设置项":["0.16"],"方法用于切换是否显示全部设置项":["0.16"],"字符串":["1.11"],"app":["2.0","4.0","7.2","7.5","9.3","9.4","9.8","9.9","12.0","14.0","17.2","17.5","19.4","19.8","19.9","22.2","24.18"],"url":["2.0","4.0","5.11","7.2","7.5","9.4","9.9","12.0","14.0","15.11","15.13","17.2","17.5","19.4","19.9","22.36","22.37","24.18","26.36","26.37"],"assets":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.4","9.9","12.0","14.0","17.2","18.2","18.3","18.4","18.5","19.4","19.9","22.2","22.29","24.18","26.29"],"sample":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.4","9.9","12.0","14.0","17.2","18.2","18.3","18.4","18.5","19.4","19.9","22.29","24.18","26.29"],"mp4":["2.0","4.0","7.2","14.0","17.2","24.18"],"on":["2.0","4.0","12.16","19.6","22.21","22.45"],"canplay":["2.0"],"事件":["2.41"],"浏览器可以播放媒体文件了":["2.42"],"浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束":["2.43"],"offlineaudiocontext":["2.44"],"duration":["2.45","13.12","13.13","15.39"],"媒体内容变为空":["2.46"],"例如":["2.46"],"视频停止播放":["2.47"],"获取媒体数据时出错":["2.48"],"media":["2.49","12.59","13.34"],"已加载元数据":["2.50"],"播放已暂停":["2.51"],"播放已开始":["2.52"],"由于缺乏数据而暂停或延迟后":["2.53"],"在浏览器加载资源时周期性触发":["2.54"],"播放速率发生变化":["2.55"],"跳帧":["2.56","2.57"],"用户代理":["2.58"],"媒体数据加载已暂停":["2.59"],"currenttime":["2.60"],"音量发生变化":["2.61"],"由于暂时缺少数据":["2.62"],"可以打印出视频全部的内置事件":["3.1"],"默认关闭":["3.1"],"默认为":["3.4","3.8","3.9","3.10","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.27","3.31","3.34","5.4"],"单位为毫秒":["3.15","3.21","3.24"],"true":["3.18","3.19","3.31","3.32","3.34","5.4","13.34","26.21","26.28","26.45"],"false":["3.20","3.33","13.33","26.8","26.9","26.13","26.18","26.20","26.23","26.24","26.26","26.46","26.48"],"是否把播放器挂在在":["3.31"],"元素下":["3.31"],"目前主要用于进度条的平滑效果":["3.33"],"属性并调用":["3.34"],"load":["3.34","5.5","13.34","15.5"],"以主动释放媒体资源":["3.34"],"开启后可以在单页应用或频繁创建":["3.34"],"销毁播放器的场景下":["3.34"],"dosomething":["4.0","14.0"],"video":["4.0","5.34","5.38","5.40","7.2","9.4","9.9","10.12","14.0","15.1","15.2","15.7","15.8","15.9","15.10","15.14","15.15","15.17","15.23","15.25","15.27","15.33","15.34","15.35","17.2","19.4","19.9","22.4","22.14","22.15","22.16","24.18","26.41"],"plugins":["4.0"],"ready":["4.0","12.2","12.53","22.4"],"可以在实例化之后再加载插件的函数":["4.0"],"销毁播放器":["5.4"],"接受一个参数表示是否销毁后同时移除播放器的":["5.4"],"html":["5.4","20.12","22.39","23.12","26.27","26.33"],"常用于在单页应用中手动释放媒体资源或重新初始化视频标签":["5.5"],"注意":["5.5"],"全局配置":["5.5"],"remove":["5.5","10.8","10.9","10.10","10.14","10.16"],"视频时间跳转":["5.6"],"单位秒":["5.6","5.7","5.8","26.34"],"视频时间快进":["5.7"],"视频时间快退":["5.8"],"设置和获取视频音量":["5.9"],"范围在":["5.9","26.25"],"string":["5.10","6.1","7.1","8.1","11.11","16.1","18.1","22.36","22.37","26.33","26.34","26.36","26.37"],"设置和获取视频地址":["5.10"],"类似":["5.11","5.12","5.13","5.15","5.42"],"但会执行一些优化操作":["5.11","5.12"],"switchurl":["5.13","15.13"],"但会带上之前的播放进度":["5.13"],"设置和获取视频是否静音":["5.14"],"设置和获取视频当前时间":["5.15"],"设置时间时和":["5.15"],"seek":["5.15"],"但它不会触发额外的事件":["5.15"],"返回的是一个":["5.18","5.19"],"promise":["5.18","5.19"],"设置和获取播放器窗口全屏":["5.20"],"设置和获取播放器网页全屏":["5.21"],"设置和获取播放器画中画模式":["5.22"],"只有在视频播放前才能看到海报效果":["5.23"],"boolean":["5.24","6.1","8.1","9.5","19.5","26.33"],"设置和获取播放器迷你模式":["5.24"],"获取视频是否正在播放中":["5.25"],"支持":["5.26","5.30"],"standard":["5.26","15.26"],"正常":["5.26"],"mini":["5.26","22.12","22.26"],"迷你窗":["5.26"],"pip":["5.26"],"type":["5.29","11.10","20.9","23.9","23.10"],"getter":["5.29"],"这些属性是对":["5.29"],"rect":["5.29","15.29"],"的快捷访问":["5.29"],"设置和获取播放器翻转":["5.30"],"normal":["5.30","13.30"],"horizontal":["5.30","13.30"],"vertical":["5.30"],"设置和获取播放器播放速度":["5.31"],"设置和获取播放器长宽比":["5.32"],"元素的属性":["5.34"],"动态获取和设置视频类型":["5.35"],"动态获取和设置播放器主题颜色":["5.36"],"常配合":["5.38","5.40"],"timeupdate":["5.38","5.40"],"事件使用":["5.38","5.40"],"通常与":["5.39"],"loaded":["5.39"],"一起使用":["5.39","26.40"],"用于展示缓冲进度细节":["5.39"],"和":["5.41","26.6","26.14","26.15","26.16"],"removeeventlistener":["5.41","15.41"],"当使用":["5.41"],"来处理事件":["5.41"],"播放器销毁时也会自动销毁该事件":["5.41"],"document":["5.42","12.41","15.42"],"queryselector":["5.42","15.42"],"但被查询的对象局限于当前播放器内":["5.42"],"可以避免同类名的错误":["5.42"],"元素":["5.43"],"动态设置缩略图":["5.46"],"number":["5.47","9.2","9.3","17.1","19.3","22.34","22.36","26.34","26.36"],"动态设置字幕偏移":["5.47"],"是否禁用组件":["6.1","7.1","8.1"],"name":["6.1","7.1","7.2","8.1","14.0","16.1","17.2","18.1","22.37","26.37"],"组件唯一名称":["7.1"],"用于标记类名":["7.1"],"index":["7.1","7.2","17.1","17.2","24.6","24.9","24.11","24.12","24.13","24.14"],"controls":["7.2","17.2"],"your":["7.2","17.2","22.43"],"button":["7.2","17.2","22.18","22.44","22.49"],"img":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5","22.29","26.29"],"layer":["8.2","8.3","8.4","8.5","10.8","12.35","12.36","18.2","18.3","18.4","18.5"],"png":["8.2","8.3","8.5","18.2","18.3","18.5"],"aspectratio":["9.1"],"subtitleoffset":["9.1"],"icon":["9.2","19.2","19.5"],"元素的图标":["9.2","9.5","9.6"],"onclick":["9.2","19.2"],"function":["9.2","9.5","9.6","11.9","19.2","19.3","19.6","20.5","22.14","22.15","22.16","22.17","23.5","24.6"],"元素点击事件":["9.2"],"width":["9.2","19.3"],"列表宽度":["9.3"],"tooltip":["9.3","9.5","9.6","19.3"],"提示文本":["9.3","9.6"],"switch":["9.5","19.5"],"按钮默认状态":["9.5"],"onswitch":["9.5"],"按钮切换事件":["9.5"],"range":["9.6","15.9"],"array":["9.6","19.6"],"默认状态数组":["9.6"],"onrange":["9.6","19.6"],"完成时触发的事件":["9.6"],"onchange":["9.6"],"变化时触发的事件":["9.6"],"here":["10.0","13.0"],"following":["10.3"],"methods":["10.3"],"to":["10.3","10.13","10.14","10.15","12.0","12.2","13.0","15.5","15.6","15.11","15.13","15.29","15.41","15.42","18.1","20.13","22.4","22.9","22.13","22.14","22.18","22.20","22.23","22.24","22.28","22.38","22.41","22.44","22.45","22.46","22.48","22.49"],"handle":["10.3","15.41"],"will":["10.3","22.8","22.38"],"also":["10.3"],"be":["10.3","11.1"],"automatically":["10.3","12.18","12.19","15.33","15.41","22.38"],"destroyed":["10.3","12.6"],"is":["10.3","10.13","10.15","12.1","12.3","12.5","12.6","12.9","12.10","12.11","12.18","12.19","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.53","13.3","13.5","13.28","13.29","13.30","13.33","13.34","15.14","15.23","15.25","15.41","22.1","22.4","22.40"],"a":["10.4","10.7","10.8","10.9","12.26","12.27","12.56","12.57","13.6","13.7","13.15","15.4","15.6","15.18","15.19","22.44","22.46","22.51"],"get":["10.4","15.9","15.10","15.35","15.36"],"retrieve":["10.4","10.6"],"del":["10.4"],"the":["10.5","12.11","12.44","12.49","12.55","12.60","12.61","13.31","13.32","15.7","15.8","15.9","15.10","15.14","15.15","15.17","15.20","15.21","15.23","15.24","15.25","15.26","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.42","15.43","16.1","18.1","19.1","20.10","22.14","22.15","22.16","22.17","22.18","22.20","22.21","22.23","22.24","22.42","22.43","22.48","22.49","22.50"],"player":["10.5","11.6","12.11","12.12","12.13","12.28","13.2","13.31","13.32","13.34","15.4","15.20","15.21","15.22","15.24","15.26","15.30","15.31","15.32","15.36","15.43","20.5","22.1","22.3","22.4","22.6","22.11","22.12","22.22","22.23","22.24","22.48","23.5"],"an":["10.6","15.17"],"value":["10.6"],"update":["10.6","10.10","10.16"],"has":["10.7","12.47","12.62"],"property":["10.7","10.13","10.15","11.1","15.33","22.33","22.34","22.36","22.37"],"for":["10.7","10.17","11.6","11.7","12.1","12.46","13.10","13.11","13.12","13.13","13.15","13.16","13.21","13.22","13.23","13.24","13.25","13.27","17.1","20.9","20.11","21.2","22.3","22.22"],"displaying":["10.7"],"control":["10.9","22.17","22.33"],"items":["10.10","10.16"],"returns":["10.11"],"current":["10.11","10.12","15.5","15.15","15.17","15.18","15.19","15.26"],"style":["10.11"],"method":["10.11","10.17"],"of":["10.11","10.12","11.2","11.3","11.4","11.8","11.12","13.4","13.14","15.15","15.17","15.18","15.19","15.34","17.1","19.3","19.5","20.11","22.40"],"status":["10.12"],"and":["10.12","12.2","15.3","15.5","15.9","15.10","15.24","15.28","15.30","15.31","15.32","15.33","15.34","15.35","15.36","15.41","20.12","22.4","22.39","22.41"],"such":["10.12","20.10","22.22"],"as":["10.12","22.22"],"used":["10.13","10.14","10.15","15.5","15.39","17.1"],"set":["10.13","10.15","12.18","12.19","15.10","15.33","15.34","15.35","15.36","15.46","15.47"],"whether":["10.13","10.15","13.19","13.20","15.4","15.14","15.25","22.9","22.13","22.28"],"display":["10.13","10.15","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.42","22.44","22.49"],"hotkeys":["10.14"],"only":["10.17","15.23","22.5","22.26"],"one":["10.17"],"add":["10.17","22.43","22.46"],"dynamically":["10.17","15.46","15.47"],"adding":["10.17"],"this":["11.1","22.8"],"can":["11.1","12.42","13.1","15.33","20.10","20.11","22.51"],"useful":["11.1","22.27"],"information":["11.2","15.28"],"environment":["11.3"],"variables":["11.3","15.44","22.50"],"timestamp":["11.4"],"default":["11.5","11.12","13.3","13.8","13.9","13.18","13.28","13.29","13.30","13.32","13.33","13.34","19.5","19.6","20.5","23.5"],"configuration":["11.5"],"utility":["11.6"],"functions":["11.6"],"validation":["11.7","11.9"],"schema":["11.7"],"constructor":["11.8"],"detection":["11.10"],"required":["11.11"],"options":["11.12","13.30","20.9"],"first":["12.1"],"becomes":["12.2"],"play":["12.2"],"paused":["12.3"],"starts":["12.4"],"playing":["12.4","12.42"],"pressed":["12.5"],"gains":["12.7"],"loses":["12.8"],"focus":["12.8"],"double":["12.9","13.17","13.18","13.19"],"clicked":["12.9","12.10"],"while":["12.11","12.48"],"loading":["12.11"],"or":["12.12","12.21","12.23","12.24","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","15.14","15.21"],"leaves":["12.12"],"moves":["12.13"],"over":["12.13"],"s":["12.14","12.19","15.20","15.21","15.22","15.26","15.30","15.31","15.32","15.33","15.36","15.43","22.6","22.7","22.11","22.41"],"dimensions":["12.14","15.28","22.11"],"change":["12.14"],"enters":["12.15","22.12"],"viewport":["12.15"],"changes":["12.16","12.17","12.40"],"mobile":["12.16"],"devices":["12.16"],"aspect":["12.17","15.32","22.16"],"ratio":["12.17","22.16"],"height":["12.18","15.33"],"size":["12.19","15.27"],"flipped":["12.20"],"exits":["12.21","12.23","12.24","12.25"],"windowed":["12.21"],"mode":["12.21","12.23","12.24","15.22","22.8","22.12","22.27","22.28","24.5"],"error":["12.22"],"occurs":["12.22"],"web":["12.23","15.21","22.24"],"fullscreen":["12.23","22.48"],"picture":["12.25","15.22","22.20"],"in":["12.25","12.28","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","15.6","15.8","15.22","15.39","22.17","22.20","22.33","22.38","22.43","22.48","22.50"],"takes":["12.26"],"performs":["12.27","15.12"],"time":["12.27","15.6","15.7","15.8","15.15","22.34","26.34"],"panel":["12.32","13.5","13.6","13.7","13.22","19.1"],"shown":["12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"hidden":["12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"menu":["12.37","13.3"],"bar":["12.38","22.17","22.26","22.32","22.33","22.34"],"state":["12.40","15.20","15.30","19.5","19.6"],"event":["12.41","13.8","13.9","13.10","13.17","15.41","19.3","19.6"],"from":["12.41","15.38","15.40","20.12","21.0","21.4","22.25","23.9","25.2"],"start":["12.42","22.9"],"browser":["12.43"],"estimates":["12.43"],"triggered":["12.45","19.6","22.4"],"become":["12.46"],"empty":["12.46"],"example":["12.46"],"playback":["12.47","12.51","12.52","12.62","15.15","15.31","22.13","22.15"],"occurred":["12.48"],"metadata":["12.50","26.38"],"fired":["12.54"],"user":["12.58"],"agent":["12.58"],"refer":["13.0"],"which":["13.1","22.5"],"print":["13.1","13.32"],"all":["13.1"],"built":["13.1","22.43","22.50"],"context":["13.3"],"notification":["13.4"],"messages":["13.4"],"milliseconds":["13.4","13.8","13.9","13.17","13.22"],"settings":["13.5","13.6","13.7","19.1"],"pixels":["13.5","13.10"],"view":["13.10"],"count":["13.11"],"feature":["13.12","13.13","22.47"],"automatic":["13.14","13.15"],"reconnection":["13.14","13.15"],"attempts":["13.14"],"when":["13.14","13.15","15.11","15.12","15.41","22.4","22.5","22.12","22.22"],"connection":["13.15"],"delay":["13.16","13.21","13.24"],"bottom":["13.16","22.17","22.33"],"click":["13.17","13.18","13.19","19.2","19.3"],"toggles":["13.18","13.19","13.20"],"single":["13.20"],"rotation":["13.21"],"speed":["13.23","13.25","22.15"],"multiplier":["13.23","13.25"],"long":["13.23","13.24","22.46"],"press":["13.23","13.24","22.46"],"left":["13.25"],"right":["13.25"],"adjustment":["13.26"],"via":["13.26","13.27"],"keyboard":["13.26","13.27"],"shortcuts":["13.26","13.27"],"seeking":["13.27"],"rates":["13.28"],"ratios":["13.29"],"under":["13.31"],"element":["13.31","15.34"],"requestanimationframe":["13.33"],"currently":["13.33","15.25","22.3","22.6","22.42"],"it":["13.33","19.1","22.38"],"actively":["13.34"],"release":["13.34","15.5"],"resources":["13.34","21.0"],"destroying":["13.34"],"myplugin":["14.0"],"console":["14.0"],"info":["14.0"],"return":["14.0","22.51"],"something":["14.0"],"pause":["15.3"],"accepts":["15.4"],"indicating":["15.4"],"src":["15.5"],"calls":["15.5"],"once":["15.5"],"commonly":["15.5"],"manually":["15.5","20.10"],"specific":["15.6"],"fast":["15.7"],"seconds":["15.8","15.39"],"similar":["15.11","15.13","15.42"],"setting":["15.11","15.12","15.15"],"but":["15.12","15.13","15.42"],"some":["15.12"],"optimization":["15.12"],"operations":["15.12"],"quality":["15.13"],"gets":["15.14","15.21","15.24","15.30","15.31","15.32"],"frame":["15.17"],"screenshot":["15.18","15.19"],"window":["15.20","22.23"],"effect":["15.23","22.22"],"visible":["15.23"],"sets":["15.24"],"supported":["15.26"],"values":["15.26"],"adapts":["15.27"],"its":["15.27"],"coordinate":["15.28"],"these":["15.29"],"properties":["15.29"],"provide":["15.29"],"quick":["15.29"],"access":["15.29"],"calculate":["15.33"],"attributes":["15.34"],"buffered":["15.38"],"ranging":["15.38","15.40","22.25"],"often":["15.38","15.40","22.11"],"typically":["15.39"],"alongside":["15.39"],"using":["15.41"],"search":["15.42"],"css":["15.44","22.50"],"subtitle":["15.47"],"offset":["15.47","22.25"],"component":["16.1","18.1"],"unique":["16.1","17.1","18.1"],"class":["17.1"],"marking":["17.1"],"comes":["19.1"],"with":["19.1","22.40","22.43"],"four":["19.1"],"elements":["19.3"],"onselect":["19.3"],"text":["19.3","26.34"],"item":["19.5"],"usage":["20.0"],"bash":["20.1","23.1"],"npm":["20.1","23.1","24.2"],"jsdelivr":["20.2","23.2"],"net":["20.2","23.2","24.3"],"https":["20.2","23.2","24.3"],"head":["20.3","23.3"],"title":["20.3","23.3"],"demo":["20.3"],"meta":["20.3"],"charset":["20.3"],"template":["20.4","23.4"],"ref":["20.4"],"export":["20.5","23.5"],"option":["20.5","23.5"],"getinstance":["20.5","23.5"],"rest":["20.5","23.5"],"const":["20.5","23.5"],"d":["20.6"],"import":["20.8","20.10","23.8","23.10","25.2"],"ts":["20.9","26.40"],"cases":["20.10"],"you":["20.10","20.11","20.13","22.27"],"types":["20.10"],"variable":["20.10"],"version":["20.11","20.12","21.0","23.11"],"chrome":["20.11"],"last":["20.11"],"starting":["20.12","21.0"],"not":["20.13"],"always":["20.13"],"accurate":["20.13"],"sometimes":["20.13"],"may":["20.13"],"want":["20.13","22.27"],"adjust":["20.13","22.38"],"bundled":["21.0","21.2"],"multilingual":["21.0"],"are":["21.1"],"en":["21.1","26.42"],"zh":["21.1","21.4","25.4","26.42"],"cn":["21.1","25.1"],"contributions":["21.2"],"welcome":["21.2"],"i18n":["21.4","25.4"],"tw":["21.4","25.4"],"mounted":["22.1"],"identifier":["22.3"],"successfully":["22.4"],"initialized":["22.4"],"image":["22.5","22.36"],"appears":["22.5","22.25"],"color":["22.6","24.5"],"live":["22.8"],"streaming":["22.8"],"fill":["22.11"],"entire":["22.11"],"multiple":["22.21"],"players":["22.21"],"exist":["22.21"],"page":["22.21"],"ui":["22.22","26.22"],"enabled":["22.22"],"overlays":["22.22"],"5s":["22.25","26.25"],"progress":["22.26","22.34"],"that":["22.26"],"side":["22.27"],"rendering":["22.27"],"mount":["22.27"],"if":["22.27"],"use":["22.28"],"menus":["22.31"],"list":["22.33"],"description":["22.33","22.34","22.36","22.37"],"thumbnail":["22.36"],"safari":["22.38","26.38"],"supports":["22.39"],"strings":["22.39"],"htmlelement":["22.39","26.39"],"together":["22.40"],"customtype":["22.40"],"by":["22.40"],"determined":["22.40"],"suffix":["22.40"],"delegates":["22.41"],"decoding":["22.41"],"third":["22.41","22.51"],"party":["22.41","22.51"],"tolowercase":["22.42","26.42"],"language":["22.43"],"enable":["22.45"],"events":["22.45"],"rotate":["22.48"],"modify":["22.50"],"htmlcanvaselement":["22.51","26.51"],"useref":["23.5"],"let":["23.10"],"null":["23.10"],"参数":["23.10"],"对于古老的浏览器":["23.11"],"可以使用":["23.11"],"legacy":["23.11"],"文件":["23.11"],"从":["23.12"],"开始":["23.12"],"所以在":["23.13"],"开始新增了一个":["23.13"],"install":["24.2"],"就可以发送一个弹幕":["24.4"],"其余都是非必要参数":["24.4"],"弹幕文本":["24.4"],"弹幕上下边距":["24.5"],"支持像素数字和百分比":["24.5"],"opacity":["24.5"],"弹幕透明度":["24.5"],"ffffff":["24.5"],"默认弹幕颜色":["24.5"],"可以被单独弹幕项覆盖":["24.5"],"data":["24.6","24.7","24.10","24.15","24.17"],"libs":["24.6","24.7","24.9","24.10","24.11","24.15","24.17"],"uncompiled":["24.6","24.7","24.9","24.10","24.11","24.12","24.15","24.17"],"plugin":["24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17"],"danmuku":["24.6","24.9","24.11","24.12","24.13","24.14","24.15","24.17"],"保存到数据库":["24.6"],"savedanmu":["24.6"],"bilibili":["24.8"],"网站的弹幕格式一致":["24.8"],"theme":["24.16"],"设置成":["24.16"],"light":["24.16"],"否则会看不清":["24.16"],"无需手动导入":["25.1"],"group":["25.2"],"id":["25.2"],"容器":["26.1"],"目前只用于记忆播放":["26.3"],"autoplayback":["26.3"],"事件一样":["26.4"],"只会出现在播放器初始化且未播放的状态下":["26.5"],"播放器主题颜色":["26.6"],"目前用于":["26.6"],"进度条":["26.6"],"播放器的默认音量":["26.7"],"使用直播模式":["26.8"],"会隐藏进度条和播放时间":["26.8"],"是否默认静音":["26.9"],"播放器的尺寸默认会填充整个":["26.11"],"容器尺寸":["26.11"],"所以经常出现黑边":["26.11"],"该值能自动调整播放器尺寸以隐藏黑边":["26.11"],"当播放器滚动到浏览器视口以外时":["26.12"],"自动进入":["26.12"],"迷你播放":["26.12"],"模式":["26.12","26.28"],"是否循环播放":["26.13"],"是否显示视频翻转功能":["26.14"],"目前只出现在":["26.14"],"设置面板":["26.14","26.15","26.16","26.18","26.22","26.25"],"右键菜单":["26.14","26.15","26.16","26.22"],"是否显示视频播放速度功能":["26.15"],"会出现在":["26.15","26.16"],"是否显示视频长宽比功能":["26.16"],"是否在底部控制栏里显示":["26.17","26.18","26.20"],"视频截图":["26.17"],"功能":["26.17"],"的开关按钮":["26.18","26.20"],"画中画":["26.20"],"假如页面里同时存在多个播放器":["26.21"],"是否只能让一个播放器播放":["26.21"],"的背景虚化效果":["26.22"],"开启后":["26.22"],"是否在底部控制栏里显示播放器":["26.23","26.24"],"窗口全屏":["26.23"],"按钮":["26.23","26.24","26.49"],"网页全屏":["26.24"],"出现在":["26.25"],"迷你进度条":["26.26"],"只在播放器失去焦点后且正在播放时出现":["26.26"],"挂载模式":["26.27"],"假如你希望在播放器挂载前":["26.27"],"就提前渲染好播放器所需的":["26.27"],"时有用":["26.27"],"你可以通过":["26.27"],"在移动端是否使用":["26.28"],"类型":["26.33"],"描述":["26.33","26.34","26.37"],"默认画质":["26.33"],"画质名字":["26.33"],"高亮时间":["26.34"],"高亮文本":["26.34"],"预览图地址":["26.36"],"预览图数量":["26.36"],"column":["26.36"],"字幕名字":["26.37"],"字幕地址":["26.37"],"字幕类型":["26.37"],"可选":["26.37"],"preload":["26.38"],"中会自动调整为":["26.38"],"字符串和":["26.39"],"默认视频的格式就是视频地址的后缀":["26.40"],"如":["26.40"],"m3u8":["26.40"],"mkv":["26.40"],"但有时候视频地地址没有正确的后缀":["26.40"],"进行匹配":["26.41"],"把视频解码权交给第三方程序进行处理":["26.41"],"处理的函数能接收三个参数":["26.41"],"视频":["26.41"],"dom":["26.41"],"默认显示语言":["26.42"],"目前支持":["26.42"],"是否在移动端显示一个":["26.44"],"锁定按钮":["26.44"],"用于隐藏底部":["26.44"],"控制栏":["26.44"],"是否在移动端启用视频元素上的手势事件":["26.45"],"是否在移动端添加长按视频快进功能":["26.46"],"是否在移动端的网页全屏时":["26.48"],"根据视频尺寸和视口尺寸":["26.48"],"旋转播放器":["26.48"],"是否显示":["26.49"],"当前只有部分浏览器支持该功能":["26.49"],"函数可以返回一个第三方的":["26.51"],"或者":["26.51"],"htmlvideoelement":["26.51"],"例如可以代理一个已经存在的":["26.51"]},{"0":["9.6","13.25","13.26","15.9"],"1":["9.6","13.26","15.9","19.6","20.10"],"2":["13.28","22.1","24.5","26.1"],"3":["13.23","20.7","20.10","23.7"],"4":["22.7","22.10","22.19","22.31","22.32","22.39","22.43","25.1","26.10","26.19","26.31","26.32","26.39","26.47","26.50"],"5":["9.6","13.12","13.27","19.6","22.47","26.47"],"6":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40"],"7":["2.19","2.21","2.23","2.25","2.26","5.16","5.28","5.33","15.16","15.28","15.33","22.4","26.4","26.39"],"8":["2.17","2.20","5.1","5.14","5.21","5.31","5.32","5.34","5.35","5.36","5.44","12.20","15.44","20.3"],"9":["2.29","2.30","2.31","5.12","5.20","5.22","5.23","5.37","12.29","12.30","12.31","13.29","15.12","15.20","15.22","15.37","22.43","26.4"],"10":["2.6","2.18","2.24","7.5","9.6","13.11","17.5","24.4"],"11":["5.2","5.3","5.21","5.33","12.28","15.2","15.33","23.11"],"12":["22.31","26.31"],"15":["22.35","26.35"],"16":["22.32","26.32"],"17":["4.0","14.0"],"25":["13.28"],"29":["15.45"],"35":["13.7"],"50":["13.10"],"200":["13.6","13.8","13.9","13.21"],"250":["9.3","13.5","19.3"],"300":["13.17"],"1000":["13.22","13.24","24.6"],"2000":["13.4"],"3000":["13.13"],"是指挂载在":["0.0","1.0","5.0"],"js":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.15","0.16","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.41","5.44","5.46","5.47","9.1","9.5","10.1","10.4","10.5","10.6","10.14","12.2","12.6","12.17","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.12","15.20","15.22","15.28","15.33","15.37","15.44","15.46","19.3","19.6","21.0","22.1","22.4","22.7","22.31","22.32","22.35","22.39","22.43","24.7","24.9","24.10","24.15","24.16","24.17","25.0","26.1","26.7","26.10","26.19","26.31","26.34","26.35","26.39","26.47","26.50"],"var":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.14","0.15","0.16","0.17","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.12","5.14","5.16","5.20","5.22","5.23","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.44","5.46","9.5","10.1","10.5","10.14","12.22","12.29","12.30","12.31","15.12","15.16","15.20","15.22","15.33","15.44","15.45","19.3","21.4","22.1","22.7","22.10","22.19","22.31","22.32","22.43","22.47","24.6","24.9","24.10","24.11","24.12","25.1","25.2","26.1","26.4","26.10","26.19","26.31","26.32","26.39","26.43","26.47"],"art":["0.1","0.2","0.5","0.6","0.7","0.10","0.14","0.16","0.17","2.2","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","5.16","5.20","5.22","5.23","5.28","5.33","5.44","8.4","9.5","10.1","10.5","12.31","15.16","15.20","15.22","15.33","15.44","15.45","18.4","19.3","20.5","20.10","21.3","21.4","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.32","22.43","22.47","23.5","24.6","24.11","24.12","24.13","25.1","25.2","26.1","26.4","26.19","26.29","26.30","26.31","26.32","26.35","26.39","26.41","26.43","26.47"],"new":["0.1","0.2","0.6","0.7","0.14","0.16","0.17","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.12","5.23","5.44","5.45","8.2","8.4","8.5","10.1","15.12","15.16","15.20","15.33","15.45","18.2","18.4","18.5","19.3","20.5","21.4","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.32","22.43","22.47","23.5","24.6","24.11","24.12","24.13","25.4","26.1","26.4","26.29","26.30","26.31","26.32","26.43"],"artplayer":["0.2","0.7","0.14","0.16","0.17","2.2","2.22","2.24","2.28","2.29","2.30","2.31","3.5","3.6","3.7","3.29","3.30","5.12","5.23","5.45","8.2","8.3","8.4","8.5","9.7","10.1","10.2","15.12","15.16","15.45","18.2","18.3","18.4","18.5","19.3","19.7","20.1","20.8","20.9","20.10","21.0","21.3","22.10","22.19","22.29","22.30","22.32","22.43","22.47","23.1","23.8","24.2","24.3","24.8","24.16","25.0","25.3","26.4","26.27","26.29","26.30","26.32","26.43"],"container":["0.2","0.3","0.14","0.17","2.2","2.28","5.12","5.45","6.2","6.3","7.4","8.2","8.3","8.4","8.5","9.7","10.2","15.12","15.16","15.45","16.2","16.3","17.4","18.2","18.3","18.4","18.5","19.3","19.7","21.4","22.10","22.19","22.29","22.30","22.32","22.43","22.47","23.4","23.9","24.6","24.11","24.12","24.13","24.14","25.3","25.4","26.2","26.4","26.29","26.30","26.32","26.43"],"app":["0.2","0.4","0.14","5.45","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.4","8.5","9.7","10.2","15.12","15.16","15.45","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.4","18.5","19.3","19.7","20.4","22.1","22.19","22.29","22.30","22.47","23.4","24.11","24.12","24.13","24.14","25.4","26.2","26.4","26.29","26.30","26.43"],"url":["0.2","0.4","5.45","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.5","9.3","9.7","9.8","10.2","15.16","15.45","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.5","19.3","19.7","19.8","22.29","22.30","22.33","22.40","22.47","24.12","24.13","24.14","26.29","26.30","26.33","26.41","26.43"],"classname":["0.3","0.11","0.12","1.11","3.15","3.21","3.24","3.25","3.28","3.31","5.4","5.15","5.26","5.30","5.38","5.39","5.40","5.41","5.42","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.6","12.1","12.2","12.11","12.12","12.13","12.14","12.16","12.19","12.21","12.23","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.41","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.18","13.22","13.28","13.29","13.30","13.32","15.6","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.24","15.25","15.27","15.30","15.31","15.32","15.33","15.34","15.35","15.36","15.41","15.43","15.47","19.5","22.4","22.9","22.13","22.17","22.25","22.34","22.42","22.50","26.6","26.8","26.12","26.14","26.15","26.16","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.27","26.28","26.33","26.34","26.38","26.40","26.42","26.44","26.48","26.49","26.51"],"run":["0.3","0.8","0.9","0.11","0.12","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.1","3.2","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.33","5.4","5.6","5.7","5.9","5.11","5.13","5.15","5.24","5.30","5.38","5.39","5.40","5.41","5.42","5.43","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.6","12.1","12.2","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.3","13.5","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.7","15.8","15.9","15.10","15.14","15.21","15.22","15.23","15.25","15.27","15.31","15.32","15.33","15.34","15.35","15.36","15.41","15.43","15.46","15.47","22.4","22.9","22.13","22.17","22.34","22.39","22.50","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.33","26.34","26.40","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"code":["0.3","0.8","0.9","0.10","0.11","0.12","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.4","5.6","5.7","5.8","5.9","5.10","5.11","5.13","5.15","5.18","5.19","5.24","5.30","5.38","5.39","5.40","5.41","5.42","5.43","5.47","9.1","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.6","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.29","13.30","15.1","15.3","15.8","15.9","15.10","15.14","15.20","15.21","15.22","15.25","15.27","15.28","15.31","15.32","15.33","15.34","15.35","15.36","15.41","15.43","15.46","15.47","21.0","21.2","22.4","22.13","22.17","22.39","22.50","24.8","26.3","26.5","26.7","26.8","26.9","26.12","26.13","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.33","26.34","26.40","26.42","26.44","26.45","26.46","26.48","26.49"],"document":["0.3","22.1"],"assets":["0.4","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.7","9.8","10.2","15.45","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.7","19.8","22.30","22.47","24.12","24.13","24.14","26.2","26.30","26.43"],"sample":["0.4","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.8","10.2","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.8","22.2","22.30","24.13","24.14","26.2","26.30","26.43"],"video":["0.4","3.34","5.45","6.2","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.3","9.8","10.2","12.11","13.1","15.6","15.18","15.19","16.2","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.3","19.8","22.38","22.45","22.46","24.13","24.14","26.2","26.51"],"mp4":["0.4","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.3","9.4","9.8","9.9","10.2","12.0","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.3","19.4","19.8","19.9","22.2","24.14","26.2"],"test":["0.4"],"foo":["0.4"],"bar":["0.4","13.16","22.6","22.8","22.22"],"const":["0.4","9.6","19.6","23.9"],"获取整体的字幕列表":["0.11"],"div":["0.11","0.12","3.31","5.4","5.26","5.38","5.40","5.42","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.5","11.6","11.9","11.10","12.1","12.11","12.19","12.21","12.23","12.25","12.32","12.33","12.35","12.36","12.37","12.38","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.26","13.28","13.29","13.30","13.32","15.6","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.24","15.25","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.43","19.5","20.3","22.4","22.9","22.13","22.17","22.25","22.28","22.34","22.42","22.50","26.6","26.12","26.14","26.15","26.16","26.18","26.20","26.23","26.24","26.25","26.27","26.28","26.33","26.34","26.38","26.40","26.41","26.42","26.44","26.48","26.49","26.51"],"详见事件文档":["0.12"],"console":["1.1","2.0","12.0","24.18"],"info":["2.0","12.0","24.18"],"只监听一次事件":["2.0"],"但估计没有足够的数据来支撑播放到结束":["2.42"],"渲染完成":["2.44"],"属性的值改变时触发":["2.45"],"当这个":["2.46"],"因为":["2.47"],"或者资源类型不是受支持的媒体格式":["2.48"],"中的首帧已经完成加载":["2.49"],"播放准备开始":["2.53"],"seek":["2.56","2.57","12.56","12.57","13.25","15.15"],"user":["2.58","23.13"],"属性指定的时间发生变化":["2.60"],"播放已停止":["2.62"],"也是指挂载在":["3.0"],"构造函数":["3.0"],"减少视频资源占用":["3.34"],"如果你希望保留":["3.34"],"元素的状态":["3.34"],"仅移除界面":["3.34"],"可将其设置为":["3.34"],"when":["5.5","11.1","12.45","22.26"],"destroy":["5.5"],"也会在调用":["5.5"],"时自动执行类似逻辑":["5.5"],"画中画":["5.26"],"fullscreen":["5.26","15.21","22.24"],"窗口全屏":["5.26"],"fullscreenweb":["5.26"],"网页全屏":["5.26"],"对应":["5.29"],"domrect":["5.29"],"的同名字段":["5.29"],"组件唯一名称":["6.1","8.1"],"用于标记类名":["6.1","8.1"],"index":["6.1","7.5","8.1","16.1","17.5","18.1","24.7","24.10","24.15","24.16","24.17"],"number":["6.1","7.1","8.1","10.12","16.1","18.1","19.2"],"contextmenu":["6.4","6.5","16.4","16.5"],"name":["6.5","7.5","9.9","16.5","17.5","19.9","22.33"],"组件索引":["7.1"],"用于显示的优先级":["7.1"],"html":["7.1","7.2","9.4","9.9","15.4","17.1","17.2","19.4","19.9","22.27","22.33"],"element":["7.1","17.1","22.45"],"position":["7.2","7.5","17.2","17.5"],"left":["7.2","17.2"],"tooltip":["7.2","9.2","9.9","17.2","19.2","19.5","19.6","19.9"],"style":["7.2","9.3","17.1","17.2","22.37","26.37"],"color":["7.2","15.36","17.2"],"red":["7.2","17.2"],"click":["7.2","17.2"],"function":["7.2","11.10","17.2","19.5","22.35","22.41","23.10","26.35"],"args":["7.2","17.2"],"controls":["7.3","7.5","17.3","17.5"],"add":["7.3","17.3"],"button1":["7.5","17.5"],"png":["8.4","18.4","22.29","26.29"],"列表宽度":["9.2"],"提示文本":["9.2","9.5"],"setting":["9.3","9.4","9.8","9.9","19.3","19.4","19.8","19.9"],"true":["9.3","9.4","9.8","9.9","13.18","13.19","13.32","19.3","19.4","19.8","19.9","24.6"],"settings":["9.3","9.4","9.9","19.3","19.4","19.9","22.14","22.15","22.16","22.18","22.22","22.25"],"subtitle":["9.3","19.3"],"01":["9.3","9.4"],"default":["9.3","13.1","13.4","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.17","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31"],"span":["9.3"],"multi":["9.4","19.4"],"level":["9.4","13.0","19.4"],"selector":["9.4","19.4"],"value":["9.6"],"min":["9.6"],"flip":["9.8","19.1","19.8"],"slider":["9.9","19.9"],"5x":["9.9","19.9"],"icon":["9.9","19.9"],"refer":["10.0","11.0","15.0"],"to":["10.0","11.0","11.1","12.53","13.25","15.0","15.4","15.15","15.39","20.11"],"proxy":["10.3"],"method":["10.3"],"used":["10.3","13.33","15.38","15.40","22.3","22.6"],"hover":["10.3"],"delete":["10.4"],"clear":["10.4"],"all":["10.4","20.12"],"caches":["10.4"],"object":["10.6","26.11"],"update":["10.8","10.9"],"show":["10.8","10.9","10.10","10.16"],"property":["10.8","10.9","10.10","10.16"],"switch":["10.11"],"version":["10.12"],"resolution":["10.12"],"duration":["10.12"],"etc":["10.12"],"control":["10.12"],"visibility":["10.12"],"toggle":["10.13","10.15","22.20"],"set":["10.16"],"the":["11.0","12.45","12.48","15.0","15.6","15.29","22.8","22.12","22.25","22.26","22.27","22.44","22.45"],"you":["11.1"],"need":["11.1"],"manage":["11.1"],"multiple":["11.1"],"player":["11.2","11.3","11.4","11.7","11.11","11.12","15.41","15.42","20.13","22.5","22.21","22.26","22.27"],"for":["11.5","11.9","13.33","16.1","18.1","22.6","22.18","22.38","22.41","22.51"],"videos":["11.5"],"options":["11.7","11.9","22.37"],"event":["11.8","12.0","12.46","15.38","15.40","19.2","19.5","22.4"],"utility":["11.10"],"by":["11.11","20.13","22.9"],"on":["12.0","13.0","13.3","14.0","22.28","22.44","22.46","22.48","24.18"],"canplay":["12.0"],"an":["12.0","20.12"],"only":["12.0","22.3","22.14","22.21","22.49"],"once":["12.0"],"time":["12.1","12.60","24.4"],"a":["12.11","13.14","22.22"],"mode":["12.25","13.31","15.24","22.48"],"media":["12.42","15.5"],"but":["12.42","15.11","15.15"],"estimates":["12.42"],"it":["12.43","15.15","22.15","22.16","22.51"],"can":["12.43","13.34","22.41"],"play":["12.43","22.4"],"offlineaudiocontext":["12.44"],"this":["12.46","13.34","22.11"],"is":["12.46","12.58","13.1","13.4","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.16","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","15.15","15.42","20.11","21.1","22.2","22.5","22.21"],"sent":["12.46"],"stopped":["12.47","12.62"],"fetching":["12.48"],"first":["12.49"],"frame":["12.49","15.18","15.19"],"has":["12.50","12.51","12.52"],"start":["12.53"],"after":["12.53","14.0"],"periodically":["12.54"],"as":["12.54"],"playback":["12.55","15.13","22.3"],"trying":["12.58"],"data":["12.59","24.8","24.16"],"indicated":["12.60"],"volume":["12.61","22.22"],"top":["13.0"],"mounted":["13.0"],"in":["13.1","13.12","13.13","13.15","13.16","13.21","13.24","13.27","13.34","15.5","15.7","15.26","20.12","22.2","22.11","22.14","22.15","22.16","22.18","22.23","22.24","22.25","22.34"],"events":["13.1"],"text":["13.2","19.2","19.5","19.6","22.34"],"pixels":["13.6","13.7"],"feature":["13.11","22.46"],"seconds":["13.12","13.27","15.6","15.7","22.34"],"milliseconds":["13.13","13.15","13.16","13.21","13.24"],"connection":["13.14"],"error":["13.14","13.15"],"occurs":["13.14","13.15"],"pause":["13.19","13.20"],"false":["13.20"],"swipe":["13.25"],"vertical":["13.30","15.30"],"during":["13.31"],"primarily":["13.33"],"smooth":["13.33"],"progress":["13.33","15.13","15.39","22.6","22.8"],"enabling":["13.34"],"reduce":["13.34"],"resource":["13.34"],"usage":["13.34"],"single":["13.34","15.5"],"page":["13.34","15.5","15.21"],"applications":["13.34","15.5"],"or":["13.34","15.5","22.51"],"scenarios":["13.34"],"where":["13.34"],"ready":["14.0"],"also":["14.0","15.4","20.12"],"remove":["15.4"],"s":["15.4","15.24","20.13","22.27"],"resources":["15.5"],"reinitialize":["15.5"],"tag":["15.5"],"performs":["15.11"],"some":["15.11","22.49"],"optimization":["15.11"],"operations":["15.11"],"retains":["15.13"],"previous":["15.13"],"similar":["15.15","22.4"],"optional":["15.17"],"parameter":["15.17","20.10"],"specifies":["15.17"],"filename":["15.17"],"returns":["15.18","15.19"],"promise":["15.18","15.19","24.6"],"state":["15.21"],"before":["15.23","22.27"],"starts":["15.23"],"playing":["15.23"],"normal":["15.26","15.30"],"mini":["15.26"],"window":["15.26"],"pip":["15.26"],"picture":["15.26"],"automatically":["15.27","22.11"],"correspond":["15.29"],"fields":["15.29"],"of":["15.29","22.12","22.36"],"same":["15.29"],"supported":["15.30","22.42"],"values":["15.30"],"horizontal":["15.30"],"speed":["15.31"],"ratio":["15.32"],"with":["15.38","15.40"],"timeupdate":["15.38","15.40"],"loaded":["15.39"],"display":["15.39","17.1"],"detailed":["15.39"],"buffering":["15.39"],"cleaned":["15.41"],"up":["15.41"],"destroyed":["15.41"],"scoped":["15.42"],"current":["15.42","20.5","23.5"],"preventing":["15.42"],"css":["16.1","18.1","26.11"],"class":["16.1","18.1","20.3"],"determines":["17.1"],"priority":["17.1"],"dom":["17.1"],"items":["19.1"],"playbackrate":["19.1"],"aspectratio":["19.1"],"width":["19.2","22.36","26.36"],"list":["19.2"],"onswitch":["19.5"],"completion":["19.6"],"onchange":["19.6"],"change":["19.6"],"install":["20.1","23.1"],"utf":["20.3","26.37"],"body":["20.3"],"if":["20.5","23.5"],"typeof":["20.5","23.5"],"ts":["20.6","22.40"],"file":["20.6","20.11"],"from":["20.8","20.9","20.13","21.2","23.8","23.11"],"import":["20.9","21.1","21.2","23.11"],"let":["20.10"],"null":["20.10"],"use":["20.11"],"which":["20.11"],"compatible":["20.11"],"down":["20.11"],"ie":["20.11","23.11"],"plugins":["20.12","24.14","24.18"],"provide":["20.12"],"ui":["20.13"],"changing":["20.13"],"therefore":["20.13"],"starting":["20.13"],"core":["21.0"],"will":["21.0","22.15","22.16","22.22"],"no":["21.0","21.1"],"longer":["21.0"],"bundle":["21.0"],"manual":["21.1"],"dist":["21.2","23.12"],"group":["21.2"],"id":["21.2"],"sometimes":["22.2","22.40"],"not":["22.2","22.5","22.40"],"known":["22.2"],"immediately":["22.2"],"such":["22.2"],"cases":["22.2"],"memory":["22.3"],"autoplayback":["22.3"],"initialized":["22.5"],"and":["22.5","22.6","22.8","22.22"],"hide":["22.8","22.44"],"resulting":["22.11"],"black":["22.11"],"bars":["22.11"],"option":["22.11"],"adjusts":["22.11"],"scrolls":["22.12"],"out":["22.12"],"currently":["22.14","22.49"],"appears":["22.14","22.26"],"appear":["22.15","22.16"],"panel":["22.18","22.22","22.25"],"button":["22.20","22.23","22.24"],"bottom":["22.20","22.23","22.24"],"simultaneously":["22.21"],"whether":["22.21"],"one":["22.21"],"context":["22.22"],"menu":["22.22"],"apply":["22.22"],"loses":["22.26"],"focus":["22.26"],"pre":["22.27"],"render":["22.27"],"required":["22.27"],"mobile":["22.28","22.44","22.45","22.48"],"devices":["22.28","22.44"],"layer":["22.29","26.29"],"boolean":["22.33"],"string":["22.33","22.34"],"myplugin":["22.35","26.35"],"column":["22.36"],"columns":["22.36"],"encoding":["22.37","26.37"],"auto":["22.38","26.38"],"better":["22.38"],"loading":["22.38"],"experience":["22.38"],"more":["22.38"],"attributes":["22.38"],"e":["22.40"],"g":["22.40"],"m3u8":["22.40"],"mkv":["22.40"],"however":["22.40"],"may":["22.40"],"have":["22.40"],"programs":["22.41"],"processing":["22.41"],"receive":["22.41"],"three":["22.41"],"en":["22.42"],"zh":["22.42","25.2"],"cn":["22.42","26.42"],"fast":["22.46"],"forward":["22.46"],"web":["22.48"],"based":["22.48"],"browsers":["22.49"],"support":["22.49"],"htmlvideoelement":["22.51"],"example":["22.51"],"demo":["23.3"],"meta":["23.3"],"charset":["23.3"],"ref":["23.4"],"时会自动导入的":["23.6"],"param":["23.10"],"getinstance":["23.10"],"可以兼容到":["23.11"],"和所有插件还会提供一个":["23.12"],"版本的":["23.12"],"mjs":["23.12"],"如":["23.12"],"globalthis":["23.13"],"custom":["23.13"],"agent":["23.13"],"全局变量":["23.13"],"plugin":["24.2","24.3","24.8","24.16"],"danmuku":["24.2","24.7","24.10","24.16"],"npm":["24.3"],"弹幕时间":["24.4"],"默认为当前播放器时间":["24.4"],"默认弹幕模式":["24.5"],"滚动":["24.5"],"顶部":["24.5"],"底部":["24.5"],"modes":["24.5"],"弹幕可见的模式":["24.5"],"fontsize":["24.5"],"danmu":["24.6","24.18"],"return":["24.6"],"resolve":["24.6"],"settimeout":["24.6"],"libs":["24.8","24.16"],"uncompiled":["24.8","24.16"],"artplayerplugindanmuku":["24.14","24.18"],"xml":["24.18"],"visible":["24.18"],"显示弹幕":["24.18"],"版本开始":["25.0"],"核心代码除了包含":["25.0"],"zhtw":["25.2"],"tw":["25.2"],"高亮元素":["26.6"],"上":["26.6"],"类似":["26.11"],"的":["26.11"],"fit":["26.11"],"里":["26.14","26.15","26.16","26.25"],"音量条等浮层会应用":["26.22"],"filter":["26.22"],"毛玻璃效果":["26.22"],"看起来更通透":["26.22"],"访问到播放器所需的":["26.27"],"画质地址":["26.33"],"预览图列数":["26.36"],"预览图宽度":["26.36"],"height":["26.36"],"预览图高度":["26.36"],"scale":["26.36"],"字幕样式":["26.37"],"字幕编码":["26.37"],"默认":["26.37"],"以提升加载体验":["26.38"],"更多视频属性":["26.38"],"这些属性将直接写入视频元素里":["26.38"],"所以需要特别指明":["26.40"],"元素":["26.41"],"视频地址":["26.41"],"当前实例":["26.41"],"dom元素":["26.51"]},{"0":["19.6","24.4"],"1":["3.29","9.3","13.29","19.3"],"2":["3.29","9.6","19.6","20.13","26.3"],"3":["9.6"],"4":["9.1","20.13","21.1","22.17","22.34","22.50","23.10","26.5","26.7","26.8","26.9","26.13","26.17","26.21","26.25","26.26","26.33","26.34","26.40","26.42","26.45","26.46"],"5":["13.14","13.25","20.13"],"6":["2.41","5.42","5.43","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","23.10"],"7":["5.4","5.6","5.7","5.10","5.17","5.18","5.19","5.24","5.38","5.39","5.40","12.19","12.21","12.23","12.25","12.26","15.10","22.39"],"8":["5.9","5.15","5.25","5.27","5.30","5.41","12.17","15.1","15.9","15.14","15.21","15.25","15.30","15.31","15.32","15.34","15.35","15.36","15.41","22.37","23.3","26.37"],"9":["5.11","5.13","15.11","15.13","15.23","22.4"],"10":["5.8","5.41","7.3","7.4","12.2","12.6","12.18","12.24","15.8","15.12","15.41","17.3","17.4","19.6"],"11":["15.3","15.21","20.11"],"14":["26.33"],"22":["9.9","19.9"],"25":["22.34","26.34"],"40":["3.7"],"100":["3.10"],"150":["9.4","19.4"],"300":["3.5","3.6"],"500":["3.8","3.9","3.17"],"1000":["13.15"],"3000":["13.16"],"实例":["0.0","5.0"],"artplayer":["0.1","0.3","0.5","0.6","0.8","0.9","0.10","0.13","0.15","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.20","5.21","5.22","5.25","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.41","5.44","5.46","5.47","9.1","9.2","9.5","10.3","10.4","10.5","10.6","10.7","10.14","10.17","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","13.5","13.6","13.7","13.8","13.9","13.28","13.29","13.30","15.2","15.3","15.5","15.20","15.22","15.28","15.33","15.34","15.37","15.41","15.44","15.46","15.47","19.5","20.2","22.4","22.7","22.17","22.31","22.39","23.2","23.13","25.1","26.10","26.19","26.31","26.34","26.39","26.40","26.47","26.50"],"container":["0.1","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.15","0.16","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.9","5.11","5.13","5.14","5.16","5.20","5.21","5.22","5.23","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.41","5.44","5.46","5.47","9.2","9.5","10.1","10.3","10.4","10.5","10.6","10.7","10.14","10.17","12.2","12.20","12.22","12.28","12.29","12.30","12.31","15.2","15.20","15.22","15.28","15.41","15.44","15.46","19.5","20.9","21.3","22.4","22.7","22.17","22.31","22.39","24.9","24.10","24.15","24.17","25.1","25.2","26.10","26.19","26.31","26.34","26.39","26.47"],"app":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.16","0.17","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.12","5.16","5.20","5.22","5.23","5.28","5.33","5.34","5.44","9.5","10.1","10.4","10.5","10.6","10.14","12.31","15.20","15.22","15.28","15.33","15.41","15.44","19.5","20.3","20.5","21.3","21.4","22.4","22.7","22.10","22.31","22.32","22.39","22.43","23.9","24.6","24.10","25.2","25.3","26.1","26.19","26.31","26.32","26.39","26.47"],"assets":["0.2","0.6","0.7","0.10","0.14","0.16","0.17","2.2","2.22","2.28","2.31","5.12","5.23","5.44","9.5","10.1","10.4","10.6","10.14","15.12","15.16","15.20","15.22","15.33","21.4","22.1","22.4","22.7","22.10","22.19","22.31","22.32","22.43","23.9","24.6","24.10","24.11","25.2","25.3","25.4","26.1","26.4","26.31","26.32"],"sample":["0.2","0.6","0.14","0.16","0.17","2.2","2.28","5.12","5.23","9.5","9.7","10.1","10.4","10.6","10.14","15.12","15.16","15.20","15.22","15.33","15.45","19.7","21.4","22.1","22.4","22.7","22.10","22.19","22.31","22.32","22.43","22.47","23.9","24.6","24.11","24.12","25.2","25.4","26.4","26.32"],"video":["0.2","0.14","0.16","0.17","5.12","7.4","8.4","9.5","9.7","10.4","10.6","10.14","15.20","15.22","15.45","17.4","18.4","19.7","21.4","22.1","22.10","22.19","22.29","22.30","22.32","22.43","22.47","22.48","22.51","24.6","24.11","24.12","25.2","25.4","26.4","26.29","26.30","26.32","26.43"],"mp4":["0.2","0.14","0.17","5.12","5.45","6.2","7.4","8.4","9.5","9.7","10.4","10.14","15.12","15.16","15.20","15.33","15.45","16.2","17.4","18.4","19.7","22.1","22.4","22.10","22.19","22.29","22.30","22.32","22.43","22.47","24.6","24.11","24.12","24.13","25.2","25.4","26.4","26.29","26.30","26.43"],"console":["0.2","0.4","1.6","7.2","10.2","11.6","15.16","17.2","22.35","26.35"],"info":["0.2","0.4","1.1","7.2","10.2","11.6","17.2","22.35","26.35"],"queryselector":["0.3","5.41","10.3","15.41","22.1","24.16","26.1"],"art":["0.3","0.8","0.9","0.11","0.13","0.15","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.6","5.7","5.8","5.9","5.10","5.14","5.15","5.17","5.18","5.19","5.21","5.24","5.25","5.27","5.30","5.31","5.32","5.34","5.35","5.36","5.37","5.39","5.46","5.47","9.1","9.2","10.4","10.6","10.7","10.12","10.14","10.17","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","15.1","15.2","15.3","15.8","15.9","15.10","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.36","15.37","15.46","15.47","19.2","19.5","21.2","22.4","22.17","22.35","22.39","22.50","24.7","24.9","24.10","24.15","24.17","26.5","26.7","26.10","26.17","26.33","26.34","26.40","26.50"],"new":["0.3","0.5","0.8","0.9","0.10","0.11","0.13","0.15","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.25","5.27","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.46","5.47","9.1","9.2","9.5","10.4","10.5","10.6","10.7","10.14","10.17","12.2","12.6","12.7","12.8","12.10","12.17","12.18","12.20","12.22","12.24","12.26","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.22","15.23","15.28","15.32","15.34","15.35","15.37","15.44","15.46","15.47","19.5","22.4","22.17","22.39","24.9","24.10","24.15","24.17","25.1","25.2","26.7","26.10","26.19","26.34","26.39","26.40","26.47","26.50"],"url":["0.6","0.7","0.9","0.10","0.14","0.16","0.17","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.20","5.23","5.33","5.44","8.4","9.5","10.1","10.4","10.5","10.6","10.14","15.20","15.22","15.33","15.44","18.4","21.3","21.4","22.1","22.4","22.7","22.10","22.19","22.31","22.32","22.41","22.43","23.9","24.6","24.10","24.11","25.2","25.3","25.4","26.1","26.4","26.31","26.32","26.39","26.47"],"js":["0.11","0.12","1.6","3.1","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","5.4","5.6","5.7","5.15","5.24","5.26","5.30","5.38","5.39","5.40","5.42","5.43","9.2","10.3","10.7","10.17","11.6","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.18","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.25","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.43","15.47","19.2","19.5","21.1","22.13","22.17","22.25","22.34","22.42","22.50","24.8","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.27","26.28","26.33","26.40","26.42","26.44","26.45","26.46","26.48","26.49"],"var":["0.11","0.12","1.1","2.41","3.5","3.6","3.7","3.17","3.30","5.1","5.6","5.7","5.8","5.9","5.10","5.11","5.13","5.15","5.17","5.18","5.19","5.21","5.24","5.25","5.27","5.30","5.38","5.39","5.40","5.41","5.43","5.47","9.1","9.2","10.3","10.4","10.6","10.7","10.17","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","15.1","15.2","15.3","15.8","15.9","15.10","15.14","15.23","15.25","15.28","15.31","15.32","15.34","15.35","15.36","15.37","15.41","15.46","15.47","19.2","19.5","21.1","21.2","22.4","22.17","22.34","22.39","22.50","24.7","24.15","24.16","24.17","26.3","26.5","26.7","26.17","26.25","26.33","26.34","26.40","26.50"],"function":["0.14","6.5","16.5","17.1","20.10","26.37"],"构造函数":["1.0"],"code":["1.11","3.34","5.5","5.26","5.29","9.6","10.3","11.1","13.1","13.2","13.3","13.4","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.28","13.31","13.32","13.33","15.6","15.7","15.11","15.13","15.17","15.18","15.19","15.23","15.24","15.30","15.38","15.39","15.40","19.1","19.2","19.5","20.11","22.3","22.5","22.9","22.25","22.28","22.33","22.34","22.40","22.42","22.45","23.11","26.6","26.11","26.14","26.15","26.16","26.22","26.27","26.36","26.38","26.41","26.51"],"once":["2.0"],"不必停下来进一步缓冲内容":["2.42"],"media":["2.46","2.47","12.43","12.48"],"已经加载完成":["2.46"],"操作完成":["2.56"],"操作开始":["2.57"],"agent":["2.58"],"的":["3.0"],"false":["3.3","3.34","20.5","23.5","24.5","24.14"],"div":["3.34","5.5","5.29","9.6","10.3","10.13","10.15","11.1","11.2","11.3","11.4","11.7","11.8","11.11","11.12","13.1","13.12","13.13","13.14","13.15","13.16","13.24","13.25","13.27","13.31","13.33","15.4","15.15","15.17","15.26","15.38","15.39","15.40","15.42","19.1","19.2","20.5","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.33","22.40","22.44","22.45","22.46","22.49","22.51","23.3","23.5","26.11","26.22","26.36"],"classname":["3.34","5.5","5.29","9.6","10.3","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","13.12","13.13","13.14","13.15","13.16","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.33","15.15","15.17","15.26","15.38","15.39","15.40","19.1","19.2","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.33","22.40","22.44","22.45","22.46","22.49","26.11","26.22","26.36","26.41"],"run":["3.34","5.5","5.26","5.29","9.6","10.3","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.12","13.1","13.2","13.4","13.6","13.7","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.6","15.11","15.13","15.15","15.17","15.18","15.19","15.24","15.30","15.38","15.39","15.40","19.1","19.2","19.5","22.3","22.5","22.6","22.8","22.12","22.20","22.23","22.24","22.25","22.28","22.33","22.40","22.42","22.45","22.46","22.49","26.11","26.22","26.27","26.36","26.38","26.41"],"add":["4.0","6.3","8.3","14.0","16.3","18.3","24.2"],"例如我想写一个在视频暂停后":["4.0"],"显示一个图片广告的插件":["4.0"],"on":["5.12","15.12","15.16","15.33"],"播放器当前可见宽高":["5.29"],"document":["5.41","10.3","15.41","24.16","26.1"],"default":["5.45","7.5","15.45","17.5","19.3","23.10"],"true":["5.45","7.5","9.7","13.31","15.4","15.45","17.5","19.7","22.4","22.10","22.30","22.47","24.5","26.4","26.30","26.37"],"html":["5.45","6.1","6.2","6.3","6.4","6.5","7.3","7.5","8.1","8.2","8.3","8.5","9.8","15.45","16.1","16.2","16.3","16.4","16.5","17.3","17.5","18.1","18.2","18.3","18.5","19.8","22.29","22.30","22.37","23.13","24.14","26.29","26.30","26.37"],"sd":["5.45","15.45"],"480p":["5.45","15.45"],"组件索引":["6.1","8.1"],"用于显示的优先级":["6.1","8.1"],"contextmenu":["6.2","6.3","16.2","16.3"],"name":["6.2","6.3","6.4","7.3","7.4","8.2","8.3","8.4","8.5","9.8","15.29","16.2","16.3","16.4","17.3","17.4","18.2","18.3","18.4","18.5","19.8","22.29","22.35","26.29","26.35"],"your":["6.2","6.3","6.4","6.5","7.3","16.2","16.3","16.4","16.5","17.3","22.47","26.43"],"menu":["6.2","6.3","6.4","6.5","16.2","16.3","16.4","16.5","22.14","22.15","22.16"],"click":["6.4","6.5","16.4","16.5","17.1","24.14"],"args":["6.5","16.5"],"组件的":["7.1"],"dom":["7.1","22.41","22.51"],"元素":["7.1"],"style":["7.1","8.2","8.3","8.5","18.2","18.3","18.5","19.3","20.4","22.29"],"object":["7.1","17.1"],"mounted":["7.2","17.2","22.27"],"subtitle":["7.2","7.5","17.2","17.5"],"button1":["7.3","7.4","17.3","17.4"],"index":["7.3","7.4","17.3","17.4","24.8"],"position":["7.3","17.3","24.13","24.14"],"left":["7.3","17.3"],"controls":["7.4","17.4","24.13","24.14"],"right":["7.5","17.5","24.14"],"selector":["7.5","17.5","22.30","26.30"],"01":["7.5","17.5","19.3","19.4"],"layers":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5"],"potser":["8.2","8.3","8.5","18.2","18.3","18.5","22.29","26.29"],"width":["8.2","8.3","8.5","9.4","9.9","18.2","18.3","18.5","19.4","19.9","22.29"],"100px":["8.2","8.3","8.5","18.2","18.3","18.5"],"src":["8.2","8.5","9.9","18.2","18.5","19.9"],"color":["9.3","19.3"],"red":["9.3","19.3"],"srt":["9.3","19.3"],"id":["9.3","19.3","22.47"],"yellow":["9.3"],"02":["9.3"],"setting":["9.5","9.7","19.7","22.30","26.30"],"max":["9.6","19.6"],"step":["9.6"],"settings":["9.8","19.8"],"slider":["9.8","19.8"],"tooltip":["9.8","19.8"],"5x":["9.8","19.8"],"icon":["9.8","19.8"],"img":["9.9","19.9"],"height":["9.9","19.9","22.36"],"state":["9.9","13.34","19.9"],"svg":["9.9","19.9"],"secondary":["10.0"],"custom":["10.3"],"test":["10.4"],"foo":["10.4"],"bar":["10.4","13.33","22.18","22.20","22.23","22.24","22.44"],"const":["10.4","20.8","20.9","23.8"],"set":["10.8","10.9","10.10","22.2"],"whether":["10.8","10.9","10.10","10.16","22.37"],"all":["10.8","10.9","10.10","10.16","13.0"],"are":["10.8","13.34"],"displayed":["10.8"],"toggle":["10.8","10.9","10.10","10.16"],"display":["10.9","10.10","10.16","16.1","18.1"],"options":["10.11"],"texttrack":["10.11"],"gets":["10.11"],"text":["10.11"],"track":["10.11"],"activecues":["10.11"],"list":["10.11"],"via":["10.12"],"show":["10.12"],"triggered":["10.12"],"event":["10.12","17.1"],"is":["10.12","12.42","13.15","20.6","22.26","22.27"],"named":["10.12"],"of":["10.13","10.15","12.49","12.62","13.34"],"first":["11.0","15.0"],"level":["11.0","15.0"],"players":["11.1","13.34"],"simultaneously":["11.1"],"there":["12.42"],"not":["12.42","15.15"],"rendering":["12.44"],"value":["12.45","19.6"],"when":["12.46","15.5"],"because":["12.47","12.62"],"the":["12.47","12.54","20.3","22.38"],"data":["12.48","23.10"],"or":["12.48"],"been":["12.50","12.51","12.53"],"begun":["12.52"],"having":["12.53"],"rate":["12.55"],"operation":["12.56","12.57"],"to":["12.58","22.11","22.21","22.37"],"fetch":["12.58"],"loading":["12.59"],"by":["12.60"],"has":["12.61"],"constructor":["13.0"],"property":["13.0","20.10"],"off":["13.1"],"effects":["13.33"],"frequently":["13.34"],"created":["13.34"],"destroyed":["13.34"],"if":["13.34"],"you":["13.34","22.1","22.2"],"wish":["13.34"],"preserve":["13.34"],"for":["14.0"],"example":["14.0"],"let":["14.0"],"after":["15.4"],"destruction":["15.4"],"defaults":["15.4"],"note":["15.5","20.3"],"global":["15.5","20.13"],"configuration":["15.5"],"remove":["15.5"],"destroy":["15.5","20.5","23.5"],"will":["15.5"],"also":["15.5"],"ready":["15.12","15.16"],"seek":["15.12"],"settimeout":["15.12"],"does":["15.15"],"trigger":["15.15"],"additional":["15.15"],"events":["15.15"],"fullscreen":["15.26"],"fullscreenweb":["15.26"],"webpage":["15.26"],"in":["15.29"],"domrect":["15.29"],"player":["15.29"],"s":["15.29"],"current":["15.29"],"errors":["15.42"],"with":["15.42"],"duplicate":["15.42"],"class":["15.42"],"names":["15.42"],"priority":["16.1","18.1"],"element":["16.1","22.41","22.51"],"handler":["17.1"],"subtitleoffset":["19.1"],"span":["19.3"],"min":["19.6"],"yarn":["20.1","23.1","24.2"],"npm":["20.2","23.2"],"dist":["20.2","20.12","23.2","24.3"],"warning":["20.3","22.47"],"option":["20.4","23.4"],"get":["20.4"],"return":["20.5","22.35","23.5","23.10","26.35"],"ref":["20.5","23.5"],"param":["20.10"],"getinstance":["20.10"],"import":["20.11"],"from":["20.11"],"group":["20.11","23.11"],"bash":["20.11","23.11"],"jsdelivr":["20.11","23.11"],"net":["20.11","23.11"],"mjs":["20.12"],"format":["20.12"],"such":["20.12"],"as":["20.12"],"version":["20.13"],"variable":["20.13"],"globalthis":["20.13"],"user":["20.13"],"any":["21.0"],"languages":["21.0"],"other":["21.0"],"than":["21.0"],"simplified":["21.0"],"chinese":["21.0"],"and":["21.0","22.14","22.15","22.16","22.26","22.48"],"english":["21.0"],"required":["21.1"],"zhtw":["21.2"],"zh":["21.2"],"tw":["21.2"],"may":["22.1"],"can":["22.2","22.27"],"asynchronously":["22.2"],"muted":["22.4","26.4"],"yet":["22.5"],"playing":["22.5","22.26"],"highlighted":["22.6"],"elements":["22.6"],"playback":["22.8"],"time":["22.8","22.21"],"size":["22.11"],"hide":["22.11"],"browser":["22.12"],"viewport":["22.12","22.48"],"panel":["22.14","22.15","22.16"],"context":["22.14","22.15","22.16"],"bottom":["22.18","22.44"],"control":["22.18","22.20","22.23","22.24","22.44"],"allowed":["22.21"],"play":["22.21","26.43"],"at":["22.21"],"a":["22.21"],"filter":["22.22"],"frosted":["22.22"],"glass":["22.22"],"more":["22.22"],"transparent":["22.22"],"look":["22.22"],"however":["22.22"],"access":["22.27"],"setting01":["22.30","26.30"],"scale":["22.36"],"utf":["22.37","23.3"],"escape":["22.37","26.37"],"boolean":["22.37","26.37"],"tags":["22.37"],"these":["22.38"],"be":["22.38"],"written":["22.38"],"directly":["22.38"],"into":["22.38"],"correct":["22.40"],"so":["22.40"],"explicitly":["22.40"],"specified":["22.40"],"parameters":["22.41"],"lang":["22.43","26.43"],"devices":["22.45","22.46"],"mobile":["22.46"],"dimensions":["22.48"],"this":["22.49"],"feature":["22.49"],"an":["22.51"],"existing":["22.51"],"body":["23.3"],"属性":["23.10"],"export":["23.10"],"https":["23.11"],"plugin":["23.12"],"danmuku":["23.12","24.3","24.8"],"head":["23.13"],"title":["23.13"],"mode":["24.4"],"弹幕模式":["24.4"],"滚动":["24.4"],"弹幕字体大小":["24.5"],"antioverlap":["24.5"],"弹幕是否防重叠":["24.5"],"synchronousplayback":["24.5"],"是否同步播放速度":["24.5"],"mount":["24.5"],"undefined":["24.5"],"弹幕发射器挂载点":["24.5"],"默认为播放器控制栏中部":["24.5"],"heatmap":["24.5"],"plugins":["24.6","24.11","24.12","24.13"],"xml":["24.6","24.13","24.14"],"这是用户在输入框输入弹幕文本":["24.6"],"然后点击发送按钮后触发的函数":["24.6"],"artplayerplugindanmuku":["24.11","24.12","24.13"],"emitter":["24.14"],"重载":["24.14"],"danmu":["24.16"],"loaded":["24.18"],"danmus":["24.18"],"加载弹幕":["24.18"],"length":["24.18"],"简体中文":["25.0"],"和":["25.0"],"英文":["25.0"],"有时候":["26.2"],"地址没那么快知道":["26.2"],"这时候你可以异步设置":["26.2"],"cover":["26.11"],"但在部分低性能设备或老旧浏览器上可能会有性能或兼容性问题":["26.22"],"预览图缩放":["26.36"],"是否转义":["26.37"],"标签":["26.37"],"默认为":["26.37"],"onvttload":["26.37"],"用于修改":["26.37"]},{"0":["15.12","23.9"],"1":["3.25","9.9","19.9","24.4"],"2":["3.26","9.3","13.29","19.3","22.3","24.4"],"3":["3.28","13.28","19.6","26.1"],"4":["3.28","13.28","19.1","20.10","22.5","22.8","22.9","22.13","22.23","22.24","22.25","22.28","22.33","22.36","22.40","22.42","22.45","22.46","22.49","26.6","26.11","26.12","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.24","26.28","26.36","26.37","26.38","26.41","26.44","26.48","26.49","26.51"],"5":["3.23","3.29","9.9","13.29","19.9","22.7"],"6":["3.29","13.29","15.43","20.10","22.2","26.2"],"7":["5.29","15.6","15.7","15.17","15.18","15.19","15.24","15.38","15.39","15.40","26.27","26.38"],"8":["5.26","15.15","15.26","15.27","22.36","23.13","26.36","26.41"],"9":["5.5"],"10":["3.12","3.14","3.27","5.12","9.9","19.9"],"12":["24.13"],"14":["22.33"],"20":["3.11"],"22":["9.5"],"40":["13.7"],"50":["24.13"],"100":["13.10"],"300":["13.5","13.6"],"500":["3.21","13.8","13.9","13.17"],"512":["24.5"],"2000":["3.22","3.24","13.22"],"3000":["3.15","15.12"],"5000":["3.4","3.13","3.16"],"的":["0.0","0.4","1.0","5.0"],"url":["0.1","0.3","0.5","0.8","0.12","0.13","0.15","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.8","5.9","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.21","5.22","5.25","5.28","5.30","5.31","5.32","5.34","5.35","5.36","5.37","5.46","5.47","9.1","9.2","9.6","10.3","10.7","10.17","12.2","12.6","12.7","12.8","12.10","12.12","12.16","12.17","12.18","12.20","12.22","12.24","12.26","12.28","12.29","12.30","12.31","15.2","15.3","15.8","15.9","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.36","15.37","15.41","15.46","15.47","19.2","19.5","20.5","20.9","21.2","22.17","22.34","22.39","22.50","24.9","24.15","24.17","25.1","26.7","26.10","26.19","26.34","26.40","26.50"],"assets":["0.1","0.3","0.5","0.8","0.9","0.11","0.13","0.15","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.30","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.20","5.21","5.22","5.25","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.46","5.47","9.1","9.2","9.6","10.3","10.5","10.7","10.17","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.3","15.9","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.37","15.41","15.44","15.46","15.47","19.2","19.5","20.9","21.2","21.3","22.17","22.34","22.39","22.40","24.9","24.15","24.17","25.1","26.10","26.19","26.33","26.34","26.39","26.40","26.47","26.50"],"sample":["0.1","0.3","0.5","0.7","0.8","0.9","0.10","0.11","0.13","0.15","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.29","2.30","2.31","2.39","5.2","5.3","5.9","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.20","5.21","5.22","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.44","5.46","5.47","9.2","9.6","10.3","10.5","10.7","10.17","12.2","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.23","15.28","15.34","15.41","15.44","15.46","19.2","19.5","20.9","21.2","21.3","22.17","22.34","22.39","22.40","24.9","24.10","24.15","24.17","25.3","26.1","26.10","26.19","26.31","26.33","26.34","26.39","26.40","26.47"],"video":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.15","2.2","2.6","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","5.2","5.3","5.9","5.11","5.13","5.14","5.16","5.20","5.22","5.23","5.28","5.31","5.32","5.33","5.35","5.36","5.44","5.46","9.2","9.6","10.1","10.3","10.5","10.7","10.17","12.2","12.22","12.28","12.29","12.30","12.31","15.28","15.41","15.44","15.46","19.2","19.5","20.9","21.2","21.3","22.7","22.17","22.31","22.39","23.9","24.9","24.10","24.15","24.17","25.3","26.1","26.10","26.19","26.31","26.34","26.39","26.40","26.47"],"mp4":["0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.16","2.2","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.16","5.20","5.22","5.23","5.28","5.32","5.33","5.34","5.44","5.46","9.2","10.1","10.3","10.5","10.6","10.7","10.17","12.28","12.29","12.30","12.31","15.22","15.23","15.28","15.41","15.44","19.2","19.5","20.9","21.2","21.3","21.4","22.7","22.17","22.31","22.39","23.9","24.9","24.10","24.17","25.3","26.1","26.10","26.19","26.31","26.32","26.34","26.39","26.47"],"warning":["0.4","10.2","10.4","11.6","15.12","15.16","15.33","20.4","22.7","22.10","25.0"],"提示":["0.4"],"默认所有播放器实例都是共享同一个":["0.4"],"localstorage":["0.4"],"而且默认的":["0.4"],"是":["0.4"],"settings":["0.4","9.2","9.5","19.5"],"如果你想不同的播放器使用不同的":["0.4"],"console":["0.6","0.14","0.17","6.2","6.3","6.4","6.5","9.3","9.4","10.1","10.4","10.5","10.6","10.14","11.1","16.2","16.3","16.4","16.5","19.3","19.4","22.30"],"info":["0.6","0.14","0.17","1.6","6.2","6.3","6.4","6.5","9.3","9.4","10.1","10.4","10.5","10.6","10.14","11.1","15.16","16.2","16.3","16.4","16.5","19.3","19.4","22.30"],"play":["0.6","10.6","12.42","22.43","26.4"],"on":["0.7","0.8","0.9","0.10","2.2","2.22","5.33","5.44","7.5","8.5","9.9","10.7","10.14","15.0","15.28","15.44","17.5","18.5","19.9","20.3","22.22"],"ready":["0.9","0.10","2.2","5.12","5.44","7.5","10.14","15.33","17.5"],"artplayer":["0.11","0.12","1.6","2.41","3.34","5.4","5.6","5.7","5.17","5.24","5.26","5.27","5.29","5.38","5.39","5.40","5.42","5.43","9.6","11.1","11.6","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.1","13.3","13.4","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.1","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.24","15.25","15.27","15.30","15.31","15.32","15.35","15.36","15.43","19.1","19.2","19.6","20.13","21.1","22.25","22.27","22.33","22.34","22.40","22.42","22.50","26.3","26.5","26.7","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.25","26.26","26.33","26.36","26.42","26.45","26.46"],"container":["0.11","0.12","1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.29","3.30","5.1","5.4","5.6","5.7","5.8","5.10","5.15","5.17","5.18","5.19","5.24","5.25","5.26","5.27","5.30","5.38","5.39","5.40","5.42","5.43","9.1","9.6","12.1","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.30","15.1","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.25","15.30","15.31","15.32","15.34","15.35","15.36","15.37","15.47","19.2","19.6","21.1","21.2","22.25","22.33","22.34","22.40","22.42","22.50","24.7","24.16","26.5","26.7","26.17","26.25","26.27","26.33","26.40","26.42","26.50"],"app":["0.11","0.12","0.13","0.15","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.17","5.18","5.19","5.21","5.25","5.27","5.30","5.31","5.32","5.35","5.36","5.37","5.39","5.41","5.46","5.47","9.1","9.2","9.6","10.3","10.7","10.17","12.2","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","15.1","15.2","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.21","15.23","15.30","15.31","15.32","15.34","15.35","15.36","15.37","15.46","15.47","19.2","20.9","21.2","22.17","22.34","22.40","22.50","23.3","23.5","24.7","24.9","24.15","24.16","24.17","25.1","26.7","26.10","26.17","26.25","26.27","26.33","26.34","26.40","26.50"],"new":["0.12","1.1","3.3","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.28","3.29","3.33","5.4","5.5","5.6","5.7","5.24","5.26","5.29","5.38","5.39","5.40","5.41","5.42","5.43","9.6","10.3","10.16","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.30","15.6","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.27","15.30","15.31","15.36","15.38","15.39","15.40","15.41","15.43","19.1","19.2","19.6","21.1","22.13","22.25","22.33","22.34","22.40","22.42","22.50","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.33","26.36","26.38","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"hotkeyevent":["0.14","10.14"],"event":["0.14","9.3","9.4","10.14","19.4"],"click":["0.14","6.2","6.3","7.1","7.3","10.14","15.20","15.22","16.2","16.3","17.3","22.31","24.12"],"true":["0.16","2.28","3.1","3.20","3.33","7.2","9.2","9.5","17.2","19.5","22.17","22.37"],"flip":["0.16"],"playbackrate":["0.16"],"aspectratio":["0.16"],"function":["0.17","6.2","6.3","6.4","7.1","7.3","9.4","10.14","10.17","15.20","15.22","16.2","16.3","16.4","17.3","19.4","22.30","22.37","24.12","24.14","26.30"],"myplugin":["0.17","10.17"],"art":["1.1","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.18","3.21","3.22","3.23","3.24","3.27","3.28","3.29","3.32","3.33","5.4","5.5","5.26","5.29","5.38","5.40","5.41","5.42","5.43","9.6","10.3","10.16","12.1","12.11","12.14","12.19","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.29","13.30","15.6","15.7","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.26","15.27","15.30","15.38","15.39","15.40","15.41","15.43","19.1","19.6","20.8","21.1","22.9","22.13","22.25","22.28","22.33","22.34","22.40","22.41","22.42","23.8","24.8","24.16","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.36","26.38","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"js":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","3.2","3.34","5.5","5.29","10.9","10.10","10.13","10.15","10.16","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.6","15.15","15.17","15.24","15.26","15.38","15.39","15.40","15.42","19.1","20.2","22.3","22.5","22.6","22.8","22.9","22.12","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.33","22.36","22.40","22.44","22.45","22.46","22.49","23.2","24.3","26.6","26.11","26.22","26.36","26.37","26.38","26.41","26.51"],"手动触发事件":["2.0"],"subtitle":["2.28","2.29","2.30","2.31","12.31"],"或者部分加载完成":["2.46"],"则发送此事件":["2.46"],"已经到达结束点":["2.47"],"正在尝试获取媒体数据":["2.58"],"一级属性":["3.0"],"var":["3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.31","3.32","3.33","5.4","5.5","5.26","5.29","5.42","9.6","10.13","10.15","10.16","12.1","12.11","13.3","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.6","15.7","15.11","15.13","15.15","15.17","15.18","15.19","15.21","15.24","15.26","15.27","15.30","15.38","15.39","15.40","15.43","19.1","19.6","22.3","22.5","22.9","22.13","22.25","22.28","22.33","22.40","22.42","24.8","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.27","26.28","26.36","26.38","26.41","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"false":["3.18","3.19","3.31","3.32","6.5","13.3","13.18","13.32","16.5"],"adsplugin":["4.0","14.0"],"option":["4.0","14.0","24.18"],"layers":["4.0","14.0"],"ads":["4.0"],"html":["4.0","7.4","8.4","9.7","15.20","15.22","17.4","18.4","19.7","20.13","22.31","22.32","24.11","24.12","24.13","26.31","26.32"],"img":["4.0","9.5","9.8","19.8","22.39","26.39"],"style":["4.0","6.1","7.3","8.1","8.4","16.1","17.3","18.1","18.4","23.4","26.29"],"width":["4.0","8.4","9.5","9.8","18.4","19.8","24.5","26.29"],"100px":["4.0","8.4","18.4","22.29","26.29"],"src":["4.0","8.3","8.4","9.8","18.3","18.4","19.8","22.29","26.29"],"display":["4.0","10.8"],"none":["4.0"],"position":["4.0","5.20","7.4","8.2","8.3","8.5","15.20","15.22","17.4","18.2","18.3","18.5","22.29","22.32","24.11","24.12","26.29","26.32"],"absolute":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.29","26.29"],"top":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.29","26.29"],"20px":["4.0","22.29","26.29"],"right":["4.0","7.2","7.4","8.2","8.5","15.20","15.22","17.2","17.4","18.2","18.5","22.29","24.11","24.12","24.13"],"seek":["5.12","22.19"],"settimeout":["5.12","7.5","17.5","22.2"],"controls":["5.20","5.22","15.20","15.22","24.11","24.12"],"jpg":["5.23"],"hd":["5.45","15.45"],"720p":["5.45","15.45"],"element":["6.1","8.1","13.34","18.1","22.38"],"组件的":["6.1","8.1"],"dom":["6.1","8.1","9.4","16.1","18.1","19.4"],"元素":["6.1","8.1"],"args":["6.2","6.3","6.4","16.2","16.3","16.4","22.30","26.30"],"show":["6.5","9.7","9.9","16.5","19.7","19.9"],"组件样式对象":["7.1"],"组件点击事件":["7.1"],"mounted":["7.1","15.0","17.1"],"selector":["7.2","17.2"],"default":["7.2","10.4","17.2","20.10","21.4","25.4"],"span":["7.2","17.2"],"01":["7.2","17.2","22.30","26.30"],"button":["7.3","7.4","17.3","17.4"],"tooltip":["7.3","7.4","8.2","8.3","17.1","17.3","17.4","18.2","18.3","22.32"],"color":["7.3","17.3"],"red":["7.3","17.3"],"your":["7.4","17.4","22.31","22.32","26.31","26.32","26.47"],"02":["7.5","9.4","17.5","19.3","19.4","22.30","26.30"],"update":["7.5","17.5"],"the":["7.5","17.5","21.4","22.10","25.4"],"tip":["8.2","8.3","18.2","18.3"],"50px":["8.2","8.3","8.5","18.2","18.3","18.5"],"potser":["8.4","18.4"],"setting":["9.2","19.5"],"item":["9.3","9.4","19.3","19.4"],"onselect":["9.4","19.4","22.30","26.30"],"pip":["9.5","19.5"],"mode":["9.5","19.5"],"close":["9.5","19.5"],"height":["9.5","9.8","19.8"],"add":["9.7","20.1","23.1"],"slider":["9.7","19.7"],"state":["9.8","19.8"],"range":["9.9","19.9","24.13"],"attached":["10.0","11.0"],"note":["10.2","10.4","15.12","15.16","15.33","22.7","22.10","22.47"],"to":["10.2","12.42","12.43","14.0","22.1"],"easily":["10.2"],"distinguish":["10.2"],"between":["10.2"],"and":["10.2","15.29"],"by":["10.4"],"zh":["10.6"],"cn":["10.6"],"of":["10.8","10.9","10.10","10.16","12.45","16.1","22.1"],"div":["10.8","10.9","10.10","10.11","10.12","10.16","15.5","15.29","19.6","22.11","22.21","22.27","22.36","22.37","22.38","22.41","22.48","26.37"],"classname":["10.8","10.9","10.10","10.12","10.13","10.15","10.16","15.4","15.5","15.29","15.42","19.6","22.21","22.27","22.36","22.37","22.38","22.41","22.48","22.51","26.37"],"run":["10.8","10.9","10.10","10.12","10.13","10.15","10.16","11.11","15.4","15.5","15.26","15.29","15.42","19.6","22.14","22.15","22.16","22.18","22.21","22.26","22.27","22.36","22.37","22.38","22.41","22.44","22.48","22.51","26.37"],"code":["10.8","10.9","10.10","10.12","10.13","10.15","10.16","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","15.4","15.15","15.26","15.29","15.42","19.6","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.27","22.36","22.37","22.38","22.44","22.46","22.48","22.49","22.51","26.37"],"currently":["10.11"],"active":["10.11"],"cues":["10.11"],"overall":["10.11"],"see":["10.12"],"documentation":["10.12"],"for":["10.12","22.1","22.37"],"details":["10.12"],"all":["11.6"],"manually":["12.0","21.0"],"triggering":["12.0"],"enough":["12.42"],"data":["12.42","12.58","20.10"],"through":["12.43"],"is":["12.44","14.0","15.5","17.1"],"already":["12.46"],"been":["12.46","20.13"],"loaded":["12.46","12.50"],"or":["12.46","12.53","22.22"],"media":["12.47","12.49","12.58"],"resource":["12.48"],"type":["12.48","24.13"],"paused":["12.51","12.53","14.0"],"browser":["12.54"],"has":["12.55","12.56","12.57","12.59","20.13"],"but":["12.58"],"currenttime":["12.60"],"changed":["12.61"],"a":["12.62"],"temporary":["12.62"],"names":["13.0"],"are":["13.0"],"in":["13.0"],"uppercase":["13.0"],"only":["13.34"],"ui":["13.34"],"set":["13.34","22.1"],"say":["14.0"],"i":["14.0","24.6"],"want":["14.0","22.10"],"write":["14.0"],"that":["14.0"],"displays":["14.0"],"an":["14.0","22.43"],"image":["14.0"],"ad":["14.0"],"when":["14.0"],"automatically":["15.5","20.6"],"execute":["15.5"],"similar":["15.5","22.11"],"logic":["15.5"],"called":["15.5"],"t":["15.12"],"some":["15.16","22.22"],"videos":["15.16"],"may":["15.16","22.22"],"not":["15.16"],"switch":["15.20"],"visible":["15.29"],"resize":["15.33"],"object":["16.1","18.1","22.11"],"triggered":["17.1"],"after":["17.1"],"yellow":["19.3"],"step":["19.6","24.13"],"unpkg":["20.2","20.11","23.2","24.3"],"player":["20.3","22.47"],"s":["20.3"],"dimensions":["20.3"],"depend":["20.3"],"instance":["20.4","22.41"],"getinstance":["20.4"],"path":["20.5"],"imported":["20.6"],"useref":["20.8","23.8"],"export":["20.10"],"return":["20.10"],"https":["20.11"],"cdn":["20.11","23.11"],"npm":["20.11","23.11"],"dist":["20.11","23.11"],"plugin":["20.12"],"danmuku":["20.12"],"doctype":["20.12","23.12"],"agent":["20.13"],"added":["20.13"],"head":["20.13"],"title":["20.13"],"demo":["20.13","23.13"],"you":["21.0","22.10"],"need":["21.0","22.1"],"import":["21.0"],"change":["21.4","25.4"],"size":["22.1"],"example":["22.1"],"equivalent":["22.4"],"muted":["22.10"],"if":["22.10","24.6"],"css":["22.11","26.1"],"fit":["22.11"],"cover":["22.11"],"description":["22.19"],"increase":["22.19"],"volume":["22.19","23.9"],"decrease":["22.19"],"forward":["22.19"],"backward":["22.19"],"this":["22.22","26.4"],"cause":["22.22"],"performance":["22.22"],"compatibility":["22.22"],"issues":["22.22"],"low":["22.22"],"via":["22.27"],"menu":["22.31","26.31"],"left":["22.32","26.32"],"something":["22.35","26.35"],"dosomething":["22.35","26.35"],"onvttload":["22.37"],"modifying":["22.37"],"text":["22.37","24.6","24.12"],"loading":["22.39","26.39"],"current":["22.41"],"modify":["22.43"],"existing":["22.43"],"because":["22.47"],"uses":["22.47"],"as":["22.47"],"key":["22.47"],"class":["23.3"],"get":["23.4"],"d":["23.6"],"选项":["23.10"],"lang":["23.12","25.2","25.3"],"meta":["23.13"],"charset":["23.13"],"utf":["23.13"],"com":["24.3"],"默认":["24.4"],"顶部":["24.4"],"底部":["24.4"],"是否开启热力图":["24.5"],"当播放器宽度小于此值时":["24.5"],"弹幕发射器置于播放器底部":["24.5"],"points":["24.5"],"热力图数据":["24.5"],"filter":["24.5"],"弹幕载入前的过滤器":["24.5"],"只支持返回布尔值":["24.5"],"beforeemit":["24.5"],"弹幕发送前的过滤器":["24.5"],"支持返回":["24.5"],"你可以对弹幕做合法校验":["24.6"],"或者做存库处理":["24.6"],"当返回true后才表示把弹幕加入到弹幕队列":["24.6"],"async":["24.6"],"const":["24.6"],"isdirty":["24.6"],"fuck":["24.6"],"test":["24.6"],"plugins":["24.10"],"artplayerplugindanmuku":["24.10"],"xml":["24.11","24.12"],"隐藏弹幕":["24.11"],"发送弹幕":["24.12"],"弹幕大小":["24.13"],"input":["24.13"],"min":["24.13"],"max":["24.13"],"重新加载当前弹幕库":["24.14"],"切换":["24.14"],"error":["24.18"],"加载错误":["24.18"],"config":["24.18"],"配置变化":["24.18"],"外":["25.0"],"不再捆绑其它多国语言":["25.0"],"需要自行导入需要的语言":["25.0"],"language":["25.4"],"您可能需要初始化容器元素的大小":["26.1"],"如":["26.1"],"等同于":["26.4"],"document":["26.27"],"queryselector":["26.27"],"control":["26.32"],"文本的函数":["26.37"],"修改现有的语言":["26.43"],"id":["26.47"]},{"0":["5.12","20.5","20.9"],"1":["9.8","13.25","19.8","24.13"],"2":["13.26"],"3":["22.1"],"4":["22.6","22.11","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.26","22.37","22.38","22.41","22.44","22.48","22.51"],"5":["9.8","13.23","19.8","20.9","23.9"],"6":["15.42"],"7":["15.4","15.29","22.27","22.38"],"8":["20.13","22.41","23.12"],"9":["15.5","22.29","26.29"],"10":["9.8","13.12","13.14","13.27","19.8"],"11":["22.43","26.43"],"12":["22.37","26.37"],"20":["13.11"],"22":["9.2","9.6","9.7","19.2","19.5","19.7"],"25":["24.13"],"32":["0.14","10.14"],"60":["22.34","26.34"],"120":["26.34"],"150":["9.3","19.3"],"200":["24.5"],"404":["2.11","12.11"],"500":["13.21"],"1000":["22.2"],"2000":["13.24"],"3000":["5.12","13.15"],"5000":["13.4","13.13","13.16"],"二级属性":["0.0"],"mp4":["0.1","0.11","0.12","0.13","0.15","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.29","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.17","5.18","5.19","5.21","5.25","5.26","5.30","5.31","5.35","5.36","5.37","5.39","5.41","5.47","9.1","9.6","10.8","10.9","10.10","10.16","12.2","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.39","12.41","13.30","15.1","15.2","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.25","15.30","15.31","15.32","15.34","15.35","15.36","15.37","15.46","15.47","19.6","20.5","22.33","22.34","22.50","23.5","24.15","24.16","25.1","26.7","26.25","26.33","26.36","26.50"],"console":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","5.9","5.14","5.15","5.16","5.23","5.28","5.30","5.31","5.32","5.34","5.35","5.36","5.44","7.3","8.2","8.3","10.3","10.17","13.2","15.28","15.32","15.34","15.41","15.44","17.3","18.2","18.3","22.29","22.31","22.32","26.29","26.30","26.31"],"info":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","5.9","5.14","5.16","5.23","5.28","5.31","5.32","5.34","5.35","5.36","7.3","8.2","8.3","10.3","10.17","15.28","15.34","15.41","17.3","18.2","18.3","22.29","22.31","22.32","26.29","26.30","26.31"],"warning":["0.2","1.6","5.12","10.1","10.5","10.6","15.20","15.22","15.41","21.0","22.2","22.4","22.17","22.19","22.40","23.3","23.4","26.10","26.40","26.47"],"提示":["0.2","5.12","23.3","26.47"],"为了方便区别":["0.2"],"元素和普通对象":["0.2"],"播放器里的所有":["0.2"],"click":["0.3","5.20","5.22","6.1","8.1","8.2","8.3","10.3","15.41","16.1","18.1","18.2","18.3","22.29","22.32","24.10","24.11","26.29","26.31","26.32"],"event":["0.3","10.3","16.1","24.11"],"你可以修改":["0.4"],"即可":["0.4"],"zh":["0.6"],"cn":["0.6","21.4","25.4"],"your":["0.6","10.6","15.33","20.3","21.3","21.4","22.3","25.3","25.4","26.3"],"ready":["0.7","0.8","0.11","0.13","0.14","0.15","0.16","2.6","2.18","2.22","2.24","5.9","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.23","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.45","5.46","6.5","8.5","9.9","10.7","12.18","12.22","12.24","15.9","15.11","15.13","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.36","15.44","15.45","15.46","16.5","18.5","19.9"],"html":["0.8","0.9","0.10","5.20","5.22","14.0","24.10"],"some":["0.8","0.9","0.10"],"text":["0.8","0.9","0.10","17.1"],"position":["0.9","5.22","5.37","7.1","8.4","14.0","17.1","18.4","24.10"],"video":["0.11","0.12","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.28","3.29","3.30","5.1","5.6","5.7","5.8","5.10","5.15","5.17","5.18","5.19","5.21","5.24","5.25","5.26","5.27","5.29","5.30","5.37","5.39","5.41","5.47","9.1","10.8","10.9","10.10","10.16","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","15.21","15.30","15.31","15.32","15.36","15.37","15.47","19.6","20.5","22.25","22.33","22.34","22.42","22.50","23.5","24.7","24.16","25.1","26.7","26.17","26.25","26.33","26.36","26.50"],"on":["0.11","0.12","0.13","0.14","0.15","0.16","2.6","2.11","2.12","2.18","2.24","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.21","5.23","5.28","5.30","5.31","5.32","5.34","5.35","5.36","5.45","5.46","6.4","6.5","7.4","10.9","10.10","12.2","12.6","12.18","12.22","12.24","15.9","15.11","15.13","15.14","15.23","15.30","15.31","15.32","15.34","15.35","15.36","15.45","15.46","16.4","16.5","17.4","22.4"],"assets":["0.12","1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","5.1","5.4","5.5","5.6","5.7","5.17","5.24","5.26","5.27","5.29","5.38","5.39","5.40","5.41","5.42","5.43","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.6","15.7","15.8","15.10","15.11","15.13","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.26","15.27","15.30","15.36","15.38","15.39","15.40","19.1","19.6","21.1","22.25","22.33","22.36","22.42","22.50","24.7","24.8","24.16","26.5","26.7","26.17","26.25","26.36","26.37","26.42"],"sample":["0.12","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.6","5.7","5.8","5.10","5.17","5.24","5.25","5.26","5.27","5.29","5.37","5.38","5.39","5.40","5.41","5.42","9.1","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.29","13.30","15.1","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.15","15.18","15.19","15.21","15.25","15.26","15.30","15.31","15.32","15.35","15.36","15.37","15.47","19.1","19.6","21.1","22.25","22.33","22.36","22.42","22.50","24.7","24.16","25.1","26.5","26.7","26.17","26.25","26.36","26.37","26.42","26.50"],"subtitleoffset":["0.16"],"return":["0.17","9.3","9.4","10.17","19.3","19.4","24.9","24.12"],"name":["0.17","10.17"],"something":["0.17"],"dosomething":["0.17"],"一级属性":["1.0","5.0"],"app":["1.1","3.3","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.22","3.23","3.28","3.29","3.33","5.4","5.5","5.6","5.7","5.24","5.26","5.29","5.38","5.40","5.42","5.43","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.11","12.14","12.19","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.6","15.7","15.15","15.17","15.18","15.19","15.24","15.25","15.26","15.27","15.29","15.38","15.39","15.40","15.43","19.1","19.6","20.13","21.1","22.5","22.9","22.13","22.25","22.27","22.33","22.36","22.37","22.42","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.23","26.24","26.26","26.28","26.36","26.37","26.38","26.41","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"url":["1.1","3.6","3.7","3.8","3.9","3.10","3.17","3.22","3.28","3.29","5.4","5.5","5.6","5.7","5.24","5.26","5.27","5.29","5.38","5.39","5.40","5.41","5.42","5.43","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.9","12.11","12.13","12.14","12.15","12.19","12.21","12.23","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.1","15.6","15.7","15.15","15.17","15.21","15.24","15.25","15.26","15.27","15.30","15.38","15.39","15.40","15.43","19.1","19.6","21.1","22.3","22.25","22.42","23.5","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.25","26.26","26.38","26.42","26.45","26.46","26.51"],"全部工具函数请参考以下地址":["1.6"],"js":["1.11","10.8","10.11","10.12","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.2","13.34","15.5","15.29","22.11","22.21","22.27","22.37","22.38","22.41","22.48","22.51"],"emit":["2.0","12.0"],"focus":["2.0","12.0"],"移除事件":["2.0"],"true":["2.16","2.17","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.39","3.30","5.2","5.3","5.21","6.2","6.4","6.5","9.1","9.6","10.16","12.17","12.20","12.28","13.1","13.20","13.33","15.2","15.3","16.2","16.4","16.5","19.2","19.6","24.16","26.10","26.33","26.47"],"setting":["2.17","2.20","2.28","3.30","9.1","9.6","12.17","12.20","13.30","19.2","19.6","22.7"],"fullscreen":["2.22"],"srt":["2.28","2.29","2.30","2.31","12.31"],"并调用":["2.46"],"但数据意外未出现":["2.58"],"属性名字全部都是大写的形式":["3.0"],"未来容易发生变动":["3.0"],"new":["3.1","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.34","10.8","10.9","10.10","10.11","10.12","10.13","10.15","11.1","13.1","13.3","13.4","13.10","13.11","13.12","13.13","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.26","13.27","13.28","13.29","13.31","13.32","13.33","15.4","15.5","15.26","15.29","15.42","22.3","22.5","22.6","22.8","22.9","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.28","22.35","22.36","22.37","22.38","22.44","22.45","22.46","22.48","22.49","22.51","23.9","26.6","26.11","26.22","26.35","26.37","26.41"],"container":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","3.34","5.5","5.29","10.8","10.9","10.10","10.11","10.12","10.13","10.15","10.16","11.1","13.3","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.7","15.15","15.17","15.24","15.26","15.27","15.29","15.38","15.39","15.40","15.42","15.43","19.1","20.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.20","22.23","22.24","22.27","22.28","22.36","22.37","22.45","22.46","22.49","22.51","23.10","24.8","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.28","26.36","26.37","26.38","26.41","26.44","26.45","26.46","26.48","26.49","26.51"],"log":["3.2","5.44","15.44"],"art":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","3.31","3.34","10.8","10.9","10.10","10.11","10.13","10.15","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.28","13.31","13.32","13.33","15.4","15.5","15.29","15.42","20.9","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.36","22.37","22.38","22.44","22.45","22.46","22.48","22.49","22.51","23.9","26.11","26.22","26.27","26.37"],"var":["3.34","10.8","10.9","10.10","10.11","10.12","11.1","13.1","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.5","15.29","15.42","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.27","22.35","22.36","22.37","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","26.11","26.35","26.37"],"show":["4.0","6.2","6.3","6.4","14.0","16.2","16.3","16.4"],"block":["4.0","14.0"],"hide":["4.0","14.0"],"controls":["4.0","5.37","15.37","17.1","24.10"],"tooltip":["4.0","7.1","9.7","19.7","26.32"],"muted":["5.2","5.3","5.25","15.2","15.3","26.10"],"seek":["5.11","5.13"],"t":["5.12"],"right":["5.20","5.22","8.3","8.4","14.0","17.1","18.3","18.4","24.10","26.29"],"switch":["5.20","15.12"],"function":["5.20","5.22","6.1","8.1","8.2","8.3","16.1","18.1","18.2","18.3","22.29","22.31","22.32","24.9","24.11","24.13","26.29","26.31"],"theme":["5.44","15.44"],"settimeout":["5.45","6.5","8.5","9.9","10.14","15.45","16.5","18.5","19.9","26.2"],"subtitle":["5.47","12.29","12.30"],"object":["6.1","8.1"],"组件样式对象":["6.1","8.1"],"false":["6.2","6.3","6.4","9.5","13.19","13.31","13.34","16.2","16.3","16.4","19.5","24.6"],"update":["6.5","8.5","9.9"],"组件挂载后触发":["7.1"],"组件的提示文本":["7.1"],"yellow":["7.2","17.2"],"02":["7.2","17.2"],"onselect":["7.2","17.2"],"item":["7.2","9.5","17.2"],"dom":["7.2","17.2"],"args":["7.3","8.2","8.3","17.3","18.2","18.3","22.29","22.31","22.32","26.29","26.31"],"mounted":["7.3","8.2","8.3","17.3","18.2","18.3","24.13"],"style":["7.4","14.0","17.4","20.5","22.32","23.5","24.13","26.32"],"color":["7.4","17.4","22.32","24.4","26.32"],"red":["7.4","17.4"],"control":["7.5","17.5"],"by":["7.5","8.5","9.9","17.5","18.5","19.9","22.2","22.47"],"absolute":["8.4","14.0","18.4"],"top":["8.4","14.0","18.4"],"50px":["8.4","18.4"],"the":["8.5","9.9","18.5","19.9","20.4"],"button":["9.2"],"img":["9.2","9.6","9.7","14.0","19.2","19.5","19.7"],"height":["9.2","9.6","19.2","19.5","20.5","22.1","23.5","26.1"],"src":["9.2","9.5","14.0","19.5","22.39","26.39"],"quality":["9.3","19.3"],"1080p":["9.3","19.3"],"state":["9.5","22.39","24.6","26.39"],"svg":["9.5","9.8","19.5","19.8"],"settings":["9.6","10.4","19.2","19.6"],"slider":["9.6"],"5x":["9.6","9.7","19.6","19.7"],"width":["9.6","9.7","14.0","19.5","19.7","20.5","22.1","23.5","26.1"],"icon":["9.7","19.7"],"range":["9.8","19.8"],"instance":["10.0","23.4"],"which":["10.0","17.1"],"note":["10.1","15.20","15.22","15.41","22.2","22.17","22.19"],"if":["10.1","10.4","15.41","20.11","22.47","24.11","24.12"],"you":["10.1","10.4","15.41","20.6"],"directly":["10.1","20.4"],"regular":["10.2"],"objects":["10.2"],"within":["10.2"],"are":["10.2"],"mouseenter":["10.3"],"instances":["10.4"],"share":["10.4"],"same":["10.4","15.12"],"localstorage":["10.4"],"and":["10.4","12.46","15.12"],"want":["10.4"],"different":["10.4"],"players":["10.4"],"use":["10.4"],"loading":["10.5"],"this":["10.5","22.40"],"is":["10.5","12.48","15.33","20.4"],"using":["10.6"],"can":["10.6","22.40"],"only":["10.6","22.40"],"to":["10.7","11.6","15.20","15.22","20.5","23.5"],"artplayer":["10.8","10.9","10.10","10.11","10.12","10.13","10.15","10.16","13.34","15.4","15.6","15.15","15.17","15.26","15.29","15.38","15.39","15.40","15.42","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.35","22.36","22.37","22.38","22.44","22.45","22.46","22.49","22.51","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.24","26.28","26.35","26.37","26.38","26.41","26.44","26.48","26.49","26.51"],"classname":["10.11","13.34","22.11","22.22"],"run":["10.11","13.34","22.11","22.22"],"code":["10.11","13.34","15.5","22.11","22.22","22.41"],"flip":["10.16"],"playbackrate":["10.16"],"constructor":["11.0"],"please":["11.6"],"refer":["11.6"],"removing":["12.0"],"through":["12.42"],"end":["12.43"],"without":["12.43"],"duration":["12.45"],"partially":["12.46"],"reached":["12.47"],"not":["12.48","20.4"],"has":["12.49"],"delayed":["12.53"],"due":["12.53","15.20","15.22","22.17"],"loads":["12.54"],"changed":["12.55"],"completed":["12.56"],"begun":["12.57"],"been":["12.59"],"property":["12.60"],"lack":["12.62"],"these":["13.0","22.19"],"subject":["13.0"],"change":["13.0"],"div":["13.34","20.13","22.22","23.13"],"ads":["14.0"],"100px":["14.0"],"display":["14.0","24.13"],"none":["14.0"],"20px":["14.0"],"have":["15.12","15.16"],"functionality":["15.12"],"a":["15.16","21.0"],"such":["15.16"],"as":["15.16"],"live":["15.16"],"streams":["15.16"],"or":["15.16","17.1","22.1"],"browser":["15.20","15.22","22.17"],"security":["15.20","15.22","22.17"],"mechanisms":["15.22","22.17"],"jpg":["15.23"],"json":["15.28"],"stringify":["15.28"],"useful":["15.33"],"but":["15.33"],"need":["15.41"],"certain":["15.41"],"left":["17.1"],"side":["17.1"],"pnpm":["20.1","23.1","24.2"],"com":["20.2","20.11","23.2","23.11"],"of":["20.3"],"its":["20.3"],"therefore":["20.3"],"must":["20.3"],"reactive":["20.4"],"modifying":["20.4"],"600px":["20.5","23.5"],"400px":["20.5","22.1","26.1"],"margin":["20.5"],"60px":["20.5"],"auto":["20.5"],"when":["20.6","21.0"],"null":["20.8","23.8"],"volume":["20.9"],"option":["20.10","23.10"],"tip":["20.11"],"lang":["20.12","21.2","21.3"],"en":["20.12","23.12"],"head":["20.12","23.12"],"meta":["20.12","20.13","23.12"],"charset":["20.12","20.13","23.12"],"utf":["20.12","20.13","23.12"],"body":["20.13","23.13"],"class":["20.13","23.13"],"require":["21.0"],"cannot":["21.0"],"be":["21.0"],"matched":["21.0"],"script":["21.2","25.2"],"play":["21.4","22.19","25.4"],"css":["22.1"],"300px":["22.1","26.1"],"three":["22.2"],"file":["22.2"],"formats":["22.2"],"caches":["22.7"],"last":["22.7"],"upon":["22.7","22.10"],"immediately":["22.10"],"page":["22.10"],"load":["22.10"],"space":["22.19"],"toggle":["22.19"],"pause":["22.19"],"devices":["22.22"],"older":["22.22"],"browsers":["22.22"],"document":["22.27"],"queryselector":["22.27"],"opacity":["22.29","26.29"],"setting02":["22.30","26.30"],"green":["22.32","26.32"],"one":["22.34","26.34"],"more":["22.34","26.34"],"chance":["22.34","26.34"],"ploading":["22.39","26.39"],"gif":["22.39","26.39"],"recognition":["22.40"],"player":["22.40"],"parse":["22.40"],"suffixes":["22.40"],"like":["22.40"],"cache":["22.47"],"progress":["22.47"],"however":["22.47"],"for":["22.47"],"播放器的尺寸依赖于容器":["23.3"],"getinstance":["23.4"],"path":["23.5"],"ts":["23.6"],"types":["23.10"],"const":["23.10"],"unpkg":["23.11"],"title":["23.12"],"ffffff":["24.4"],"弹幕颜色":["24.4"],"默认为白色":["24.4"],"promise":["24.5"],"beforevisible":["24.5"],"弹幕显示前的过滤器":["24.5"],"visible":["24.5"],"弹幕层是否可见":["24.5"],"emitter":["24.5"],"是否开启弹幕发射器":["24.5"],"maxlength":["24.5"],"弹幕输入框最大长度":["24.5"],"await":["24.6"],"这里是所有弹幕的过滤器":["24.6"],"包含来自服务端的和来自用户输入的":["24.6"],"plugins":["24.9","24.15","24.16","24.17"],"artplayerplugindanmuku":["24.9","24.15","24.16","24.17"],"xml":["24.10"],"隐藏弹幕":["24.10"],"prompt":["24.12"],"请输入弹幕文本":["24.12"],"弹幕测试文本":["24.12"],"trim":["24.12"],"value":["24.13"],"flex":["24.13"],"alignitems":["24.13"],"center":["24.13"],"切换到新的弹幕库":["24.14"],"config":["24.14"],"v2":["24.14"],"fullscreenweb":["24.16"],"stop":["24.18"],"弹幕停止":["24.18"],"start":["24.18"],"弹幕开始":["24.18"],"当无法匹配到语言时":["25.0"],"会默认显示英文":["25.0"],"i18n":["25.0","25.3"],"或者使用":["26.1"],"aspect":["26.1"],"热键":["26.19"],"描述":["26.19"],"增加音量":["26.19"],"降低音量":["26.19"],"innerhtml":["26.27"],"sd":["26.33"],"后缀的识别":["26.40"],"播放器只能解析这种后缀":["26.40"],"因为播放器默认使用":["26.47"]},{"0":["23.5"],"2":["5.31"],"4":["22.22"],"5":["5.8","5.9","5.15","15.8","26.7"],"8":["2.0","12.0","20.12"],"9":["5.32","22.1"],"10":["5.11","5.13","15.11","15.13"],"16":["5.32","15.32","22.1","24.12","26.1"],"22":["19.6"],"60":["22.36","24.5","26.36"],"120":["22.34"],"180":["22.34","26.34"],"200":["24.6"],"240":["26.34"],"360":["9.3"],"720":["9.3","19.3"],"1000":["0.8","0.9","0.10","0.16","24.5","26.2"],"1080":["9.3","19.3"],"5000":["0.14","10.14"],"比较少用":["0.0"],"warning":["0.1","0.5","0.6","0.7","0.8","5.16","5.20","5.22","5.28","5.33","5.41","10.3","10.7","10.14","15.28","20.5","20.13","22.29","22.30","22.31","22.32","22.39","22.42","22.50","23.13","26.2","26.4","26.7","26.17","26.19","26.31","26.32","26.39","26.42","26.50"],"提示":["0.1","5.16","5.20","5.22","5.33","26.2","26.7","26.10","26.17"],"假如直接修改这个":["0.1"],"元素都是以":["0.2"],"开头命名的":["0.2"],"这是所有":["0.2"],"元素的定义":["0.2"],"mouseenter":["0.3"],"mouseleave":["0.3","10.3"],"loading":["0.5","12.49"],"这是所有图标的定义":["0.5"],"types":["0.5","1.6","11.6","25.0","26.50"],"使用":["0.6","24.9"],"只能更新实例化之后的":["0.6"],"to":["0.7","22.2"],"play":["0.7","4.0","5.2","10.7","15.2","21.3","22.2","25.3"],"如果想马上隐藏":["0.7"],"settimeout":["0.8","0.9","0.10","0.12","0.13","0.14","0.15","0.16","5.2","5.3","5.8","5.11","5.13","5.21","6.4","7.4","8.4","9.8","10.8","10.9","10.10","10.16","15.2","15.8","15.11","15.13","16.4","17.4","18.4","19.8"],"false":["0.8","0.9","0.10","0.15","0.16","22.29","22.31","24.4","26.29","26.31"],"left":["0.9","7.1","10.9"],"true":["0.10","0.12","0.13","2.19","3.5","3.6","3.7","3.28","3.29","5.1","5.14","5.25","5.34","6.3","10.10","12.16","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.39","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.21","15.25","15.34","16.3","19.1","22.25","22.33","26.17","26.25"],"srt":["0.11","5.47","12.28","12.29","12.30","15.47"],"ready":["0.12","5.2","5.3","5.5","5.6","5.7","5.8","5.10","5.17","5.21","5.24","5.25","5.26","5.27","5.29","6.4","7.4","8.4","9.8","10.8","10.9","10.10","10.11","10.12","10.13","10.15","10.16","12.0","12.6","15.2","15.3","15.5","15.8","15.10","15.15","15.17","15.18","15.19","15.21","15.25","15.26","15.29","15.30","16.4","17.4","18.4","19.8","24.17"],"on":["0.17","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","5.1","5.2","5.3","5.4","5.5","5.6","5.7","5.17","5.24","5.25","5.26","5.27","5.29","5.38","5.39","5.40","5.47","8.4","9.8","10.8","10.11","10.12","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.17","12.19","12.20","12.21","12.23","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17","15.1","15.2","15.3","15.5","15.6","15.7","15.8","15.10","15.15","15.17","15.18","15.19","15.20","15.21","15.22","15.24","15.25","15.26","15.27","15.29","15.38","15.39","15.40","15.47","17.1","18.4","19.8","24.15","24.17","26.4"],"非常少使用":["1.0"],"sample":["1.1","3.1","3.3","3.4","3.11","3.12","3.13","3.18","3.21","3.22","3.23","3.24","3.27","3.31","3.32","3.33","3.34","5.4","5.5","5.43","10.11","10.12","11.1","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.21","13.22","13.23","13.24","13.28","13.33","13.34","15.4","15.5","15.6","15.7","15.17","15.24","15.27","15.29","15.38","15.39","15.40","15.42","15.43","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.35","22.37","22.38","22.41","22.44","22.45","22.46","22.49","22.51","23.10","24.8","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.28","26.35","26.38","26.41","26.44","26.45","26.46","26.48","26.49","26.51"],"video":["1.1","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.21","3.22","3.23","3.24","3.31","3.33","5.4","5.5","5.42","10.11","10.13","10.15","11.1","12.1","12.14","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","15.4","15.24","15.26","15.29","15.39","15.42","19.1","20.10","21.1","22.9","22.13","22.28","22.36","23.10","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.28","26.37","26.38","26.42","26.44","26.45","26.46","26.48","26.49"],"mp4":["1.1","3.8","3.9","3.10","3.17","3.22","3.28","3.34","5.4","5.5","5.6","5.7","5.24","5.27","5.29","5.38","5.40","5.42","5.43","10.11","10.12","10.13","10.15","12.1","12.3","12.4","12.11","12.14","12.19","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.40","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.34","15.4","15.5","15.6","15.7","15.15","15.17","15.24","15.26","15.27","15.29","15.38","15.39","15.40","15.42","15.43","19.1","20.10","21.1","22.5","22.25","22.36","22.37","22.38","22.42","23.10","24.7","24.8","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.26","26.37","26.38","26.42","26.45","26.46","26.51"],"artplayer":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.2","22.11","22.21","22.22","22.41","22.48"],"d":["1.6"],"info":["1.11","2.12","5.15","5.26","5.29","5.30","5.41","5.42","9.5","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","15.9","15.14","15.15","15.23","15.26","15.29","15.30","15.31","15.32","15.35","15.36","19.5","24.17","26.32"],"const":["2.0","5.18","5.19","9.5","12.0","15.18","15.19","19.5","20.10","24.13"],"onready":["2.0","12.0"],"console":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","5.25","5.26","5.29","5.39","5.41","5.42","5.43","9.5","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","12.5","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.27","12.31","12.41","15.9","15.14","15.15","15.23","15.26","15.29","15.30","15.31","15.35","15.36","15.42","15.43","19.5","20.5","23.5","24.17","26.32"],"event":["2.5","2.7","2.8","2.9","2.10","2.12","2.13","2.22","2.41","5.41","9.2","9.5","12.5","12.7","12.8","12.9","12.10","12.12","12.13","12.22","18.1"],"reconnecttime":["2.11","12.11"],"state":["2.12","2.15","2.16","2.21","2.23","2.24","2.25","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","9.2","9.6","9.7","12.12","12.15","12.21","12.23","12.24","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","19.2","19.7"],"height":["2.18","9.7","19.6","19.7"],"datauri":["2.26","12.26"],"currenttime":["2.27","12.27"],"offset":["2.28"],"cues":["2.29","2.30","2.31","12.29","12.30","12.31"],"option":["2.31","12.31"],"load":["2.46","12.46"],"方法重新加载它":["2.46"],"基本上用不到":["3.0"],"app":["3.1","3.4","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.24","3.25","3.26","3.27","3.31","3.32","3.34","10.11","10.12","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","15.4","15.5","15.42","20.10","22.3","22.6","22.8","22.11","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.28","22.35","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","23.10","23.13","26.3","26.11","26.22","26.35"],"url":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","3.34","10.12","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","15.4","15.5","15.29","15.42","20.10","22.5","22.6","22.8","22.9","22.11","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.28","22.35","22.38","22.44","22.45","22.46","22.48","22.49","22.51","23.10","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.24","26.27","26.28","26.35","26.44","26.48","26.49"],"assets":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","3.34","10.11","10.12","11.1","13.3","13.4","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.18","13.21","13.22","13.23","13.24","13.31","13.32","13.33","13.34","15.4","15.5","15.29","15.42","15.43","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.28","22.35","22.37","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","23.10","26.3","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.27","26.28","26.35","26.38","26.41","26.44","26.45","26.46","26.48","26.49","26.51"],"loop":["3.5","3.6","3.7","13.5","13.6","13.7"],"flip":["3.5","3.6","3.7","13.5","13.6","13.7"],"dblclick":["3.17"],"setting":["3.28","3.29","12.28","13.28","13.29","19.1","24.13"],"playbackrate":["3.28","13.28"],"contextmenu":["3.28","3.29","3.30","13.29","13.30"],"aspectratio":["3.29","10.16","13.29"],"show":["3.29","3.30","9.8","13.30","19.8","22.29","22.31","24.11","24.18","26.29","26.31"],"click":["4.0","5.37","5.41","14.0","15.37"],"marginright":["4.0","14.0"],"比较常用":["5.0"],"muted":["5.1","15.1","15.25"],"seek":["5.8","15.8","15.11","15.13"],"switch":["5.12"],"和":["5.12","7.1","24.5"],"的功能是一样的":["5.12"],"只是":["5.12"],"有的视频是没有时长的":["5.16"],"async":["5.18","5.19","15.18","15.19"],"await":["5.18","5.19","15.18","15.19"],"t":["5.23"],"json":["5.28"],"stringify":["5.28"],"resize":["5.33","24.15"],"当你的容器只有宽度":["5.33"],"playsinline":["5.34","15.34"],"m3u8":["5.35","22.2","26.41"],"000":["5.36"],"right":["5.37","7.1","15.37"],"html":["5.37","10.8","10.9","10.10","15.37","20.1","23.1"],"timeupdate":["5.39"],"green":["5.44","15.44"],"1080p":["5.45","15.45"],"png":["5.46","15.46","22.36","22.39","26.36","26.39"],"组件点击事件":["6.1","8.1"],"mounted":["6.1","8.1","16.1","18.1","22.29","26.29"],"组件挂载后触发":["6.1","8.1"],"get":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"the":["6.2","6.3","6.4","6.5","7.2","7.3","7.4","8.2","8.3","8.4","9.8","16.2","16.3","16.4","16.5","17.2","17.3","17.4","18.2","18.3","18.4","19.8","22.19"],"element":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"of":["6.2","6.3","7.2","7.3","8.2","8.3","10.5","12.53","16.2","16.3","17.2","17.3","18.2","18.3"],"by":["6.2","6.3","6.4","6.5","7.2","7.4","8.4","16.2","16.3","16.4","16.5","17.2","17.4","18.4","21.0"],"delete":["6.4","7.4","8.4","9.8","16.4","17.4","18.4","19.8"],"控制控制器出现的左右位置":["7.1"],"selector":["7.1","17.1"],"array":["7.1","17.1"],"return":["7.2","17.2"],"control":["7.2","7.3","7.4","17.2","17.3","17.4"],"200px":["8.5","18.5"],"svg":["9.2","9.6","9.7","19.2","19.6","19.7"],"item":["9.2","9.6","19.2"],"720p":["9.3","19.3"],"360p":["9.3","19.3"],"nextstate":["9.5","19.5"],"src":["9.6","9.7","19.2","19.6","19.7"],"pip":["9.9","19.9"],"mode":["9.9","19.9"],"close":["9.9","19.9"],"are":["10.0","11.0","15.0","22.2"],"less":["10.0"],"commonly":["10.0","15.0"],"modify":["10.1","10.4","20.11","20.13"],"this":["10.1","10.2"],"object":["10.1"],"named":["10.2"],"with":["10.2","20.12","23.12"],"a":["10.2","12.48","15.12","15.20","15.22"],"prefix":["10.2"],"is":["10.2","15.12","20.5","22.47"],"definition":["10.2","10.5"],"note":["10.3","10.14","15.28","20.13","22.4"],"if":["10.3","10.6","10.7","22.4","22.17"],"you":["10.3","10.6","10.7","22.47"],"need":["10.3","20.11","20.13","22.47"],"that":["10.3","15.16"],"should":["10.3"],"only":["10.3","10.14","15.5","15.41","22.19"],"exist":["10.3","15.41"],"during":["10.3"],"can":["10.4"],"after":["10.6","10.14","16.1","18.1","22.19"],"instantiation":["10.6"],"want":["10.6","10.7"],"before":["10.6","20.13"],"hide":["10.7","24.18"],"some":["10.8","10.9","10.10"],"text":["10.8","10.9","10.10","24.7","24.9"],"position":["10.9","15.37"],"these":["10.14"],"take":["10.14","22.19"],"effect":["10.14","22.19"],"subtitleoffset":["10.16"],"something":["10.17"],"dosomething":["10.17"],"which":["11.0","15.0"],"rarely":["11.0"],"following":["11.6","20.11"],"address":["11.6"],"off":["12.0"],"end":["12.42","12.47"],"without":["12.42"],"stopping":["12.42","12.43"],"for":["12.42","12.43","21.0","22.10","22.30","22.31","22.32","22.50"],"property":["12.45"],"changes":["12.45"],"method":["12.46","15.12"],"called":["12.46"],"its":["12.47"],"supported":["12.48","22.2"],"finished":["12.49"],"lack":["12.53"],"resource":["12.54"],"unexpectedly":["12.58"],"not":["12.58","20.5"],"suspended":["12.59"],"has":["12.60"],"changed":["12.60"],"data":["12.62"],"future":["13.0"],"and":["13.0","20.11"],"container":["13.1","13.4","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","20.10","22.3","22.18","22.21","22.22","22.26","22.35","22.38","22.41","22.44","22.48","23.3","26.35"],"log":["13.2","20.5","23.5"],"new":["13.14","13.15","13.16","13.25","13.34","20.8","20.9","22.11","22.22","22.27","22.41","23.8","26.27"],"var":["13.34","22.11","22.22"],"art":["13.34","22.11","22.22","22.27"],"controls":["14.0"],"tooltip":["14.0","16.1"],"returns":["15.12"],"promise":["15.12","24.9"],"it":["15.12","15.33","15.41","20.13"],"resolve":["15.12"],"s":["15.12","15.41"],"been":["15.16"],"fully":["15.16"],"decoded":["15.16"],"in":["15.16","20.4"],"mechanisms":["15.20"],"user":["15.20","15.22"],"interaction":["15.20","15.22"],"e":["15.20","15.22","22.7"],"g":["15.20","15.22","22.7"],"dimension":["15.28"],"exact":["15.33"],"unknown":["15.33"],"lifecycle":["15.41"],"triggered":["16.1","18.1"],"mount":["16.1","18.1"],"appears":["17.1"],"objects":["17.1"],"selection":["17.1"],"list":["17.1"],"img":["19.6"],"width":["19.6"],"have":["20.3"],"defined":["20.3"],"tip":["20.3","20.9","23.9","23.11"],"see":["20.3"],"more":["20.3","22.10","22.42"],"will":["20.4"],"reactive":["20.5"],"import":["20.6","20.12","23.12"],"current":["20.8","23.8"],"full":["20.9"],"typescript":["20.9","23.9"],"support":["20.11"],"even":["20.11"],"older":["20.11"],"configuration":["20.11","22.31","22.32"],"title":["20.12"],"map":["20.12","23.12"],"displayed":["21.0"],"default":["21.0"],"i18n":["21.0","21.3"],"syntax":["21.0","22.50"],"lang":["21.1","25.1"],"window":["21.2","25.2"],"imported":["21.4","25.4"],"use":["22.1"],"aspect":["22.1"],"ratio":["22.1","26.1"],"ogg":["22.2","26.2"],"webm":["22.2","26.2"],"other":["22.2"],"like":["22.2"],"or":["22.2"],"flv":["22.2"],"inside":["22.4"],"callback":["22.4"],"refers":["22.4"],"instance":["22.4"],"however":["22.4"],"an":["22.4"],"arrow":["22.4"],"next":["22.7"],"initialization":["22.7"],"page":["22.7"],"refresh":["22.7"],"must":["22.10"],"be":["22.10"],"set":["22.10"],"screenshotting":["22.17"],"may":["22.17"],"fail":["22.17"],"source":["22.17"],"player":["22.19"],"gains":["22.19"],"focus":["22.19"],"js":["22.22"],"innerhtml":["22.27"],"component":["22.31","22.32"],"please":["22.32"],"refer":["22.32"],"sd":["22.33"],"480p":["22.33","26.33"],"谁でもいいはずなのに":["22.34","26.34"],"夏の想い出がまわる":["22.34","26.34"],"all":["22.39"],"icon":["22.39"],"but":["22.40"],"cannot":["22.40"],"zh":["22.43","26.43"],"cn":["22.43","26.43"],"same":["22.47"],"different":["22.47"],"then":["22.47"],"reference":["22.50"],"的尺寸":["23.3"],"所以你的容器":["23.3"],"必须是有尺寸的":["23.3"],"非响应式":["23.4"],"在":["23.4"],"400px":["23.5"],"margin":["23.5"],"60px":["23.5"],"auto":["23.5"],"全部":["23.9"],"定义":["23.9"],"volume":["23.10"],"假如你要兼容更古老的浏览器时":["23.11"],"请修改以下配置然后自行构建":["23.11"],"body":["23.12"],"border":["24.4"],"弹幕是否有描边":["24.4"],"默认为":["24.4"],"locktime":["24.5"],"输入框锁定时间":["24.5"],"theme":["24.5"],"dark":["24.5","24.16"],"弹幕主题":["24.5"],"支持":["24.5"],"length":["24.6"],"这是弹幕即将显示的时触发的函数":["24.6"],"当返回true后才表示可以马上发送到播放器里":["24.6"],"弹幕已经出现在播放器里":["24.6"],"你可以访问到弹幕的dom元素里":["24.6"],"plugins":["24.7","24.8"],"artplayerplugindanmuku":["24.7","24.8"],"resovle":["24.9"],"function":["24.10","26.32"],"target":["24.11"],"innertext":["24.11"],"else":["24.11"],"color":["24.12"],"math":["24.12"],"floor":["24.12"],"random":["24.12"],"0xffffff":["24.12"],"tostring":["24.12"],"queryselector":["24.13"],"addeventlistener":["24.13"],"追加":["24.14"],"追加新的弹幕库":["24.14"],"参数类型和option":["24.14"],"danmuku相同":["24.14"],"xml":["24.15","24.17"],"弹幕隐藏":["24.18"],"弹幕显示":["24.18"],"写法参考":["25.0","26.50"],"默认支持三种视频文件格式":["26.2"],"播放器会缓存最后一次音量的大小":["26.7"],"假如希望默认进入页面就能自动播放视频":["26.10"],"必需为":["26.10"],"视频快进":["26.19"],"视频快退":["26.19"],"space":["26.19"],"切换播放":["26.19"],"暂停":["26.19"],"subtitle":["26.25"],"args":["26.32"],"hd":["26.33"],"webkit":["26.38"],"全部图标的定义":["26.39"],"但无法解析这种后缀":["26.40"],"作为":["26.47"],"key":["26.47"],"来缓存播放进度的":["26.47"],"但假如你的同一个视频的":["26.47"]},{"0":["5.10","5.11","5.13","5.16","5.23","15.10","15.11","15.13","15.16","15.23","20.10","23.10"],"1":["5.47","9.7","15.47","19.7","24.7","24.9"],"2":["5.8","15.8","15.31"],"5":["5.6","5.7","9.7","15.6","15.7","15.9","15.15","19.7","20.10","23.10"],"9":["15.32","26.1"],"10":["5.46","9.7","15.46","19.7","22.36","26.36"],"60":["5.46","15.46"],"240":["22.34"],"300":["22.34","26.34"],"360":["19.3"],"404":["3.14","3.15","13.14","13.15"],"1000":["0.13","0.15","10.8","10.9","10.10","10.13","10.15","10.16"],"3000":["0.12","5.2","5.3","5.8","5.11","5.13","5.21","5.45","6.4","6.5","7.4","7.5","8.4","8.5","9.8","9.9","10.12","15.2","15.3","15.8","15.11","15.13","15.21","15.45","16.4","16.5","17.4","17.5","18.4","18.5","19.8","19.9"],"对象":["0.1"],"播放器不会马上做出响应":["0.1"],"types":["0.2","2.0","10.2","10.5","20.9","21.0","22.39","22.50","23.9","26.39"],"d":["0.2","0.5","2.0","10.2","10.5","11.6","12.0","21.0","22.39","22.50","25.0","26.39","26.50"],"ts":["0.2","0.5","1.6","2.0","10.2","10.5","11.6","12.0","21.0","22.39","22.50","25.0","26.39","26.50"],"warning":["0.3","0.9","0.10","0.14","0.16","2.0","10.8","10.9","10.10","10.16","12.0","22.1","22.36","22.43","23.5","26.1","26.29","26.30","26.36","26.43"],"提示":["0.3","0.14","5.28","5.41","23.13","26.1","26.4","26.19"],"假如你需要一些":["0.3","5.41"],"事件只存在于播放器的生命周期上时":["0.3","5.41"],"强烈建议使用这些函数":["0.3"],"以避免造成内存泄漏":["0.3","5.41"],"your":["0.4","5.17","10.4","15.17"],"假如想在实例化之前更新":["0.6"],"请使用基础选项的":["0.6"],"来更新":["0.6"],"的显示":["0.7"],"组件配置":["0.8","0.9","0.10","26.29","26.31","26.32"],"请参考以下地址":["0.8","0.9","0.10","0.16","26.29","26.30","26.31","26.32"],"component":["0.8","0.9","0.10","0.16","10.8","10.9","10.10","10.16","22.29","22.30","26.29","26.30","26.31","26.32"],"color":["0.11","10.11","22.37","26.37"],"red":["0.11","10.11"],"false":["0.12","0.13","5.21","9.9","10.8","10.9","10.10","10.12","10.13","10.15","10.16","15.21","19.9","22.22","22.45","26.22","26.45"],"只在播放器获得焦点后":["0.14","26.19"],"如点击了播放器后":["0.14","26.19"],"这些快捷键才会生效":["0.14","26.19"],"true":["0.15","3.11","3.12","3.13","3.21","3.22","3.23","3.24","5.24","10.12","10.13","10.15","13.11","13.12","13.13","13.21","13.22","13.23","13.24","15.14","15.24","22.8","22.9","22.11","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.27","22.38","22.44","22.46","22.48","22.49","24.12","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.23","26.24","26.26","26.27","26.38","26.44","26.46","26.48","26.49"],"设置面板":["0.16"],"html":["0.16","10.16","22.42","22.43","24.2","26.42","26.43"],"ready":["0.17","2.0","5.1","5.4","5.47","10.17","15.1","15.4","15.6","15.7","15.24","15.27","15.47"],"off":["2.0"],"全部事件请参考以下地址":["2.0"],"events":["2.0"],"info":["2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","5.18","5.19","5.25","5.38","5.39","5.40","5.43","9.2","9.6","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","15.18","15.19","15.25","15.38","15.39","15.40","15.42","15.43","19.2","19.6"],"console":["2.2","2.6","2.19","2.28","2.39","3.8","3.9","3.10","3.17","5.18","5.19","5.38","5.40","9.2","9.6","12.1","12.2","12.3","12.4","12.6","12.11","12.14","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.28","12.29","12.30","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.8","13.9","13.10","13.17","15.18","15.19","15.25","15.38","15.39","15.40","19.2","19.6"],"log":["2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17"],"video":["3.1","3.3","3.4","3.16","3.18","3.19","3.20","3.25","3.26","3.27","3.32","13.3","13.4","13.11","13.12","13.13","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.11","22.12","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.27","22.35","22.44","22.49","26.3","26.11","26.27","26.35"],"mp4":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.9","22.11","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.27","22.28","22.35","22.44","22.45","22.46","22.48","22.49","22.51","26.3","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.24","26.27","26.28","26.35","26.44","26.48","26.49"],"playbackrate":["3.5","3.6","3.7","13.5","13.6","13.7"],"aspectratio":["3.5","3.6","3.7","13.5","13.6","13.7"],"autoplayback":["3.11","3.12","3.13","13.11","13.12","13.13"],"sample":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","13.1","13.3","13.4","13.14","13.15","13.16","13.18","13.19","13.20","13.25","13.26","13.27","13.31","13.32","22.3","22.11","22.21","22.22","22.27","22.48","26.3","26.27"],"autoorientation":["3.21","13.21"],"show":["3.22","3.28","13.22","13.28","13.29"],"fastforward":["3.23","3.24","13.23","13.24"],"fullscreenweb":["3.31","13.31"],"miniprogressbar":["3.33","13.33"],"只销毁界面":["3.34"],"不主动清空":["3.34"],"pause":["4.0","14.0"],"layer":["4.0","14.0"],"png":["4.0","14.0"],"仅重置":["5.5"],"不移除界面":["5.5"],"t":["5.10","5.11","5.13","15.10","15.11","15.13","15.23"],"方法会返回":["5.12"],"promise":["5.12"],"当":["5.12"],"resolve":["5.12"],"时表示新地址是可以播放":["5.12"],"reject":["5.12","15.12"],"时表示新地址加载错误":["5.12"],"例如直播中的视频或者没被解码完成的视频":["5.16"],"这个时候获取的时长会是":["5.16"],"name":["5.17","15.17"],"由于浏览器安全机制":["5.20","5.22","26.17"],"触发窗口全屏前":["5.20"],"页面必须先存在交互":["5.20","5.22"],"例如用户点击过页面":["5.20","5.22"],"触发画中画前":["5.22"],"默认":["5.26"],"尺寸和坐标信息是通过":["5.28"],"getboundingclientrect":["5.28","15.28"],"获取的":["5.28"],"但不知道具体高度时":["5.33"],"这个属性很有用":["5.33"],"它能自动计算出视频的高度":["5.33"],"但你需要确定设置这个属性的时机":["5.33"],"强烈建议使用该函数":["5.41"],"4k":["5.45","15.45"],"number":["5.46","15.46","24.13"],"column":["5.46","15.46"],"tooltip":["6.1","8.1","18.1"],"组件的提示文本":["6.1","8.1"],"remove":["6.4","7.4","8.4","9.8","16.4","17.4","18.4"],"选择列表的对象数组":["7.1"],"onselect":["7.1","17.1"],"选择列表的元素被点击时触发的函数":["7.1"],"by":["7.3","8.2","8.3","9.8","17.3","18.2","18.3","19.8"],"left":["8.5","18.5","22.2"],"return":["9.2","9.5","9.6","19.2","19.5","19.6"],"switchquality":["9.3","19.3"],"open":["9.5","19.5"],"event":["9.6"],"x":["9.6","19.6"],"range":["9.7","19.7"],"switch":["9.9","19.9"],"used":["10.0","11.0","13.0","15.0","22.4"],"will":["10.1","15.16","20.5","22.4","22.7"],"not":["10.1","13.34","15.5","22.4"],"respond":["10.1"],"immediately":["10.1","10.7"],"s":["10.3","22.40"],"lifecycle":["10.3"],"strongly":["10.3","15.41"],"recommended":["10.3","15.41"],"use":["10.3","10.6","15.41","22.40"],"these":["10.3"],"functions":["10.3"],"avoid":["10.3","15.41"],"memory":["10.3","15.41"],"leaks":["10.3","15.41"],"please":["10.6","10.8","10.9","10.10","10.16","12.0","22.2","22.10","22.29","22.30","22.31"],"option":["10.6"],"in":["10.6","20.5"],"basic":["10.6"],"settings":["10.6","22.42","22.43"],"for":["10.8","10.9","10.10","10.16","12.0","15.33","20.13","22.4","22.29"],"configuration":["10.8","10.9","10.10","22.29"],"refer":["10.8","10.9","10.10","10.16","12.0","22.2","22.29","22.30","22.31"],"srt":["10.11","22.25","26.25"],"settimeout":["10.12","10.13","10.15","15.3","15.21"],"gains":["10.14"],"focus":["10.14"],"e":["10.14","22.19"],"g":["10.14","22.19"],"clicking":["10.14","22.19"],"on":["10.17","15.4","22.2","22.19","24.6"],"a":["12.0","17.1"],"complete":["12.0"],"list":["12.0"],"state":["12.39"],"further":["12.42"],"buffering":["12.42","12.43"],"to":["12.46","15.33","22.29","22.30","22.31","22.32"],"reload":["12.46"],"it":["12.46","20.11"],"format":["12.48"],"data":["12.53"],"forthcoming":["12.58"],"rarely":["13.0"],"assets":["13.1","13.14","13.15","13.16","13.19","13.20","13.25","13.26","13.27","22.3","22.11","22.27"],"dblclick":["13.17"],"contextmenu":["13.28"],"do":["13.34","15.5"],"clear":["13.34"],"play":["14.0"],"interface":["15.5"],"playable":["15.12"],"fails":["15.12"],"load":["15.12"],"cases":["15.16"],"obtained":["15.16","15.28"],"be":["15.16"],"page":["15.20","15.22"],"must":["15.20","15.22"],"occur":["15.20","15.22"],"before":["15.20","15.22"],"triggering":["15.20","15.22"],"default":["15.26"],"is":["15.26","15.28","22.17"],"via":["15.28"],"you":["15.33","22.40"],"need":["15.33"],"determine":["15.33"],"timing":["15.33"],"setting":["15.33","22.14","22.15","22.16","22.25","26.14","26.15","26.16","26.25"],"m3u8":["15.35","22.41","26.2"],"000":["15.36"],"timeupdate":["15.39"],"this":["15.41","22.7"],"text":["16.1","18.1"],"when":["17.1"],"item":["17.1"],"clicked":["17.1"],"script":["20.1","23.1","24.2"],"examples":["20.3"],"at":["20.3"],"following":["20.3","22.32"],"link":["20.3"],"example":["20.3","23.3"],"update":["20.4","20.5"],"player":["20.4","20.12","23.12"],"directly":["20.5"],"modifying":["20.5"],"the":["20.5","22.32"],"definitions":["20.9","22.39"],"packages":["20.9","23.9"],"volume":["20.10"],"art8":["20.10","23.10"],"new":["20.10","23.10"],"yourself":["20.11"],"scripts":["20.11","23.11"],"reference":["20.11","21.0"],"documentation":["20.11"],"browserslist":["20.11","23.11"],"body":["20.12"],"div":["20.12","23.12"],"id":["20.12","23.12"],"importing":["20.13"],"dependency":["20.13"],"take":["20.13"],"effect":["20.13"],"see":["21.0"],"or":["21.1","25.1"],"note":["22.1"],"among":["22.1"],"all":["22.1"],"options":["22.1"],"only":["22.1"],"required":["22.1"],"third":["22.2"],"party":["22.2"],"libraries":["22.2"],"section":["22.2"],"point":["22.4"],"jpg":["22.5","26.5"],"ffad00":["22.6","26.6"],"read":["22.7","22.10"],"cached":["22.7"],"value":["22.7"],"information":["22.10"],"policy":["22.10","26.10"],"changes":["22.10","26.10"],"cross":["22.17"],"origin":["22.17"],"with":["22.17"],"website":["22.17"],"disable":["22.22"],"url":["22.27"],"panel":["22.30"],"address":["22.32"],"hd":["22.33"],"720p":["22.33","26.33"],"こんなとこにあるはずもないのに":["22.34","26.34"],"终わり":["22.34","26.34"],"generate":["22.36"],"online":["22.36"],"tool":["22.36","26.36"],"03a9f4":["22.37","26.37"],"font":["22.37","24.5","26.37"],"size":["22.37","24.5","26.37"],"30px":["22.37","26.37"],"webkit":["22.38"],"playsinline":["22.38","26.38"],"therefore":["22.40"],"if":["22.40"],"best":["22.40"],"also":["22.40"],"start":["22.42","22.43","26.42","26.43"],"i18n":["22.42","26.42"],"tw":["22.43","26.43"],"more":["22.43"],"identify":["22.47"],"unique":["22.47"],"document":["22.51","26.51"],"createelement":["22.51","26.51"],"tip":["23.3"],"以下链接可以看到更多的使用例子":["23.3"],"里直接修改":["23.4","23.5"],"是不会改变播放器的":["23.4","23.5"],"非响应式":["23.5"],"在":["23.5"],"构建配置":["23.11"],"build":["23.11"],"参考文档":["23.11"],"你需要在引入":["23.13"],"依赖前来修改它才会生效":["23.13"],"style":["24.4"],"弹幕自定义样式":["24.4"],"默认为空对象":["24.4"],"light":["24.5"],"只在自定义挂载时生效":["24.5"],"不透明度配置项":["24.5"],"弹幕字号配置项":["24.5"],"显示区域配置项":["24.5"],"弹幕速度配置项":["24.5"],"颜色列表配置项":["24.5"],"ref":["24.6"],"innerhtml":["24.6"],"ଘ":["24.6"],"੭ˊᵕˋ":["24.6"],"੭":["24.6"],"使用数组":["24.7"],"time":["24.7","24.9"],"异步返回":["24.9"],"显示弹幕":["24.10","24.11"],"hide":["24.11"],"border":["24.12"],"change":["24.13"],"fontsize":["24.13"],"const":["24.14"],"target":["24.14"],"xml":["24.16"],"也可以手动挂载":["24.16"],"reset":["24.18"],"弹幕重置":["24.18"],"destroy":["24.18"],"弹幕销毁":["24.18"],"全部选项里":["26.1"],"只有":["26.1"],"是必填的":["26.1"],"如需要播放":["26.2"],"或者":["26.2"],"flv":["26.2"],"等其它格式":["26.2"],"请参考左侧的":["26.2"],"第三方库":["26.2"],"回调函数里的":["26.4"],"就是播放器实例":["26.4"],"但回调函数假如使用了箭头函数":["26.4"],"则不会指向播放器实例":["26.4"],"下次初始化时":["26.7"],"如刷新页面":["26.7"],"播放器会读取该缓存值":["26.7"],"更多信息请阅读":["26.10"],"假如视频源地址和网站是跨域的":["26.17"],"可能会出现截图失败":["26.17"],"关闭毛玻璃效果":["26.22"],"在线生成预览图":["26.36"],"thumbnail":["26.36"],"所以假如你使用了":["26.40"],"最好同时要指明":["26.40"],"function":["26.41"],"更多的语言设置":["26.42","26.43"],"是不同的话":["26.47"],"那么你需要使用":["26.47"],"来标识视频的唯一":["26.47"]}]'},t={"0.0":{t:"# 高级属性",p:`这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用 +`,l:"advanced/built-in.html",a:"高级属性"},"0.1":{t:"`option`",p:`播放器的选项 +<div className="run-code">▶ Run Code< ...`,l:"advanced/built-in.html#option",a:"option"},"0.2":{t:"`template`",p:`管理播放器所有的 DOM 元素 +<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#template",a:"template"},"0.3":{t:"`events`",p:"管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener ...",l:"advanced/built-in.html#events",a:"events"},"0.4":{t:"`storage`",p:`管理播放器的本地存储 + +name 属性用于设置缓存的 key +set 方法用于设置缓存 +get 方法用于获取缓存 +del 方 ...`,l:"advanced/built-in.html#storage",a:"storage"},"0.5":{t:"`icons`",p:`管理播放器所有的 svg 图标 +<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#icons",a:"icons"},"0.6":{t:"`i18n`",p:`管理播放器的 i18n + +get 方法用于获取 i18n 的值 +update 方法用于更新 i18n 对象 + +<div ...`,l:"advanced/built-in.html#i18n",a:"i18n"},"0.7":{t:"`notice`",p:`管理播放器的提示语,只有一个 show 属性用于显示提示语 +<div className="run-code ...`,l:"advanced/built-in.html#notice",a:"notice"},"0.8":{t:"`layers`",p:`管理播放器的层 + +add 方法用于动态添加层 +remove 方法用于动态删除层 +update 方法用于动态更新层 +show ...`,l:"advanced/built-in.html#layers",a:"layers"},"0.9":{t:"`controls`",p:`管理播放器的控制器 + +add 方法用于动态添加控制器 +remove 方法用于动态删除控制器 +update 方法用于动态更新控 ...`,l:"advanced/built-in.html#controls",a:"controls"},"0.10":{t:"`contextmenu`",p:`管理播放器的右键菜单 + +add 方法用于动态添加菜单 +remove 方法用于动态删除菜单 +update 方法用于动态更新菜单 ...`,l:"advanced/built-in.html#contextmenu",a:"contextmenu"},"0.11":{t:"`subtitle`",p:`管理播放器的字幕功能 + +url 属性设置和返回当前字幕地址 +style 方法设置当前字幕的样式 +switch 方法设置当前字 ...`,l:"advanced/built-in.html#subtitle",a:"subtitle"},"0.12":{t:"`info`",p:`管理播放器的信息面板,常用于查看当前播放器和视频的运行状态,例如版本号、分辨率、时长等。 + +通过 art.info.show ...`,l:"advanced/built-in.html#info",a:"info"},"0.13":{t:"`loading`",p:`管理播放器的加载层 + +show 属性用于设置是否显示加载层 +toggle 属性用于切换是否显示加载层 + +<div cl ...`,l:"advanced/built-in.html#loading",a:"loading"},"0.14":{t:"`hotkey`",p:`管理播放器的快捷键功能 + +add 方法用于添加快捷键 +remove 方法用于删除快捷键 + +<div className ...`,l:"advanced/built-in.html#hotkey",a:"hotkey"},"0.15":{t:"`mask`",p:`管理播放器的遮罩层 + +show 属性用于设置是否显示遮罩层 +toggle 属性用于切换是否显示遮罩层 + +<div cl ...`,l:"advanced/built-in.html#mask",a:"mask"},"0.16":{t:"`setting`",p:`管理播放器的设置面板 + +add 方法用于动态添加设置项 +remove 方法用于动态删除设置项 +update 方法用于动态更新 ...`,l:"advanced/built-in.html#setting",a:"setting"},"0.17":{t:"`plugins`",p:`管理播放器的插件功能,只有一个方法 add 用于动态添加插件 +<div className="run-cod ...`,l:"advanced/built-in.html#plugins",a:"plugins"},"1.0":{t:"# 静态属性",p:`这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用 +`,l:"advanced/class.html",a:"静态属性"},"1.1":{t:"`instances`",p:`返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性 +<div className=" ...`,l:"advanced/class.html#instances",a:"instances"},"1.2":{t:"`version`",p:`返回播放器的版本信息 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#version",a:"version"},"1.3":{t:"`env`",p:`返回播放器的环境变量 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#env",a:"env"},"1.4":{t:"`build`",p:`返回播放器的打包时间 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#build",a:"build"},"1.5":{t:"`config`",p:`返回视频的默认配置 +<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#config",a:"config"},"1.6":{t:"`utils`",p:`返回播放器的工具函数集合 +<div className="run-code">▶ Run C ...`,l:"advanced/class.html#utils",a:"utils"},"1.7":{t:"`scheme`",p:`返回播放器选项的校验方案 +<div className="run-code">▶ Run C ...`,l:"advanced/class.html#scheme",a:"scheme"},"1.8":{t:"`Emitter`",p:`返回事件分发器的构造函数 +<div className="run-code">▶ Run C ...`,l:"advanced/class.html#emitter",a:"emitter"},"1.9":{t:"`validator`",p:`返回选项的校验函数 +<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#validator",a:"validator"},"1.10":{t:"`kindOf`",p:`返回类型检测的函数工具 +<div className="run-code">▶ Run Co ...`,l:"advanced/class.html#kindof",a:"kindof"},"1.11":{t:"`html`",p:`返回播放器所需的 html 字符串 +<div className="run-code">▶ ...`,l:"advanced/class.html#html",a:"html"},"1.12":{t:"`option`",p:`返回播放器的默认选项 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#option",a:"option"},"2.0":{t:"# 实例事件",p:`播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件 +监听事件: +<div cl ...`,l:"advanced/event.html",a:"实例事件"},"2.1":{t:"`ready`",p:`当播放器首次可以播放器时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#ready",a:"ready"},"2.2":{t:"`restart`",p:`当播放器切换地址后并可以播放时触发 +<div className="run-code">▶ ...`,l:"advanced/event.html#restart",a:"restart"},"2.3":{t:"`pause`",p:`当播放器暂停时触发 +<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#pause",a:"pause"},"2.4":{t:"`play`",p:`当播放器播放时触发 +<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#play",a:"play"},"2.5":{t:"`hotkey`",p:`当播放器热键被按下时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#hotkey",a:"hotkey"},"2.6":{t:"`destroy`",p:`当播放器销毁时触发 +<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#destroy",a:"destroy"},"2.7":{t:"`focus`",p:`当播放器获得焦点时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#focus",a:"focus"},"2.8":{t:"`blur`",p:`当播放器失去焦点时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#blur",a:"blur"},"2.9":{t:"`dblclick`",p:`当播放器被双击时触发 +<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#dblclick",a:"dblclick"},"2.10":{t:"`click`",p:`当播放器被单击时触发 +<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#click",a:"click"},"2.11":{t:"`error`",p:`当播放器加载视频发生错误时触发 +<div className="run-code">▶ Ru ...`,l:"advanced/event.html#error",a:"error"},"2.12":{t:"`hover`",p:`当播放器被鼠标移出或者移入时触发 +<div className="run-code">▶ R ...`,l:"advanced/event.html#hover",a:"hover"},"2.13":{t:"`mousemove`",p:`当播放器被鼠标经过时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mousemove",a:"mousemove"},"2.14":{t:"`resize`",p:`当播放器尺寸变化时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#resize",a:"resize"},"2.15":{t:"`view`",p:`当播放器出现在视口时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#view",a:"view"},"2.16":{t:"`lock`",p:`在移动端,当锁定的状态发生变化时触发 +<div className="run-code">▶ ...`,l:"advanced/event.html#lock",a:"lock"},"2.17":{t:"`aspectRatio`",p:`当播放器长宽比变化时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#aspectratio",a:"aspectratio"},"2.18":{t:"`autoHeight`",p:`当播放器自动设置高度时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#autoheight",a:"autoheight"},"2.19":{t:"`autoSize`",p:`当播放器自动设置尺寸时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#autosize",a:"autosize"},"2.20":{t:"`flip`",p:`当播放器发生翻转时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#flip",a:"flip"},"2.21":{t:"`fullscreen`",p:`当播放器发生窗口全屏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreen",a:"fullscreen"},"2.22":{t:"`fullscreenError`",p:`当播放器发生窗口全屏错误时触发 +<div className="run-code">▶ Ru ...`,l:"advanced/event.html#fullscreenerror",a:"fullscreenerror"},"2.23":{t:"`fullscreenWeb`",p:`当播放器发生网页全屏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreenweb",a:"fullscreenweb"},"2.24":{t:"`mini`",p:`当播放器进入迷你模式时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#mini",a:"mini"},"2.25":{t:"`pip`",p:`当播放器进入画中画时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#pip",a:"pip"},"2.26":{t:"`screenshot`",p:`当播放器被截图时触发 +<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#screenshot",a:"screenshot"},"2.27":{t:"`seek`",p:`当播放器发生时间跳转时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#seek",a:"seek"},"2.28":{t:"`subtitleOffset`",p:`当播放器发生字幕偏移时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#subtitleoffset",a:"subtitleoffset"},"2.29":{t:"`subtitleBeforeUpdate`",p:`当字幕更新前触发 +<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"2.30":{t:"`subtitleAfterUpdate`",p:`当字幕更新后触发 +<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"2.31":{t:"`subtitleLoad`",p:`当字幕加载时触发 +<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleload",a:"subtitleload"},"2.32":{t:"`info`",p:`当信息面板显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#info",a:"info"},"2.33":{t:"`layer`",p:`当自定义层显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#layer",a:"layer"},"2.34":{t:"`loading`",p:`当加载器显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#loading",a:"loading"},"2.35":{t:"`mask`",p:`当遮罩层显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mask",a:"mask"},"2.36":{t:"`subtitle`",p:`当字幕层显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#subtitle",a:"subtitle"},"2.37":{t:"`contextmenu`",p:`当右键菜单显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#contextmenu",a:"contextmenu"},"2.38":{t:"`control`",p:`当控制器显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#control",a:"control"},"2.39":{t:"`setting`",p:`当设置面板显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#setting",a:"setting"},"2.40":{t:"`muted`",p:`当静音的状态变化时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#muted",a:"muted"},"2.41":{t:"`keydown`",p:`监听来自 document 的 keydown 事件 +<div className="run-code&qu ...`,l:"advanced/event.html#keydown",a:"keydown"},"2.42":{t:"`video:canplay`",p:`浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容 +`,l:"advanced/event.html#video-canplay",a:"video-canplay"},"2.43":{t:"`video:canplaythrough`",p:`浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束 +`,l:"advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"2.44":{t:"`video:complete`",p:`OfflineAudioContext 渲染完成 +`,l:"advanced/event.html#video-complete",a:"video-complete"},"2.45":{t:"`video:durationchange`",p:`duration 属性的值改变时触发 +`,l:"advanced/event.html#video-durationchange",a:"video-durationchange"},"2.46":{t:"`video:emptied`",p:"媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载 ...",l:"advanced/event.html#video-emptied",a:"video-emptied"},"2.47":{t:"`video:ended`",p:`视频停止播放,因为 media 已经到达结束点 +`,l:"advanced/event.html#video-ended",a:"video-ended"},"2.48":{t:"`video:error`",p:`获取媒体数据时出错,或者资源类型不是受支持的媒体格式 +`,l:"advanced/event.html#video-error",a:"video-error"},"2.49":{t:"`video:loadeddata`",p:`media 中的首帧已经完成加载 +`,l:"advanced/event.html#video-loadeddata",a:"video-loadeddata"},"2.50":{t:"`video:loadedmetadata`",p:`已加载元数据 +`,l:"advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"2.51":{t:"`video:pause`",p:`播放已暂停 +`,l:"advanced/event.html#video-pause",a:"video-pause"},"2.52":{t:"`video:play`",p:`播放已开始 +`,l:"advanced/event.html#video-play",a:"video-play"},"2.53":{t:"`video:playing`",p:`由于缺乏数据而暂停或延迟后,播放准备开始 +`,l:"advanced/event.html#video-playing",a:"video-playing"},"2.54":{t:"`video:progress`",p:`在浏览器加载资源时周期性触发 +`,l:"advanced/event.html#video-progress",a:"video-progress"},"2.55":{t:"`video:ratechange`",p:`播放速率发生变化 +`,l:"advanced/event.html#video-ratechange",a:"video-ratechange"},"2.56":{t:"`video:seeked`",p:`跳帧(seek)操作完成 +`,l:"advanced/event.html#video-seeked",a:"video-seeked"},"2.57":{t:"`video:seeking`",p:`跳帧(seek)操作开始 +`,l:"advanced/event.html#video-seeking",a:"video-seeking"},"2.58":{t:"`video:stalled`",p:`用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现 +`,l:"advanced/event.html#video-stalled",a:"video-stalled"},"2.59":{t:"`video:suspend`",p:`媒体数据加载已暂停 +`,l:"advanced/event.html#video-suspend",a:"video-suspend"},"2.60":{t:"`video:timeupdate`",p:`currentTime 属性指定的时间发生变化 +`,l:"advanced/event.html#video-timeupdate",a:"video-timeupdate"},"2.61":{t:"`video:volumechange`",p:`音量发生变化 +`,l:"advanced/event.html#video-volumechange",a:"video-volumechange"},"2.62":{t:"`video:waiting`",p:`由于暂时缺少数据,播放已停止 +`,l:"advanced/event.html#video-waiting",a:"video-waiting"},"3.0":{t:"# 全局属性",p:`这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到 +`,l:"advanced/global.html",a:"全局属性"},"3.1":{t:"DEBUG",p:`是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭 +<div className="run- ...`,l:"advanced/global.html#debug",a:"debug"},"3.2":{t:"STYLE",p:`返回播放器样式文本 +<div className="run-code">▶ Run Code ...`,l:"advanced/global.html#style",a:"style"},"3.3":{t:"CONTEXTMENU",p:`是否开启右键菜单,默认开启 +<div className="run-code">▶ Run ...`,l:"advanced/global.html#contextmenu",a:"contextmenu"},"3.4":{t:"NOTICE_TIME",p:`提示信息的显示时长,单位为毫秒,默认为 2000 +<div className="run-code" ...`,l:"advanced/global.html#notice-time",a:"notice-time"},"3.5":{t:"SETTING_WIDTH",p:`设置面板的默认宽度,单位为像素,默认为 250 +<div className="run-code" ...`,l:"advanced/global.html#setting-width",a:"setting-width"},"3.6":{t:"SETTING_ITEM_WIDTH",p:`设置面板的设置项的默认宽度,单位为像素,默认为 200 +<div className="run-code&q ...`,l:"advanced/global.html#setting-item-width",a:"setting-item-width"},"3.7":{t:"SETTING_ITEM_HEIGHT",p:`设置面板的设置项的默认高度,单位为像素,默认为 35 +<div className="run-code&qu ...`,l:"advanced/global.html#setting-item-height",a:"setting-item-height"},"3.8":{t:"RESIZE_TIME",p:`resize 事件的节流时间,单位为毫秒,默认为 200 +<div className="run-code& ...`,l:"advanced/global.html#resize-time",a:"resize-time"},"3.9":{t:"SCROLL_TIME",p:`scroll 事件的节流时间,单位为毫秒,默认为 200 +<div className="run-code& ...`,l:"advanced/global.html#scroll-time",a:"scroll-time"},"3.10":{t:"SCROLL_GAP",p:`view 事件的边界容差距离,单位为像素,默认为 50 +<div className="run-code&q ...`,l:"advanced/global.html#scroll-gap",a:"scroll-gap"},"3.11":{t:"AUTO_PLAYBACK_MAX",p:`自动回放功能的最大记录数,默认为 10 +<div className="run-code"> ...`,l:"advanced/global.html#auto-playback-max",a:"auto-playback-max"},"3.12":{t:"AUTO_PLAYBACK_MIN",p:`自动回放功能的最小记录时长,单位为秒,默认为 5 +<div className="run-code" ...`,l:"advanced/global.html#auto-playback-min",a:"auto-playback-min"},"3.13":{t:"AUTO_PLAYBACK_TIMEOUT",p:`自动回放功能的隐藏延迟时长,单位为毫秒,默认为 3000 +<div className="run-code& ...`,l:"advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"3.14":{t:"RECONNECT_TIME_MAX",p:`发生连接错误时,自动连接的最大次数,默认为 5 +<div className="run-code" ...`,l:"advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"3.15":{t:"RECONNECT_SLEEP_TIME",p:`发生连接错误时,自动连接的延迟时间,单位为毫秒,默认为 1000 +<div className="run-c ...`,l:"advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"3.16":{t:"CONTROL_HIDE_TIME",p:`底部控制栏的自动隐藏的延迟时间,单位为毫秒,默认为 3000 +<div className="run-cod ...`,l:"advanced/global.html#control-hide-time",a:"control-hide-time"},"3.17":{t:"DBCLICK_TIME",p:`双击事件的延迟事件,单位为毫秒,默认为 300 +<div className="run-code" ...`,l:"advanced/global.html#dbclick-time",a:"dbclick-time"},"3.18":{t:"DBCLICK_FULLSCREEN",p:`在桌面端,是否双击切换全屏,默认为 true +<div className="run-code"& ...`,l:"advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"3.19":{t:"MOBILE_DBCLICK_PLAY",p:`在移动端,是否双击切换播放暂停,默认为 true +<div className="run-code" ...`,l:"advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"3.20":{t:"MOBILE_CLICK_PLAY",p:`在移动端,是否单击切换播放暂停,默认为 false +<div className="run-code&quo ...`,l:"advanced/global.html#mobile-click-play",a:"mobile-click-play"},"3.21":{t:"AUTO_ORIENTATION_TIME",p:`在移动端,自动旋屏的延迟时间,单位为毫秒,默认为 200 +<div className="run-code& ...`,l:"advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"3.22":{t:"INFO_LOOP_TIME",p:`信息面板的刷新时间,单位为毫秒,默认为 1000 +<div className="run-code" ...`,l:"advanced/global.html#info-loop-time",a:"info-loop-time"},"3.23":{t:"FAST_FORWARD_VALUE",p:`在移动端,长按加速的速率倍数,默认为 3 +<div className="run-code"> ...`,l:"advanced/global.html#fast-forward-value",a:"fast-forward-value"},"3.24":{t:"FAST_FORWARD_TIME",p:`在移动端,长按加速的延迟时间,单位为毫秒,默认为 1000 +<div className="run-code ...`,l:"advanced/global.html#fast-forward-time",a:"fast-forward-time"},"3.25":{t:"TOUCH_MOVE_RATIO",p:`在移动端,左右滑动进度的速率倍数,默认为 0.5 +<div className="run-code" ...`,l:"advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"3.26":{t:"VOLUME_STEP",p:`快捷键调节音量的幅度比例,默认为 0.1 +<div className="run-code"> ...`,l:"advanced/global.html#volume-step",a:"volume-step"},"3.27":{t:"SEEK_STEP",p:`快捷键调节播放进度的幅度,单位为秒,默认为 5 +<div className="run-code" ...`,l:"advanced/global.html#seek-step",a:"seek-step"},"3.28":{t:"PLAYBACK_RATE",p:`内置播放速率的列表,默认为 [0.5, 0.75, 1, 1.25, 1.5, 2] +<div className=& ...`,l:"advanced/global.html#playback-rate",a:"playback-rate"},"3.29":{t:"ASPECT_RATIO",p:`内置视频长宽比的列表,默认为 ['default', '4:3', '16:9'] +<div className=&q ...`,l:"advanced/global.html#aspect-ratio",a:"aspect-ratio"},"3.30":{t:"FLIP",p:`内置视频翻转的列表,默认为 ['normal', 'horizontal', 'vertical'] +<div cla ...`,l:"advanced/global.html#flip",a:"flip"},"3.31":{t:"FULLSCREEN_WEB_IN_BODY",p:`网页全屏时,是否把播放器挂在在 body 元素下,默认为 true +<div className="run- ...`,l:"advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"3.32":{t:"LOG_VERSION",p:`设置是否打印播放器版本,默认为 true +<div className="run-code"> ...`,l:"advanced/global.html#log-version",a:"log-version"},"3.33":{t:"USE_RAF",p:`设置是否使用 requestAnimationFrame ,默认为 false,目前主要用于进度条的平滑效果 +<div ...`,l:"advanced/global.html#use-raf",a:"use-raf"},"3.34":{t:"REMOVE_SRC_WHEN_DESTROY",p:`在销毁播放器时,是否同时移除视频的 src 属性并调用 load() 以主动释放媒体资源,默认为 true。 +开启后可以在单 ...`,l:"advanced/global.html#remove-src-when-destroy",a:"remove-src-when-destroy"},"4.0":{t:"# 编写插件",p:`但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事 +可以在实例化的时候加载插件的函数 +<div cla ...`,l:"advanced/plugin.html",a:"编写插件"},"5.0":{t:"# 实例属性",p:`这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用 +`,l:"advanced/property.html",a:"实例属性"},"5.1":{t:"`play`",p:` +Type: Function + +播放视频 +<div className="run-code"&g ...`,l:"advanced/property.html#play",a:"play"},"5.2":{t:"`pause`",p:` +Type: Function + +暂停视频 +<div className="run-code"&g ...`,l:"advanced/property.html#pause",a:"pause"},"5.3":{t:"`toggle`",p:` +Type: Function + +切换视频的播放和暂停 +<div className="run-code&q ...`,l:"advanced/property.html#toggle",a:"toggle"},"5.4":{t:"`destroy`",p:` +Type: Function +Parameter: Boolean + +销毁播放器,接受一个参数表示是否销毁后同时移除播放器 ...`,l:"advanced/property.html#destroy",a:"destroy"},"5.5":{t:"`reset`",p:` +Type: Function + +重置播放器的视频元素:会移除当前 src 并调用一次 load(),常用于在单页应用中手动 ...`,l:"advanced/property.html#reset",a:"reset"},"5.6":{t:"`seek`",p:` +Type: Setter +Parameter: Number + +视频时间跳转,单位秒 +<div className= ...`,l:"advanced/property.html#seek",a:"seek"},"5.7":{t:"`forward`",p:` +Type: Setter +Parameter: Number + +视频时间快进,单位秒 +<div className= ...`,l:"advanced/property.html#forward",a:"forward"},"5.8":{t:"`backward`",p:` +Type: Setter +Parameter: Number + +视频时间快退,单位秒 +<div className= ...`,l:"advanced/property.html#backward",a:"backward"},"5.9":{t:"`volume`",p:` +Type: Setter/Getter +Parameter: Number + +设置和获取视频音量,范围在:[0, 1] +& ...`,l:"advanced/property.html#volume",a:"volume"},"5.10":{t:"`url`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取视频地址 +<div clas ...`,l:"advanced/property.html#url",a:"url"},"5.11":{t:"`switch`",p:` +Type: Setter +Parameter: String + +设置视频地址,设置时和 art.url 类似,但会执行一些 ...`,l:"advanced/property.html#switch",a:"switch"},"5.12":{t:"`switchUrl`",p:` +Type: Function +Parameter: String + +设置视频地址,设置时和 art.url 类似,但会执行 ...`,l:"advanced/property.html#switchurl",a:"switchurl"},"5.13":{t:"`switchQuality`",p:` +Type: Function +Parameter: String + +设置视频画质地址,和 art.switchUrl 类似 ...`,l:"advanced/property.html#switchquality",a:"switchquality"},"5.14":{t:"`muted`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取视频是否静音 +<div c ...`,l:"advanced/property.html#muted",a:"muted"},"5.15":{t:"`currentTime`",p:` +Type: Setter/Getter +Parameter: Number + +设置和获取视频当前时间,设置时间时和 see ...`,l:"advanced/property.html#currenttime",a:"currenttime"},"5.16":{t:"`duration`",p:` +Type: Getter + +获取视频时长 +<div className="run-code"&g ...`,l:"advanced/property.html#duration",a:"duration"},"5.17":{t:"`screenshot`",p:` +Type: Function + +下载当前视频帧的截图, 可选参数为截图名字 +<div className=" ...`,l:"advanced/property.html#screenshot",a:"screenshot"},"5.18":{t:"`getDataURL`",p:` +Type: Function + +获取当前视频帧的截图的base64地址,返回的是一个 Promise +<div cl ...`,l:"advanced/property.html#getdataurl",a:"getdataurl"},"5.19":{t:"`getBlobUrl`",p:` +Type: Function + +获取当前视频帧的截图的blob地址,返回的是一个 Promise +<div clas ...`,l:"advanced/property.html#getbloburl",a:"getbloburl"},"5.20":{t:"`fullscreen`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器窗口全屏 +<div ...`,l:"advanced/property.html#fullscreen",a:"fullscreen"},"5.21":{t:"`fullscreenWeb`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器网页全屏 +<div ...`,l:"advanced/property.html#fullscreenweb",a:"fullscreenweb"},"5.22":{t:"`pip`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器画中画模式 +<div ...`,l:"advanced/property.html#pip",a:"pip"},"5.23":{t:"`poster`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取视频海报,只有在视频播放前才能看到 ...`,l:"advanced/property.html#poster",a:"poster"},"5.24":{t:"`mini`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器迷你模式 +<div ...`,l:"advanced/property.html#mini",a:"mini"},"5.25":{t:"`playing`",p:` +Type: Getter +Parameter: Boolean + +获取视频是否正在播放中 +<div classNam ...`,l:"advanced/property.html#playing",a:"playing"},"5.26":{t:"`state`",p:` +Type: Setter/Getter +Parameter: String + +获取或设置播放器当前状态,支持:standa ...`,l:"advanced/property.html#state",a:"state"},"5.27":{t:"`autoSize`",p:` +Type: Function + +设置视频是否自适应尺寸 +<div className="run-code& ...`,l:"advanced/property.html#autosize",a:"autosize"},"5.28":{t:"`rect`",p:` +Type: Getter + +获取播放器的尺寸和坐标信息 +<div className="run-code& ...`,l:"advanced/property.html#rect",a:"rect"},"5.29":{t:"`bottom` / `top` / `left` / `right` / `x` / `y` / `width` / `height`",p:` +Type: Getter + +这些属性是对 rect 的快捷访问: + +bottom, top, left, right, x ...`,l:"advanced/property.html#bottom-top-left-right-x-y-width-height",a:"bottom-top-left-right-x-y-width-height"},"5.30":{t:"`flip`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取播放器翻转,支持normal, ...`,l:"advanced/property.html#flip",a:"flip"},"5.31":{t:"`playbackRate`",p:` +Type: Setter/Getter +Parameter: Number + +设置和获取播放器播放速度 +<div c ...`,l:"advanced/property.html#playbackrate",a:"playbackrate"},"5.32":{t:"`aspectRatio`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取播放器长宽比 +<div cl ...`,l:"advanced/property.html#aspectratio",a:"aspectratio"},"5.33":{t:"`autoHeight`",p:` +Type: Function + +当容器只有宽度,该属性可以自动计算出并设置视频的高度 +<div className= ...`,l:"advanced/property.html#autoheight",a:"autoheight"},"5.34":{t:"`attr`",p:` +Type: Function +Parameter: String + +动态获取和设置 video 元素的属性 +<div ...`,l:"advanced/property.html#attr",a:"attr"},"5.35":{t:"`type`",p:` +Type: Setter/Getter +Parameter: String + +动态获取和设置视频类型 +<div cl ...`,l:"advanced/property.html#type",a:"type"},"5.36":{t:"`theme`",p:` +Type: Setter/Getter +Parameter: String + +动态获取和设置播放器主题颜色 +<div ...`,l:"advanced/property.html#theme",a:"theme"},"5.37":{t:"`airplay`",p:` +Type: Function + +开启隔空播放 +<div className="run-code" ...`,l:"advanced/property.html#airplay",a:"airplay"},"5.38":{t:"`loaded`",p:` +Type: Getter + +视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 +&l ...`,l:"advanced/property.html#loaded",a:"loaded"},"5.39":{t:"`loadedTime`",p:` +Type: Getter + +已缓存的媒体时长,单位为秒。通常与 loaded 一起使用,用于展示缓冲进度细节。 +<d ...`,l:"advanced/property.html#loadedtime",a:"loadedtime"},"5.40":{t:"`played`",p:` +Type: Getter + +视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 +&l ...`,l:"advanced/property.html#played",a:"played"},"5.41":{t:"`proxy`",p:` +Type: Function + +DOM 事件的代理函数,实质上代理了 addEventListener 和 removeE ...`,l:"advanced/property.html#proxy",a:"proxy"},"5.42":{t:"`query`",p:` +Type: Function + +DOM 的查询函数,类似 document.querySelector,但被查询的对象局限 ...`,l:"advanced/property.html#query",a:"query"},"5.43":{t:"`video`",p:` +Type: Element + +快捷返回播放器的 video 元素 +<div className="run- ...`,l:"advanced/property.html#video",a:"video"},"5.44":{t:"`cssVar`",p:` +Type: Function + +动态获取或设置 css 变量 +<div className="run-co ...`,l:"advanced/property.html#cssvar",a:"cssvar"},"5.45":{t:"`quality`",p:` +Type: Setter +Parameter: Array + +动态设置画质列表 +<div className=&qu ...`,l:"advanced/property.html#quality",a:"quality"},"5.46":{t:"`thumbnails`",p:` +Type: Setter/Getter +Parameter: Object + +动态设置缩略图 +<div classN ...`,l:"advanced/property.html#thumbnails",a:"thumbnails"},"5.47":{t:"`subtitleOffset`",p:` +Type: Setter/Getter +Parameter: Number + +动态设置字幕偏移 +<div class ...`,l:"advanced/property.html#subtitleoffset",a:"subtitleoffset"},"6.0":{t:"# 右键菜单",p:"",l:"component/contextmenu.html",a:"右键菜单"},"6.1":{t:"配置",p:` + + +属性 +类型 +描述 + + + + +disable +Boolean +是否禁用组件 + + +name +String +组件唯一名称,用于 ...`,l:"component/contextmenu.html#配置",a:"配置"},"6.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#创建",a:"创建"},"6.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#添加",a:"添加"},"6.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#删除",a:"删除"},"6.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#更新",a:"更新"},"7.0":{t:"# 控制器",p:"",l:"component/controls.html",a:"控制器"},"7.1":{t:"配置",p:` + + +属性 +类型 +描述 + + + + +disable +Boolean +是否禁用组件 + + +name +String +组件唯一名称,用于 ...`,l:"component/controls.html#配置",a:"配置"},"7.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#创建",a:"创建"},"7.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#添加",a:"添加"},"7.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#删除",a:"删除"},"7.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#更新",a:"更新"},"8.0":{t:"# 业务层",p:"",l:"component/layers.html",a:"业务层"},"8.1":{t:"配置",p:` + + +属性 +类型 +描述 + + + + +disable +Boolean +是否禁用组件 + + +name +String +组件唯一名称,用于 ...`,l:"component/layers.html#配置",a:"配置"},"8.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#创建",a:"创建"},"8.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#添加",a:"添加"},"8.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#删除",a:"删除"},"8.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#更新",a:"更新"},"9.0":{t:"# 设置面板",p:"",l:"component/setting.html",a:"设置面板"},"9.1":{t:"内置",p:"须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOf ...",l:"component/setting.html#内置",a:"内置"},"9.2":{t:"创建 - 按钮",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM + + +icon +String, El ...`,l:"component/setting.html#创建-按钮",a:"创建-按钮"},"9.3":{t:"创建 - 选择列表",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM + + +icon +String, El ...`,l:"component/setting.html#创建-选择列表",a:"创建-选择列表"},"9.4":{t:"创建 - 列表嵌套",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#创建-列表嵌套",a:"创建-列表嵌套"},"9.5":{t:"创建 - 切换按钮",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM 元素 + + +icon +String, ...`,l:"component/setting.html#创建-切换按钮",a:"创建-切换按钮"},"9.6":{t:"创建 - 范围滑块",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM 元素 + + +icon +String, ...`,l:"component/setting.html#创建-范围滑块",a:"创建-范围滑块"},"9.7":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#添加",a:"添加"},"9.8":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#删除",a:"删除"},"9.9":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#更新",a:"更新"},"10.0":{t:"# Advanced Properties",p:"The Advanced Properties here refer to the secondary properties ...",l:"en/advanced/built-in.html",a:"advanced-properties"},"10.1":{t:"`option`",p:`The player's options. +<div className="run-code"&g ...`,l:"en/advanced/built-in.html#option",a:"option"},"10.2":{t:"`template`",p:`Manages all DOM elements of the player. +<div className=&quo ...`,l:"en/advanced/built-in.html#template",a:"template"},"10.3":{t:"`events`",p:"Manages all DOM events for the player. It essentially proxies ...",l:"en/advanced/built-in.html#events",a:"events"},"10.4":{t:"`storage`",p:`Manages the player's local storage. + +The name property is used ...`,l:"en/advanced/built-in.html#storage",a:"storage"},"10.5":{t:"`icons`",p:`Manages all svg icons for the player. +<div className=" ...`,l:"en/advanced/built-in.html#icons",a:"icons"},"10.6":{t:"`i18n`",p:`Manages the player's i18n. + +The get method is used to retrieve ...`,l:"en/advanced/built-in.html#i18n",a:"i18n"},"10.7":{t:"`notice`",p:"Manages the player's notifications. It only has a show propert ...",l:"en/advanced/built-in.html#notice",a:"notice"},"10.8":{t:"`layers`",p:`Manages the player's layers. + +The add method is used to dynami ...`,l:"en/advanced/built-in.html#layers",a:"layers"},"10.9":{t:"`controls`",p:`Manages the player's controls. + + +The add method is used to dyn ...`,l:"en/advanced/built-in.html#controls",a:"controls"},"10.10":{t:"`contextmenu`",p:`Manages the player's context menu + +The add method is used to d ...`,l:"en/advanced/built-in.html#contextmenu",a:"contextmenu"},"10.11":{t:"`subtitle`",p:`Manages the player's subtitle functionality + +The url property ...`,l:"en/advanced/built-in.html#subtitle",a:"subtitle"},"10.12":{t:"`info`",p:"Manages the player's information panel, commonly used to view ...",l:"en/advanced/built-in.html#info",a:"info"},"10.13":{t:"`loading`",p:`Manages the player's loading layer + +The show property is used ...`,l:"en/advanced/built-in.html#loading",a:"loading"},"10.14":{t:"`hotkey`",p:`Manages the player's hotkey functionality + +The add method is u ...`,l:"en/advanced/built-in.html#hotkey",a:"hotkey"},"10.15":{t:"`mask`",p:`Manages the player's mask layer + +The show property is used to ...`,l:"en/advanced/built-in.html#mask",a:"mask"},"10.16":{t:"`setting`",p:`Manages the player's settings panel + +The add method is used to ...`,l:"en/advanced/built-in.html#setting",a:"setting"},"10.17":{t:"`plugins`",p:"Manages the player's plugin functionality, with only one metho ...",l:"en/advanced/built-in.html#plugins",a:"plugins"},"11.0":{t:"# Static Properties",p:"Here, static properties refer to the first-level properties at ...",l:"en/advanced/class.html",a:"static-properties"},"11.1":{t:"`instances`",p:"Returns an array of all player instances. This property can be ...",l:"en/advanced/class.html#instances",a:"instances"},"11.2":{t:"`version`",p:`Returns the version information of the player. +<div classNa ...`,l:"en/advanced/class.html#version",a:"version"},"11.3":{t:"`env`",p:`Returns the environment variables of the player. +<div class ...`,l:"en/advanced/class.html#env",a:"env"},"11.4":{t:"`build`",p:`Returns the build timestamp of the player. +<div className=& ...`,l:"en/advanced/class.html#build",a:"build"},"11.5":{t:"`config`",p:`Returns the default configuration for videos. +<div classNam ...`,l:"en/advanced/class.html#config",a:"config"},"11.6":{t:"`utils`",p:`Returns the collection of utility functions for the player. +&l ...`,l:"en/advanced/class.html#utils",a:"utils"},"11.7":{t:"`scheme`",p:`Returns the validation schema for player options. +<div clas ...`,l:"en/advanced/class.html#scheme",a:"scheme"},"11.8":{t:"`Emitter`",p:`Returns the constructor of the event emitter. +<div classNam ...`,l:"en/advanced/class.html#emitter",a:"emitter"},"11.9":{t:"`validator`",p:`Returns the validation function for options. +<div className ...`,l:"en/advanced/class.html#validator",a:"validator"},"11.10":{t:"`kindOf`",p:`Returns the type detection utility function. +<div className ...`,l:"en/advanced/class.html#kindof",a:"kindof"},"11.11":{t:"`html`",p:`Returns the html string required by the player. +<div classN ...`,l:"en/advanced/class.html#html",a:"html"},"11.12":{t:"`option`",p:`Returns the default options of the player. +<div className=& ...`,l:"en/advanced/class.html#option",a:"option"},"12.0":{t:"# Instance Events",p:"Player events are divided into two types: native events of the ...",l:"en/advanced/event.html",a:"instance-events"},"12.1":{t:"`ready`",p:`Triggered when the player is ready for the first time. +<div ...`,l:"en/advanced/event.html#ready",a:"ready"},"12.2":{t:"`restart`",p:"Triggered when the player switches URLs and becomes ready to p ...",l:"en/advanced/event.html#restart",a:"restart"},"12.3":{t:"`pause`",p:`Triggered when the player is paused. +<div className="r ...`,l:"en/advanced/event.html#pause",a:"pause"},"12.4":{t:"`play`",p:`Triggered when the player starts playing. +<div className=&q ...`,l:"en/advanced/event.html#play",a:"play"},"12.5":{t:"`hotkey`",p:`Triggered when a player hotkey is pressed. +<div className=& ...`,l:"en/advanced/event.html#hotkey",a:"hotkey"},"12.6":{t:"`destroy`",p:`Triggered when the player is destroyed. +<div className=&quo ...`,l:"en/advanced/event.html#destroy",a:"destroy"},"12.7":{t:"`focus`",p:`Triggered when the player gains focus. +<div className=" ...`,l:"en/advanced/event.html#focus",a:"focus"},"12.8":{t:"`blur`",p:`Triggered when the player loses focus. +<div className=" ...`,l:"en/advanced/event.html#blur",a:"blur"},"12.9":{t:"`dblclick`",p:`Triggered when the player is double-clicked. +<div className ...`,l:"en/advanced/event.html#dblclick",a:"dblclick"},"12.10":{t:"`click`",p:`Triggered when the player is clicked. +<div className=" ...`,l:"en/advanced/event.html#click",a:"click"},"12.11":{t:"`error`",p:"Triggered when an error occurs while the player is loading a v ...",l:"en/advanced/event.html#error",a:"error"},"12.12":{t:"`hover`",p:`Triggered when the mouse enters or leaves the player. +<div ...`,l:"en/advanced/event.html#hover",a:"hover"},"12.13":{t:"`mousemove`",p:`Triggered when the mouse moves over the player. +<div classN ...`,l:"en/advanced/event.html#mousemove",a:"mousemove"},"12.14":{t:"`resize`",p:`Triggered when the player's dimensions change. +<div classNa ...`,l:"en/advanced/event.html#resize",a:"resize"},"12.15":{t:"`view`",p:`Triggered when the player enters the viewport. +<div classNa ...`,l:"en/advanced/event.html#view",a:"view"},"12.16":{t:"`lock`",p:`Triggered when the lock state changes on mobile devices. +<d ...`,l:"en/advanced/event.html#lock",a:"lock"},"12.17":{t:"`aspectRatio`",p:`Triggered when the player's aspect ratio changes. +<div clas ...`,l:"en/advanced/event.html#aspectratio",a:"aspectratio"},"12.18":{t:"`autoHeight`",p:`Triggered when the player's height is automatically set. +<d ...`,l:"en/advanced/event.html#autoheight",a:"autoheight"},"12.19":{t:"`autoSize`",p:`Triggered when the player's size is automatically set. +<div ...`,l:"en/advanced/event.html#autosize",a:"autosize"},"12.20":{t:"`flip`",p:`Triggered when the player is flipped. +<div className=" ...`,l:"en/advanced/event.html#flip",a:"flip"},"12.21":{t:"`fullscreen`",p:"Triggered when the player enters or exits windowed fullscreen ...",l:"en/advanced/event.html#fullscreen",a:"fullscreen"},"12.22":{t:"`fullscreenError`",p:`Triggered when a windowed fullscreen error occurs. +<div cla ...`,l:"en/advanced/event.html#fullscreenerror",a:"fullscreenerror"},"12.23":{t:"`fullscreenWeb`",p:"Triggered when the player enters or exits web fullscreen mode. ...",l:"en/advanced/event.html#fullscreenweb",a:"fullscreenweb"},"12.24":{t:"`mini`",p:`Triggered when the player enters or exits mini mode. +<div c ...`,l:"en/advanced/event.html#mini",a:"mini"},"12.25":{t:"`pip`",p:"Triggered when the player enters or exits Picture-in-Picture m ...",l:"en/advanced/event.html#pip",a:"pip"},"12.26":{t:"`screenshot`",p:`Triggered when the player takes a screenshot. +<div classNam ...`,l:"en/advanced/event.html#screenshot",a:"screenshot"},"12.27":{t:"`seek`",p:`Triggered when the player performs a time seek. +<div classN ...`,l:"en/advanced/event.html#seek",a:"seek"},"12.28":{t:"`subtitleOffset`",p:`Triggered when the subtitle offset changes in the player. +< ...`,l:"en/advanced/event.html#subtitleoffset",a:"subtitleoffset"},"12.29":{t:"`subtitleBeforeUpdate`",p:`Triggered before subtitles are updated. +<div className=&quo ...`,l:"en/advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"12.30":{t:"`subtitleAfterUpdate`",p:`Triggered after subtitles are updated. +<div className=" ...`,l:"en/advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"12.31":{t:"`subtitleLoad`",p:`Triggered when subtitles are loaded. +<div className="r ...`,l:"en/advanced/event.html#subtitleload",a:"subtitleload"},"12.32":{t:"`info`",p:`Triggered when the info panel is shown or hidden. +<div clas ...`,l:"en/advanced/event.html#info",a:"info"},"12.33":{t:"`layer`",p:`Triggered when a custom layer is shown or hidden. +<div clas ...`,l:"en/advanced/event.html#layer",a:"layer"},"12.34":{t:"`loading`",p:`Triggered when the loader is shown or hidden. +<div classNam ...`,l:"en/advanced/event.html#loading",a:"loading"},"12.35":{t:"`mask`",p:`Triggered when the mask layer is shown or hidden. +<div clas ...`,l:"en/advanced/event.html#mask",a:"mask"},"12.36":{t:"`subtitle`",p:`Triggered when the subtitle layer is shown or hidden. +<div ...`,l:"en/advanced/event.html#subtitle",a:"subtitle"},"12.37":{t:"`contextmenu`",p:`Triggered when the context menu is shown or hidden. +<div cl ...`,l:"en/advanced/event.html#contextmenu",a:"contextmenu"},"12.38":{t:"`control`",p:`Triggered when the control bar is shown or hidden. +<div cla ...`,l:"en/advanced/event.html#control",a:"control"},"12.39":{t:"`setting`",p:`Triggered when the settings panel is shown or hidden. +<div ...`,l:"en/advanced/event.html#setting",a:"setting"},"12.40":{t:"`muted`",p:`Triggered when the muted state changes. +<div className=&quo ...`,l:"en/advanced/event.html#muted",a:"muted"},"12.41":{t:"`keydown`",p:`Listens for the keydown event from the document. +<div class ...`,l:"en/advanced/event.html#keydown",a:"keydown"},"12.42":{t:"`video:canplay`",p:"The browser can start playing the media, but estimates there i ...",l:"en/advanced/event.html#video-canplay",a:"video-canplay"},"12.43":{t:"`video:canplaythrough`",p:"The browser estimates it can play the media through to the end ...",l:"en/advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"12.44":{t:"`video:complete`",p:`The OfflineAudioContext rendering is complete. +`,l:"en/advanced/event.html#video-complete",a:"video-complete"},"12.45":{t:"`video:durationchange`",p:`Triggered when the value of the duration property changes. +`,l:"en/advanced/event.html#video-durationchange",a:"video-durationchange"},"12.46":{t:"`video:emptied`",p:"The media has become empty; for example, this event is sent wh ...",l:"en/advanced/event.html#video-emptied",a:"video-emptied"},"12.47":{t:"`video:ended`",p:`Playback has stopped because the media has reached its end. +`,l:"en/advanced/event.html#video-ended",a:"video-ended"},"12.48":{t:"`video:error`",p:"An error occurred while fetching the media data, or the resour ...",l:"en/advanced/event.html#video-error",a:"video-error"},"12.49":{t:"`video:loadeddata`",p:`The first frame of the media has finished loading. +`,l:"en/advanced/event.html#video-loadeddata",a:"video-loadeddata"},"12.50":{t:"`video:loadedmetadata`",p:`Metadata has been loaded. +`,l:"en/advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"12.51":{t:"`video:pause`",p:`Playback has been paused. +`,l:"en/advanced/event.html#video-pause",a:"video-pause"},"12.52":{t:"`video:play`",p:`Playback has begun. +`,l:"en/advanced/event.html#video-play",a:"video-play"},"12.53":{t:"`video:playing`",p:"Playback is ready to start after having been paused or delayed ...",l:"en/advanced/event.html#video-playing",a:"video-playing"},"12.54":{t:"`video:progress`",p:`Fired periodically as the browser loads the resource. +`,l:"en/advanced/event.html#video-progress",a:"video-progress"},"12.55":{t:"`video:ratechange`",p:`The playback rate has changed. +`,l:"en/advanced/event.html#video-ratechange",a:"video-ratechange"},"12.56":{t:"`video:seeked`",p:`A seek operation has completed. +`,l:"en/advanced/event.html#video-seeked",a:"video-seeked"},"12.57":{t:"`video:seeking`",p:`A seek operation has begun. +`,l:"en/advanced/event.html#video-seeking",a:"video-seeking"},"12.58":{t:"`video:stalled`",p:"The user agent is trying to fetch media data, but data is unex ...",l:"en/advanced/event.html#video-stalled",a:"video-stalled"},"12.59":{t:"`video:suspend`",p:`Media data loading has been suspended. +`,l:"en/advanced/event.html#video-suspend",a:"video-suspend"},"12.60":{t:"`video:timeupdate`",p:`The time indicated by the currentTime property has changed. +`,l:"en/advanced/event.html#video-timeupdate",a:"video-timeupdate"},"12.61":{t:"`video:volumechange`",p:`The volume has changed. +`,l:"en/advanced/event.html#video-volumechange",a:"video-volumechange"},"12.62":{t:"`video:waiting`",p:`Playback has stopped because of a temporary lack of data. +`,l:"en/advanced/event.html#video-waiting",a:"video-waiting"},"13.0":{t:"# Global Properties",p:"The global properties here refer to the top-level properties m ...",l:"en/advanced/global.html",a:"global-properties"},"13.1":{t:"DEBUG",p:"Whether to enable debug mode, which can print all built-in vid ...",l:"en/advanced/global.html#debug",a:"debug"},"13.2":{t:"STYLE",p:`Returns the player style text. +<div className="run-cod ...`,l:"en/advanced/global.html#style",a:"style"},"13.3":{t:"CONTEXTMENU",p:`Whether to enable the context menu. Default is on. +<div cla ...`,l:"en/advanced/global.html#contextmenu",a:"contextmenu"},"13.4":{t:"NOTICE_TIME",p:"The display duration of notification messages, in milliseconds ...",l:"en/advanced/global.html#notice-time",a:"notice-time"},"13.5":{t:"SETTING_WIDTH",p:"The default width of the settings panel, in pixels. Default is ...",l:"en/advanced/global.html#setting-width",a:"setting-width"},"13.6":{t:"SETTING_ITEM_WIDTH",p:"The default width of a setting item in the settings panel, in ...",l:"en/advanced/global.html#setting-item-width",a:"setting-item-width"},"13.7":{t:"SETTING_ITEM_HEIGHT",p:"The default height of a setting item in the settings panel, in ...",l:"en/advanced/global.html#setting-item-height",a:"setting-item-height"},"13.8":{t:"RESIZE_TIME",p:"The throttle time for the resize event, in milliseconds. Defau ...",l:"en/advanced/global.html#resize-time",a:"resize-time"},"13.9":{t:"SCROLL_TIME",p:"The throttle time for the scroll event, in milliseconds. Defau ...",l:"en/advanced/global.html#scroll-time",a:"scroll-time"},"13.10":{t:"SCROLL_GAP",p:"The boundary tolerance distance for the view event, in pixels. ...",l:"en/advanced/global.html#scroll-gap",a:"scroll-gap"},"13.11":{t:"AUTO_PLAYBACK_MAX",p:"The maximum record count for the auto-playback feature. Defaul ...",l:"en/advanced/global.html#auto-playback-max",a:"auto-playback-max"},"13.12":{t:"AUTO_PLAYBACK_MIN",p:"The minimum record duration for the auto-playback feature, in ...",l:"en/advanced/global.html#auto-playback-min",a:"auto-playback-min"},"13.13":{t:"AUTO_PLAYBACK_TIMEOUT",p:"The hide delay duration for the auto-playback feature, in mill ...",l:"en/advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"13.14":{t:"RECONNECT_TIME_MAX",p:"The maximum number of automatic reconnection attempts when a c ...",l:"en/advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"13.15":{t:"RECONNECT_SLEEP_TIME",p:"The delay time for automatic reconnection when a connection er ...",l:"en/advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"13.16":{t:"CONTROL_HIDE_TIME",p:"The auto-hide delay time for the bottom control bar, in millis ...",l:"en/advanced/global.html#control-hide-time",a:"control-hide-time"},"13.17":{t:"DBCLICK_TIME",p:"The delay time for the double-click event, in milliseconds. De ...",l:"en/advanced/global.html#dbclick-time",a:"dbclick-time"},"13.18":{t:"DBCLICK_FULLSCREEN",p:"On desktop, whether double-click toggles fullscreen. Default i ...",l:"en/advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"13.19":{t:"MOBILE_DBCLICK_PLAY",p:"On mobile, whether double-click toggles play/pause. Default is ...",l:"en/advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"13.20":{t:"MOBILE_CLICK_PLAY",p:"On mobile, whether single-click toggles play/pause. Default is ...",l:"en/advanced/global.html#mobile-click-play",a:"mobile-click-play"},"13.21":{t:"AUTO_ORIENTATION_TIME",p:"On mobile, the delay time for auto-rotation, in milliseconds. ...",l:"en/advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"13.22":{t:"INFO_LOOP_TIME",p:"The refresh interval for the info panel, in milliseconds. Defa ...",l:"en/advanced/global.html#info-loop-time",a:"info-loop-time"},"13.23":{t:"FAST_FORWARD_VALUE",p:"On mobile, the speed multiplier for long-press fast-forward. D ...",l:"en/advanced/global.html#fast-forward-value",a:"fast-forward-value"},"13.24":{t:"FAST_FORWARD_TIME",p:"On mobile, the delay time for long-press fast-forward, in mill ...",l:"en/advanced/global.html#fast-forward-time",a:"fast-forward-time"},"13.25":{t:"TOUCH_MOVE_RATIO",p:"On mobile, the speed multiplier for left/right swipe to seek. ...",l:"en/advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"13.26":{t:"VOLUME_STEP",p:"The step size for volume adjustment via keyboard shortcuts. De ...",l:"en/advanced/global.html#volume-step",a:"volume-step"},"13.27":{t:"SEEK_STEP",p:"The step size for seeking via keyboard shortcuts, in seconds. ...",l:"en/advanced/global.html#seek-step",a:"seek-step"},"13.28":{t:"PLAYBACK_RATE",p:"The built-in list of playback rates. Default is [0.5, 0.75, 1, ...",l:"en/advanced/global.html#playback-rate",a:"playback-rate"},"13.29":{t:"ASPECT_RATIO",p:"The built-in list of video aspect ratios. Default is ['default ...",l:"en/advanced/global.html#aspect-ratio",a:"aspect-ratio"},"13.30":{t:"FLIP",p:"The built-in list of video flip options. Default is ['normal', ...",l:"en/advanced/global.html#flip",a:"flip"},"13.31":{t:"FULLSCREEN_WEB_IN_BODY",p:"Whether to mount the player under the body element during web ...",l:"en/advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"13.32":{t:"LOG_VERSION",p:`Sets whether to print the player version. Default is true. +< ...`,l:"en/advanced/global.html#log-version",a:"log-version"},"13.33":{t:"USE_RAF",p:"Sets whether to use requestAnimationFrame. Default is false. C ...",l:"en/advanced/global.html#use-raf",a:"use-raf"},"13.34":{t:"REMOVE_SRC_WHEN_DESTROY",p:"Whether to remove the video's src attribute and call load() to ...",l:"en/advanced/global.html#remove-src-when-destroy",a:"remove-src-when-destroy"},"14.0":{t:"# Writing Plugins",p:"Once you are familiar with the player's properties, methods, a ...",l:"en/advanced/plugin.html",a:"writing-plugins"},"15.0":{t:"# Instance Properties",p:"Here, Instance Properties refer to the first-level properties ...",l:"en/advanced/property.html",a:"instance-properties"},"15.1":{t:"`play`",p:` +Type: Function + +Play the video. +<div className="run-c ...`,l:"en/advanced/property.html#play",a:"play"},"15.2":{t:"`pause`",p:` +Type: Function + +Pause the video. +<div className="run- ...`,l:"en/advanced/property.html#pause",a:"pause"},"15.3":{t:"`toggle`",p:` +Type: Function + +Toggle video play and pause. +<div classNam ...`,l:"en/advanced/property.html#toggle",a:"toggle"},"15.4":{t:"`destroy`",p:` +Type: Function +Parameter: Boolean + +Destroy the player. Accept ...`,l:"en/advanced/property.html#destroy",a:"destroy"},"15.5":{t:"`reset`",p:` +Type: Function + +Reset the player's video element: removes the ...`,l:"en/advanced/property.html#reset",a:"reset"},"15.6":{t:"`seek`",p:` +Type: Setter +Parameter: Number + +Seek to a specific time in th ...`,l:"en/advanced/property.html#seek",a:"seek"},"15.7":{t:"`forward`",p:` +Type: Setter +Parameter: Number + +Fast-forward the video time, ...`,l:"en/advanced/property.html#forward",a:"forward"},"15.8":{t:"`backward`",p:` +Type: Setter +Parameter: Number + +Rewind the video time, in sec ...`,l:"en/advanced/property.html#backward",a:"backward"},"15.9":{t:"`volume`",p:` +Type: Setter/Getter +Parameter: Number + +Set and get the video ...`,l:"en/advanced/property.html#volume",a:"volume"},"15.10":{t:"`url`",p:` +Type: Setter/Getter +Parameter: String + +Set and get the video ...`,l:"en/advanced/property.html#url",a:"url"},"15.11":{t:"`switch`",p:` +Type: Setter +Parameter: String + +Set the video URL. Similar to ...`,l:"en/advanced/property.html#switch",a:"switch"},"15.12":{t:"`switchUrl`",p:` +Type: Function +Parameter: String + +Set the video URL. Similar ...`,l:"en/advanced/property.html#switchurl",a:"switchurl"},"15.13":{t:"`switchQuality`",p:` +Type: Function +Parameter: String + +Sets the video quality URL. ...`,l:"en/advanced/property.html#switchquality",a:"switchquality"},"15.14":{t:"`muted`",p:` +Type: Setter/Getter +Parameter: Boolean + +Sets or gets whether ...`,l:"en/advanced/property.html#muted",a:"muted"},"15.15":{t:"`currentTime`",p:` +Type: Setter/Getter +Parameter: Number + +Sets or gets the curre ...`,l:"en/advanced/property.html#currenttime",a:"currenttime"},"15.16":{t:"`duration`",p:` +Type: Getter + +Gets the duration of the video. +<div classNa ...`,l:"en/advanced/property.html#duration",a:"duration"},"15.17":{t:"`screenshot`",p:` +Type: Function + +Downloads a screenshot of the current video f ...`,l:"en/advanced/property.html#screenshot",a:"screenshot"},"15.18":{t:"`getDataURL`",p:` +Type: Function + +Gets the base64 URL of a screenshot of the cu ...`,l:"en/advanced/property.html#getdataurl",a:"getdataurl"},"15.19":{t:"`getBlobUrl`",p:` +Type: Function + +Gets the blob URL of a screenshot of the curr ...`,l:"en/advanced/property.html#getbloburl",a:"getbloburl"},"15.20":{t:"`fullscreen`",p:` +Type: Setter/Getter +Parameter: Boolean + +Sets or gets the play ...`,l:"en/advanced/property.html#fullscreen",a:"fullscreen"},"15.21":{t:"`fullscreenWeb`",p:` +Type: Setter/Getter +Parameter: Boolean + +Sets or gets the play ...`,l:"en/advanced/property.html#fullscreenweb",a:"fullscreenweb"},"15.22":{t:"`pip`",p:` +Type: Setter/Getter +Parameter: Boolean + +Sets or gets the play ...`,l:"en/advanced/property.html#pip",a:"pip"},"15.23":{t:"`poster`",p:` +Type: Setter/Getter +Parameter: String + +Sets and gets the vide ...`,l:"en/advanced/property.html#poster",a:"poster"},"15.24":{t:"`mini`",p:` +Type: Setter/Getter +Parameter: Boolean + +Sets and gets the pla ...`,l:"en/advanced/property.html#mini",a:"mini"},"15.25":{t:"`playing`",p:` +Type: Getter +Parameter: Boolean + +Gets whether the video is cu ...`,l:"en/advanced/property.html#playing",a:"playing"},"15.26":{t:"`state`",p:` +Type: Setter/Getter +Parameter: String + +Gets or sets the playe ...`,l:"en/advanced/property.html#state",a:"state"},"15.27":{t:"`autoSize`",p:` +Type: Function + +Sets whether the video adapts its size automa ...`,l:"en/advanced/property.html#autosize",a:"autosize"},"15.28":{t:"`rect`",p:` +Type: Getter + +Gets the player's dimensions and coordinate inf ...`,l:"en/advanced/property.html#rect",a:"rect"},"15.29":{t:"`bottom` / `top` / `left` / `right` / `x` / `y` / `width` / `height`",p:` +Type: Getter + +These properties provide quick access to rect: + ...`,l:"en/advanced/property.html#bottom-top-left-right-x-y-width-height",a:"bottom-top-left-right-x-y-width-height"},"15.30":{t:"`flip`",p:` +Type: Setter/Getter +Parameter: String + +Sets and gets the play ...`,l:"en/advanced/property.html#flip",a:"flip"},"15.31":{t:"`playbackRate`",p:` +Type: Setter/Getter +Parameter: Number + +Sets and gets the play ...`,l:"en/advanced/property.html#playbackrate",a:"playbackrate"},"15.32":{t:"`aspectRatio`",p:` +Type: Setter/Getter +Parameter: String + +Sets and gets the play ...`,l:"en/advanced/property.html#aspectratio",a:"aspectratio"},"15.33":{t:"`autoHeight`",p:` +Type: Function + +When the container only has a defined width, ...`,l:"en/advanced/property.html#autoheight",a:"autoheight"},"15.34":{t:"`attr`",p:` +Type: Function +Parameter: String + +Dynamically get and set att ...`,l:"en/advanced/property.html#attr",a:"attr"},"15.35":{t:"`type`",p:` +Type: Setter/Getter +Parameter: String + +Dynamically get and se ...`,l:"en/advanced/property.html#type",a:"type"},"15.36":{t:"`theme`",p:` +Type: Setter/Getter +Parameter: String + +Dynamically get and se ...`,l:"en/advanced/property.html#theme",a:"theme"},"15.37":{t:"`airplay`",p:` +Type: Function + +Initiate AirPlay. +<div className="run ...`,l:"en/advanced/property.html#airplay",a:"airplay"},"15.38":{t:"`loaded`",p:` +Type: Getter + +The proportion of video buffered, ranging from ...`,l:"en/advanced/property.html#loaded",a:"loaded"},"15.39":{t:"`loadedTime`",p:` +Type: Getter + +The buffered media duration in seconds. Typical ...`,l:"en/advanced/property.html#loadedtime",a:"loadedtime"},"15.40":{t:"`played`",p:` +Type: Getter + +The proportion of video played, ranging from [0 ...`,l:"en/advanced/property.html#played",a:"played"},"15.41":{t:"`proxy`",p:` +Type: Function + +A proxy function for DOM events, essentially ...`,l:"en/advanced/property.html#proxy",a:"proxy"},"15.42":{t:"`query`",p:` +Type: Function + +A DOM query function, similar to document.que ...`,l:"en/advanced/property.html#query",a:"query"},"15.43":{t:"`video`",p:` +Type: Element + +Quickly returns the player's video element. +&l ...`,l:"en/advanced/property.html#video",a:"video"},"15.44":{t:"`cssVar`",p:` +Type: Function + +Dynamically get or set CSS variables. +<div ...`,l:"en/advanced/property.html#cssvar",a:"cssvar"},"15.45":{t:"`quality`",p:` +Type: Setter +Parameter: Array + +Dynamically set the quality li ...`,l:"en/advanced/property.html#quality",a:"quality"},"15.46":{t:"`thumbnails`",p:` +Type: Setter/Getter +Parameter: Object + +Dynamically set thumbn ...`,l:"en/advanced/property.html#thumbnails",a:"thumbnails"},"15.47":{t:"`subtitleOffset`",p:` +Type: Setter/Getter +Parameter: Number + +Dynamically set subtit ...`,l:"en/advanced/property.html#subtitleoffset",a:"subtitleoffset"},"16.0":{t:"# Context Menu",p:"",l:"en/component/contextmenu.html",a:"context-menu"},"16.1":{t:"Configuration",p:` + + +Property +Type +Description + + + + +disable +Boolean +Whether to di ...`,l:"en/component/contextmenu.html#configuration",a:"configuration"},"16.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#creation",a:"creation"},"16.3":{t:"Addition",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#addition",a:"addition"},"16.4":{t:"Deletion",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#deletion",a:"deletion"},"16.5":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#update",a:"update"},"17.0":{t:"# Controls",p:"",l:"en/component/controls.html",a:"controls"},"17.1":{t:"Configuration",p:` + + +Property +Type +Description + + + + +disable +Boolean +Whether to di ...`,l:"en/component/controls.html#configuration",a:"configuration"},"17.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#creation",a:"creation"},"17.3":{t:"Adding",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#adding",a:"adding"},"17.4":{t:"Removal",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#removal",a:"removal"},"17.5":{t:"Updating",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#updating",a:"updating"},"18.0":{t:"# Layers",p:"",l:"en/component/layers.html",a:"layers"},"18.1":{t:"Configuration",p:` + + +Property +Type +Description + + + + +disable +Boolean +Whether to di ...`,l:"en/component/layers.html#configuration",a:"configuration"},"18.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#creation",a:"creation"},"18.3":{t:"Addition",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#addition",a:"addition"},"18.4":{t:"Removal",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#removal",a:"removal"},"18.5":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#update",a:"update"},"19.0":{t:"# Settings Panel",p:"",l:"en/component/setting.html",a:"settings-panel"},"19.1":{t:"Built-in",p:"First, you need to open the settings panel. It comes with four ...",l:"en/component/setting.html#built-in",a:"built-in"},"19.2":{t:"Create - Button",p:` + + +Property +Type +Description + + + + +html +String, Element +The DOM ...`,l:"en/component/setting.html#create-button",a:"create-button"},"19.3":{t:"Create - Selection List",p:` + + +Property +Type +Description + + + + +html +String, Element +The DOM ...`,l:"en/component/setting.html#create-selection-list",a:"create-selection-list"},"19.4":{t:"Create - Nested List",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#create-nested-list",a:"create-nested-list"},"19.5":{t:"Create - Toggle Button",p:` + + +Property +Type +Description + + + + +html +String, Element +DOM elem ...`,l:"en/component/setting.html#create-toggle-button",a:"create-toggle-button"},"19.6":{t:"Create - Range Slider",p:` + + +Property +Type +Description + + + + +html +String, Element +DOM elem ...`,l:"en/component/setting.html#create-range-slider",a:"create-range-slider"},"19.7":{t:"Add",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#add",a:"add"},"19.8":{t:"Remove",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#remove",a:"remove"},"19.9":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#update",a:"update"},"20.0":{t:"# Installation and Usage",p:"",l:"en/index.html",a:"installation-and-usage"},"20.1":{t:"Installation",p:`::: code-group +npm install artplayer + +yarn add artplayer + +pnpm ...`,l:"en/index.html#installation",a:"installation"},"20.2":{t:"`CDN`",p:`::: code-group +https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"en/index.html#cdn",a:"cdn"},"20.3":{t:"Usage",p:`::: code-group +<html> + <head> + <title ...`,l:"en/index.html#usage",a:"usage"},"20.4":{t:"`Vue.js`",p:`::: code-group +<template> + <div ref="$container ...`,l:"en/index.html#vue-js",a:"vue-js"},"20.5":{t:"`React.js`",p:`::: code-group +import Artplayer from 'artplayer' +import { useE ...`,l:"en/index.html#react-js",a:"react-js"},"20.6":{t:"TypeScript",p:"The artplayer.d.ts file is automatically imported when you imp ...",l:"en/index.html#typescript",a:"typescript"},"20.7":{t:"Vue.js",p:` + +`,l:"en/index.html#vue-js",a:"vue-js"},"20.8":{t:"React.js",p:`import Artplayer from 'artplayer'; +const art = useRef<Artpl ...`,l:"en/index.html#react-js",a:"react-js"},"20.9":{t:"Option",p:`You can also use the type for the options. +import Artplayer, { ...`,l:"en/index.html#option",a:"option"},"20.10":{t:"JavaScript",p:"Sometimes your js files may lose TypeScript type hints. In suc ...",l:"en/index.html#javascript",a:"javascript"},"20.11":{t:"Legacy Browsers",p:"The production build artplayer.js only supports the latest maj ...",l:"en/index.html#legacy-browsers",a:"legacy-browsers"},"20.12":{t:"ECMAScript Module",p:`::: tip ESM Demo: +https://artplayer.org/esm.html +::: +Starting ...`,l:"en/index.html#ecmascript-module",a:"ecmascript-module"},"20.13":{t:"Custom userAgent",p:"Currently, the detection of whether a device is mobile is not ...",l:"en/index.html#custom-useragent",a:"custom-useragent"},"21.0":{t:"# Language Settings",p:`::: danger +Due to the increasing number of bundled multilingua ...`,l:"en/start/i18n.html",a:"language-settings"},"21.1":{t:"Default Languages",p:"The default languages are: en, zh-cn. No manual import is requ ...",l:"en/start/i18n.html#default-languages",a:"default-languages"},"21.2":{t:"Importing Languages",p:"Language files before bundling are located at: artplayer/src/i ...",l:"en/start/i18n.html#importing-languages",a:"importing-languages"},"21.3":{t:"Adding a New Language",p:`var art = new Artplayer({ + container: '.artplayer-app', + ...`,l:"en/start/i18n.html#adding-a-new-language",a:"adding-a-new-language"},"21.4":{t:"Modifying a Language",p:`import zhTw from 'artplayer/i18n/zh-tw'; + +var art = new Artpla ...`,l:"en/start/i18n.html#modifying-a-language",a:"modifying-a-language"},"22.0":{t:"# Basic Options",p:"",l:"en/start/option.html",a:"basic-options"},"22.1":{t:"`container`",p:` +Type: String, Element +Default: #artplayer + +The DOM container ...`,l:"en/start/option.html#container",a:"container"},"22.2":{t:"`url`",p:` +Type: String +Default: '' + +The video source URL. +<div class ...`,l:"en/start/option.html#url",a:"url"},"22.3":{t:"`id`",p:` +Type: String +Default: '' + +The unique identifier for the playe ...`,l:"en/start/option.html#id",a:"id"},"22.4":{t:"`onReady`",p:` +Type: Function +Default: undefined + +The constructor accepts a ...`,l:"en/start/option.html#onready",a:"onready"},"22.5":{t:"`poster`",p:` +Type: String +Default: '' + +The video poster image, which only ...`,l:"en/start/option.html#poster",a:"poster"},"22.6":{t:"`theme`",p:` +Type: String +Default: #f00 + +The player's theme color, current ...`,l:"en/start/option.html#theme",a:"theme"},"22.7":{t:"`volume`",p:` +Type: Number +Default: 0.7 + +The player's default volume. +<d ...`,l:"en/start/option.html#volume",a:"volume"},"22.8":{t:"`isLive`",p:` +Type: Boolean +Default: false + +Enable live streaming mode. Thi ...`,l:"en/start/option.html#islive",a:"islive"},"22.9":{t:"`muted`",p:` +Type: Boolean +Default: false + +Whether to start muted by defau ...`,l:"en/start/option.html#muted",a:"muted"},"22.10":{t:"`autoplay`",p:` +Type: Boolean +Default: false + +Whether to autoplay. +<div cl ...`,l:"en/start/option.html#autoplay",a:"autoplay"},"22.11":{t:"`autoSize`",p:` +Type: Boolean +Default: false + +By default, the player's dimens ...`,l:"en/start/option.html#autosize",a:"autosize"},"22.12":{t:"`autoMini`",p:` +Type: Boolean +Default: false + +Automatically enters Mini Playe ...`,l:"en/start/option.html#automini",a:"automini"},"22.13":{t:"`loop`",p:` +Type: Boolean +Default: false + +Whether to loop playback. +<d ...`,l:"en/start/option.html#loop",a:"loop"},"22.14":{t:"`flip`",p:` +Type: Boolean +Default: false + +Whether to display the video fl ...`,l:"en/start/option.html#flip",a:"flip"},"22.15":{t:"`playbackRate`",p:` +Type: Boolean +Default: false + +Whether to display the video pl ...`,l:"en/start/option.html#playbackrate",a:"playbackrate"},"22.16":{t:"`aspectRatio`",p:` +Type: Boolean +Default: false + +Whether to display the video as ...`,l:"en/start/option.html#aspectratio",a:"aspectratio"},"22.17":{t:"`screenshot`",p:` +Type: Boolean +Default: false + +Whether to display the Screensh ...`,l:"en/start/option.html#screenshot",a:"screenshot"},"22.18":{t:"`setting`",p:` +Type: Boolean +Default: false + +Whether to display the toggle b ...`,l:"en/start/option.html#setting",a:"setting"},"22.19":{t:"`hotkey`",p:` +Type: Boolean +Default: true + +Whether to use hotkeys. +<div ...`,l:"en/start/option.html#hotkey",a:"hotkey"},"22.20":{t:"`pip`",p:` +Type: Boolean +Default: false + +Whether to display the Picture- ...`,l:"en/start/option.html#pip",a:"pip"},"22.21":{t:"`mutex`",p:` +Type: Boolean +Default: true + +If multiple players exist on the ...`,l:"en/start/option.html#mutex",a:"mutex"},"22.22":{t:"`backdrop`",p:` +Type: Boolean +Default: true + +Whether to enable the backdrop b ...`,l:"en/start/option.html#backdrop",a:"backdrop"},"22.23":{t:"`fullscreen`",p:` +Type: Boolean +Default: false + +Whether to display the player W ...`,l:"en/start/option.html#fullscreen",a:"fullscreen"},"22.24":{t:"`fullscreenWeb`",p:` +Type: Boolean +Default: false + +Whether to display the player W ...`,l:"en/start/option.html#fullscreenweb",a:"fullscreenweb"},"22.25":{t:"`subtitleOffset`",p:` +Type: Boolean +Default: false + +Subtitle time offset, ranging f ...`,l:"en/start/option.html#subtitleoffset",a:"subtitleoffset"},"22.26":{t:"`miniProgressBar`",p:` +Type: Boolean +Default: false + +A mini progress bar that only a ...`,l:"en/start/option.html#miniprogressbar",a:"miniprogressbar"},"22.27":{t:"`useSSR`",p:` +Type: Boolean +Default: false + +Whether to use SSR (Server-Side ...`,l:"en/start/option.html#usessr",a:"usessr"},"22.28":{t:"`playsInline`",p:` +Type: Boolean +Default: true + +Whether to use playsInline mode ...`,l:"en/start/option.html#playsinline",a:"playsinline"},"22.29":{t:"`layers`",p:` +Type: Array +Default: [] + +Initialize custom layers. +<div cl ...`,l:"en/start/option.html#layers",a:"layers"},"22.30":{t:"`settings`",p:` +Type: Array +Default: [] + +Initialize custom settings panels. +& ...`,l:"en/start/option.html#settings",a:"settings"},"22.31":{t:"`contextmenu`",p:` +Type: Array +Default: [] + +Initialize custom context menus. +< ...`,l:"en/start/option.html#contextmenu",a:"contextmenu"},"22.32":{t:"`controls`",p:` +Type: Array +Default: [] + +Initialize custom bottom control bar ...`,l:"en/start/option.html#controls",a:"controls"},"22.33":{t:"`quality`",p:` +Type: Array +Default: [] + +Whether to display the Quality Selec ...`,l:"en/start/option.html#quality",a:"quality"},"22.34":{t:"`highlight`",p:` +Type: Array +Default: [] + +Display Highlight Information on the ...`,l:"en/start/option.html#highlight",a:"highlight"},"22.35":{t:"`plugins`",p:` +Type: Array +Default: [] + +Initialize custom plugins. +<div c ...`,l:"en/start/option.html#plugins",a:"plugins"},"22.36":{t:"`thumbnails`",p:` +Type: Object +Default: {} + +Set Preview Thumbnails on the progr ...`,l:"en/start/option.html#thumbnails",a:"thumbnails"},"22.37":{t:"`subtitle`",p:` +Type: Object +Default: {} + +Set video subtitles. Supported subt ...`,l:"en/start/option.html#subtitle",a:"subtitle"},"22.38":{t:"`moreVideoAttr`",p:` +Type: Object +Default: {'controls': false, 'preload': 'metadat ...`,l:"en/start/option.html#morevideoattr",a:"morevideoattr"},"22.39":{t:"`icons`",p:` +Type: Object +Default: {} + +Used to replace default icons. Supp ...`,l:"en/start/option.html#icons",a:"icons"},"22.40":{t:"`type`",p:` +Type: String +Default: '' + +Used to specify the video format. I ...`,l:"en/start/option.html#type",a:"type"},"22.41":{t:"`customType`",p:` +Type: Object +Default: {} + +Matches based on the video's type a ...`,l:"en/start/option.html#customtype",a:"customtype"},"22.42":{t:"`lang`",p:` +Type: String +Default: navigator.language.toLowerCase() + +The d ...`,l:"en/start/option.html#lang",a:"lang"},"22.43":{t:"`i18n`",p:` +Type: Object +Default: {} + +Custom i18n configuration. This con ...`,l:"en/start/option.html#i18n",a:"i18n"},"22.44":{t:"`lock`",p:` +Type: Boolean +Default: false + +Whether to display a lock butto ...`,l:"en/start/option.html#lock",a:"lock"},"22.45":{t:"`gesture`",p:` +Type: Boolean +Default: true + +Whether to enable gesture events ...`,l:"en/start/option.html#gesture",a:"gesture"},"22.46":{t:"`fastForward`",p:` +Type: Boolean +Default: false + +Whether to add a long-press vid ...`,l:"en/start/option.html#fastforward",a:"fastforward"},"22.47":{t:"`autoPlayback`",p:` +Type: Boolean +Default: false + +Whether to use the automatic pl ...`,l:"en/start/option.html#autoplayback",a:"autoplayback"},"22.48":{t:"`autoOrientation`",p:` +Type: Boolean +Default: false + +Whether to rotate the player in ...`,l:"en/start/option.html#autoorientation",a:"autoorientation"},"22.49":{t:"`airplay`",p:` +Type: Boolean +Default: false + +Whether to display the airplay ...`,l:"en/start/option.html#airplay",a:"airplay"},"22.50":{t:"`cssVar`",p:` +Type: Object +Default: {} + +Used to modify the built-in CSS var ...`,l:"en/start/option.html#cssvar",a:"cssvar"},"22.51":{t:"`proxy`",p:` +Type: function +Default: undefined + +The function can return a ...`,l:"en/start/option.html#proxy",a:"proxy"},"23.0":{t:"# 安装使用",p:"",l:"index.html",a:"安装使用"},"23.1":{t:"安装",p:`::: code-group +npm install artplayer + +yarn add artplayer + +pnpm ...`,l:"index.html#安装",a:"安装"},"23.2":{t:"`CDN`",p:`::: code-group +https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"index.html#cdn",a:"cdn"},"23.3":{t:"使用",p:`::: code-group +<html> + <head> + <title ...`,l:"index.html#使用",a:"使用"},"23.4":{t:"`Vue.js`",p:`::: code-group +<template> + <div ref="$container ...`,l:"index.html#vue-js",a:"vue-js"},"23.5":{t:"`React.js`",p:`::: code-group +import Artplayer from 'artplayer' +import { useE ...`,l:"index.html#react-js",a:"react-js"},"23.6":{t:"TypeScript",p:`导入 Artplayer 时会自动导入的 artplayer.d.ts +`,l:"index.html#typescript",a:"typescript"},"23.7":{t:"Vue.js",p:` + +`,l:"index.html#vue-js",a:"vue-js"},"23.8":{t:"React.js",p:`import Artplayer from 'artplayer'; +const art = useRef<Artpl ...`,l:"index.html#react-js",a:"react-js"},"23.9":{t:"Option",p:`你也可以使用选项的类型 +import Artplayer, { type Option } from 'artplayer' ...`,l:"index.html#option",a:"option"},"23.10":{t:"JavaScript",p:`有时你的 js 文件会丢失 TypeScript 的类型提示,这时候你可以手动导入类型 +变量: +/** + * @type { ...`,l:"index.html#javascript",a:"javascript"},"23.11":{t:"古老的浏览器",p:`生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version +对于 ...`,l:"index.html#古老的浏览器",a:"古老的浏览器"},"23.12":{t:"ECMAScript Module",p:`::: tip ESM Demo: +https://artplayer.org/esm.html +::: +从 5.2.6 开 ...`,l:"index.html#ecmascript-module",a:"ecmascript-module"},"23.13":{t:"自定义 userAgent",p:"目前对于是否移动设备的判断并不准确,有时候希望通过改变 userAgent 来调整播放器的UI, 所以在 5.2.4 开始新 ...",l:"index.html#自定义-useragent",a:"自定义-useragent"},"24.0":{t:"# 弹幕库",p:"",l:"plugin/danmuku.html",a:"弹幕库"},"24.1":{t:"演示",p:`👉 查看完整演示 +`,l:"plugin/danmuku.html#演示",a:"演示"},"24.2":{t:"安装",p:`::: code-group +npm install artplayer-plugin-danmuku + +yarn add ...`,l:"plugin/danmuku.html#安装",a:"安装"},"24.3":{t:"CDN",p:`::: code-group +https://cdn.jsdelivr.net/npm/artplayer-plugin-d ...`,l:"plugin/danmuku.html#cdn",a:"cdn"},"24.4":{t:"弹幕结构",p:`每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数 +{ + t ...`,l:"plugin/danmuku.html#弹幕结构",a:"弹幕结构"},"24.5":{t:"全部选项",p:`只有danmuku是必须的参数,其余都是非必填 +{ + danmuku: [], // 弹幕数据 + speed: ...`,l:"plugin/danmuku.html#全部选项",a:"全部选项"},"24.6":{t:"生命周期",p:`来自用户输入的弹幕: +beforeEmit -> filter -> beforeVisible -> a ...`,l:"plugin/danmuku.html#生命周期",a:"生命周期"},"24.7":{t:"使用弹幕数组",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用弹幕数组",a:"使用弹幕数组"},"24.8":{t:"使用弹幕 XML",p:`弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致 +<div className="run-cod ...`,l:"plugin/danmuku.html#使用弹幕-xml",a:"使用弹幕-xml"},"24.9":{t:"使用异步返回",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用异步返回",a:"使用异步返回"},"24.10":{t:"`hide/show`",p:`通过方法 hide 和 show 进行隐藏或者显示弹幕 +<div className="run-code&q ...`,l:"plugin/danmuku.html#hide-show",a:"hide-show"},"24.11":{t:"`isHide`",p:`通过属性 isHide 判断当前弹幕是隐藏或者显示 +<div className="run-code&quo ...`,l:"plugin/danmuku.html#ishide",a:"ishide"},"24.12":{t:"`emit`",p:`通过方法 emit 发送一条实时弹幕 +<div className="run-code" data ...`,l:"plugin/danmuku.html#emit",a:"emit"},"24.13":{t:"`config`",p:`通过方法 config 实时改变弹幕配置 +<div className="run-code" da ...`,l:"plugin/danmuku.html#config",a:"config"},"24.14":{t:"`load`",p:`通过 load 方法可以重载弹幕库,或者切换新弹幕库,或者追加新的弹幕库 +<div className="r ...`,l:"plugin/danmuku.html#load",a:"load"},"24.15":{t:"`reset`",p:`用于清空当前显示的弹幕 +<div className="run-code" data-libs=& ...`,l:"plugin/danmuku.html#reset",a:"reset"},"24.16":{t:"`mount`",p:`在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。 +当 ...`,l:"plugin/danmuku.html#mount",a:"mount"},"24.17":{t:"`option`",p:`用于获取当前弹幕配置 +<div className="run-code" data-libs=&q ...`,l:"plugin/danmuku.html#option",a:"option"},"24.18":{t:"事件",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#事件",a:"事件"},"25.0":{t:"# 语言设置",p:`::: danger +鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 ...`,l:"start/i18n.html",a:"语言设置"},"25.1":{t:"默认语言",p:`默认语言有: en, zh-cn, 无需手动导入 +var art = new Artplayer({ + contain ...`,l:"start/i18n.html#默认语言",a:"默认语言"},"25.2":{t:"导入语言",p:`打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言 +打包后的语言文件存放于: a ...`,l:"start/i18n.html#导入语言",a:"导入语言"},"25.3":{t:"新增语言",p:`var art = new Artplayer({ + container: '.artplayer-app', + ...`,l:"start/i18n.html#新增语言",a:"新增语言"},"25.4":{t:"修改语言",p:`import zhTw from 'artplayer/i18n/zh-tw'; + +var art = new Artpla ...`,l:"start/i18n.html#修改语言",a:"修改语言"},"26.0":{t:"# 基础选项",p:"",l:"start/option.html",a:"基础选项"},"26.1":{t:"`container`",p:` +Type: String, Element +Default: #artplayer + +播放器挂载的 DOM 容器 +< ...`,l:"start/option.html#container",a:"container"},"26.2":{t:"`url`",p:` +Type: String +Default: '' + +视频源地址 +<div className="run-c ...`,l:"start/option.html#url",a:"url"},"26.3":{t:"`id`",p:` +Type: String +Default: '' + +播放器的唯一标识,目前只用于记忆播放 autoplayback +< ...`,l:"start/option.html#id",a:"id"},"26.4":{t:"`onReady`",p:` +Type: Function +Default: undefined + +构造函数接受一个函数作为第二个参数,播放器初始化成功 ...`,l:"start/option.html#onready",a:"onready"},"26.5":{t:"`poster`",p:` +Type: String +Default: '' + +视频的海报,只会出现在播放器初始化且未播放的状态下 +<div c ...`,l:"start/option.html#poster",a:"poster"},"26.6":{t:"`theme`",p:` +Type: String +Default: #f00 + +播放器主题颜色,目前用于 进度条 和 高亮元素 上 +<div ...`,l:"start/option.html#theme",a:"theme"},"26.7":{t:"`volume`",p:` +Type: Number +Default: 0.7 + +播放器的默认音量 +<div className="r ...`,l:"start/option.html#volume",a:"volume"},"26.8":{t:"`isLive`",p:` +Type: Boolean +Default: false + +使用直播模式,会隐藏进度条和播放时间 +<div clas ...`,l:"start/option.html#islive",a:"islive"},"26.9":{t:"`muted`",p:` +Type: Boolean +Default: false + +是否默认静音 +<div className=" ...`,l:"start/option.html#muted",a:"muted"},"26.10":{t:"`autoplay`",p:` +Type: Boolean +Default: false + +是否自动播放 +<div className=" ...`,l:"start/option.html#autoplay",a:"autoplay"},"26.11":{t:"`autoSize`",p:` +Type: Boolean +Default: false + +播放器的尺寸默认会填充整个 container 容器尺寸,所以 ...`,l:"start/option.html#autosize",a:"autosize"},"26.12":{t:"`autoMini`",p:` +Type: Boolean +Default: false + +当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式 +&l ...`,l:"start/option.html#automini",a:"automini"},"26.13":{t:"`loop`",p:` +Type: Boolean +Default: false + +是否循环播放 +<div className=" ...`,l:"start/option.html#loop",a:"loop"},"26.14":{t:"`flip`",p:` +Type: Boolean +Default: false + +是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#flip",a:"flip"},"26.15":{t:"`playbackRate`",p:` +Type: Boolean +Default: false + +是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#playbackrate",a:"playbackrate"},"26.16":{t:"`aspectRatio`",p:` +Type: Boolean +Default: false + +是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里 + ...`,l:"start/option.html#aspectratio",a:"aspectratio"},"26.17":{t:"`screenshot`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示 视频截图 功能 +<div cla ...`,l:"start/option.html#screenshot",a:"screenshot"},"26.18":{t:"`setting`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示 设置面板 的开关按钮 +<div ...`,l:"start/option.html#setting",a:"setting"},"26.19":{t:"`hotkey`",p:` +Type: Boolean +Default: true + +是否使用快捷键 +<div className=" ...`,l:"start/option.html#hotkey",a:"hotkey"},"26.20":{t:"`pip`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示 画中画 的开关按钮 +<div c ...`,l:"start/option.html#pip",a:"pip"},"26.21":{t:"`mutex`",p:` +Type: Boolean +Default: true + +假如页面里同时存在多个播放器,是否只能让一个播放器播放 +< ...`,l:"start/option.html#mutex",a:"mutex"},"26.22":{t:"`backdrop`",p:` +Type: Boolean +Default: true + +是否开启播放器 UI 的背景虚化效果。开启后,设置面板、右键菜单 ...`,l:"start/option.html#backdrop",a:"backdrop"},"26.23":{t:"`fullscreen`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示播放器 窗口全屏 按钮 +<div ...`,l:"start/option.html#fullscreen",a:"fullscreen"},"26.24":{t:"`fullscreenWeb`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示播放器 网页全屏 按钮 +<div ...`,l:"start/option.html#fullscreenweb",a:"fullscreenweb"},"26.25":{t:"`subtitleOffset`",p:` +Type: Boolean +Default: false + +字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里 ...`,l:"start/option.html#subtitleoffset",a:"subtitleoffset"},"26.26":{t:"`miniProgressBar`",p:` +Type: Boolean +Default: false + +迷你进度条,只在播放器失去焦点后且正在播放时出现 +<di ...`,l:"start/option.html#miniprogressbar",a:"miniprogressbar"},"26.27":{t:"`useSSR`",p:` +Type: Boolean +Default: false + +是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲 ...`,l:"start/option.html#usessr",a:"usessr"},"26.28":{t:"`playsInline`",p:` +Type: Boolean +Default: true + +在移动端是否使用 playsInline 模式 +<div ...`,l:"start/option.html#playsinline",a:"playsinline"},"26.29":{t:"`layers`",p:` +Type: Array +Default: [] + +初始化自定义的 层 +<div className="ru ...`,l:"start/option.html#layers",a:"layers"},"26.30":{t:"`settings`",p:` +Type: Array +Default: [] + +初始化自定义的 设置面板 +<div className=" ...`,l:"start/option.html#settings",a:"settings"},"26.31":{t:"`contextmenu`",p:` +Type: Array +Default: [] + +初始化自定义的 右键菜单 +<div className=" ...`,l:"start/option.html#contextmenu",a:"contextmenu"},"26.32":{t:"`controls`",p:` +Type: Array +Default: [] + +初始化自定义的底部 控制栏 +<div className=&quo ...`,l:"start/option.html#controls",a:"controls"},"26.33":{t:"`quality`",p:` +Type: Array +Default: [] + +是否在底部控制栏里显示 画质选择 列表 + + + +属性 +类型 +描述 + + + + + ...`,l:"start/option.html#quality",a:"quality"},"26.34":{t:"`highlight`",p:` +Type: Array +Default: [] + +在进度条上显示 高亮信息 + + + +属性 +类型 +描述 + + + + +time +Nu ...`,l:"start/option.html#highlight",a:"highlight"},"26.35":{t:"`plugins`",p:` +Type: Array +Default: [] + +初始化自定义的 插件 +<div className="r ...`,l:"start/option.html#plugins",a:"plugins"},"26.36":{t:"`thumbnails`",p:` +Type: Object +Default: {} + +在进度条上设置 预览图 + + + +属性 +类型 +描述 + + + + +url +Str ...`,l:"start/option.html#thumbnails",a:"thumbnails"},"26.37":{t:"`subtitle`",p:` +Type: Object +Default: {} + +设置视频的字幕,支持字幕格式:vtt, srt, ass + + + +属性 + ...`,l:"start/option.html#subtitle",a:"subtitle"},"26.38":{t:"`moreVideoAttr`",p:` +Type: Object +Default: {'controls': false, 'preload': 'metadat ...`,l:"start/option.html#morevideoattr",a:"morevideoattr"},"26.39":{t:"`icons`",p:` +Type: Object +Default: {} + +用于替换默认图标,支持 Html 字符串和 HTMLElement +& ...`,l:"start/option.html#icons",a:"icons"},"26.40":{t:"`type`",p:` +Type: String +Default: '' + +用于指明视频的格式,需要配合 customType 一起使用,默认视频 ...`,l:"start/option.html#type",a:"type"},"26.41":{t:"`customType`",p:` +Type: Object +Default: {} + +通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处 ...`,l:"start/option.html#customtype",a:"customtype"},"26.42":{t:"`lang`",p:` +Type: String +Default: navigator.language.toLowerCase() + +默认显示语 ...`,l:"start/option.html#lang",a:"lang"},"26.43":{t:"`i18n`",p:` +Type: Object +Default: {} + +自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并 +新增 ...`,l:"start/option.html#i18n",a:"i18n"},"26.44":{t:"`lock`",p:` +Type: Boolean +Default: false + +是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏 +< ...`,l:"start/option.html#lock",a:"lock"},"26.45":{t:"`gesture`",p:` +Type: Boolean +Default: true + +是否在移动端启用视频元素上的手势事件 +<div class ...`,l:"start/option.html#gesture",a:"gesture"},"26.46":{t:"`fastForward`",p:` +Type: Boolean +Default: false + +是否在移动端添加长按视频快进功能 +<div classN ...`,l:"start/option.html#fastforward",a:"fastforward"},"26.47":{t:"`autoPlayback`",p:` +Type: Boolean +Default: false + +是否使用自动 回放功能 +<div className=& ...`,l:"start/option.html#autoplayback",a:"autoplayback"},"26.48":{t:"`autoOrientation`",p:` +Type: Boolean +Default: false + +是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器 + ...`,l:"start/option.html#autoorientation",a:"autoorientation"},"26.49":{t:"`airplay`",p:` +Type: Boolean +Default: false + +是否显示 airplay 按钮,当前只有部分浏览器支持该功能 + ...`,l:"start/option.html#airplay",a:"airplay"},"26.50":{t:"`cssVar`",p:` +Type: Object +Default: {} + +用于改变内置的css变量 +<div className=&quo ...`,l:"start/option.html#cssvar",a:"cssvar"},"26.51":{t:"`proxy`",p:` +Type: function +Default: undefined + +函数可以返回一个第三方的 HTMLCanvasEle ...`,l:"start/option.html#proxy",a:"proxy"}},n={previewLength:62,buttonLabel:"Search",placeholder:"Search docs",allow:[],ignore:[]},a={INDEX_DATA:e,PREVIEW_LOOKUP:t,Options:n};export{a as default}; diff --git a/docs/document/assets/chunks/virtual_search-data.LxkiP9ls.js b/docs/document/assets/chunks/virtual_search-data.LxkiP9ls.js deleted file mode 100644 index 434e0c73e..000000000 --- a/docs/document/assets/chunks/virtual_search-data.LxkiP9ls.js +++ /dev/null @@ -1,1403 +0,0 @@ -const e={map:'[{"高级属性":["0.0"],"option":["0.1","1.12","10.1","11.12","20.9","23.9","24.17"],"template":["0.2","10.2"],"events":["0.3","10.3"],"storage":["0.4","10.4"],"icons":["0.5","10.5","22.39","26.39"],"i18n":["0.6","10.6","22.43","26.43"],"notice":["0.7","3.4","10.7","13.4"],"layers":["0.8","10.8","22.29","26.29"],"controls":["0.9","10.9","17.0","22.32","26.32"],"contextmenu":["0.10","2.37","3.3","10.10","12.37","13.3","22.31","26.31"],"subtitle":["0.11","2.36","10.11","12.36","22.37","26.37"],"info":["0.12","2.32","3.22","10.12","12.32","13.22"],"loading":["0.13","2.34","10.13","12.34"],"hotkey":["0.14","2.5","10.14","12.5","22.19","26.19"],"mask":["0.15","2.35","10.15","12.35"],"setting":["0.16","2.39","3.5","3.6","3.7","10.16","12.39","13.5","13.6","13.7","22.18","26.18"],"plugins":["0.17","10.17","22.35","26.35"],"静态属性":["1.0"],"instances":["1.1","11.1"],"version":["1.2","11.2"],"env":["1.3","11.3"],"build":["1.4","11.4"],"config":["1.5","11.5","24.13"],"utils":["1.6","11.6"],"scheme":["1.7","11.7"],"emitter":["1.8","11.8"],"validator":["1.9","11.9"],"kindof":["1.10","11.10"],"html":["1.11","11.11"],"实例事件":["2.0"],"ready":["2.1","12.1"],"restart":["2.2","12.2"],"pause":["2.3","5.2","12.3","15.2"],"play":["2.4","5.1","12.4","15.1"],"destroy":["2.6","5.4","12.6","15.4"],"focus":["2.7","12.7"],"blur":["2.8","12.8"],"dblclick":["2.9","12.9"],"click":["2.10","12.10"],"error":["2.11","12.11"],"hover":["2.12","12.12"],"mousemove":["2.13","12.13"],"resize":["2.14","3.8","12.14","13.8"],"view":["2.15","12.15"],"lock":["2.16","12.16","22.44","26.44"],"aspectratio":["2.17","5.32","12.17","15.32","22.16","26.16"],"autoheight":["2.18","5.33","12.18","15.33"],"autosize":["2.19","5.27","12.19","15.27","22.11","26.11"],"flip":["2.20","3.30","5.30","12.20","13.30","15.30","22.14","26.14"],"fullscreen":["2.21","3.31","5.20","12.21","13.31","15.20","22.23","26.23"],"fullscreenerror":["2.22","12.22"],"fullscreenweb":["2.23","5.21","12.23","15.21","22.24","26.24"],"mini":["2.24","5.24","12.24","15.24"],"pip":["2.25","5.22","12.25","15.22","22.20","26.20"],"screenshot":["2.26","5.17","12.26","15.17","22.17","26.17"],"seek":["2.27","3.27","5.6","12.27","13.27","15.6"],"subtitleoffset":["2.28","5.47","12.28","15.47","22.25","26.25"],"subtitlebeforeupdate":["2.29","12.29"],"subtitleafterupdate":["2.30","12.30"],"subtitleload":["2.31","12.31"],"layer":["2.33","12.33","18.0"],"control":["2.38","3.16","12.38","13.16"],"muted":["2.40","5.14","12.40","15.14","22.9","26.9"],"keydown":["2.41","12.41"],"video":["2.42","2.43","2.44","2.45","2.46","2.47","2.48","2.49","2.50","2.51","2.52","2.53","2.54","2.55","2.56","2.57","2.58","2.59","2.60","2.61","2.62","5.43","12.42","12.43","12.44","12.45","12.46","12.47","12.48","12.49","12.50","12.51","12.52","12.53","12.54","12.55","12.56","12.57","12.58","12.59","12.60","12.61","12.62","15.43"],"全局属性":["3.0"],"debug":["3.1","13.1"],"style":["3.2","13.2"],"scroll":["3.9","3.10","13.9","13.10"],"auto":["3.11","3.12","3.13","3.21","13.11","13.12","13.13","13.21"],"reconnect":["3.14","3.15","13.14","13.15"],"dbclick":["3.17","3.18","13.17","13.18"],"mobile":["3.19","3.20","13.19","13.20"],"fast":["3.23","3.24","13.23","13.24"],"touch":["3.25","13.25"],"volume":["3.26","5.9","13.26","15.9","22.7","26.7"],"playback":["3.28","13.28"],"aspect":["3.29","13.29"],"log":["3.32","13.32"],"use":["3.33","13.33"],"remove":["3.34","13.34","19.8"],"编写插件":["4.0"],"实例属性":["5.0"],"toggle":["5.3","15.3"],"reset":["5.5","15.5","24.15"],"forward":["5.7","15.7"],"backward":["5.8","15.8"],"url":["5.10","15.10","22.2","26.2"],"switch":["5.11","15.11"],"switchurl":["5.12","15.12"],"switchquality":["5.13","15.13"],"currenttime":["5.15","15.15"],"duration":["5.16","15.16"],"getdataurl":["5.18","15.18"],"getbloburl":["5.19","15.19"],"poster":["5.23","15.23","22.5","26.5"],"playing":["5.25","15.25"],"state":["5.26","15.26"],"rect":["5.28","15.28"],"bottom":["5.29","15.29"],"playbackrate":["5.31","15.31","22.15","26.15"],"attr":["5.34","15.34"],"type":["5.35","15.35","22.40","26.40"],"theme":["5.36","15.36","22.6","26.6"],"airplay":["5.37","15.37","22.49","26.49"],"loaded":["5.38","15.38"],"loadedtime":["5.39","15.39"],"played":["5.40","15.40"],"proxy":["5.41","15.41","22.51","26.51"],"query":["5.42","15.42"],"cssvar":["5.44","15.44","22.50","26.50"],"quality":["5.45","15.45","22.33","26.33"],"thumbnails":["5.46","15.46","22.36","26.36"],"右键菜单":["6.0"],"配置":["6.1","7.1","8.1"],"创建":["6.2","7.2","8.2","9.2","9.3","9.4","9.5","9.6"],"添加":["6.3","7.3","8.3","9.7"],"删除":["6.4","7.4","8.4","9.8"],"更新":["6.5","7.5","8.5","9.9"],"控制器":["7.0"],"业务层":["8.0"],"设置面板":["9.0"],"内置":["9.1"],"advanced":["10.0"],"static":["11.0"],"instance":["12.0","15.0"],"global":["13.0"],"writing":["14.0"],"context":["16.0"],"configuration":["16.1","17.1","18.1"],"creation":["16.2","17.2","18.2"],"addition":["16.3","18.3"],"removal":["16.4","17.4","18.4"],"update":["16.5","18.5","19.9"],"adding":["17.3","21.3"],"updating":["17.5"],"settings":["19.0","22.30","26.30"],"built":["19.1"],"creating":["19.2","19.3","19.4"],"create":["19.5","19.6"],"add":["19.7"],"installation":["20.0","20.1"],"cdn":["20.2","23.2","24.3"],"usage":["20.3"],"vue":["20.4","20.7","23.4","23.7"],"react":["20.5","20.8","23.5","23.8"],"typescript":["20.6","23.6"],"javascript":["20.10","23.10"],"legacy":["20.11"],"ecmascript":["20.12","23.12"],"custom":["20.13"],"language":["21.0"],"default":["21.1"],"importing":["21.2"],"modifying":["21.4"],"basic":["22.0"],"container":["22.1","26.1"],"id":["22.3","26.3"],"onready":["22.4","26.4"],"islive":["22.8","26.8"],"autoplay":["22.10","26.10"],"automini":["22.12","26.12"],"loop":["22.13","26.13"],"mutex":["22.21","26.21"],"backdrop":["22.22","26.22"],"miniprogressbar":["22.26","26.26"],"usessr":["22.27","26.27"],"playsinline":["22.28","26.28"],"highlight":["22.34","26.34"],"morevideoattr":["22.38","26.38"],"customtype":["22.41","26.41"],"lang":["22.42","26.42"],"gesture":["22.45","26.45"],"fastforward":["22.46","26.46"],"autoplayback":["22.47","26.47"],"autoorientation":["22.48","26.48"],"安装使用":["23.0"],"安装":["23.1","24.2"],"使用":["23.3"],"古老的浏览器":["23.11"],"自定义":["23.13"],"弹幕库":["24.0"],"演示":["24.1"],"弹幕结构":["24.4"],"全部选项":["24.5"],"生命周期":["24.6"],"使用弹幕数组":["24.7"],"使用弹幕":["24.8"],"使用异步返回":["24.9"],"hide":["24.10"],"ishide":["24.11"],"emit":["24.12"],"load":["24.14"],"mount":["24.16"],"事件":["24.18"],"语言设置":["25.0"],"默认语言":["25.1"],"导入语言":["25.2"],"新增语言":["25.3"],"修改语言":["25.4"],"基础选项":["26.0"]},{"0":["3.28","5.38","5.40","22.7","26.7"],"1":["23.11","24.5"],"3":["3.29","23.9"],"4":["3.29","25.3"],"5":["3.28","8.2","18.2","24.5"],"7":["8.3","18.3","22.7"],"9":["25.3"],"10":["24.5"],"15":["4.0"],"21":["8.5","9.9","18.5","19.9"],"26":["7.5","17.5"],"27":["9.9","19.9"],"75":["3.28"],"250":["3.5"],"这里的":["0.0","1.0","3.0","5.0"],"播放器的选项":["0.1"],"div":["0.1","0.2","0.4","0.5","0.7","0.14","0.17","1.1","1.6","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","4.0","5.1","5.2","5.3","5.16","5.28","5.33","5.37","5.45","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","10.1","10.2","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.29","22.30","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29","26.30","26.31","26.32"],"classname":["0.1","0.2","0.17","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","4.0","5.45","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","10.2","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.29","22.30","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29","26.30"],"run":["0.1","0.2","2.0","2.2","2.6","2.11","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","4.0","5.45","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.29","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29","26.30"],"管理播放器所有的":["0.2","0.3","0.5"],"dom":["0.2","0.3","5.41","5.42","9.2","9.3","9.5","9.6","10.2","10.3","15.41","15.42","19.2","19.3","19.5","19.6","22.1","26.1"],"元素":["0.2","9.5","9.6"],"事件":["0.3","4.0"],"实质上是代理了":["0.3"],"addeventlistener":["0.3","5.41","10.3","15.41"],"和":["0.3","4.0","5.13","24.8","24.10","26.4"],"removeeventlistener":["0.3","10.3"],"当使用以下方法来处理事件":["0.3"],"播放器销毁时也会自动销毁该事件":["0.3"],"管理播放器的本地存储":["0.4"],"name":["0.4","4.0","10.4"],"属性用于设置缓存的":["0.4"],"key":["0.4","10.4"],"set":["0.4","10.4","15.9","15.11","15.12","22.36","22.37"],"方法用于设置缓存":["0.4"],"get":["0.4","0.6","10.6"],"方法用于获取缓存":["0.4"],"del":["0.4"],"方法用于删除缓存":["0.4"],"clear":["0.4"],"方法用于清空缓存":["0.4"],"svg":["0.5","10.5"],"图标":["0.5"],"管理播放器的":["0.6"],"方法用于获取":["0.6"],"的值":["0.6"],"update":["0.6","0.8","0.9","0.10","0.16"],"管理播放器的提示语":["0.7"],"只有一个":["0.7"],"show":["0.7","0.13","0.15","10.13","10.15","24.10"],"属性用于显示提示语":["0.7"],"管理播放器的层":["0.8"],"add":["0.8","0.9","0.10","0.14","0.16","0.17","10.8","10.9","10.10","10.14","10.16"],"方法用于动态添加层":["0.8"],"remove":["0.8","0.9","0.10","0.14","0.16"],"方法用于动态删除层":["0.8"],"管理播放器的控制器":["0.9"],"方法用于动态添加控制器":["0.9"],"方法用于动态删除控制器":["0.9"],"管理播放器的右键菜单":["0.10"],"方法用于动态添加菜单":["0.10"],"方法用于动态删除菜单":["0.10"],"方法用于动态更新菜单":["0.10"],"管理播放器的字幕功能":["0.11"],"url":["0.11","5.12","10.11","12.2","15.12","15.18","15.19"],"属性设置和返回当前字幕地址":["0.11"],"style":["0.11"],"方法设置当前字幕的样式":["0.11"],"switch":["0.11"],"管理播放器的信息面板":["0.12"],"常用于查看当前播放器和视频的运行状态":["0.12"],"例如版本号":["0.12"],"分辨率":["0.12"],"时长等":["0.12"],"管理播放器的加载层":["0.13"],"属性用于设置是否显示加载层":["0.13"],"toggle":["0.13","0.15","19.5"],"管理播放器的快捷键功能":["0.14"],"方法用于添加快捷键":["0.14"],"方法用于删除快捷键":["0.14"],"管理播放器的遮罩层":["0.15"],"属性用于设置是否显示遮罩层":["0.15"],"管理播放器的设置面板":["0.16"],"方法用于动态添加设置项":["0.16"],"方法用于动态删除设置项":["0.16"],"方法用于动态更新设置项":["0.16"],"管理播放器的插件功能":["0.17"],"只有一个方法":["0.17"],"用于动态添加插件":["0.17"],"返回全部播放器实例的数组":["1.1"],"假如你想同时管理多个播放器的时候":["1.1"],"可以用到该属性":["1.1"],"返回播放器的版本信息":["1.2"],"返回播放器的环境变量":["1.3"],"返回播放器的打包时间":["1.4"],"返回视频的默认配置":["1.5"],"返回播放器的工具函数集合":["1.6"],"返回播放器选项的校验方案":["1.7"],"返回事件分发器的构造函数":["1.8"],"返回选项的校验函数":["1.9"],"返回类型检测的函数工具":["1.10"],"返回播放器所需的":["1.11"],"返回播放器的默认选项":["1.12"],"播放器的事件分为两种":["2.0"],"一种视频的":["2.0"],"原生事件":["2.0"],"前缀":["2.0"],"video":["2.0","12.0","13.29","13.30","13.34","15.3","15.5","15.11","15.12","15.13","15.16","22.2","22.5","22.37","22.40","22.41"],"另外一种是":["2.0"],"自定义事件":["2.0"],"监听事件":["2.0"],"code":["2.0","2.2","2.28","4.0","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","20.1","20.2","20.3","20.4","20.5","22.2","22.29","23.1","23.2","23.3","23.4","23.5","24.2","24.3","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.29"],"js":["2.0","4.0","6.5","7.2","7.3","7.5","8.2","8.3","8.5","9.4","9.8","9.9","14.0","16.5","17.2","17.3","17.5","18.2","18.3","18.5","19.4","19.8","19.9","20.4","20.5","20.7","20.8","20.10","20.11","21.2","21.4","23.4","23.5","23.7","23.8","23.10","23.11","24.5","24.18","25.2","25.3","25.4"],"当播放器首次可以播放器时触发":["2.1"],"当播放器切换地址后并可以播放时触发":["2.2"],"当播放器暂停时触发":["2.3"],"当播放器播放时触发":["2.4"],"当播放器热键被按下时触发":["2.5"],"当播放器销毁时触发":["2.6"],"当播放器获得焦点时触发":["2.7"],"当播放器失去焦点时触发":["2.8"],"当播放器被双击时触发":["2.9"],"当播放器被单击时触发":["2.10"],"当播放器加载视频发生错误时触发":["2.11"],"当播放器被鼠标移出或者移入时触发":["2.12"],"当播放器被鼠标经过时触发":["2.13"],"当播放器尺寸变化时触发":["2.14"],"当播放器出现在视口时触发":["2.15"],"在移动端":["2.16","3.19","3.20","3.21","3.23","3.24","3.25"],"当锁定的状态发生变化时触发":["2.16"],"当播放器长宽比变化时触发":["2.17"],"当播放器自动设置高度时触发":["2.18"],"当播放器自动设置尺寸时触发":["2.19"],"当播放器发生翻转时触发":["2.20"],"当播放器发生窗口全屏时触发":["2.21"],"当播放器发生窗口全屏错误时触发":["2.22"],"当播放器发生网页全屏时触发":["2.23"],"当播放器进入迷你模式时触发":["2.24"],"当播放器进入画中画时触发":["2.25"],"当播放器被截图时触发":["2.26"],"当播放器发生时间跳转时触发":["2.27"],"当播放器发生字幕偏移时触发":["2.28"],"当字幕更新前触发":["2.29"],"当字幕更新后触发":["2.30"],"当字幕加载时触发":["2.31"],"当信息面板显示或隐藏时触发":["2.32"],"当自定义层显示或隐藏时触发":["2.33"],"当加载器显示或隐藏时触发":["2.34"],"当遮罩层显示或隐藏时触发":["2.35"],"当字幕层显示或隐藏时触发":["2.36"],"当右键菜单显示或隐藏时触发":["2.37"],"当控制器显示或隐藏时触发":["2.38"],"当设置面板显示或隐藏时触发":["2.39"],"当静音的状态变化时触发":["2.40"],"监听来自":["2.41"],"document":["2.41"],"的":["2.41"],"canplay":["2.42","12.42"],"canplaythrough":["2.43","12.43"],"complete":["2.44","12.44"],"durationchange":["2.45","12.45"],"emptied":["2.46","12.46"],"ended":["2.47","12.47"],"error":["2.48","12.48"],"loadeddata":["2.49","12.49"],"loadedmetadata":["2.50","12.50"],"pause":["2.51","12.51"],"play":["2.52","3.19","3.20","12.52","13.19","13.20"],"playing":["2.53","12.53"],"progress":["2.54","12.54","22.36"],"ratechange":["2.55","12.55"],"seeked":["2.56","12.56"],"seeking":["2.57","12.57","13.27"],"stalled":["2.58","12.58"],"suspend":["2.59","12.59"],"timeupdate":["2.60","12.60"],"volumechange":["2.61","12.61"],"waiting":["2.62","12.62"],"是否开始":["3.1"],"模式":["3.1"],"返回播放器样式文本":["3.2"],"是否开启右键菜单":["3.3"],"默认开启":["3.3"],"time":["3.4","3.8","3.9","3.14","3.15","3.16","3.17","3.21","3.22","3.24","13.4","13.8","13.9","13.14","13.15","13.16","13.17","13.21","13.22","13.24"],"提示信息的显示时长":["3.4"],"单位为毫秒":["3.4","3.8","3.9","3.13","3.16","3.17","3.22"],"width":["3.5","3.6","5.29","9.3","13.5","13.6","15.29","15.33"],"设置面板的默认宽度":["3.5"],"单位为像素":["3.5","3.6","3.7","3.10"],"默认为":["3.5","3.6","3.7","3.11","3.17","3.26","3.28","3.29","3.30","3.32","3.33"],"item":["3.6","3.7","13.6","13.7","19.6"],"设置面板的设置项的默认宽度":["3.6"],"height":["3.7","5.29","13.7","15.29"],"设置面板的设置项的默认高度":["3.7"],"事件的节流时间":["3.8","3.9"],"gap":["3.10","13.10"],"view":["3.10","10.12"],"事件的边界容差距离":["3.10"],"playback":["3.11","3.12","3.13","12.53","13.11","13.12","13.13","15.3","22.47"],"max":["3.11","3.14","13.11","13.14"],"自动回放功能的最大记录数":["3.11"],"min":["3.12","13.12"],"自动回放功能的最小记录时长":["3.12"],"单位为秒":["3.12","3.27","5.39"],"timeout":["3.13","13.13"],"自动回放功能的隐藏延迟时长":["3.13"],"发生连接错误时":["3.14","3.15"],"自动连接的最大次数":["3.14"],"sleep":["3.15","13.15"],"自动连接的延迟时间":["3.15"],"hide":["3.16","13.13","13.16"],"底部控制栏的自动隐藏的延迟时间":["3.16"],"双击事件的延迟事件":["3.17"],"fullscreen":["3.18","12.22","13.18"],"在桌面端":["3.18"],"是否双击切换全屏":["3.18"],"dbclick":["3.19","13.19"],"是否双击切换播放暂停":["3.19"],"click":["3.20","13.20"],"是否单击切换播放暂停":["3.20"],"orientation":["3.21","13.21"],"自动旋屏的延迟时间":["3.21"],"loop":["3.22","13.22"],"信息面板的刷新时间":["3.22"],"forward":["3.23","3.24","13.23","13.24"],"value":["3.23","13.23"],"长按加速的速率倍数":["3.23"],"长按加速的延迟时间":["3.24"],"move":["3.25","13.25"],"ratio":["3.25","3.29","13.25","13.29"],"左右滑动进度的速率倍数":["3.25"],"step":["3.26","3.27","13.26","13.27"],"快捷键调节音量的幅度比例":["3.26"],"快捷键调节播放进度的幅度":["3.27"],"rate":["3.28","13.28"],"内置播放速率的列表":["3.28"],"内置视频长宽比的列表":["3.29"],"default":["3.29","13.5","13.6","13.7","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.39","22.40","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","22.50","22.51","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.39","26.40","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49","26.50","26.51"],"内置视频翻转的列表":["3.30"],"normal":["3.30"],"horizontal":["3.30"],"vertical":["3.30"],"web":["3.31","13.31"],"in":["3.31","12.28","13.17","13.28","13.29","13.30","13.31","19.1","20.10"],"body":["3.31","13.31"],"网页全屏时":["3.31"],"version":["3.32","13.32"],"设置是否打印播放器版本":["3.32"],"raf":["3.33","13.33"],"设置是否使用":["3.33"],"requestanimationframe":["3.33"],"src":["3.34","5.5","13.34","21.2","25.2"],"when":["3.34","10.3","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.34","15.33"],"destroy":["3.34","13.34"],"在销毁播放器时":["3.34"],"是否同时移除视频的":["3.34"],"但你已经知道播放器的":["4.0"],"属性":["4.0","6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.33","26.34","26.36","26.37"],"方法":["4.0"],"后":["4.0"],"再编写插件是非常简单的事":["4.0"],"可以在实例化的时候加载插件的函数":["4.0"],"function":["4.0","5.1","5.2","5.3","5.4","5.5","5.12","5.13","5.17","5.18","5.19","5.27","5.33","5.34","5.37","5.41","5.42","5.44","9.3","15.1","15.2","15.3","15.4","15.5","15.12","15.13","15.17","15.18","15.19","15.27","15.33","15.34","15.37","15.41","15.42","15.44","19.3","22.4","22.51","26.4","26.51"],"myplugin":["4.0"],"art":["4.0","5.12","7.2","15.12","17.2"],"console":["4.0"],"info":["4.0"],"return":["4.0"],"something":["4.0"],"type":["5.1","5.2","5.3","5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.27","5.28","5.30","5.31","5.32","5.33","5.34","5.36","5.37","5.38","5.39","5.40","5.41","5.42","5.43","5.44","5.45","5.46","5.47","15.1","15.2","15.3","15.4","15.5","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.15","15.16","15.17","15.18","15.19","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.27","15.28","15.29","15.30","15.31","15.32","15.33","15.34","15.36","15.37","15.38","15.39","15.40","15.41","15.42","15.43","15.44","15.45","15.46","15.47","16.1","17.1","18.1","19.2","19.3","19.5","19.6","20.10","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.39","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","22.50","22.51","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.39","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49","26.50","26.51"],"播放视频":["5.1"],"暂停视频":["5.2"],"切换视频的播放和暂停":["5.3"],"parameter":["5.4","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.30","5.31","5.32","5.34","5.35","5.36","5.45","5.46","5.47","15.4","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.15","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.30","15.31","15.32","15.34","15.35","15.36","15.45","15.46","15.47","22.4"],"boolean":["5.4","5.14","5.20","5.21","5.22","5.25","7.1","15.4","15.14","15.20","15.21","15.22","15.24","15.25","16.1","17.1","18.1","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.44","22.45","22.46","22.47","22.48","22.49","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.44","26.45","26.46","26.47","26.48","26.49"],"重置播放器的视频元素":["5.5"],"会移除当前":["5.5"],"并调用一次":["5.5"],"setter":["5.6","5.7","5.8","5.9","5.10","5.11","5.14","5.15","5.20","5.21","5.22","5.23","5.24","5.26","5.30","5.31","5.32","5.35","5.36","5.45","5.46","5.47","15.6","15.7","15.8","15.9","15.10","15.11","15.14","15.15","15.20","15.21","15.22","15.23","15.24","15.26","15.30","15.31","15.32","15.35","15.36","15.45","15.46","15.47"],"number":["5.6","5.7","5.8","5.9","5.15","5.31","13.14","15.6","15.7","15.8","15.9","15.15","15.31","15.47","21.0","22.7","26.7"],"getter":["5.9","5.10","5.14","5.15","5.16","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.28","5.30","5.31","5.32","5.35","5.36","5.38","5.39","5.40","5.46","5.47","15.9","15.10","15.14","15.15","15.16","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.28","15.29","15.30","15.31","15.32","15.35","15.36","15.38","15.39","15.40","15.46","15.47"],"string":["5.11","5.12","5.13","5.23","5.26","5.30","5.32","5.34","5.35","5.36","9.2","9.3","9.5","9.6","15.10","15.11","15.12","15.13","15.23","15.26","15.30","15.32","15.34","15.35","15.36","19.2","19.3","19.5","19.6","22.1","22.2","22.3","22.5","22.6","22.40","22.42","26.1","26.2","26.3","26.5","26.6","26.40","26.42"],"设置视频地址":["5.11","5.12"],"设置时和":["5.11","5.12"],"设置视频画质地址":["5.13"],"获取视频时长":["5.16"],"下载当前视频帧的截图":["5.17"],"可选参数为截图名字":["5.17"],"获取当前视频帧的截图的":["5.18","5.19"],"base64":["5.18","15.18"],"地址":["5.18","5.19"],"blob":["5.19","15.19"],"设置和获取视频海报":["5.23"],"获取或设置播放器当前状态":["5.26"],"设置视频是否自适应尺寸":["5.27"],"获取播放器的尺寸和坐标信息":["5.28"],"top":["5.29","15.29"],"left":["5.29","15.29"],"right":["5.29","15.29"],"x":["5.29","15.29"],"y":["5.29","15.29"],"当容器只有宽度":["5.33"],"该属性可以自动计算出并设置视频的高度":["5.33"],"动态获取和设置":["5.34"],"开启隔空播放":["5.37"],"视频缓存的比例":["5.38"],"范围是":["5.38","5.40"],"已缓存的媒体时长":["5.39"],"视频播放的比例":["5.40"],"事件的代理函数":["5.41"],"实质上代理了":["5.41"],"的查询函数":["5.42"],"element":["5.43","9.2","9.3","9.5","9.6","15.5","15.43","19.2","19.3","19.5","19.6","22.1","26.1"],"快捷返回播放器的":["5.43"],"动态获取或设置":["5.44"],"css":["5.44"],"变量":["5.44","23.10"],"array":["5.45","9.3","11.1","15.45","19.3","22.29","22.30","22.31","22.32","22.33","22.34","22.35","26.29","26.30","26.31","26.32","26.33","26.34","26.35"],"动态设置画质列表":["5.45"],"object":["5.46","15.46","22.36","22.37","22.38","22.39","22.41","22.43","22.50","26.36","26.37","26.38","26.39","26.41","26.43","26.50"],"类型":["6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.34","26.36","26.37"],"描述":["6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.36"],"disable":["6.1","7.1","8.1","16.1","17.1","18.1"],"var":["7.2","9.4","17.2"],"new":["7.2","17.2","21.3"],"artplayer":["7.2","17.2","20.4","20.5","20.6","20.11","20.12","21.2","22.1","23.5","23.11","23.12","24.18","25.2","25.4","26.1"],"container":["7.2","15.33","17.2"],"须先打开设置面板":["9.1"],"然后自带四个内置项":["9.1"],"flip":["9.1"],"playbackrate":["9.1"],"按钮":["9.2"],"html":["9.2","9.3","9.5","9.6","19.2","19.3","19.5","19.6","20.3","23.3","26.39"],"元素的":["9.2","9.3","9.5","9.6"],"选择列表":["9.3"],"icon":["9.3","9.5","9.6","19.3","19.6"],"元素的图标":["9.3"],"selector":["9.3","19.3"],"元素列表":["9.3"],"onselect":["9.3","19.3"],"元素点击事件":["9.3"],"列表嵌套":["9.4"],"切换按钮":["9.5"],"范围滑块":["9.6"],"properties":["10.0","11.0","13.0","14.0","15.0"],"the":["10.0","10.1","10.2","10.3","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17","11.2","11.3","11.4","11.5","11.6","11.7","11.8","11.9","11.10","11.11","11.12","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.42","12.43","12.46","12.58","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.17","13.22","13.24","13.26","13.27","13.28","13.29","13.30","13.34","14.0","15.1","15.2","15.4","15.5","15.11","15.12","15.13","15.16","15.18","15.19","15.20","15.22","15.28","15.33","15.38","15.39","15.40","15.45","17.1","19.5","19.6","20.9","20.11","20.13","21.0","21.1","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.11","22.22","22.33","22.34","22.36","22.37","22.40","22.41","22.47","22.51"],"player":["10.1","10.2","10.3","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17","11.1","12.0","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.14","12.15","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","14.0","15.5","15.28"],"s":["10.1","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17","12.17","13.34","14.0","15.5","15.28"],"options":["10.1","22.0"],"manages":["10.2","10.3","10.4","10.5","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","10.17"],"all":["10.2","10.3","10.5","11.1"],"elements":["10.2"],"of":["10.2","11.1","11.6","13.5","13.6","13.7","13.28","13.29","13.30","15.16","15.38","15.39","15.40","15.45","19.5","19.6","21.0"],"for":["10.3","10.5","12.41","13.8","13.9","15.41","20.13"],"it":["10.3","10.7","22.40"],"essentially":["10.3","15.41"],"proxies":["10.3"],"and":["10.3","10.11","12.0","13.34","14.0","15.15","15.20","15.22","15.23"],"using":["10.3"],"local":["10.4"],"property":["10.4","10.11","16.1","17.1","18.1","19.2","19.3","19.5","19.6"],"is":["10.4","10.6","10.8","10.9","10.10","10.14","10.16","12.20","20.13"],"used":["10.4","10.6","10.8","10.9","10.10","10.12","10.16","22.39","22.40","22.50"],"to":["10.4","10.6","10.8","10.9","10.10","10.12","10.16","12.0","13.1","13.3","13.31","13.32","13.33","13.34","15.12","17.1","19.1","21.0","22.10","22.17","22.19","22.22","22.27","22.33","22.39","22.40","22.47","22.50"],"cache":["10.4"],"method":["10.4","10.6","10.8","10.9","10.10","10.14","10.16"],"notifications":["10.7"],"only":["10.7","15.33","20.11"],"dynamically":["10.8","10.9","10.10","10.16","15.34","15.35","15.36","15.44","15.45"],"context":["10.10","12.37","22.31"],"menu":["10.10","16.0"],"functionality":["10.11","10.14","10.17"],"sets":["10.11","13.32","13.33","15.13","15.14","15.15","15.20","15.21","15.22","15.23","15.26","15.27","15.30","15.31","15.32","15.44","15.45"],"information":["10.12","22.34"],"panel":["10.12","10.16","12.39","19.0","22.30"],"commonly":["10.12"],"layer":["10.13","10.15"],"settings":["10.16","12.39","21.0"],"plugin":["10.17","14.0","24.18"],"with":["10.17","12.0","14.0"],"here":["11.0","15.0"],"returns":["11.1","11.2","11.3","11.4","11.5","11.6","11.7","11.8","11.9","11.10","11.11","11.12","13.2","15.43"],"an":["11.1","12.0","12.11","12.48"],"collection":["11.6"],"events":["12.0","12.41","14.0","15.41"],"are":["12.0","12.29","12.30","12.31","14.0","21.2"],"divided":["12.0"],"into":["12.0"],"two":["12.0"],"types":["12.0"],"native":["12.0"],"prefixed":["12.0"],"custom":["12.0","12.33","22.29","22.30","22.31","22.32","22.35","22.43"],"listen":["12.0"],"event":["12.0"],"triggered":["12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40"],"switches":["12.2"],"a":["12.5","12.22","15.17","15.33","15.41","15.42","20.13","21.3","22.4"],"occurs":["12.11"],"mouse":["12.12","12.13"],"enters":["12.12","12.21","12.23","12.24","12.25"],"state":["12.16"],"automatically":["12.18","22.12"],"window":["12.22"],"subtitle":["12.28","22.25"],"offset":["12.28"],"changes":["12.28"],"before":["12.29","21.2"],"subtitles":["12.29","12.30","12.31"],"updated":["12.29","12.30"],"after":["12.30"],"loaded":["12.31"],"layers":["12.33"],"loader":["12.34"],"controls":["12.38","22.38","26.38"],"mute":["12.40"],"listens":["12.41"],"browser":["12.42"],"media":["12.46","15.39"],"has":["12.46","15.33"],"these":["13.0"],"whether":["13.1","13.3","13.18","13.31","13.32","13.33","13.34","15.27","16.1","17.1","18.1","20.13","22.10","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.22","22.23","22.24","22.27","22.33","22.44","22.45","22.46","22.47","22.48","22.49"],"enable":["13.1","13.3","22.8","22.19","22.22"],"mode":["13.1"],"display":["13.4","22.17","22.33","22.34"],"duration":["13.4"],"throttle":["13.8","13.9"],"boundary":["13.10"],"tolerance":["13.10"],"distance":["13.10"],"maximum":["13.11","13.14"],"record":["13.11","13.12"],"minimum":["13.12"],"delay":["13.13","13.15","13.16","13.17"],"on":["13.18","13.19","13.20","13.21","13.23","13.24","13.25","22.34","22.36","22.41"],"desktop":["13.18"],"devices":["13.19","13.20","13.21","13.23","13.24","13.25"],"mobile":["13.21","13.23","13.24","13.25","20.13"],"refresh":["13.22"],"interval":["13.22"],"adjustment":["13.26"],"built":["13.28","13.29","13.30"],"list":["13.28","13.29","13.30","15.45","19.3"],"determines":["13.31","13.34"],"attribute":["13.34"],"plugins":["14.0"],"once":["14.0"],"you":["14.0","19.1","20.9"],"familiar":["14.0"],"methods":["14.0"],"becomes":["14.0"],"very":["14.0"],"straightforward":["14.0"],"can":["14.0","20.9"],"load":["14.0"],"functions":["14.0"],"during":["14.0"],"instantiation":["14.0"],"removes":["15.5"],"rewind":["15.8"],"similar":["15.12"],"gets":["15.15","15.16","15.18","15.19","15.20","15.22","15.23","15.25","15.26","15.28","15.34","15.44"],"downloads":["15.17"],"or":["15.26","15.44"],"defined":["15.33"],"this":["15.33","22.43"],"initiates":["15.37"],"proportion":["15.38","15.40"],"amount":["15.39"],"proxying":["15.41"],"quickly":["15.43"],"description":["16.1","17.1","18.1","19.2","19.3","19.5","19.6"],"control":["17.1","22.32"],"first":["19.1"],"need":["19.1"],"open":["19.1"],"buttons":["19.2"],"selection":["19.3","22.33"],"lists":["19.3","19.4"],"nested":["19.4"],"button":["19.5"],"range":["19.6"],"slider":["19.6"],"usage":["20.0"],"group":["20.1","20.2","20.3","20.4","20.5","23.1","23.2","23.3","23.4","23.5","24.2","24.3"],"bash":["20.2","23.2","24.2","24.3"],"index":["20.3","23.3","24.18"],"head":["20.3"],"jsx":["20.5","20.8","23.5","23.8"],"import":["20.5","21.4","23.5","23.9","25.4"],"from":["20.5","21.4","23.5","25.4"],"useeffect":["20.5","23.5"],"useref":["20.5"],"also":["20.9"],"use":["20.9","22.27","22.47"],"sometimes":["20.10"],"your":["20.10"],"files":["20.10","21.2"],"may":["20.10"],"lose":["20.10"],"typescript":["20.10","23.10"],"hints":["20.10"],"browsers":["20.11"],"production":["20.11"],"build":["20.11"],"supports":["20.11"],"latest":["20.11"],"major":["20.11"],"module":["20.12","23.12"],"tip":["20.12","23.12"],"esm":["20.12","23.12"],"demo":["20.12","23.12"],"https":["20.12","23.12"],"org":["20.12","23.12"],"useragent":["20.13","23.13"],"currently":["20.13"],"detection":["20.13"],"device":["20.13"],"danger":["21.0","25.0"],"due":["21.0"],"increasing":["21.0"],"languages":["21.1","21.2","21.4"],"language":["21.2","21.3","22.42","26.42"],"bundling":["21.2"],"located":["21.2"],"at":["21.2"],"i18n":["21.2","25.2"],"zhtw":["21.4","25.4"],"where":["22.1"],"source":["22.2"],"unique":["22.3"],"undefined":["22.4","22.51","26.4","26.51"],"constructor":["22.4"],"accepts":["22.4"],"as":["22.4"],"second":["22.4"],"which":["22.4"],"f00":["22.6","26.6"],"false":["22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.20","22.23","22.24","22.25","22.26","22.27","22.38","22.44","22.46","22.47","22.48","22.49","26.10","26.11","26.12","26.14","26.15","26.16","26.17","26.25","26.27","26.38","26.44","26.47","26.49"],"by":["22.11"],"true":["22.19","22.21","22.22","22.28","22.45","26.19","26.22"],"hotkeys":["22.19"],"if":["22.21"],"blur":["22.22"],"timing":["22.25"],"mini":["22.26"],"ssr":["22.27","26.27"],"initialize":["22.29","22.30","22.31","22.32","22.35"],"bottom":["22.32"],"preview":["22.36"],"bar":["22.36"],"supported":["22.37"],"formats":["22.37"],"vtt":["22.37","26.37"],"srt":["22.37","26.37"],"preload":["22.38"],"metadata":["22.38"],"replace":["22.39"],"specify":["22.40"],"format":["22.40"],"needs":["22.40"],"be":["22.40","22.43"],"matches":["22.41"],"based":["22.41"],"navigator":["22.42","26.42"],"configuration":["22.43"],"will":["22.43"],"deeply":["22.43"],"merged":["22.43"],"automatic":["22.47"],"导入":["23.6"],"你也可以使用选项的类型":["23.9"],"ts":["23.9"],"有时你的":["23.10"],"文件会丢失":["23.10"],"的类型提示":["23.10"],"这时候你可以手动导入类型":["23.10"],"生产构建的":["23.11"],"只兼容最新一个主版本的":["23.11"],"chrome":["23.11"],"last":["23.11"],"目前对于是否移动设备的判断并不准确":["23.13"],"有时候希望通过改变":["23.13"],"来调整播放器的ui":["23.13"],"查看完整演示":["24.1"],"jsdelivr":["24.3"],"每一个弹幕是一个对象":["24.4"],"多个弹幕组成的数组就是弹幕库":["24.4"],"通常只需要":["24.4"],"text":["24.4"],"只有":["24.5"],"danmuku":["24.5","24.18"],"是必须的参数":["24.5"],"其余都是非必填":["24.5"],"弹幕数据":["24.5"],"speed":["24.5"],"弹幕持续时间":["24.5"],"范围在":["24.5"],"margin":["24.5"],"来自用户输入的弹幕":["24.6"],"beforeemit":["24.6"],"filter":["24.6"],"beforevisible":["24.6"],"artplayerplugindanmuku":["24.6"],"visible":["24.6"],"来自服务器的弹幕":["24.6"],"xml":["24.8"],"弹幕":["24.8"],"文件":["24.8"],"data":["24.9","24.11","24.12","24.13","24.14","24.18"],"通过方法":["24.10","24.12","24.13"],"进行隐藏或者显示弹幕":["24.10"],"通过属性":["24.11"],"判断当前弹幕是隐藏或者显示":["24.11"],"发送一条实时弹幕":["24.12"],"libs":["24.12","24.13","24.14","24.18"],"实时改变弹幕配置":["24.13"],"uncompiled":["24.13","24.14","24.18"],"通过":["24.14"],"方法可以重载弹幕库":["24.14"],"或者切换新弹幕库":["24.14"],"或者追加新的弹幕库":["24.14"],"用于清空当前显示的弹幕":["24.15"],"在初始化弹幕插件的时候":["24.16"],"是可以指定弹幕发射器的挂载位置的":["24.16"],"默认是挂载在控制栏的中部":["24.16"],"你也可以把它挂载在播放器以外的地方":["24.16"],"当播放器全屏的时候":["24.16"],"发射器会自动回到控制栏的中部":["24.16"],"假如你挂载的地方是亮色的话":["24.16"],"建议把":["24.16"],"用于获取当前弹幕配置":["24.17"],"鉴于捆绑的多国语言越来越多":["25.0"],"从":["25.0"],"默认语言有":["25.1"],"en":["25.1"],"zh":["25.1"],"打包前的语言文件存放于":["25.2"],"欢迎来添加你的语言":["25.2"],"打包后的语言文件存放于":["25.2"],"dist":["25.2"],"播放器挂载的":["26.1"],"视频源地址":["26.2"],"播放器的唯一标识":["26.3"],"构造函数接受一个函数作为第二个参数":["26.4"],"播放器初始化成功且视频可以播放时触发":["26.4"],"ready":["26.4"],"视频的海报":["26.5"],"是否自动播放":["26.10"],"是否使用快捷键":["26.19"],"是否开启播放器":["26.22"],"字幕时间偏移":["26.25"],"是否使用":["26.27"],"初始化自定义的":["26.29","26.30","26.31","26.35"],"层":["26.29"],"设置面板":["26.30"],"右键菜单":["26.31"],"初始化自定义的底部":["26.32"],"控制栏":["26.32"],"是否在底部控制栏里显示":["26.33"],"画质选择":["26.33"],"列表":["26.33"],"在进度条上显示":["26.34"],"高亮信息":["26.34"],"插件":["26.35"],"在进度条上设置":["26.36"],"预览图":["26.36"],"设置视频的字幕":["26.37"],"支持字幕格式":["26.37"],"ass":["26.37"],"用于替换默认图标":["26.39"],"支持":["26.39"],"用于指明视频的格式":["26.40"],"需要配合":["26.40"],"customtype":["26.40"],"通过视频的":["26.41"],"自定义":["26.43"],"配置":["26.43"],"该配置会和自带的":["26.43"],"进行深度合并":["26.43"],"新增你的语言":["26.43"],"是否使用自动":["26.47"],"回放功能":["26.47"],"用于改变内置的css变量":["26.50"]},{"0":["3.25","3.26","5.9","13.28","21.0","24.5","25.0"],"1":["3.26","3.28","5.9","5.38","5.40","13.28","20.11","21.0","23.10","25.0"],"2":["3.28","20.8","20.12","23.8","23.12","23.13"],"3":["3.23","13.29","20.9","22.2","23.10","26.2"],"4":["6.2","13.29","16.2","21.3","22.47","23.13","26.43"],"5":["3.12","3.14","3.25","3.27","13.28","20.12","21.0","22.29","22.30","23.12","23.13","25.0","26.29","26.30"],"6":["2.0","6.3","7.3","12.0","16.3","17.3","20.12","23.12"],"7":["26.7"],"9":["3.29","9.7","19.7","21.3","26.43"],"10":["2.2","3.11","7.2","17.2"],"11":["2.28"],"13":["6.2","6.3","16.2","16.3"],"14":["9.7","19.7"],"15":["14.0"],"16":["3.29","13.29"],"19":["5.45"],"21":["6.4","6.5","7.3","7.4","8.4","16.4","16.5","17.3","17.4","18.4"],"22":["8.2","8.3","9.8","18.2","18.3","19.8"],"23":["22.29","26.29"],"24":["6.5","16.5"],"25":["3.28","24.5"],"29":["5.45","8.5","18.5"],"34":["22.30","26.30"],"35":["3.7"],"40":["7.5","17.5"],"50":["3.10"],"75":["13.28"],"200":["3.6","3.8","3.9","3.21"],"300":["3.17"],"1000":["3.15","3.22","3.24"],"2000":["3.4"],"3000":["3.13","3.16"],"code":["0.1","0.2","0.4","0.5","0.6","0.7","0.13","0.14","0.15","0.16","0.17","1.1","1.6","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","3.5","3.6","3.7","3.17","3.29","3.30","5.1","5.2","5.3","5.12","5.14","5.16","5.17","5.20","5.21","5.22","5.23","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.44","5.45","5.46","9.3","10.1","10.2","10.5","12.0","12.20","12.28","12.29","12.30","12.31","15.2","15.12","15.16","15.20","15.22","15.37","15.44","15.45","19.3","22.1","22.10","22.19","22.30","22.31","22.32","22.35","22.43","22.47","24.10","24.16","25.2","26.1","26.4","26.10","26.19","26.30","26.31","26.32","26.35","26.39","26.43","26.47","26.50"],"js":["0.2","0.4","0.14","0.17","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.45","6.2","6.3","6.4","7.4","8.4","9.3","9.6","9.7","10.2","12.0","15.16","16.2","16.3","16.4","17.4","18.4","19.3","19.7","21.3","22.2","22.10","22.19","22.29","22.30","22.47","24.4","24.6","24.11","24.12","24.13","24.14","25.1","26.2","26.4","26.29","26.30","26.32","26.43"],"var":["0.2","0.4","2.0","4.0","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.7","9.8","9.9","10.2","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.3","19.4","19.7","19.8","19.9","21.3","21.4","22.2","22.29","22.30","24.13","24.14","24.18","25.3","25.4","26.2","26.29","26.30"],"proxy":["0.3"],"方法用于代理":["0.3"],"hover":["0.3"],"方法用于代理自定义的":["0.3"],"div":["0.3","0.6","0.8","0.9","0.10","0.13","0.15","0.16","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","2.41","3.1","3.2","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.30","3.32","3.33","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.27","5.30","5.31","5.32","5.34","5.35","5.36","5.39","5.41","5.43","5.44","5.46","5.47","9.1","9.3","10.5","12.0","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.16","12.17","12.18","12.19","12.20","12.22","12.24","12.26","12.27","12.28","12.29","12.30","12.31","12.33","12.34","12.38","12.39","12.40","12.41","15.1","15.2","15.3","15.12","15.16","15.20","15.22","15.28","15.33","15.37","15.44","15.45","15.46","15.47","19.3","20.4","22.1","22.7","22.10","22.19","22.31","22.32","22.35","22.39","22.43","22.47","23.4","24.8","24.16","26.1","26.3","26.4","26.5","26.7","26.8","26.9","26.10","26.13","26.17","26.19","26.21","26.26","26.35","26.39","26.43","26.45","26.46","26.47","26.50"],"classname":["0.4","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.14","0.15","0.16","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.3","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.16","3.17","3.18","3.19","3.20","3.22","3.23","3.26","3.27","3.29","3.30","3.32","3.33","5.1","5.2","5.3","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.43","5.44","5.46","5.47","9.1","9.3","10.1","10.5","12.0","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.17","12.18","12.20","12.22","12.24","12.26","12.28","12.29","12.30","12.31","12.40","12.41","15.1","15.2","15.3","15.12","15.16","15.20","15.22","15.28","15.33","15.37","15.44","15.45","15.46","19.3","22.1","22.7","22.10","22.19","22.31","22.32","22.35","22.43","22.47","24.8","24.10","24.16","26.1","26.3","26.4","26.5","26.7","26.9","26.10","26.13","26.17","26.19","26.31","26.32","26.35","26.39","26.43","26.45","26.46","26.47","26.50"],"run":["0.4","0.5","0.6","0.7","0.10","0.13","0.14","0.15","0.16","0.17","1.1","1.6","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.29","3.30","3.32","5.1","5.2","5.3","5.8","5.10","5.12","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.44","5.46","5.47","9.1","9.3","10.1","10.2","10.5","12.0","12.2","12.6","12.7","12.8","12.10","12.20","12.22","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.12","15.16","15.20","15.22","15.28","15.37","15.44","15.45","19.3","22.1","22.7","22.10","22.19","22.30","22.31","22.32","22.35","22.43","22.47","24.8","24.10","24.16","26.1","26.4","26.5","26.7","26.10","26.19","26.31","26.32","26.35","26.39","26.43","26.47","26.50"],"art":["0.4","0.12","2.0","5.11","5.13","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.5","9.3","9.4","9.7","9.8","9.9","10.2","12.0","14.0","15.11","15.13","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.5","19.3","19.4","19.7","19.8","19.9","22.2","23.10","24.14","24.18","25.3","25.4","26.2"],"new":["0.4","2.0","4.0","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.3","9.3","9.4","9.7","9.8","9.9","10.2","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.3","19.4","19.7","19.8","19.9","22.2","24.14","24.18","25.3","26.2"],"artplayer":["0.4","2.0","4.0","5.5","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.4","9.8","9.9","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.4","19.8","19.9","20.3","21.4","22.2","23.3","23.4","23.6","23.9","23.10","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","26.2"],"container":["0.4","2.0","4.0","6.4","6.5","7.3","7.5","9.3","9.4","9.8","9.9","12.0","14.0","16.4","16.5","17.3","17.5","19.4","19.8","19.9","20.4","20.5","22.2","22.11","23.5","24.18","26.11"],"方法用于更新":["0.6"],"对象":["0.6"],"方法用于动态更新层":["0.8"],"show":["0.8","0.9","0.10","0.12","0.16","10.7"],"属性用于设置是否显示全部层":["0.8"],"toggle":["0.8","0.9","0.10","0.16","22.18"],"方法用于切换是否显示全部层":["0.8"],"方法用于动态更新控制器":["0.9"],"属性用于设置是否显示全部控制器":["0.9"],"方法用于切换是否显示全部控制器":["0.9"],"属性用于设置是否显示全部菜单":["0.10"],"方法用于切换是否显示全部菜单":["0.10"],"方法设置当前字幕地址和选项":["0.11"],"texttrack":["0.11"],"获取当前字幕轨":["0.11"],"activecues":["0.11"],"获取当前活跃的字幕列表":["0.11"],"cues":["0.11"],"通过":["0.12"],"控制面板的显示与隐藏":["0.12"],"触发的事件名为":["0.12"],"属性用于切换是否显示加载层":["0.13"],"属性用于切换是否显示遮罩层":["0.15"],"属性用于设置是否显示全部设置项":["0.16"],"方法用于切换是否显示全部设置项":["0.16"],"字符串":["1.11"],"app":["2.0","4.0","7.2","7.5","9.3","9.4","9.8","9.9","12.0","14.0","17.2","17.5","19.4","19.8","19.9","22.2","24.18"],"url":["2.0","4.0","5.11","7.2","7.5","9.4","9.9","12.0","14.0","15.11","15.13","17.2","17.5","19.4","19.9","22.36","22.37","24.18","26.36","26.37"],"assets":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.4","9.9","12.0","14.0","17.2","18.2","18.3","18.4","18.5","19.4","19.9","22.2","22.29","24.18","26.29"],"sample":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.4","9.9","12.0","14.0","17.2","18.2","18.3","18.4","18.5","19.4","19.9","22.29","24.18","26.29"],"mp4":["2.0","4.0","7.2","12.0","14.0","17.2","24.18"],"on":["2.0","4.0","12.5","12.16","14.0","19.6","22.21","22.45"],"canplay":["2.0"],"事件":["2.41"],"浏览器可以播放媒体文件了":["2.42"],"浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束":["2.43"],"offlineaudiocontext":["2.44","12.44"],"duration":["2.45","13.12","13.13"],"媒体内容变为空":["2.46"],"例如":["2.46"],"视频停止播放":["2.47"],"获取媒体数据时出错":["2.48"],"media":["2.49","12.59","13.34"],"已加载元数据":["2.50"],"播放已暂停":["2.51"],"播放已开始":["2.52"],"由于缺乏数据而暂停或延迟后":["2.53"],"在浏览器加载资源时周期性触发":["2.54"],"播放速率发生变化":["2.55"],"跳帧":["2.56","2.57"],"用户代理":["2.58"],"媒体数据加载已暂停":["2.59"],"currenttime":["2.60"],"音量发生变化":["2.61"],"由于暂时缺少数据":["2.62"],"可以打印出视频全部的内置事件":["3.1"],"默认关闭":["3.1"],"默认为":["3.4","3.8","3.9","3.10","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.27","3.31","3.34","5.4"],"单位为毫秒":["3.15","3.21","3.24"],"true":["3.18","3.19","3.31","3.32","3.34","5.4","26.21","26.28","26.45"],"false":["3.20","3.33","13.33","26.8","26.9","26.13","26.18","26.20","26.23","26.24","26.26","26.46","26.48"],"是否把播放器挂在在":["3.31"],"元素下":["3.31"],"目前主要用于进度条的平滑效果":["3.33"],"属性并调用":["3.34"],"load":["3.34","5.5","13.34","15.5"],"以主动释放媒体资源":["3.34"],"开启后可以在单页应用或频繁创建":["3.34"],"销毁播放器的场景下":["3.34"],"dosomething":["4.0","14.0"],"video":["4.0","5.34","5.38","5.40","7.2","9.4","9.9","10.12","12.11","14.0","15.1","15.2","15.7","15.8","15.9","15.10","15.14","15.15","15.17","15.23","15.25","15.27","15.33","15.34","15.35","15.38","15.40","17.2","19.4","19.9","22.4","22.13","22.14","22.15","22.16","22.17","24.18","26.41"],"plugins":["4.0"],"ready":["4.0","12.53","14.0","22.4"],"可以在实例化之后再加载插件的函数":["4.0"],"销毁播放器":["5.4"],"接受一个参数表示是否销毁后同时移除播放器的":["5.4"],"html":["5.4","20.12","22.39","23.12","26.27","26.33"],"常用于在单页应用中手动释放媒体资源或重新初始化视频标签":["5.5"],"注意":["5.5"],"全局配置":["5.5"],"remove":["5.5","10.8","10.9","10.10","10.14","10.16"],"视频时间跳转":["5.6"],"单位秒":["5.6","5.7","5.8","26.34"],"视频时间快进":["5.7"],"视频时间快退":["5.8"],"设置和获取视频音量":["5.9"],"范围在":["5.9","26.25"],"string":["5.10","6.1","7.1","8.1","11.11","16.1","17.1","18.1","22.36","22.37","26.33","26.34","26.36","26.37"],"设置和获取视频地址":["5.10"],"类似":["5.11","5.12","5.13","5.15","5.42"],"但会执行一些优化操作":["5.11","5.12"],"switchurl":["5.13","15.13"],"但会带上之前的播放进度":["5.13"],"设置和获取视频是否静音":["5.14"],"设置和获取视频当前时间":["5.15"],"设置时间时和":["5.15"],"seek":["5.15"],"但它不会触发额外的事件":["5.15"],"返回的是一个":["5.18","5.19"],"promise":["5.18","5.19"],"设置和获取播放器窗口全屏":["5.20"],"设置和获取播放器网页全屏":["5.21"],"设置和获取播放器画中画模式":["5.22"],"只有在视频播放前才能看到海报效果":["5.23"],"boolean":["5.24","6.1","8.1","9.5","19.5","26.33"],"设置和获取播放器迷你模式":["5.24"],"获取视频是否正在播放中":["5.25"],"支持":["5.26","5.30"],"standard":["5.26","15.26"],"正常":["5.26"],"mini":["5.26","22.12"],"迷你窗":["5.26"],"pip":["5.26"],"type":["5.29","20.9","23.9","23.10"],"getter":["5.29"],"这些属性是对":["5.29"],"rect":["5.29","15.29"],"的快捷访问":["5.29"],"设置和获取播放器翻转":["5.30"],"normal":["5.30","13.30"],"horizontal":["5.30","13.30"],"vertical":["5.30"],"设置和获取播放器播放速度":["5.31"],"设置和获取播放器长宽比":["5.32"],"元素的属性":["5.34"],"动态获取和设置视频类型":["5.35"],"动态获取和设置播放器主题颜色":["5.36"],"常配合":["5.38","5.40"],"timeupdate":["5.38","5.40"],"事件使用":["5.38","5.40"],"通常与":["5.39"],"loaded":["5.39"],"一起使用":["5.39","26.40"],"用于展示缓冲进度细节":["5.39"],"和":["5.41","26.6","26.14","26.15","26.16"],"removeeventlistener":["5.41","15.41"],"当使用":["5.41"],"来处理事件":["5.41"],"播放器销毁时也会自动销毁该事件":["5.41"],"document":["5.42","12.41","15.42"],"queryselector":["5.42","15.42"],"但被查询的对象局限于当前播放器内":["5.42"],"可以避免同类名的错误":["5.42"],"元素":["5.43"],"动态设置缩略图":["5.46"],"number":["5.47","9.2","9.3","19.3","22.34","22.36","26.34","26.36"],"动态设置字幕偏移":["5.47"],"是否禁用组件":["6.1","7.1","8.1"],"name":["6.1","7.1","7.2","8.1","14.0","16.1","17.1","17.2","18.1","22.37","26.37"],"组件唯一名称":["7.1"],"用于标记类名":["7.1"],"index":["7.1","7.2","17.1","17.2","24.6","24.9","24.11","24.12","24.13","24.14"],"controls":["7.2","17.2"],"your":["7.2","17.2","21.2","22.43"],"button":["7.2","17.2","22.18","22.44","22.49"],"img":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5","22.29","26.29"],"layer":["8.2","8.3","8.4","8.5","10.8","12.35","12.36","18.2","18.3","18.4","18.5"],"png":["8.2","8.3","8.5","18.2","18.3","18.5"],"aspectratio":["9.1"],"subtitleoffset":["9.1"],"icon":["9.2","19.2","19.5"],"元素的图标":["9.2","9.5","9.6"],"onclick":["9.2","19.2"],"function":["9.2","9.5","9.6","11.8","11.9","11.10","14.0","19.2","19.6","20.5","23.5","24.6"],"元素点击事件":["9.2"],"width":["9.2","19.3"],"列表宽度":["9.3"],"tooltip":["9.3","9.5","9.6","19.3"],"提示文本":["9.3","9.6"],"switch":["9.5","19.5"],"按钮默认状态":["9.5"],"onswitch":["9.5"],"按钮切换事件":["9.5"],"range":["9.6","15.9","22.25"],"array":["9.6","19.6"],"默认状态数组":["9.6"],"onrange":["9.6","19.6"],"完成时触发的事件":["9.6"],"onchange":["9.6"],"变化时触发的事件":["9.6"],"here":["10.0"],"following":["10.3"],"methods":["10.3"],"to":["10.3","10.13","10.14","10.15","13.0","15.5","15.6","15.11","15.13","15.29","15.41","15.42","16.1","18.1","20.13","21.2","22.4","22.9","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.28","22.38","22.41","22.44","22.45","22.46","22.48","22.49"],"handle":["10.3","15.41"],"event":["10.3","13.8","13.9","13.10","15.41","19.2","19.3","19.6"],"will":["10.3"],"be":["10.3","11.1"],"automatically":["10.3","12.19","15.33","15.41","22.38"],"destroyed":["10.3","12.6"],"is":["10.3","10.13","10.15","12.1","12.3","12.5","12.6","12.9","12.10","12.32","12.34","12.35","12.36","12.37","12.39","12.53","13.3","13.5","13.28","13.29","13.30","15.14","15.23","15.25","15.41","22.1","22.4","22.40"],"a":["10.4","10.7","10.8","10.9","12.26","12.27","12.56","12.57","13.15","15.4","15.6","15.18","15.19","22.44","22.46","22.51"],"value":["10.4","10.6"],"get":["10.4","15.9","15.10"],"del":["10.4"],"the":["10.5","12.5","12.11","12.28","12.41","12.49","12.55","12.60","12.61","13.0","13.21","13.23","13.25","13.31","13.32","15.7","15.8","15.9","15.10","15.14","15.15","15.17","15.21","15.23","15.24","15.25","15.26","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.42","15.43","16.1","18.1","19.1","20.10","22.14","22.15","22.16","22.17","22.18","22.20","22.21","22.23","22.24","22.42","22.43","22.48","22.49"],"player":["10.5","11.6","12.5","12.12","12.13","12.28","13.2","13.31","13.32","13.34","15.4","15.20","15.21","15.22","15.24","15.26","15.30","15.31","15.32","15.36","15.43","20.5","22.1","22.3","22.4","22.6","22.7","22.11","22.12","22.22","22.23","22.24","22.48","23.5"],"an":["10.6","15.17"],"update":["10.6","10.10","10.16"],"has":["10.7","12.47","15.38","15.39","15.40"],"property":["10.7","10.13","10.15","11.1","15.33","22.33","22.34","22.36","22.37"],"for":["10.7","10.17","11.6","11.7","11.8","11.10","11.12","12.1","12.46","13.4","13.10","13.11","13.12","13.13","13.15","13.16","13.17","13.21","13.22","13.23","13.24","13.25","13.26","13.27","17.1","20.11","22.3","22.22"],"displaying":["10.7"],"control":["10.9","22.17","22.33"],"items":["10.10","10.16","13.6","13.7"],"returns":["10.11"],"current":["10.11","10.12","15.5","15.15","15.17","15.18","15.19","15.26"],"style":["10.11"],"method":["10.11","10.17"],"of":["10.11","10.12","11.2","11.3","11.4","13.14","15.15","15.17","15.18","15.19","15.34","20.11","22.7"],"status":["10.12"],"and":["10.12","12.2","15.3","15.5","15.9","15.10","15.14","15.21","15.24","15.28","15.30","15.31","15.32","15.33","15.34","15.35","15.36","15.41","20.12","22.4","22.39","22.41"],"such":["10.12","20.10","22.22"],"as":["10.12","22.22"],"used":["10.13","10.14","10.15","15.5"],"set":["10.13","10.15","15.10","15.33","15.46","15.47"],"whether":["10.13","10.15","13.19","13.20","15.4","15.14","15.25","22.9","22.13","22.28"],"display":["10.13","10.15","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.42","22.44","22.49"],"hotkeys":["10.14"],"only":["10.17","15.23","22.5","22.26"],"add":["10.17","21.2","22.43","22.46"],"dynamically":["10.17","15.46","15.47"],"adding":["10.17"],"refer":["11.0","13.0"],"this":["11.1"],"can":["11.1","12.42","13.1","15.33","20.10","20.11","22.51"],"useful":["11.1","22.27"],"information":["11.2","13.22","15.28"],"environment":["11.3"],"variables":["11.3","15.44","22.50"],"time":["11.4","12.27","12.60","15.6","15.7","15.8","15.15","22.34","26.34"],"default":["11.5","11.12","13.3","13.8","13.9","13.17","13.26","13.28","13.29","13.30","19.5","19.6","20.5","23.5"],"configuration":["11.5"],"utility":["11.6","11.10"],"functions":["11.6"],"validation":["11.7","11.9"],"schema":["11.7"],"constructor":["11.8"],"required":["11.11"],"options":["11.12"],"first":["12.1"],"becomes":["12.2"],"playable":["12.2"],"paused":["12.3"],"starts":["12.4"],"playing":["12.4","12.42"],"pressed":["12.5"],"gains":["12.7"],"loses":["12.8"],"focus":["12.8"],"double":["12.9","13.17","13.18","13.19"],"clicked":["12.9","12.10"],"while":["12.11"],"loading":["12.11"],"or":["12.12","12.15","12.21","12.23","12.24","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"leaves":["12.12","12.15"],"moves":["12.13"],"over":["12.13"],"s":["12.14","15.20","15.21","15.22","15.26","15.31","15.32","15.36","15.43","22.6","22.11","22.41"],"dimensions":["12.14","15.28","22.11"],"change":["12.14"],"enters":["12.15","22.12"],"viewport":["12.15"],"changes":["12.16","12.17","12.40"],"mobile":["12.16"],"devices":["12.16"],"aspect":["12.17","15.32","22.16"],"ratio":["12.17","22.16"],"adjusts":["12.18","12.19","22.38"],"its":["12.18","12.19","15.27"],"height":["12.18","15.33"],"size":["12.19","15.27","22.11"],"flipped":["12.20"],"exits":["12.21","12.23","12.24","12.25"],"window":["12.21","15.20","22.23"],"mode":["12.21","12.23","12.24","13.18","15.22","22.8","22.12","22.27","22.28","24.5"],"error":["12.22"],"occurs":["12.22"],"web":["12.23","15.21"],"fullscreen":["12.23","22.48"],"picture":["12.25","15.22","22.20"],"in":["12.25","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.16","13.21","13.22","13.24","13.27","15.6","15.8","15.22","15.39","22.17","22.20","22.33","22.38","22.40","22.43","22.50"],"captures":["12.26"],"performs":["12.27","15.12"],"panel":["12.32","13.5","13.6","13.7","13.22","19.1"],"shown":["12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"hidden":["12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"are":["12.33","12.38","21.1"],"menu":["12.37","13.3","22.31"],"state":["12.40","15.20","15.30","19.5","19.6"],"from":["12.41","15.38","15.40","20.12","21.0","23.9","25.2"],"start":["12.42"],"browser":["12.43"],"estimates":["12.43"],"triggered":["12.45","19.6","22.4"],"become":["12.46"],"empty":["12.46"],"example":["12.46"],"playback":["12.47","12.51","12.52","12.62","15.15","15.31","22.15"],"occurred":["12.48"],"metadata":["12.50","26.38"],"periodically":["12.54"],"user":["12.58"],"agent":["12.58"],"top":["13.0"],"which":["13.1","22.5","22.8"],"print":["13.1","13.32"],"all":["13.1"],"built":["13.1","22.43","22.50"],"context":["13.3"],"notification":["13.4"],"messages":["13.4"],"milliseconds":["13.4","13.8","13.9","13.16","13.17","13.21","13.22","13.24"],"settings":["13.5","13.6","13.7","19.1"],"pixels":["13.5","13.10"],"view":["13.10"],"count":["13.11"],"feature":["13.12","13.13","22.47"],"automatic":["13.14","13.15"],"reconnection":["13.14","13.15"],"attempts":["13.14"],"when":["13.14","13.15","13.25","15.11","15.12","15.41","22.4","22.5","22.12","22.22"],"connection":["13.15"],"auto":["13.16","22.38"],"hiding":["13.16"],"click":["13.17","13.18","13.19","19.2","19.3"],"events":["13.17","22.45"],"toggles":["13.18","13.19","13.20"],"single":["13.20"],"delay":["13.21","13.24"],"speed":["13.23","13.25"],"multiplier":["13.23","13.25"],"activating":["13.24"],"seeking":["13.25"],"keyboard":["13.26","13.27"],"shortcuts":["13.26","13.27"],"seconds":["13.27","15.8","15.39"],"rates":["13.28"],"ratios":["13.29"],"modes":["13.30"],"mount":["13.31","22.27"],"under":["13.31"],"defaults":["13.32","13.33","13.34"],"requestanimationframe":["13.33"],"currently":["13.33","15.25","22.3","22.6","22.42"],"mainly":["13.33"],"call":["13.34"],"actively":["13.34"],"release":["13.34","15.5"],"resources":["13.34","21.0"],"destroying":["13.34"],"myplugin":["14.0"],"console":["14.0"],"info":["14.0"],"return":["14.0","22.51"],"something":["14.0"],"pause":["15.3"],"accepts":["15.4"],"indicating":["15.4"],"src":["15.5"],"calls":["15.5"],"once":["15.5"],"commonly":["15.5"],"manually":["15.5","20.10"],"specific":["15.6"],"fast":["15.7"],"similar":["15.11","15.13","15.42"],"setting":["15.11","15.12","15.15"],"but":["15.12","15.13","15.42"],"some":["15.12"],"optimization":["15.12"],"operations":["15.12"],"quality":["15.13"],"gets":["15.14","15.21","15.24","15.30","15.31","15.32","15.35","15.36"],"frame":["15.17"],"screenshot":["15.18","15.19"],"effect":["15.23","22.22"],"sets":["15.24","15.34","15.35","15.36"],"supported":["15.26","15.30"],"values":["15.26"],"adapts":["15.27"],"coordinate":["15.28"],"these":["15.29"],"properties":["15.29"],"provide":["15.29"],"shortcut":["15.29"],"access":["15.29"],"calculate":["15.33"],"attributes":["15.34"],"element":["15.34"],"that":["15.38","15.39","15.40","22.26"],"been":["15.38","15.39","15.40"],"buffered":["15.38","15.39"],"ranging":["15.38","15.40"],"using":["15.41"],"search":["15.42"],"css":["15.44","17.1","22.50"],"available":["15.45"],"levels":["15.45"],"subtitle":["15.47"],"offset":["15.47","22.25"],"component":["16.1","18.1"],"unique":["16.1","17.1","18.1"],"class":["17.1"],"identification":["17.1"],"it":["19.1","22.38"],"comes":["19.1"],"with":["19.1","22.40","22.43"],"four":["19.1"],"text":["19.3","26.34"],"item":["19.5"],"bash":["20.1","23.1"],"npm":["20.1","23.1","24.2"],"jsdelivr":["20.2","23.2"],"net":["20.2","23.2","24.3"],"https":["20.2","23.2","24.3"],"title":["20.3","23.3"],"demo":["20.3"],"meta":["20.3"],"charset":["20.3"],"utf":["20.3"],"template":["20.4","23.4"],"ref":["20.4"],"export":["20.5","23.5"],"option":["20.5","23.5"],"getinstance":["20.5","23.5"],"rest":["20.5","23.5"],"const":["20.5","23.5"],"d":["20.6"],"import":["20.8","20.9","20.10","23.8","23.10","25.2"],"ts":["20.9","26.40"],"cases":["20.10"],"you":["20.10","20.11","20.13","22.27"],"types":["20.10"],"variable":["20.10"],"version":["20.11","21.0","23.11"],"chrome":["20.11"],"last":["20.11"],"starting":["20.12","21.0"],"not":["20.13"],"entirely":["20.13"],"accurate":["20.13"],"sometimes":["20.13"],"may":["20.13"],"want":["20.13","22.27"],"adjust":["20.13"],"bundled":["21.0"],"multilingual":["21.0"],"en":["21.1","26.42"],"zh":["21.1","21.4","25.4","26.42"],"cn":["21.1","25.1"],"contributions":["21.2"],"welcome":["21.2"],"after":["21.2"],"i18n":["21.4","25.4"],"tw":["21.4","25.4"],"mounted":["22.1"],"identifier":["22.3"],"successfully":["22.4"],"initialized":["22.4"],"play":["22.4"],"image":["22.5","22.36"],"appears":["22.5","22.25","22.26"],"color":["22.6","24.5"],"live":["22.8"],"streaming":["22.8"],"hides":["22.8"],"mute":["22.9"],"by":["22.9","22.40"],"fill":["22.11"],"entire":["22.11"],"enable":["22.13","22.45"],"functionality":["22.14","22.17"],"rate":["22.15"],"bottom":["22.17","22.33"],"multiple":["22.21"],"players":["22.21"],"exist":["22.21"],"simultaneously":["22.21"],"ui":["22.22","26.22"],"enabled":["22.22"],"overlays":["22.22"],"webpage":["22.24"],"within":["22.25"],"5s":["22.25","26.25"],"progress":["22.26","22.34"],"bar":["22.26","22.32","22.33","22.34"],"if":["22.27"],"pre":["22.27"],"render":["22.27"],"use":["22.28"],"list":["22.33"],"description":["22.33","22.34","22.36","22.37"],"thumbnail":["22.36"],"ass":["22.37"],"safari":["22.38","26.38"],"supports":["22.39"],"both":["22.39"],"strings":["22.39"],"htmlelement":["22.39","26.39"],"conjunction":["22.40"],"customtype":["22.40"],"determined":["22.40"],"suffix":["22.40"],"delegates":["22.41"],"decoding":["22.41"],"third":["22.41","22.51"],"tolowercase":["22.42","26.42"],"language":["22.43"],"long":["22.46"],"press":["22.46"],"rotate":["22.48"],"during":["22.48"],"modify":["22.50"],"party":["22.51"],"htmlcanvaselement":["22.51","26.51"],"head":["23.3"],"useref":["23.5"],"let":["23.10"],"null":["23.10"],"参数":["23.10"],"对于古老的浏览器":["23.11"],"可以使用":["23.11"],"legacy":["23.11"],"文件":["23.11"],"从":["23.12"],"开始":["23.12"],"所以在":["23.13"],"开始新增了一个":["23.13"],"install":["24.2"],"就可以发送一个弹幕":["24.4"],"其余都是非必要参数":["24.4"],"弹幕文本":["24.4"],"弹幕上下边距":["24.5"],"支持像素数字和百分比":["24.5"],"opacity":["24.5"],"弹幕透明度":["24.5"],"ffffff":["24.5"],"默认弹幕颜色":["24.5"],"可以被单独弹幕项覆盖":["24.5"],"data":["24.6","24.7","24.10","24.15","24.17"],"libs":["24.6","24.7","24.9","24.10","24.11","24.15","24.17"],"uncompiled":["24.6","24.7","24.9","24.10","24.11","24.12","24.15","24.17"],"plugin":["24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17"],"danmuku":["24.6","24.9","24.11","24.12","24.13","24.14","24.15","24.17"],"保存到数据库":["24.6"],"savedanmu":["24.6"],"bilibili":["24.8"],"网站的弹幕格式一致":["24.8"],"theme":["24.16"],"设置成":["24.16"],"light":["24.16"],"否则会看不清":["24.16"],"无需手动导入":["25.1"],"group":["25.2"],"id":["25.2"],"容器":["26.1"],"目前只用于记忆播放":["26.3"],"autoplayback":["26.3"],"事件一样":["26.4"],"只会出现在播放器初始化且未播放的状态下":["26.5"],"播放器主题颜色":["26.6"],"目前用于":["26.6"],"进度条":["26.6"],"播放器的默认音量":["26.7"],"使用直播模式":["26.8"],"会隐藏进度条和播放时间":["26.8"],"是否默认静音":["26.9"],"播放器的尺寸默认会填充整个":["26.11"],"容器尺寸":["26.11"],"所以经常出现黑边":["26.11"],"该值能自动调整播放器尺寸以隐藏黑边":["26.11"],"当播放器滚动到浏览器视口以外时":["26.12"],"自动进入":["26.12"],"迷你播放":["26.12"],"模式":["26.12","26.28"],"是否循环播放":["26.13"],"是否显示视频翻转功能":["26.14"],"目前只出现在":["26.14"],"设置面板":["26.14","26.15","26.16","26.18","26.22","26.25"],"右键菜单":["26.14","26.15","26.16","26.22"],"是否显示视频播放速度功能":["26.15"],"会出现在":["26.15","26.16"],"是否显示视频长宽比功能":["26.16"],"是否在底部控制栏里显示":["26.17","26.18","26.20"],"视频截图":["26.17"],"功能":["26.17"],"的开关按钮":["26.18","26.20"],"画中画":["26.20"],"假如页面里同时存在多个播放器":["26.21"],"是否只能让一个播放器播放":["26.21"],"的背景虚化效果":["26.22"],"开启后":["26.22"],"是否在底部控制栏里显示播放器":["26.23","26.24"],"窗口全屏":["26.23"],"按钮":["26.23","26.24","26.49"],"网页全屏":["26.24"],"出现在":["26.25"],"迷你进度条":["26.26"],"只在播放器失去焦点后且正在播放时出现":["26.26"],"挂载模式":["26.27"],"假如你希望在播放器挂载前":["26.27"],"就提前渲染好播放器所需的":["26.27"],"时有用":["26.27"],"你可以通过":["26.27"],"在移动端是否使用":["26.28"],"类型":["26.33"],"描述":["26.33","26.34","26.37"],"默认画质":["26.33"],"画质名字":["26.33"],"高亮时间":["26.34"],"高亮文本":["26.34"],"预览图地址":["26.36"],"预览图数量":["26.36"],"column":["26.36"],"字幕名字":["26.37"],"字幕地址":["26.37"],"字幕类型":["26.37"],"可选":["26.37"],"preload":["26.38"],"中会自动调整为":["26.38"],"字符串和":["26.39"],"默认视频的格式就是视频地址的后缀":["26.40"],"如":["26.40"],"m3u8":["26.40"],"mkv":["26.40"],"但有时候视频地地址没有正确的后缀":["26.40"],"进行匹配":["26.41"],"把视频解码权交给第三方程序进行处理":["26.41"],"处理的函数能接收三个参数":["26.41"],"视频":["26.41"],"dom":["26.41"],"默认显示语言":["26.42"],"目前支持":["26.42"],"是否在移动端显示一个":["26.44"],"锁定按钮":["26.44"],"用于隐藏底部":["26.44"],"控制栏":["26.44"],"是否在移动端启用视频元素上的手势事件":["26.45"],"是否在移动端添加长按视频快进功能":["26.46"],"是否在移动端的网页全屏时":["26.48"],"根据视频尺寸和视口尺寸":["26.48"],"旋转播放器":["26.48"],"是否显示":["26.49"],"当前只有部分浏览器支持该功能":["26.49"],"函数可以返回一个第三方的":["26.51"],"或者":["26.51"],"htmlvideoelement":["26.51"],"例如可以代理一个已经存在的":["26.51"]},{"0":["9.6","13.26","15.9","15.38","15.40"],"1":["9.6","13.26","15.9","15.38","15.40","19.6","20.10"],"2":["13.28","22.1","24.5","26.1"],"3":["13.23","20.7","20.10","23.7"],"4":["22.7","22.10","22.19","22.31","22.32","22.39","22.43","25.1","26.10","26.19","26.31","26.32","26.39","26.47","26.50"],"5":["9.6","13.12","13.27","19.6","22.47","26.47"],"6":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40"],"7":["2.19","2.21","2.23","2.25","2.26","5.16","5.28","5.33","15.16","15.28","15.33","22.4","26.4","26.39"],"8":["2.17","2.20","5.1","5.14","5.21","5.31","5.32","5.34","5.35","5.36","5.44","12.20","15.44","20.3"],"9":["2.29","2.30","2.31","5.12","5.20","5.22","5.23","5.37","12.29","12.30","12.31","13.29","15.12","15.20","15.22","15.37","22.4","22.43","26.4"],"10":["2.6","2.18","2.24","7.5","9.6","12.2","13.11","17.5","24.4"],"11":["5.2","5.3","5.21","5.33","12.28","15.2","15.33","23.11"],"12":["22.31","26.31"],"15":["22.35","26.35"],"16":["22.32","26.32"],"17":["4.0","14.0"],"19":["15.45"],"25":["13.28"],"29":["15.45"],"35":["13.7"],"50":["13.10"],"200":["13.6","13.8","13.9","13.21"],"250":["9.3","13.5","19.3"],"300":["13.17"],"1000":["13.22","24.6"],"2000":["13.4"],"3000":["13.13"],"是指挂载在":["0.0","1.0","5.0"],"js":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.15","0.16","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.25","5.27","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.41","5.44","5.46","5.47","9.1","9.5","10.1","10.5","10.6","10.14","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.12","15.20","15.22","15.28","15.33","15.37","15.44","15.45","15.46","19.6","21.0","22.1","22.4","22.7","22.31","22.32","22.35","22.39","22.43","24.7","24.9","24.10","24.15","24.16","24.17","25.0","26.1","26.7","26.10","26.19","26.31","26.34","26.35","26.39","26.47","26.50"],"var":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.14","0.15","0.16","0.17","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.12","5.14","5.16","5.20","5.22","5.23","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.44","5.46","9.5","10.1","10.5","10.6","10.14","12.22","12.28","12.29","12.30","12.31","15.12","15.16","15.20","15.22","15.33","15.44","15.45","22.1","22.7","22.10","22.19","22.31","22.32","22.43","22.47","24.6","24.9","24.10","24.11","24.12","25.1","25.2","26.1","26.4","26.10","26.19","26.31","26.32","26.39","26.43","26.47"],"art":["0.1","0.2","0.5","0.6","0.7","0.10","0.14","0.16","0.17","2.2","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","5.16","5.20","5.22","5.23","5.28","5.33","5.44","8.4","9.5","10.1","10.5","12.31","15.16","15.20","15.22","15.33","15.44","15.45","18.4","20.5","20.10","21.3","21.4","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.32","22.43","22.47","23.5","24.6","24.11","24.12","24.13","25.1","25.2","26.1","26.4","26.19","26.29","26.30","26.31","26.32","26.35","26.39","26.41","26.43","26.47"],"new":["0.1","0.2","0.6","0.7","0.14","0.16","0.17","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.12","5.23","5.44","5.45","8.2","8.4","8.5","10.1","15.12","15.16","15.20","15.22","15.33","15.45","18.2","18.4","18.5","19.3","20.5","21.4","22.1","22.10","22.19","22.29","22.30","22.31","22.32","22.43","22.47","23.5","24.6","24.11","24.12","24.13","25.4","26.1","26.4","26.29","26.30","26.31","26.32","26.43"],"artplayer":["0.2","0.7","0.14","0.16","0.17","2.2","2.22","2.24","2.28","2.29","2.30","2.31","3.5","3.6","3.7","3.29","3.30","5.12","5.23","5.45","8.2","8.3","8.4","8.5","9.7","10.1","10.2","15.12","15.16","15.20","15.22","15.45","18.2","18.3","18.4","18.5","19.3","19.7","20.1","20.8","20.9","20.10","21.0","21.3","22.10","22.19","22.29","22.30","22.32","22.43","22.47","23.1","23.8","24.2","24.3","24.8","24.16","25.0","25.3","26.4","26.27","26.29","26.30","26.32","26.43"],"container":["0.2","0.3","0.14","0.17","2.2","2.28","5.12","5.45","6.2","6.3","7.4","8.2","8.3","8.4","8.5","9.7","10.2","15.12","15.16","15.20","15.45","16.2","16.3","17.4","18.2","18.3","18.4","18.5","19.3","19.7","21.4","22.10","22.19","22.29","22.30","22.43","22.47","23.4","23.9","24.6","24.11","24.12","24.13","24.14","25.3","25.4","26.2","26.4","26.29","26.30","26.32","26.43"],"app":["0.2","0.4","0.14","5.45","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.4","8.5","9.7","10.2","15.12","15.16","15.45","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.4","18.5","19.3","19.7","20.3","20.4","21.4","22.1","22.19","22.29","22.30","22.47","23.4","24.11","24.12","24.13","24.14","25.4","26.2","26.4","26.29","26.30","26.43"],"url":["0.2","0.4","5.45","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.5","9.3","9.7","9.8","10.2","15.16","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.5","19.3","19.7","19.8","22.29","22.30","22.33","22.40","22.47","24.12","24.13","24.14","26.29","26.30","26.33","26.41","26.43"],"classname":["0.3","0.11","0.12","1.11","3.15","3.21","3.24","3.25","3.28","3.31","5.4","5.15","5.26","5.30","5.38","5.39","5.40","5.41","5.42","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.6","12.1","12.5","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.18","13.22","13.26","13.27","13.28","13.29","13.30","13.32","15.6","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.24","15.25","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.43","15.47","19.2","19.5","22.4","22.9","22.13","22.17","22.25","22.34","22.39","22.42","22.50","26.6","26.8","26.12","26.14","26.15","26.16","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.27","26.28","26.33","26.34","26.38","26.40","26.42","26.44","26.48","26.49","26.51"],"run":["0.3","0.8","0.9","0.11","0.12","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.1","3.2","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.33","5.4","5.6","5.7","5.9","5.11","5.13","5.15","5.24","5.30","5.38","5.39","5.40","5.41","5.42","5.43","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.6","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.3","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.7","15.8","15.9","15.10","15.14","15.21","15.23","15.25","15.27","15.30","15.31","15.32","15.33","15.34","15.35","15.36","15.41","15.43","15.46","15.47","22.4","22.9","22.13","22.17","22.34","22.39","22.50","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.33","26.34","26.40","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"code":["0.3","0.8","0.9","0.10","0.11","0.12","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.4","5.6","5.7","5.8","5.9","5.10","5.11","5.13","5.15","5.18","5.19","5.24","5.30","5.38","5.39","5.40","5.41","5.42","5.43","5.47","9.1","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.6","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.29","13.30","15.1","15.3","15.8","15.9","15.10","15.14","15.21","15.23","15.25","15.27","15.28","15.31","15.32","15.33","15.34","15.35","15.36","15.41","15.43","15.46","15.47","21.0","21.2","22.4","22.7","22.17","22.39","22.50","24.8","26.3","26.5","26.7","26.8","26.9","26.12","26.13","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.33","26.34","26.40","26.42","26.44","26.45","26.46","26.48","26.49"],"document":["0.3","22.1"],"assets":["0.4","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.7","9.8","10.2","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.7","19.8","22.30","22.47","24.12","24.13","24.14","26.2","26.30","26.43"],"sample":["0.4","5.45","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.8","10.2","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.8","22.2","22.30","24.13","24.14","26.2","26.30","26.43"],"video":["0.4","3.34","5.45","6.2","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.3","9.8","10.2","13.1","15.6","15.18","15.19","16.2","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.3","19.8","22.38","22.45","22.46","24.13","24.14","26.2","26.51"],"mp4":["0.4","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.3","9.4","9.8","9.9","10.2","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.3","19.4","19.8","19.9","22.2","24.14","26.2"],"test":["0.4"],"foo":["0.4"],"bar":["0.4","13.16","13.33","22.6","22.8","22.17","22.22"],"const":["0.4","9.6","19.6","20.9","23.9"],"获取整体的字幕列表":["0.11"],"div":["0.11","0.12","3.31","5.4","5.26","5.38","5.40","5.42","9.2","9.5","10.4","10.6","10.7","10.14","10.17","11.5","11.6","11.9","12.1","12.5","12.15","12.21","12.23","12.25","12.32","12.35","12.36","12.37","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.18","13.19","13.20","13.22","13.26","13.27","13.28","13.29","13.30","13.32","15.6","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.24","15.25","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.43","19.2","19.5","20.3","22.4","22.9","22.13","22.17","22.25","22.28","22.34","22.42","22.50","26.6","26.12","26.14","26.15","26.16","26.18","26.20","26.23","26.24","26.25","26.27","26.28","26.33","26.34","26.38","26.40","26.41","26.42","26.44","26.48","26.49","26.51"],"详见事件文档":["0.12"],"console":["1.1","2.0","12.0","24.18"],"info":["2.0","12.0","24.18"],"只监听一次事件":["2.0"],"但估计没有足够的数据来支撑播放到结束":["2.42"],"渲染完成":["2.44"],"属性的值改变时触发":["2.45"],"当这个":["2.46"],"因为":["2.47"],"或者资源类型不是受支持的媒体格式":["2.48"],"中的首帧已经完成加载":["2.49"],"播放准备开始":["2.53"],"seek":["2.56","2.57","12.56","12.57","15.15"],"user":["2.58","23.13"],"属性指定的时间发生变化":["2.60"],"播放已停止":["2.62"],"也是指挂载在":["3.0"],"构造函数":["3.0"],"减少视频资源占用":["3.34"],"如果你希望保留":["3.34"],"元素的状态":["3.34"],"仅移除界面":["3.34"],"可将其设置为":["3.34"],"when":["5.5","11.1","12.45","22.26"],"destroy":["5.5"],"也会在调用":["5.5"],"时自动执行类似逻辑":["5.5"],"画中画":["5.26"],"fullscreen":["5.26","15.21","22.24"],"窗口全屏":["5.26"],"fullscreenweb":["5.26"],"网页全屏":["5.26"],"对应":["5.29"],"domrect":["5.29"],"的同名字段":["5.29"],"组件唯一名称":["6.1","8.1"],"用于标记类名":["6.1","8.1"],"index":["6.1","7.5","8.1","16.1","17.5","18.1","24.7","24.10","24.15","24.16","24.17"],"number":["6.1","7.1","8.1","10.12","16.1","17.1","18.1","19.2"],"contextmenu":["6.4","6.5","16.4","16.5"],"name":["6.5","7.5","9.9","16.5","17.5","19.9","22.33"],"组件索引":["7.1"],"用于显示的优先级":["7.1"],"html":["7.1","7.2","9.4","9.9","15.4","17.1","17.2","19.4","19.9","22.27","22.33"],"element":["7.1","13.31","17.1","22.45"],"position":["7.2","7.5","17.2","17.5"],"left":["7.2","13.25","17.2"],"tooltip":["7.2","9.2","9.9","17.2","19.2","19.5","19.6","19.9"],"style":["7.2","9.3","17.2","22.37","26.37"],"color":["7.2","15.36","17.2"],"red":["7.2","17.2"],"click":["7.2","17.2"],"function":["7.2","17.2","19.5","22.35","22.41","23.10","26.35"],"args":["7.2","17.2"],"controls":["7.3","7.5","17.3","17.5"],"add":["7.3","17.3"],"button1":["7.5","17.5"],"png":["8.4","18.4","22.29","26.29"],"列表宽度":["9.2"],"提示文本":["9.2","9.5"],"setting":["9.3","9.4","9.8","9.9","19.3","19.4","19.8","19.9"],"true":["9.3","9.4","9.8","9.9","13.18","13.19","13.32","13.34","19.3","19.4","19.8","19.9","24.6"],"settings":["9.3","9.4","9.9","19.3","19.4","19.9","22.14","22.15","22.16","22.18","22.22","22.25"],"subtitle":["9.3","19.3"],"01":["9.3","9.4","19.3"],"default":["9.3","13.1","13.4","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.27"],"span":["9.3"],"multi":["9.4","19.4"],"level":["9.4","13.0","19.4"],"selector":["9.4","19.4"],"value":["9.6"],"min":["9.6"],"flip":["9.8","19.1","19.8"],"slider":["9.9","19.9"],"5x":["9.9","19.9"],"icon":["9.9","19.9"],"refer":["10.0","15.0"],"to":["10.0","11.0","11.1","12.53","15.0","15.4","15.15","15.39","20.11"],"proxy":["10.3"],"method":["10.3"],"used":["10.3","13.33","15.38","15.39","15.40","22.3","22.6"],"hover":["10.3"],"delete":["10.4"],"clear":["10.4"],"all":["10.4","20.12"],"object":["10.6","26.11"],"update":["10.8","10.9"],"show":["10.8","10.9","10.10","10.16"],"property":["10.8","10.9","10.10","10.16"],"switch":["10.11"],"version":["10.12","20.12"],"resolution":["10.12"],"duration":["10.12"],"etc":["10.12"],"control":["10.12"],"visibility":["10.12"],"toggle":["10.13","10.15","22.20"],"set":["10.16"],"whether":["10.16","22.21"],"the":["11.0","12.45","13.1","15.0","15.6","15.29","22.8","22.12","22.25","22.26","22.27","22.44","22.45"],"top":["11.0"],"you":["11.1"],"need":["11.1"],"manage":["11.1"],"multiple":["11.1"],"player":["11.2","11.3","11.4","11.7","11.11","11.12","15.41","15.42","20.13","22.5","22.21","22.26","22.27"],"for":["11.5","11.9","13.33","16.1","18.1","22.6","22.18","22.38","22.51"],"videos":["11.5"],"options":["11.7","11.9","22.37"],"event":["11.8","12.46","19.5","22.4"],"type":["11.10"],"detection":["11.10"],"by":["11.11","20.13"],"on":["12.0","13.0","13.3","22.28","22.44","22.46","22.48","24.18"],"canplay":["12.0"],"only":["12.0","21.0","22.3","22.21","22.49"],"once":["12.0"],"time":["12.1","24.4"],"mode":["12.25","13.31","15.24","22.48"],"media":["12.42","12.48","15.5"],"but":["12.42","15.11","15.15"],"estimates":["12.42"],"there":["12.42"],"it":["12.43","15.15","22.51"],"can":["12.43","13.34"],"play":["12.43"],"rendering":["12.44"],"this":["12.46","13.34","22.11"],"is":["12.46","12.58","13.4","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.16","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.25","13.26","13.27","15.15","15.42","20.6","21.1","22.2","22.5","22.21"],"sent":["12.46"],"stopped":["12.47","12.62"],"because":["12.47"],"while":["12.48","12.54"],"fetching":["12.48"],"first":["12.49"],"frame":["12.49","15.18","15.19"],"has":["12.50","12.51","12.52","12.62"],"start":["12.53"],"after":["12.53","14.0","15.4"],"triggered":["12.54"],"playback":["12.55","15.13","15.23","22.3","22.8"],"trying":["12.58"],"data":["12.59","24.8","24.16"],"indicated":["12.60"],"volume":["12.61","22.22"],"mounted":["13.0"],"in":["13.1","13.12","13.13","13.15","13.34","15.5","15.7","15.26","22.2","22.11","22.14","22.15","22.16","22.18","22.23","22.24","22.25","22.34"],"events":["13.1"],"of":["13.1","15.29","22.12","22.36","22.40"],"text":["13.2","19.2","19.5","19.6","22.34"],"pixels":["13.6","13.7"],"feature":["13.11","22.46"],"seconds":["13.12","15.6","15.7","22.34"],"milliseconds":["13.13","13.15"],"a":["13.14","22.22"],"connection":["13.14"],"error":["13.14","13.15"],"occurs":["13.14","13.15"],"bottom":["13.16","22.20","22.23","22.24"],"pause":["13.19","13.20"],"false":["13.20"],"automatic":["13.21"],"screen":["13.21"],"rotation":["13.21"],"during":["13.23","13.24","13.31"],"long":["13.23","13.24"],"press":["13.23","13.24"],"swiping":["13.25"],"right":["13.25"],"vertical":["13.30","15.30"],"defaults":["13.31"],"smooth":["13.33"],"progress":["13.33","15.13","22.6","22.8"],"enabled":["13.34"],"reduce":["13.34"],"resource":["13.34"],"usage":["13.34"],"single":["13.34","15.5"],"page":["13.34","15.5","15.21","22.21"],"applications":["13.34","15.5"],"also":["14.0","20.12"],"remove":["15.4"],"s":["15.4","15.24","20.13","22.27"],"resources":["15.5"],"or":["15.5","22.51"],"reinitialize":["15.5"],"tag":["15.5"],"performs":["15.11"],"some":["15.11","22.49"],"optimization":["15.11"],"operations":["15.11"],"retains":["15.13"],"previous":["15.13"],"similar":["15.15","22.4"],"optional":["15.17"],"parameter":["15.17","20.10"],"specifies":["15.17"],"filename":["15.17"],"returns":["15.18","15.19"],"promise":["15.18","15.19","24.6"],"state":["15.21"],"visible":["15.23","24.18"],"before":["15.23","22.27"],"starts":["15.23"],"normal":["15.26","15.30"],"mini":["15.26"],"window":["15.26"],"pip":["15.26"],"picture":["15.26"],"automatically":["15.27","22.11"],"correspond":["15.29"],"fields":["15.29"],"same":["15.29"],"values":["15.30"],"horizontal":["15.30"],"rate":["15.31"],"ratio":["15.32"],"often":["15.38","15.40","22.11"],"with":["15.38","15.40"],"typically":["15.39"],"alongside":["15.39"],"loaded":["15.39"],"display":["15.39","17.1"],"detailed":["15.39"],"removed":["15.41"],"destroyed":["15.41"],"scoped":["15.42"],"current":["15.42","20.5","23.5"],"instance":["15.42"],"css":["16.1","18.1","26.11"],"class":["16.1","18.1","20.3"],"priority":["17.1"],"items":["19.1"],"playbackrate":["19.1"],"aspectratio":["19.1"],"width":["19.2","22.36","26.36"],"list":["19.2"],"onswitch":["19.5"],"completion":["19.6"],"onchange":["19.6"],"change":["19.6"],"install":["20.1","23.1"],"body":["20.3"],"if":["20.5","23.5"],"typeof":["20.5","23.5"],"ts":["20.6","22.40"],"from":["20.8","20.9","20.13","21.2","23.8","23.11"],"let":["20.10"],"null":["20.10"],"use":["20.11"],"file":["20.11"],"which":["20.11"],"compatibility":["20.11"],"down":["20.11"],"ie":["20.11","23.11"],"plugins":["20.12","24.14","24.18"],"provide":["20.12"],"an":["20.12"],"mjs":["20.12","23.12"],"ui":["20.13"],"changing":["20.13"],"therefore":["20.13"],"starting":["20.13"],"core":["21.0"],"will":["21.0","22.22"],"include":["21.0"],"no":["21.1"],"manual":["21.1"],"import":["21.1","21.2","23.11"],"dist":["21.2","23.12"],"group":["21.2"],"id":["21.2"],"sometimes":["22.2","22.40"],"not":["22.2","22.5"],"known":["22.2"],"immediately":["22.2"],"such":["22.2"],"cases":["22.2"],"resumption":["22.3"],"autoplayback":["22.3"],"initialized":["22.5"],"and":["22.5","22.6","22.8","22.22","22.26"],"resulting":["22.11"],"black":["22.11"],"bars":["22.11"],"option":["22.11"],"scrolls":["22.12"],"out":["22.12"],"looping":["22.13"],"currently":["22.14","22.49"],"appears":["22.14","22.15","22.16"],"panel":["22.14","22.15","22.16","22.18","22.22","22.25"],"functionality":["22.15","22.16"],"button":["22.20","22.23","22.24"],"one":["22.21"],"context":["22.22"],"menu":["22.22"],"apply":["22.22"],"loses":["22.26"],"focus":["22.26"],"required":["22.27"],"mounting":["22.27"],"mobile":["22.28","22.44","22.45","22.48"],"devices":["22.28","22.44"],"layer":["22.29","26.29"],"boolean":["22.33"],"string":["22.33","22.34"],"myplugin":["22.35","26.35"],"column":["22.36"],"columns":["22.36"],"encoding":["22.37","26.37"],"better":["22.38"],"loading":["22.38"],"experience":["22.38"],"more":["22.38"],"attributes":["22.38"],"these":["22.38"],"e":["22.40"],"g":["22.40"],"m3u8":["22.40"],"mkv":["22.40"],"however":["22.40"],"lacks":["22.40"],"party":["22.41"],"programs":["22.41"],"handler":["22.41"],"receives":["22.41"],"three":["22.41"],"parameters":["22.41"],"supported":["22.42"],"en":["22.42"],"zh":["22.42","25.2"],"cn":["22.42","26.42"],"hide":["22.44"],"fast":["22.46"],"forward":["22.46"],"web":["22.48"],"based":["22.48"],"browsers":["22.49"],"support":["22.49"],"htmlvideoelement":["22.51"],"example":["22.51"],"demo":["23.3"],"meta":["23.3"],"charset":["23.3"],"ref":["23.4"],"时会自动导入的":["23.6"],"param":["23.10"],"getinstance":["23.10"],"可以兼容到":["23.11"],"和所有插件还会提供一个":["23.12"],"版本的":["23.12"],"如":["23.12"],"globalthis":["23.13"],"custom":["23.13"],"agent":["23.13"],"全局变量":["23.13"],"plugin":["24.2","24.3","24.8","24.16"],"danmuku":["24.2","24.7","24.10","24.16"],"npm":["24.3"],"弹幕时间":["24.4"],"默认为当前播放器时间":["24.4"],"默认弹幕模式":["24.5"],"滚动":["24.5"],"顶部":["24.5"],"底部":["24.5"],"modes":["24.5"],"弹幕可见的模式":["24.5"],"fontsize":["24.5"],"danmu":["24.6","24.18"],"return":["24.6"],"resolve":["24.6"],"settimeout":["24.6"],"libs":["24.8","24.16"],"uncompiled":["24.8","24.16"],"artplayerplugindanmuku":["24.14","24.18"],"xml":["24.18"],"显示弹幕":["24.18"],"版本开始":["25.0"],"核心代码除了包含":["25.0"],"zhtw":["25.2"],"tw":["25.2"],"高亮元素":["26.6"],"上":["26.6"],"类似":["26.11"],"的":["26.11"],"fit":["26.11"],"里":["26.14","26.15","26.16","26.25"],"音量条等浮层会应用":["26.22"],"filter":["26.22"],"毛玻璃效果":["26.22"],"看起来更通透":["26.22"],"访问到播放器所需的":["26.27"],"画质地址":["26.33"],"预览图列数":["26.36"],"预览图宽度":["26.36"],"height":["26.36"],"预览图高度":["26.36"],"scale":["26.36"],"字幕样式":["26.37"],"字幕编码":["26.37"],"默认":["26.37"],"utf":["26.37"],"auto":["26.38"],"以提升加载体验":["26.38"],"更多视频属性":["26.38"],"这些属性将直接写入视频元素里":["26.38"],"所以需要特别指明":["26.40"],"元素":["26.41"],"视频地址":["26.41"],"当前实例":["26.41"],"dom元素":["26.51"]},{"0":["13.25","19.6","24.4"],"1":["3.29","9.3","13.29","19.3"],"2":["3.29","9.6","19.6","20.13","26.3"],"3":["9.6"],"4":["9.1","20.13","21.1","22.17","22.34","22.50","23.10","26.5","26.7","26.8","26.9","26.13","26.17","26.21","26.25","26.26","26.33","26.34","26.40","26.42","26.45","26.46"],"5":["13.14","13.25","20.13"],"6":["2.41","5.42","5.43","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","23.10"],"7":["5.4","5.6","5.7","5.10","5.17","5.18","5.19","5.24","5.38","5.39","5.40","12.19","12.21","12.23","12.25","12.26","15.10","22.39"],"8":["5.9","5.15","5.25","5.27","5.30","5.41","12.17","15.1","15.9","15.14","15.21","15.25","15.30","15.31","15.32","15.34","15.35","15.36","15.41","22.37","23.3","26.37"],"9":["5.11","5.13","15.11","15.13","15.23"],"10":["5.8","5.41","7.3","7.4","12.6","12.18","12.24","15.8","15.12","15.41","17.3","17.4","19.6"],"11":["15.3","15.21","20.11"],"14":["26.33"],"22":["9.9","19.9"],"25":["22.34","26.34"],"40":["3.7"],"100":["3.10"],"150":["9.4","19.4"],"300":["3.5","3.6"],"500":["3.8","3.9","3.17"],"1000":["13.15","13.24"],"3000":["13.16"],"实例":["0.0","5.0"],"artplayer":["0.1","0.3","0.5","0.6","0.8","0.9","0.10","0.13","0.15","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.20","5.21","5.22","5.25","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.41","5.44","5.46","5.47","9.1","9.2","9.5","10.3","10.4","10.5","10.6","10.7","10.14","10.17","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","13.5","13.6","13.7","13.8","13.9","13.17","13.28","13.29","13.30","15.2","15.3","15.5","15.28","15.33","15.34","15.37","15.41","15.44","15.46","15.47","19.2","19.5","20.2","22.4","22.7","22.17","22.27","22.31","22.39","23.2","23.13","25.1","26.10","26.19","26.31","26.34","26.39","26.40","26.47","26.50"],"container":["0.1","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.15","0.16","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.9","5.11","5.13","5.14","5.16","5.20","5.21","5.22","5.23","5.28","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.41","5.44","5.46","5.47","9.2","9.5","10.1","10.3","10.4","10.5","10.6","10.7","10.14","10.17","12.2","12.20","12.22","12.28","12.29","12.30","12.31","15.2","15.22","15.28","15.41","15.44","15.46","19.5","20.9","21.3","22.4","22.7","22.17","22.31","22.32","22.39","24.9","24.10","24.15","24.17","25.1","25.2","26.10","26.19","26.31","26.34","26.39","26.47"],"app":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.16","0.17","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.12","5.16","5.20","5.22","5.23","5.28","5.33","5.34","5.44","9.5","10.1","10.4","10.5","10.6","10.14","12.28","12.31","15.20","15.22","15.28","15.33","15.41","15.44","19.5","20.5","20.9","21.3","22.4","22.7","22.10","22.31","22.32","22.43","23.9","24.6","24.10","25.2","25.3","26.1","26.19","26.31","26.32","26.39","26.47"],"assets":["0.2","0.6","0.7","0.10","0.14","0.16","0.17","2.2","2.22","2.28","2.31","5.12","5.23","5.44","9.5","10.1","10.4","10.6","10.14","15.12","15.16","15.20","15.22","15.33","15.45","21.4","22.1","22.4","22.7","22.10","22.19","22.31","22.32","22.43","23.9","24.6","24.10","24.11","25.2","25.3","25.4","26.1","26.4","26.31","26.32"],"sample":["0.2","0.6","0.14","0.16","0.17","2.2","2.28","5.12","5.23","9.5","9.7","10.1","10.4","10.6","10.14","15.12","15.16","15.20","15.22","15.33","15.45","19.7","21.4","22.1","22.4","22.10","22.19","22.31","22.32","22.43","22.47","23.9","24.6","24.11","24.12","25.2","25.4","26.4","26.32"],"video":["0.2","0.14","0.16","0.17","5.12","7.4","8.4","9.5","9.7","10.4","10.6","10.14","15.20","15.22","15.45","17.4","18.4","19.7","21.4","22.1","22.10","22.19","22.29","22.30","22.32","22.43","22.47","22.48","22.51","24.6","24.11","24.12","25.2","25.4","26.4","26.29","26.30","26.32","26.43"],"mp4":["0.2","0.14","0.17","5.12","5.45","6.2","7.4","8.4","9.5","9.7","10.4","10.6","10.14","15.12","15.16","15.20","15.22","15.33","15.45","16.2","17.4","18.4","19.7","21.4","22.1","22.4","22.10","22.19","22.29","22.30","22.32","22.43","22.47","24.6","24.11","24.12","24.13","25.2","25.4","26.4","26.29","26.30","26.43"],"console":["0.2","0.4","1.6","7.2","10.2","11.6","15.16","17.2","22.35","26.35"],"info":["0.2","0.4","1.1","7.2","10.2","11.6","17.2","22.35","26.35"],"queryselector":["0.3","5.41","10.3","15.41","22.1","24.16","26.1"],"art":["0.3","0.8","0.9","0.11","0.13","0.15","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.6","5.7","5.8","5.9","5.10","5.14","5.15","5.17","5.18","5.19","5.21","5.24","5.25","5.27","5.30","5.31","5.32","5.34","5.35","5.36","5.37","5.39","5.46","5.47","9.1","9.2","10.4","10.6","10.7","10.12","10.14","10.17","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","15.1","15.2","15.3","15.8","15.9","15.10","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.36","15.37","15.41","15.46","15.47","19.2","19.5","21.2","22.4","22.17","22.35","22.39","22.50","24.7","24.9","24.10","24.15","24.17","26.5","26.7","26.10","26.17","26.33","26.34","26.40","26.50"],"new":["0.3","0.5","0.8","0.9","0.10","0.11","0.13","0.15","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.25","5.27","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.46","5.47","9.1","9.2","9.5","10.4","10.5","10.6","10.7","10.14","10.17","12.2","12.6","12.7","12.8","12.10","12.17","12.18","12.20","12.22","12.24","12.26","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.23","15.28","15.32","15.34","15.35","15.37","15.44","15.46","15.47","19.2","19.5","20.13","22.4","22.7","22.17","22.39","24.9","24.10","24.15","24.17","25.1","25.2","26.7","26.10","26.19","26.34","26.39","26.40","26.47","26.50"],"url":["0.6","0.7","0.9","0.10","0.14","0.16","0.17","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.20","5.23","5.33","5.44","8.4","9.5","10.1","10.4","10.5","10.6","10.14","15.20","15.22","15.33","15.44","15.45","18.4","21.3","21.4","22.1","22.4","22.7","22.10","22.19","22.31","22.32","22.41","22.43","23.9","24.6","24.10","24.11","25.2","25.3","25.4","26.1","26.4","26.31","26.32","26.39","26.47"],"js":["0.11","0.12","1.6","3.1","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","5.4","5.6","5.7","5.15","5.24","5.26","5.30","5.38","5.39","5.40","5.42","5.43","9.2","10.3","10.4","10.7","10.17","11.6","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.25","15.27","15.30","15.31","15.32","15.34","15.35","15.36","15.41","15.43","15.47","19.2","19.5","21.1","22.17","22.25","22.34","22.42","22.50","24.8","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.27","26.28","26.33","26.40","26.42","26.44","26.45","26.46","26.48","26.49"],"var":["0.11","0.12","1.1","2.41","3.5","3.6","3.7","3.17","3.30","5.1","5.6","5.7","5.8","5.9","5.10","5.11","5.13","5.15","5.17","5.18","5.19","5.21","5.24","5.25","5.27","5.30","5.38","5.39","5.40","5.41","5.43","5.47","9.1","9.2","10.3","10.4","10.7","10.17","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","15.1","15.2","15.3","15.8","15.9","15.10","15.14","15.23","15.25","15.28","15.31","15.32","15.34","15.35","15.36","15.37","15.41","15.46","15.47","19.2","19.5","21.1","21.2","22.4","22.17","22.34","22.39","22.50","24.7","24.15","24.16","24.17","26.3","26.5","26.7","26.17","26.25","26.33","26.34","26.40","26.50"],"function":["0.14","6.5","16.5","17.1","20.10","26.37"],"构造函数":["1.0"],"code":["1.11","3.34","5.5","5.26","5.29","9.6","10.3","11.1","13.2","13.3","13.4","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.17","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.28","13.31","13.32","13.33","15.6","15.7","15.11","15.13","15.17","15.18","15.19","15.24","15.30","15.38","15.39","15.40","19.1","19.2","19.5","20.11","22.3","22.5","22.8","22.9","22.13","22.25","22.28","22.33","22.34","22.40","22.42","22.45","23.11","26.6","26.11","26.14","26.15","26.16","26.22","26.27","26.36","26.38","26.41","26.51"],"once":["2.0"],"不必停下来进一步缓冲内容":["2.42"],"media":["2.46","2.47","12.43"],"已经加载完成":["2.46"],"操作完成":["2.56"],"操作开始":["2.57"],"agent":["2.58"],"的":["3.0"],"false":["3.3","3.34","20.5","23.5","24.5","24.14"],"div":["3.34","5.5","5.29","9.6","10.3","10.13","10.15","11.1","11.2","11.3","11.4","11.7","11.8","11.10","11.11","11.12","13.1","13.12","13.13","13.14","13.15","13.16","13.21","13.23","13.24","13.25","13.31","13.33","15.4","15.15","15.17","15.26","15.38","15.39","15.40","15.42","19.1","20.5","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.33","22.40","22.44","22.45","22.46","22.49","22.51","23.3","23.5","26.11","26.22","26.36"],"classname":["3.34","5.5","5.29","9.6","10.3","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","13.12","13.13","13.14","13.15","13.16","13.19","13.20","13.21","13.23","13.24","13.25","13.31","13.33","15.4","15.15","15.17","15.26","15.38","15.39","15.40","19.1","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.33","22.40","22.44","22.45","22.46","22.49","26.11","26.22","26.36","26.41"],"run":["3.34","5.5","5.26","5.29","9.6","10.3","11.1","11.2","11.3","11.4","11.5","11.7","11.9","11.10","11.12","13.1","13.2","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.6","15.11","15.13","15.15","15.17","15.18","15.19","15.24","15.38","15.39","15.40","19.1","19.2","19.5","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.20","22.23","22.24","22.25","22.26","22.28","22.33","22.40","22.42","22.45","22.46","22.49","26.11","26.22","26.27","26.36","26.38","26.41"],"add":["4.0","6.3","8.3","14.0","16.3","18.3","24.2"],"例如我想写一个在视频暂停后":["4.0"],"显示一个图片广告的插件":["4.0"],"on":["5.12","15.12","15.16","15.33"],"播放器当前可见宽高":["5.29"],"document":["5.41","10.3","15.41","24.16","26.1"],"default":["5.45","7.5","15.45","17.5","19.3","23.10"],"true":["5.45","7.5","9.7","13.31","15.4","15.45","17.5","19.7","22.4","22.10","22.30","22.47","24.5","26.4","26.30","26.37"],"html":["5.45","6.1","6.2","6.3","6.4","6.5","7.3","7.5","8.1","8.2","8.3","8.5","9.8","15.45","16.1","16.2","16.3","16.4","16.5","17.3","17.5","18.1","18.2","18.3","18.5","19.8","22.29","22.30","22.37","23.13","24.14","26.29","26.30","26.37"],"sd":["5.45"],"480p":["5.45"],"组件索引":["6.1","8.1"],"用于显示的优先级":["6.1","8.1"],"contextmenu":["6.2","6.3","16.2","16.3"],"name":["6.2","6.3","6.4","7.3","7.4","8.2","8.3","8.4","8.5","9.8","15.29","16.2","16.3","16.4","17.3","17.4","18.2","18.3","18.4","18.5","19.8","22.29","22.35","26.29","26.35"],"your":["6.2","6.3","6.4","6.5","7.3","16.2","16.3","16.4","16.5","17.3","22.47","26.43"],"menu":["6.2","6.3","6.4","6.5","16.2","16.3","16.4","16.5","22.14","22.15","22.16"],"click":["6.4","6.5","16.4","16.5","17.1","24.14"],"args":["6.5","16.5"],"组件的":["7.1"],"dom":["7.1","17.1","22.41","22.51"],"元素":["7.1"],"style":["7.1","8.2","8.3","8.5","17.1","18.2","18.3","18.5","19.3","20.4","22.29"],"object":["7.1","17.1"],"mounted":["7.2","17.2"],"subtitle":["7.2","7.5","17.2","17.5"],"button1":["7.3","7.4","17.3","17.4"],"index":["7.3","7.4","17.3","17.4","24.8"],"position":["7.3","15.20","15.22","17.3","24.13","24.14"],"left":["7.3","17.3"],"controls":["7.4","15.20","15.22","17.4","24.13","24.14"],"right":["7.5","17.5","24.14"],"selector":["7.5","17.5","22.30","26.30"],"01":["7.5","17.5","19.4"],"layers":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5"],"potser":["8.2","8.3","8.5","18.2","18.3","18.5","22.29","26.29"],"width":["8.2","8.3","8.5","9.4","9.9","18.2","18.3","18.5","19.4","19.9","22.29"],"100px":["8.2","8.3","8.5","18.2","18.3","18.5"],"src":["8.2","8.5","9.9","18.2","18.5","19.9"],"color":["9.3","19.3"],"red":["9.3","19.3"],"srt":["9.3","19.3"],"id":["9.3","19.3","22.47"],"yellow":["9.3"],"02":["9.3"],"setting":["9.5","9.7","19.7","22.30","26.30"],"max":["9.6","19.6"],"step":["9.6"],"settings":["9.8","19.8"],"slider":["9.8","19.8"],"tooltip":["9.8","19.8"],"5x":["9.8","19.8"],"icon":["9.8","19.8"],"img":["9.9","19.9"],"height":["9.9","19.9","22.36"],"state":["9.9","19.9"],"svg":["9.9","19.9"],"secondary":["10.0"],"custom":["10.3"],"test":["10.4"],"foo":["10.4"],"bar":["10.4","22.18","22.20","22.23","22.24","22.44"],"set":["10.8","10.9","10.10","22.2"],"whether":["10.8","10.9","10.10","22.37"],"all":["10.8","10.9","10.10","10.16"],"are":["10.8","13.34","21.0"],"visible":["10.8"],"toggle":["10.8","10.9","10.10","10.16"],"display":["10.9","10.10","10.16","16.1","18.1"],"options":["10.11"],"texttrack":["10.11"],"gets":["10.11"],"text":["10.11"],"track":["10.11"],"activecues":["10.11"],"list":["10.11"],"via":["10.12","22.27"],"show":["10.12"],"triggered":["10.12"],"event":["10.12","15.38","15.40"],"is":["10.12","12.44","13.1","13.15","13.24","22.26"],"named":["10.12"],"of":["10.13","10.15","12.49"],"level":["11.0","15.0"],"simultaneously":["11.1"],"isn":["12.42"],"t":["12.42"],"enough":["12.42"],"value":["12.45","19.6"],"when":["12.46","15.5"],"the":["12.47","12.54","20.3","22.38"],"data":["12.48","23.10"],"or":["12.48","13.34"],"been":["12.50","12.51","12.53"],"begun":["12.52"],"having":["12.53"],"rate":["12.55"],"operation":["12.56","12.57"],"to":["12.58","22.11","22.21","22.37"],"fetch":["12.58"],"loading":["12.59"],"by":["12.60"],"has":["12.61"],"due":["12.62"],"constructor":["13.0"],"property":["13.0","20.10"],"names":["13.0","15.42"],"off":["13.1"],"effects":["13.33"],"scenarios":["13.34"],"where":["13.34"],"players":["13.34"],"frequently":["13.34"],"created":["13.34"],"destroyed":["13.34"],"if":["13.34"],"you":["13.34","22.1","22.2"],"wish":["13.34"],"preserve":["13.34"],"for":["14.0"],"example":["14.0"],"let":["14.0"],"say":["14.0"],"first":["15.0"],"destruction":["15.4"],"defaults":["15.4"],"note":["15.5","20.3"],"global":["15.5","20.13"],"configuration":["15.5"],"remove":["15.5"],"destroy":["15.5","20.5","23.5"],"will":["15.5","22.38"],"also":["15.5"],"ready":["15.12","15.16"],"seek":["15.12"],"settimeout":["15.12"],"does":["15.15"],"not":["15.15"],"trigger":["15.15"],"additional":["15.15"],"events":["15.15"],"fullscreen":["15.26"],"fullscreenweb":["15.26"],"webpage":["15.26"],"in":["15.29"],"domrect":["15.29"],"player":["15.29","20.3"],"s":["15.29","17.1"],"current":["15.29"],"timeupdate":["15.38","15.40"],"buffering":["15.39"],"progress":["15.39"],"preventing":["15.42"],"errors":["15.42"],"from":["15.42","20.11"],"duplicate":["15.42"],"class":["15.42"],"priority":["16.1","18.1"],"subtitleoffset":["19.1"],"span":["19.3"],"min":["19.6"],"yarn":["20.1","23.1","24.2"],"npm":["20.2","23.2"],"dist":["20.2","20.12","23.2","24.3"],"warning":["20.3","22.47"],"option":["20.4","23.4"],"return":["20.5","22.35","23.5","23.10","26.35"],"ref":["20.5","23.5"],"automatically":["20.6"],"const":["20.8","23.8"],"param":["20.10"],"getinstance":["20.10"],"import":["20.11"],"group":["20.11","23.11"],"bash":["20.11","23.11"],"jsdelivr":["20.11","23.11"],"net":["20.11","23.11"],"such":["20.12"],"as":["20.12"],"plugin":["20.12","23.12"],"variable":["20.13"],"globalthis":["20.13"],"user":["20.13"],"simplified":["21.0"],"chinese":["21.0"],"and":["21.0","22.14","22.15","22.16","22.48"],"english":["21.0"],"other":["21.0"],"languages":["21.0"],"no":["21.0"],"longer":["21.0"],"required":["21.1"],"zhtw":["21.2"],"zh":["21.2"],"tw":["21.2"],"may":["22.1"],"can":["22.2","22.27"],"asynchronously":["22.2"],"muted":["22.4","26.4"],"yet":["22.5"],"playing":["22.5","22.26"],"highlighted":["22.6"],"elements":["22.6"],"time":["22.8","22.21"],"adjusts":["22.11"],"hide":["22.11"],"browser":["22.12"],"viewport":["22.12","22.48"],"context":["22.14","22.15","22.16"],"bottom":["22.18","22.44"],"control":["22.18","22.20","22.23","22.24","22.44"],"allowed":["22.21"],"play":["22.21","26.43"],"at":["22.21"],"a":["22.21"],"filter":["22.22"],"frosted":["22.22"],"glass":["22.22"],"more":["22.22"],"transparent":["22.22"],"appearance":["22.22"],"however":["22.22"],"access":["22.27"],"setting01":["22.30","26.30"],"scale":["22.36"],"utf":["22.37","23.3"],"escape":["22.37","26.37"],"boolean":["22.37","26.37"],"tags":["22.37"],"be":["22.38"],"directly":["22.38"],"written":["22.38"],"into":["22.38"],"correct":["22.40"],"so":["22.40"],"explicit":["22.40"],"specification":["22.40"],"necessary":["22.40"],"element":["22.41","22.51"],"lang":["22.43","26.43"],"devices":["22.45","22.46"],"mobile":["22.46"],"dimensions":["22.48"],"size":["22.48"],"this":["22.49"],"feature":["22.49"],"an":["22.51"],"existing":["22.51"],"body":["23.3"],"属性":["23.10"],"export":["23.10"],"https":["23.11"],"danmuku":["23.12","24.3","24.8"],"head":["23.13"],"title":["23.13"],"mode":["24.4"],"弹幕模式":["24.4"],"滚动":["24.4"],"弹幕字体大小":["24.5"],"antioverlap":["24.5"],"弹幕是否防重叠":["24.5"],"synchronousplayback":["24.5"],"是否同步播放速度":["24.5"],"mount":["24.5"],"undefined":["24.5"],"弹幕发射器挂载点":["24.5"],"默认为播放器控制栏中部":["24.5"],"heatmap":["24.5"],"plugins":["24.6","24.11","24.12","24.13"],"xml":["24.6","24.13","24.14"],"这是用户在输入框输入弹幕文本":["24.6"],"然后点击发送按钮后触发的函数":["24.6"],"artplayerplugindanmuku":["24.11","24.12","24.13"],"emitter":["24.14"],"重载":["24.14"],"danmu":["24.16"],"loaded":["24.18"],"danmus":["24.18"],"加载弹幕":["24.18"],"length":["24.18"],"简体中文":["25.0"],"和":["25.0"],"英文":["25.0"],"有时候":["26.2"],"地址没那么快知道":["26.2"],"这时候你可以异步设置":["26.2"],"cover":["26.11"],"但在部分低性能设备或老旧浏览器上可能会有性能或兼容性问题":["26.22"],"预览图缩放":["26.36"],"是否转义":["26.37"],"标签":["26.37"],"默认为":["26.37"],"onvttload":["26.37"],"用于修改":["26.37"]},{"0":["15.12","23.9"],"1":["3.25","9.9","19.9","24.4"],"2":["3.26","9.3","13.29","19.3","22.3","24.4"],"3":["3.28","13.28","19.6","26.1"],"4":["3.28","13.28","19.1","20.10","22.5","22.8","22.9","22.13","22.14","22.15","22.16","22.23","22.24","22.25","22.28","22.33","22.36","22.40","22.42","22.45","22.46","22.49","26.6","26.11","26.12","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.24","26.28","26.36","26.37","26.38","26.41","26.44","26.48","26.49","26.51"],"5":["3.23","3.29","9.9","13.29","19.9","22.7"],"6":["3.29","13.29","15.43","20.10","22.2","26.2"],"7":["5.29","15.6","15.7","15.17","15.18","15.19","15.24","15.38","15.39","15.40","26.27","26.38"],"8":["5.26","15.15","15.26","15.27","22.36","23.13","26.36","26.41"],"9":["5.5"],"10":["3.12","3.14","3.27","5.12","9.9","19.9"],"12":["24.13"],"14":["22.33"],"20":["3.11"],"22":["9.5"],"40":["13.7"],"50":["24.13"],"100":["13.10"],"300":["13.5","13.6"],"500":["3.21","13.8","13.9","13.17"],"512":["24.5"],"2000":["3.22","3.24","13.22"],"3000":["3.15","15.12"],"5000":["3.4","3.13","3.16"],"的":["0.0","0.4","1.0","5.0"],"url":["0.1","0.3","0.5","0.8","0.12","0.13","0.15","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.8","5.9","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.21","5.22","5.25","5.28","5.30","5.31","5.32","5.34","5.35","5.36","5.37","5.46","5.47","9.1","9.2","9.6","10.3","10.7","10.17","12.6","12.7","12.8","12.10","12.12","12.16","12.17","12.18","12.20","12.22","12.24","12.26","12.28","12.29","12.30","12.31","15.2","15.3","15.8","15.9","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.36","15.37","15.41","15.46","15.47","19.2","19.5","20.5","20.9","21.2","22.17","22.34","22.39","24.9","24.15","24.17","25.1","26.7","26.10","26.19","26.34","26.40","26.50"],"assets":["0.1","0.3","0.5","0.8","0.9","0.11","0.13","0.15","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.30","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.20","5.21","5.22","5.25","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.37","5.46","5.47","9.1","9.2","9.6","10.3","10.5","10.7","10.17","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.3","15.9","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.37","15.41","15.44","15.46","15.47","19.2","19.5","20.9","21.2","21.3","22.17","22.34","22.39","22.40","24.9","24.15","24.17","25.1","26.10","26.19","26.33","26.34","26.39","26.40","26.47","26.50"],"sample":["0.1","0.3","0.5","0.7","0.8","0.9","0.10","0.11","0.13","0.15","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.29","2.30","2.31","2.39","5.2","5.3","5.9","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.20","5.21","5.22","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.44","5.46","5.47","9.2","9.6","10.3","10.5","10.7","10.17","12.2","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.23","15.28","15.34","15.41","15.44","15.46","19.2","19.5","20.9","21.2","21.3","22.7","22.17","22.34","22.39","22.40","24.9","24.10","24.15","24.17","25.3","26.1","26.10","26.19","26.31","26.33","26.34","26.39","26.40","26.47"],"video":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.13","0.15","2.2","2.6","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","5.2","5.3","5.9","5.11","5.13","5.14","5.16","5.20","5.22","5.23","5.28","5.31","5.32","5.33","5.35","5.36","5.44","5.46","9.2","9.6","10.1","10.3","10.5","10.7","10.17","12.2","12.22","12.28","12.29","12.30","12.31","15.28","15.41","15.44","15.46","19.2","19.5","20.9","21.2","21.3","22.7","22.31","22.39","23.9","24.9","24.10","24.15","24.17","25.3","26.1","26.10","26.19","26.31","26.34","26.39","26.40","26.47"],"mp4":["0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.16","2.2","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.16","5.20","5.22","5.23","5.28","5.32","5.33","5.34","5.44","5.46","9.2","10.1","10.3","10.5","10.7","10.17","12.2","12.28","12.29","12.30","12.31","15.23","15.28","15.41","15.44","19.2","19.5","20.9","21.2","21.3","22.7","22.17","22.31","22.39","23.9","24.9","24.10","24.17","25.3","26.1","26.10","26.19","26.31","26.32","26.34","26.39","26.47"],"warning":["0.4","10.2","10.4","11.6","15.12","15.16","15.22","15.33","20.4","22.7","22.10","25.0"],"提示":["0.4"],"默认所有播放器实例都是共享同一个":["0.4"],"localstorage":["0.4"],"而且默认的":["0.4"],"是":["0.4"],"settings":["0.4","9.2","9.5","19.5"],"如果你想不同的播放器使用不同的":["0.4"],"console":["0.6","0.14","0.17","6.2","6.3","6.4","6.5","9.3","9.4","10.1","10.4","10.5","10.6","10.14","11.1","16.2","16.3","16.4","16.5","19.3","19.4","22.30"],"info":["0.6","0.14","0.17","1.6","6.2","6.3","6.4","6.5","9.3","9.4","10.1","10.4","10.5","10.6","10.14","11.1","15.16","16.2","16.3","16.4","16.5","19.3","19.4","22.30"],"play":["0.6","10.6","12.42","22.43","26.4"],"on":["0.7","0.8","0.9","0.10","2.2","2.22","5.33","5.44","7.5","8.5","9.9","10.7","10.14","11.0","15.0","15.28","15.44","17.5","18.5","19.9","20.3","22.22"],"ready":["0.9","0.10","2.2","5.12","5.44","7.5","10.14","15.33","17.5"],"artplayer":["0.11","0.12","1.6","2.41","3.34","5.4","5.6","5.7","5.17","5.24","5.26","5.27","5.29","5.38","5.39","5.40","5.42","5.43","9.6","11.6","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.3","13.4","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.1","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.24","15.25","15.27","15.30","15.31","15.32","15.35","15.36","15.43","19.1","19.6","20.13","21.1","22.25","22.33","22.34","22.40","22.42","22.50","26.3","26.5","26.7","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.25","26.26","26.33","26.36","26.42","26.45","26.46"],"container":["0.11","0.12","1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.29","3.30","5.1","5.4","5.6","5.7","5.8","5.10","5.15","5.17","5.18","5.19","5.24","5.25","5.26","5.27","5.30","5.38","5.39","5.40","5.42","5.43","9.1","9.6","12.1","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.30","15.1","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.23","15.25","15.30","15.31","15.32","15.34","15.35","15.36","15.37","15.47","19.2","19.6","21.1","21.2","22.25","22.33","22.34","22.40","22.42","22.50","24.7","24.16","26.5","26.7","26.17","26.25","26.27","26.33","26.40","26.42","26.50"],"app":["0.11","0.12","0.13","0.15","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.17","5.18","5.19","5.21","5.25","5.27","5.30","5.31","5.32","5.35","5.36","5.37","5.39","5.41","5.46","5.47","9.1","9.2","9.6","10.3","10.7","10.17","12.2","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.29","12.30","12.39","12.40","12.41","15.1","15.2","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.21","15.23","15.30","15.31","15.32","15.34","15.35","15.36","15.37","15.46","15.47","19.2","21.2","22.17","22.34","22.39","22.40","22.50","23.3","23.5","24.7","24.9","24.15","24.16","24.17","25.1","26.7","26.10","26.17","26.25","26.27","26.33","26.34","26.40","26.50"],"new":["0.12","1.1","3.3","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.28","3.29","3.33","5.4","5.5","5.6","5.7","5.24","5.26","5.29","5.38","5.39","5.40","5.41","5.42","5.43","9.6","10.3","10.16","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.17","13.30","15.6","15.7","15.8","15.9","15.10","15.11","15.13","15.14","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.27","15.30","15.31","15.36","15.41","15.43","19.1","19.6","21.1","21.2","22.9","22.13","22.25","22.33","22.34","22.40","22.42","22.50","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.33","26.36","26.38","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"hotkeyevent":["0.14","10.14"],"event":["0.14","9.3","9.4","10.14","17.1","19.4"],"click":["0.14","6.2","6.3","7.1","7.3","10.14","15.20","15.22","16.2","16.3","17.3","22.31","24.12"],"true":["0.16","2.28","3.1","3.20","3.33","7.2","9.2","9.5","17.2","19.2","19.5","22.17","22.37"],"flip":["0.16"],"playbackrate":["0.16"],"aspectratio":["0.16"],"function":["0.17","6.2","6.3","6.4","7.1","7.3","9.4","10.14","10.17","15.20","15.22","16.2","16.3","16.4","17.3","19.4","22.30","22.37","24.12","24.14","26.30"],"myplugin":["0.17","10.17"],"art":["1.1","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.18","3.21","3.22","3.23","3.24","3.27","3.28","3.29","3.32","3.33","5.4","5.5","5.26","5.29","5.38","5.40","5.41","5.42","5.43","9.6","10.3","10.16","12.1","12.5","12.14","12.15","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.29","13.30","15.6","15.7","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.27","15.30","15.38","15.39","15.40","15.43","19.1","19.6","20.8","21.1","22.9","22.13","22.25","22.28","22.33","22.34","22.40","22.41","22.42","23.8","24.8","24.16","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.23","26.24","26.25","26.26","26.28","26.36","26.38","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"js":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","3.2","3.34","5.5","5.29","10.8","10.9","10.10","10.13","10.15","10.16","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.6","15.15","15.17","15.24","15.26","15.38","15.39","15.40","15.42","19.1","20.2","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.27","22.28","22.33","22.36","22.40","22.44","22.45","22.46","22.49","23.2","24.3","26.6","26.11","26.22","26.36","26.37","26.38","26.41","26.51"],"手动触发事件":["2.0"],"subtitle":["2.28","2.29","2.30","2.31","12.31"],"或者部分加载完成":["2.46"],"则发送此事件":["2.46"],"已经到达结束点":["2.47"],"正在尝试获取媒体数据":["2.58"],"一级属性":["3.0"],"var":["3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.31","3.32","3.33","5.4","5.5","5.26","5.29","5.42","9.6","10.13","10.15","10.16","12.1","13.3","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.6","15.7","15.11","15.13","15.15","15.17","15.18","15.19","15.21","15.24","15.26","15.27","15.30","15.38","15.39","15.40","15.43","19.1","19.6","22.3","22.5","22.9","22.13","22.25","22.28","22.33","22.40","22.42","24.8","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.27","26.28","26.36","26.38","26.41","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"false":["3.18","3.19","3.31","3.32","6.5","13.3","13.32","16.5"],"adsplugin":["4.0","14.0"],"option":["4.0","14.0","24.18"],"layers":["4.0","14.0"],"ads":["4.0","14.0"],"html":["4.0","7.4","8.4","9.7","15.20","15.22","17.4","18.4","19.7","20.13","22.31","22.32","24.11","24.12","24.13","26.31","26.32"],"img":["4.0","9.5","9.8","19.8","26.39"],"style":["4.0","6.1","7.3","8.1","8.4","16.1","17.3","18.1","18.4","23.4","26.29"],"width":["4.0","8.4","9.5","9.8","18.4","19.8","24.5","26.29"],"100px":["4.0","8.4","18.4","22.29","26.29"],"src":["4.0","8.3","8.4","9.8","18.3","18.4","19.8","22.29","26.29"],"display":["4.0"],"none":["4.0"],"position":["4.0","5.20","7.4","8.2","8.3","8.5","17.4","18.2","18.3","18.5","22.29","22.32","24.11","24.12","26.29","26.32"],"absolute":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.29","26.29"],"top":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.29","26.29"],"20px":["4.0","22.29","26.29"],"right":["4.0","7.2","7.4","8.2","8.5","15.20","15.22","17.2","17.4","18.2","18.5","22.29","24.11","24.12","24.13"],"seek":["5.12","22.19"],"settimeout":["5.12","7.5","17.5","22.2"],"controls":["5.20","5.22","24.11","24.12"],"jpg":["5.23"],"hd":["5.45","15.45"],"720p":["5.45","15.45"],"element":["6.1","8.1","13.34","16.1","18.1","22.38"],"组件的":["6.1","8.1"],"dom":["6.1","8.1","9.4","16.1","18.1","19.4"],"元素":["6.1","8.1"],"args":["6.2","6.3","6.4","16.2","16.3","16.4","22.30","26.30"],"show":["6.5","9.7","9.9","16.5","19.7","19.9"],"组件样式对象":["7.1"],"组件点击事件":["7.1"],"mounted":["7.1","11.0","15.0","17.1"],"selector":["7.2","17.2"],"default":["7.2","10.4","17.2","20.10","21.0","21.4","25.4"],"span":["7.2","17.2"],"01":["7.2","17.2","22.30","26.30"],"button":["7.3","7.4","17.3","17.4"],"tooltip":["7.3","7.4","8.2","8.3","17.3","17.4","18.2","18.3","22.32"],"color":["7.3","17.3"],"red":["7.3","17.3"],"your":["7.4","17.4","22.31","22.32","26.31","26.32","26.47"],"02":["7.5","9.4","17.5","19.3","19.4","22.30","26.30"],"update":["7.5","17.5"],"the":["7.5","12.48","17.5","21.4","22.10","25.4"],"tip":["8.2","8.3","18.2","18.3"],"50px":["8.2","8.3","8.5","18.2","18.3","18.5"],"potser":["8.4","18.4"],"setting":["9.2","19.2","19.5"],"item":["9.3","9.4","19.3","19.4"],"onselect":["9.4","19.4","22.30","26.30"],"pip":["9.5","19.5"],"mode":["9.5","19.5"],"close":["9.5","19.5"],"height":["9.5","9.8","19.8"],"add":["9.7","20.1","23.1"],"slider":["9.7","19.7"],"state":["9.8","13.34","19.8"],"range":["9.9","19.9","24.13"],"attached":["10.0"],"note":["10.2","10.4","15.12","15.16","15.33","22.7","22.10","22.47"],"to":["10.2","12.42","12.43","12.62","14.0","22.1"],"easily":["10.2"],"distinguish":["10.2"],"between":["10.2"],"and":["10.2","15.29"],"const":["10.4","24.6"],"by":["10.4","21.0","22.47"],"zh":["10.6"],"cn":["10.6"],"visibility":["10.8"],"of":["10.8","10.9","10.10","10.16","12.45","20.3","22.1"],"div":["10.8","10.9","10.10","10.11","10.12","10.16","15.5","15.29","19.6","22.21","22.27","22.36","22.37","22.38","22.41","22.48","26.37"],"classname":["10.8","10.9","10.10","10.12","10.13","10.15","10.16","15.5","15.29","15.42","19.6","22.21","22.27","22.36","22.37","22.38","22.41","22.48","22.51","26.37"],"run":["10.8","10.9","10.10","10.12","10.13","10.15","10.16","11.8","11.11","15.4","15.5","15.26","15.29","15.42","19.6","22.18","22.21","22.27","22.36","22.37","22.38","22.41","22.44","22.48","22.51","26.37"],"code":["10.8","10.9","10.10","10.12","10.13","10.15","10.16","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","15.4","15.15","15.26","15.29","15.42","19.6","22.6","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.27","22.36","22.37","22.38","22.41","22.44","22.46","22.48","22.49","22.51","26.37"],"currently":["10.11"],"active":["10.11"],"cues":["10.11"],"overall":["10.11"],"see":["10.12"],"documentation":["10.12"],"for":["10.12","22.1","22.37"],"details":["10.12"],"all":["11.6","13.0"],"manually":["12.0","21.0"],"trigger":["12.0"],"data":["12.42","12.58","20.10"],"through":["12.42","12.43"],"already":["12.46"],"been":["12.46","20.13"],"loaded":["12.46","12.50"],"or":["12.46","12.53","22.22"],"media":["12.47","12.49","12.58"],"resource":["12.48"],"type":["12.48","24.13"],"paused":["12.51","12.53","14.0"],"browser":["12.54"],"is":["12.54","14.0","15.5","17.1"],"has":["12.55","12.56","12.57","12.59","20.13"],"but":["12.58"],"currenttime":["12.60"],"attribute":["12.60"],"changed":["12.61"],"are":["13.0"],"in":["13.0"],"uppercase":["13.0"],"they":["13.0"],"only":["13.34"],"ui":["13.34"],"set":["13.34"],"i":["14.0","24.6"],"want":["14.0","22.10"],"write":["14.0"],"a":["14.0"],"that":["14.0"],"displays":["14.0"],"an":["14.0","22.43"],"image":["14.0"],"ad":["14.0"],"when":["14.0"],"automatically":["15.5"],"execute":["15.5"],"similar":["15.5","22.11"],"logic":["15.5"],"called":["15.5"],"t":["15.12"],"some":["15.16","22.22"],"videos":["15.16"],"may":["15.16","22.22"],"not":["15.16"],"switch":["15.20"],"visible":["15.29"],"resize":["15.33"],"sd":["15.45"],"480p":["15.45"],"object":["16.1","18.1","22.11"],"handler":["17.1"],"triggered":["17.1"],"after":["17.1"],"yellow":["19.3"],"step":["19.6","24.13"],"unpkg":["20.2","20.11","23.2","24.3"],"s":["20.3"],"dimensions":["20.3"],"depend":["20.3"],"size":["20.3","22.1"],"get":["20.4","23.4"],"instance":["20.4","22.41"],"getinstance":["20.4"],"imported":["20.6","21.0"],"useref":["20.8","23.8"],"export":["20.10"],"return":["20.10"],"https":["20.11"],"cdn":["20.11","23.11"],"npm":["20.11","23.11"],"dist":["20.11","23.11"],"danmuku":["20.12"],"doctype":["20.12","23.12"],"agent":["20.13"],"added":["20.13"],"head":["20.13"],"title":["20.13"],"demo":["20.13","23.13"],"must":["21.0"],"be":["21.0"],"as":["21.0","22.47"],"change":["21.4","25.4"],"language":["21.4","25.4"],"need":["22.1"],"initialize":["22.1"],"example":["22.1"],"this":["22.4","22.22","26.4"],"equivalent":["22.4"],"muted":["22.10"],"if":["22.10","24.6"],"you":["22.10"],"fit":["22.11"],"cover":["22.11"],"css":["22.11","26.1"],"description":["22.19"],"increase":["22.19"],"volume":["22.19","23.9"],"decrease":["22.19"],"forward":["22.19"],"backward":["22.19"],"cause":["22.22"],"performance":["22.22"],"compatibility":["22.22"],"issues":["22.22"],"low":["22.22"],"left":["22.32","26.32"],"something":["22.35","26.35"],"dosomething":["22.35","26.35"],"onvttload":["22.37"],"modifying":["22.37"],"text":["22.37","24.6","24.12"],"loading":["22.39","26.39"],"current":["22.41"],"modify":["22.43"],"existing":["22.43"],"player":["22.47"],"uses":["22.47"],"class":["23.3"],"d":["23.6"],"选项":["23.10"],"lang":["23.12","25.2","25.3"],"meta":["23.13"],"charset":["23.13"],"utf":["23.13"],"com":["24.3"],"默认":["24.4"],"顶部":["24.4"],"底部":["24.4"],"是否开启热力图":["24.5"],"当播放器宽度小于此值时":["24.5"],"弹幕发射器置于播放器底部":["24.5"],"points":["24.5"],"热力图数据":["24.5"],"filter":["24.5"],"弹幕载入前的过滤器":["24.5"],"只支持返回布尔值":["24.5"],"beforeemit":["24.5"],"弹幕发送前的过滤器":["24.5"],"支持返回":["24.5"],"你可以对弹幕做合法校验":["24.6"],"或者做存库处理":["24.6"],"当返回true后才表示把弹幕加入到弹幕队列":["24.6"],"async":["24.6"],"isdirty":["24.6"],"fuck":["24.6"],"test":["24.6"],"plugins":["24.10"],"artplayerplugindanmuku":["24.10"],"xml":["24.11","24.12"],"隐藏弹幕":["24.11"],"发送弹幕":["24.12"],"弹幕大小":["24.13"],"input":["24.13"],"min":["24.13"],"max":["24.13"],"重新加载当前弹幕库":["24.14"],"切换":["24.14"],"error":["24.18"],"加载错误":["24.18"],"config":["24.18"],"配置变化":["24.18"],"外":["25.0"],"不再捆绑其它多国语言":["25.0"],"需要自行导入需要的语言":["25.0"],"您可能需要初始化容器元素的大小":["26.1"],"如":["26.1"],"等同于":["26.4"],"document":["26.27"],"queryselector":["26.27"],"menu":["26.31"],"control":["26.32"],"文本的函数":["26.37"],"修改现有的语言":["26.43"],"id":["26.47"]},{"0":["5.12","20.5","20.9"],"1":["9.8","13.25","19.8","24.13"],"2":["13.26"],"3":["22.1"],"4":["22.6","22.12","22.18","22.20","22.21","22.26","22.37","22.38","22.41","22.44","22.48","22.51"],"5":["9.8","13.23","19.8","20.9","23.9"],"6":["15.42"],"7":["15.4","15.29","22.27","22.38"],"8":["12.0","20.12","20.13","22.41","23.12"],"9":["15.5","22.29","26.29"],"10":["9.8","13.12","13.14","13.27","19.8"],"11":["22.43","26.43"],"12":["22.37","26.37"],"20":["13.11"],"22":["9.2","9.6","9.7","19.2","19.5","19.7"],"25":["24.13"],"32":["0.14","10.14"],"60":["22.34","26.34"],"120":["26.34"],"150":["9.3","19.3"],"200":["24.5"],"404":["2.11","12.11"],"500":["13.21"],"1000":["22.2"],"2000":["13.24"],"3000":["5.12","13.15"],"5000":["13.4","13.13","13.16"],"二级属性":["0.0"],"mp4":["0.1","0.11","0.12","0.13","0.15","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.29","3.30","5.1","5.2","5.3","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.17","5.18","5.19","5.21","5.25","5.26","5.30","5.31","5.35","5.36","5.37","5.39","5.41","5.47","9.1","9.6","10.8","10.9","10.10","10.16","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.39","12.41","13.30","15.1","15.2","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.18","15.19","15.21","15.25","15.30","15.31","15.32","15.34","15.35","15.36","15.37","15.46","15.47","19.6","20.5","22.33","22.34","22.50","23.5","24.15","24.16","25.1","26.7","26.25","26.33","26.36","26.50"],"console":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","5.9","5.14","5.15","5.16","5.23","5.28","5.30","5.31","5.32","5.34","5.35","5.36","5.44","7.3","8.2","8.3","10.3","10.17","13.2","15.28","15.32","15.34","15.41","15.44","17.3","18.2","18.3","22.29","22.31","26.29","26.30","26.31"],"info":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","5.9","5.14","5.16","5.23","5.28","5.31","5.32","5.34","5.35","5.36","7.3","8.2","8.3","10.3","10.17","15.28","15.34","15.41","17.3","18.2","18.3","22.29","22.31","26.29","26.30","26.31"],"warning":["0.2","1.6","5.12","10.1","10.5","10.6","15.20","15.41","21.0","22.2","22.4","22.17","22.19","22.40","23.3","23.4","26.10","26.40","26.47"],"提示":["0.2","5.12","23.3","26.47"],"为了方便区别":["0.2"],"元素和普通对象":["0.2"],"播放器里的所有":["0.2"],"click":["0.3","5.20","5.22","6.1","8.1","8.2","8.3","10.3","15.41","16.1","18.1","18.2","18.3","22.29","22.32","24.10","24.11","26.29","26.31","26.32"],"event":["0.3","24.11"],"你可以修改":["0.4"],"即可":["0.4"],"zh":["0.6"],"cn":["0.6","21.4","25.4"],"your":["0.6","10.6","15.33","20.3","21.3","21.4","22.3","25.3","25.4","26.3"],"ready":["0.7","0.8","0.11","0.13","0.14","0.15","0.16","2.6","2.18","2.22","2.24","5.9","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.23","5.28","5.30","5.31","5.32","5.33","5.34","5.35","5.36","5.45","5.46","6.5","8.5","9.9","10.7","12.2","12.18","12.22","12.24","15.9","15.11","15.13","15.14","15.23","15.28","15.31","15.32","15.34","15.35","15.36","15.44","15.45","15.46","16.5","18.5","19.9"],"html":["0.8","0.9","0.10","5.20","5.22","14.0","24.10"],"some":["0.8","0.9","0.10"],"text":["0.8","0.9","0.10","17.1"],"position":["0.9","5.22","5.37","7.1","8.4","14.0","17.1","18.4","24.10"],"video":["0.11","0.12","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.28","3.29","3.30","5.1","5.6","5.7","5.8","5.10","5.15","5.17","5.18","5.19","5.21","5.24","5.25","5.26","5.27","5.29","5.30","5.37","5.39","5.41","5.47","9.1","10.8","10.9","10.10","10.16","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.24","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","15.21","15.30","15.31","15.32","15.36","15.37","15.47","19.6","20.5","22.25","22.33","22.34","22.42","22.50","23.5","24.7","24.16","25.1","26.7","26.17","26.25","26.33","26.36","26.50"],"on":["0.11","0.12","0.13","0.14","0.15","0.16","2.6","2.11","2.12","2.18","2.24","5.8","5.9","5.10","5.11","5.13","5.14","5.15","5.16","5.18","5.19","5.21","5.23","5.28","5.30","5.31","5.32","5.34","5.35","5.36","5.45","5.46","6.4","6.5","7.4","10.9","10.10","12.2","12.6","12.18","12.22","12.24","15.9","15.11","15.13","15.14","15.23","15.30","15.31","15.32","15.34","15.35","15.36","15.45","15.46","16.4","16.5","17.4","22.4"],"assets":["0.12","1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","5.1","5.4","5.5","5.6","5.7","5.17","5.24","5.26","5.27","5.29","5.38","5.39","5.40","5.41","5.42","5.43","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.6","15.7","15.8","15.10","15.11","15.13","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.26","15.27","15.30","15.36","19.1","19.6","21.1","22.25","22.33","22.36","22.42","22.50","24.7","24.8","24.16","26.5","26.7","26.17","26.25","26.36","26.37","26.42"],"sample":["0.12","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.6","5.7","5.8","5.10","5.17","5.24","5.25","5.26","5.27","5.29","5.37","5.38","5.39","5.40","5.41","5.42","9.1","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.29","13.30","15.1","15.3","15.8","15.9","15.10","15.11","15.13","15.14","15.15","15.18","15.19","15.21","15.25","15.30","15.31","15.32","15.35","15.36","15.37","15.47","19.1","19.6","21.1","22.25","22.33","22.36","22.42","22.50","24.7","24.16","25.1","26.5","26.7","26.17","26.25","26.36","26.37","26.42","26.50"],"subtitleoffset":["0.16"],"return":["0.17","9.3","9.4","10.17","19.3","19.4","24.9","24.12"],"name":["0.17","10.17"],"something":["0.17"],"dosomething":["0.17"],"一级属性":["1.0","5.0"],"app":["1.1","3.3","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.22","3.23","3.28","3.29","3.33","5.4","5.5","5.6","5.7","5.24","5.26","5.29","5.38","5.40","5.42","5.43","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.14","12.15","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.6","15.7","15.15","15.17","15.18","15.19","15.24","15.25","15.26","15.27","15.29","15.38","15.39","15.40","15.43","19.1","19.6","20.13","21.1","22.5","22.9","22.13","22.25","22.27","22.33","22.36","22.37","22.42","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.23","26.24","26.26","26.28","26.36","26.37","26.38","26.41","26.42","26.44","26.45","26.46","26.48","26.49","26.51"],"url":["1.1","3.6","3.7","3.8","3.9","3.10","3.17","3.22","3.28","3.29","5.4","5.5","5.6","5.7","5.24","5.26","5.27","5.29","5.38","5.39","5.40","5.41","5.42","5.43","10.8","10.9","10.10","10.13","10.15","10.16","12.1","12.3","12.4","12.5","12.9","12.11","12.13","12.14","12.15","12.19","12.21","12.23","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.1","15.6","15.7","15.15","15.17","15.21","15.24","15.25","15.26","15.27","15.30","15.38","15.39","15.40","15.43","19.1","19.6","21.1","22.3","22.25","22.42","22.50","23.5","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.25","26.26","26.38","26.42","26.45","26.46","26.51"],"全部工具函数请参考以下地址":["1.6"],"js":["1.11","10.11","10.12","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.2","13.34","15.5","15.29","22.11","22.21","22.37","22.38","22.41","22.48","22.51"],"emit":["2.0","12.0"],"focus":["2.0","12.0"],"移除事件":["2.0"],"true":["2.16","2.17","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.39","3.30","5.2","5.3","5.21","6.2","6.4","6.5","9.1","9.6","10.16","12.17","12.20","12.28","13.1","13.20","13.33","15.2","15.3","16.2","16.4","16.5","19.6","24.16","26.10","26.33","26.47"],"setting":["2.17","2.20","2.28","3.30","9.1","9.6","12.17","12.20","13.30","19.6"],"fullscreen":["2.22"],"srt":["2.28","2.29","2.30","2.31","12.31"],"并调用":["2.46"],"但数据意外未出现":["2.58"],"属性名字全部都是大写的形式":["3.0"],"未来容易发生变动":["3.0"],"new":["3.1","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.34","10.8","10.9","10.10","10.11","10.12","10.13","10.15","11.1","13.1","13.3","13.4","13.10","13.11","13.12","13.13","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.26","13.27","13.28","13.29","13.31","13.32","13.33","15.4","15.5","15.26","15.29","15.38","15.39","15.40","15.42","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.28","22.35","22.36","22.37","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","23.9","26.6","26.11","26.22","26.35","26.37","26.41"],"container":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","3.34","5.5","5.29","10.8","10.9","10.10","10.11","10.12","10.13","10.15","10.16","11.1","13.3","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.7","15.15","15.17","15.24","15.26","15.27","15.29","15.38","15.39","15.40","15.42","15.43","19.1","20.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.20","22.23","22.24","22.26","22.27","22.28","22.36","22.37","22.45","22.46","22.49","22.51","23.10","24.8","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.28","26.36","26.37","26.38","26.41","26.44","26.45","26.46","26.48","26.49","26.51"],"log":["3.2","5.44","15.44"],"art":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","3.31","3.34","10.8","10.9","10.10","10.11","10.13","10.15","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.28","13.31","13.32","13.33","15.4","15.5","15.26","15.29","15.42","20.9","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.36","22.37","22.38","22.44","22.45","22.46","22.48","22.49","22.51","23.9","26.11","26.22","26.27","26.37"],"var":["3.34","10.8","10.9","10.10","10.11","10.12","11.1","13.1","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.5","15.29","15.42","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.23","22.24","22.26","22.27","22.35","22.36","22.37","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","26.11","26.35","26.37"],"show":["4.0","6.2","6.3","6.4","14.0","16.2","16.3","16.4"],"block":["4.0","14.0"],"hide":["4.0","14.0"],"controls":["4.0","5.37","15.37","24.10"],"tooltip":["4.0","7.1","9.7","17.1","19.7","26.32"],"muted":["5.2","5.3","5.25","15.2","15.3","26.10"],"seek":["5.11","5.13"],"t":["5.12"],"right":["5.20","5.22","8.3","8.4","14.0","17.1","18.3","18.4","24.10","26.29"],"switch":["5.20","15.12"],"function":["5.20","5.22","6.1","8.1","8.2","8.3","11.0","16.1","18.1","18.2","18.3","22.29","22.31","22.32","24.9","24.11","24.13","26.29","26.31"],"theme":["5.44","15.44"],"settimeout":["5.45","6.5","8.5","9.9","10.14","15.45","16.5","18.5","19.9","26.2"],"subtitle":["5.47","12.29","12.30"],"object":["6.1","8.1"],"组件样式对象":["6.1","8.1"],"false":["6.2","6.3","6.4","9.5","13.18","13.19","13.31","13.34","16.2","16.3","16.4","19.5","24.6"],"update":["6.5","8.5","9.9"],"组件挂载后触发":["7.1"],"组件的提示文本":["7.1"],"yellow":["7.2","17.2"],"02":["7.2","17.2"],"onselect":["7.2","17.2"],"item":["7.2","9.5","17.2"],"dom":["7.2","17.2"],"args":["7.3","8.2","8.3","17.3","18.2","18.3","22.29","22.31","22.32","26.29","26.31"],"mounted":["7.3","8.2","8.3","17.3","18.2","18.3","24.13"],"style":["7.4","14.0","17.4","20.5","22.32","23.5","24.13","26.32"],"color":["7.4","17.4","22.32","24.4","26.32"],"red":["7.4","17.4"],"control":["7.5","17.5"],"by":["7.5","8.5","9.9","17.5","18.5","19.9","22.2"],"absolute":["8.4","14.0","18.4"],"top":["8.4","14.0","18.4"],"50px":["8.4","18.4"],"the":["8.5","9.9","18.5","19.9"],"button":["9.2","19.2"],"img":["9.2","9.6","9.7","14.0","19.2","19.5","19.7","22.39"],"height":["9.2","9.6","19.2","19.5","20.5","22.1","23.5","26.1"],"src":["9.2","9.5","14.0","19.2","19.5","22.39","26.39"],"quality":["9.3","19.3"],"1080p":["9.3","19.3"],"state":["9.5","22.39","24.6","26.39"],"svg":["9.5","9.8","19.5","19.8"],"settings":["9.6","10.4","19.2","19.6"],"slider":["9.6"],"5x":["9.6","9.7","19.6","19.7"],"width":["9.6","9.7","14.0","19.5","19.7","20.5","22.1","23.5","26.1"],"icon":["9.7","19.7"],"range":["9.8","19.8"],"instance":["10.0","23.4"],"which":["10.0","11.0"],"note":["10.1","15.20","15.22","15.41","22.2","22.4","22.17","22.19"],"if":["10.1","10.4","15.41","20.11","22.47","24.11","24.12"],"you":["10.1","10.4","15.41"],"directly":["10.1","20.4"],"regular":["10.2"],"objects":["10.2"],"within":["10.2"],"are":["10.2"],"mouseenter":["10.3"],"instances":["10.4"],"share":["10.4"],"same":["10.4","15.12","22.47"],"localstorage":["10.4"],"and":["10.4","12.46","15.12"],"want":["10.4"],"different":["10.4"],"players":["10.4"],"use":["10.4"],"loading":["10.5","12.54"],"this":["10.5","22.40"],"is":["10.5","12.48","15.33","20.4"],"using":["10.6"],"can":["10.6","22.40"],"only":["10.6","22.40"],"to":["10.7","11.6","15.20","15.22","20.5","23.5"],"artplayer":["10.8","10.9","10.10","10.11","10.12","10.13","10.15","10.16","11.1","13.1","13.34","15.4","15.6","15.15","15.17","15.26","15.29","15.38","15.39","15.40","15.42","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.35","22.36","22.37","22.38","22.44","22.45","22.46","22.49","22.51","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.24","26.28","26.35","26.37","26.38","26.41","26.44","26.48","26.49","26.51"],"classname":["10.11","13.34","22.11","22.22"],"run":["10.11","13.34","22.11","22.22"],"code":["10.11","13.34","15.5","22.11","22.22"],"flip":["10.16"],"playbackrate":["10.16"],"constructor":["11.0"],"please":["11.6"],"refer":["11.6"],"remove":["12.0"],"listener":["12.0"],"end":["12.42","12.43"],"without":["12.42","12.43"],"duration":["12.45"],"partially":["12.46"],"reached":["12.47"],"its":["12.47","20.3"],"not":["12.48","20.4"],"has":["12.49","12.60"],"delayed":["12.53"],"due":["12.53","15.20","15.22","22.17"],"changed":["12.55"],"completed":["12.56"],"begun":["12.57"],"been":["12.59"],"temporary":["12.62"],"lack":["12.62"],"subject":["13.0"],"change":["13.0"],"div":["13.34","20.13","22.11","22.22","23.13"],"100px":["14.0"],"display":["14.0","24.13"],"none":["14.0"],"20px":["14.0"],"have":["15.12","15.16"],"functionality":["15.12"],"a":["15.16","21.0"],"such":["15.16"],"as":["15.16"],"live":["15.16"],"streams":["15.16"],"or":["15.16","17.1","22.1"],"browser":["15.20","15.22","22.17"],"security":["15.20","15.22","22.17"],"mechanisms":["15.20","15.22","22.17"],"page":["15.20","15.22","22.10"],"must":["15.22","20.3"],"jpg":["15.23"],"json":["15.28"],"stringify":["15.28"],"useful":["15.33"],"but":["15.33"],"need":["15.41"],"left":["17.1"],"pnpm":["20.1","23.1","24.2"],"com":["20.2","20.11","23.2","23.11"],"so":["20.3"],"reactive":["20.4"],"modifying":["20.4"],"path":["20.5","23.5"],"600px":["20.5","23.5"],"400px":["20.5","22.1","26.1"],"margin":["20.5"],"60px":["20.5"],"auto":["20.5"],"when":["20.6","21.0"],"importing":["20.6"],"null":["20.8","23.8"],"volume":["20.9"],"option":["20.10","23.10"],"tip":["20.11"],"lang":["20.12","21.2","21.3"],"en":["20.12","23.12"],"head":["20.12","23.12"],"meta":["20.12","20.13","23.12"],"charset":["20.12","20.13","23.12"],"utf":["20.12","20.13","23.12"],"body":["20.13","23.13"],"class":["20.13","23.13"],"needed":["21.0"],"cannot":["21.0"],"matched":["21.0"],"script":["21.2","25.2"],"play":["21.4","22.19","25.4"],"css":["22.1"],"300px":["22.1","26.1"],"three":["22.2"],"file":["22.2"],"formats":["22.2"],"caches":["22.7"],"last":["22.7"],"level":["22.7"],"immediately":["22.10"],"upon":["22.10"],"load":["22.10"],"space":["22.19"],"toggle":["22.19"],"pause":["22.19"],"these":["22.19"],"devices":["22.22"],"older":["22.22"],"browsers":["22.22"],"document":["22.27"],"queryselector":["22.27"],"opacity":["22.29","26.29"],"setting02":["22.30","26.30"],"green":["22.32","26.32"],"one":["22.34","26.34"],"more":["22.34","26.34"],"chance":["22.34","26.34"],"ploading":["22.39","26.39"],"gif":["22.39","26.39"],"recognition":["22.40"],"player":["22.40"],"parse":["22.40"],"suffixes":["22.40"],"like":["22.40"],"key":["22.47"],"cache":["22.47"],"progress":["22.47"],"however":["22.47"],"播放器的尺寸依赖于容器":["23.3"],"getinstance":["23.4"],"ts":["23.6"],"types":["23.10"],"const":["23.10"],"unpkg":["23.11"],"title":["23.12"],"ffffff":["24.4"],"弹幕颜色":["24.4"],"默认为白色":["24.4"],"promise":["24.5"],"beforevisible":["24.5"],"弹幕显示前的过滤器":["24.5"],"visible":["24.5"],"弹幕层是否可见":["24.5"],"emitter":["24.5"],"是否开启弹幕发射器":["24.5"],"maxlength":["24.5"],"弹幕输入框最大长度":["24.5"],"await":["24.6"],"这里是所有弹幕的过滤器":["24.6"],"包含来自服务端的和来自用户输入的":["24.6"],"plugins":["24.9","24.15","24.16","24.17"],"artplayerplugindanmuku":["24.9","24.15","24.16","24.17"],"xml":["24.10"],"隐藏弹幕":["24.10"],"prompt":["24.12"],"请输入弹幕文本":["24.12"],"弹幕测试文本":["24.12"],"trim":["24.12"],"value":["24.13"],"flex":["24.13"],"alignitems":["24.13"],"center":["24.13"],"切换到新的弹幕库":["24.14"],"config":["24.14"],"v2":["24.14"],"fullscreenweb":["24.16"],"stop":["24.18"],"弹幕停止":["24.18"],"start":["24.18"],"弹幕开始":["24.18"],"当无法匹配到语言时":["25.0"],"会默认显示英文":["25.0"],"i18n":["25.0","25.3"],"或者使用":["26.1"],"aspect":["26.1"],"热键":["26.19"],"描述":["26.19"],"增加音量":["26.19"],"降低音量":["26.19"],"innerhtml":["26.27"],"sd":["26.33"],"后缀的识别":["26.40"],"播放器只能解析这种后缀":["26.40"],"因为播放器默认使用":["26.47"]},{"0":["23.5"],"2":["5.31"],"4":["22.11","22.22"],"5":["5.8","5.9","5.15","15.8","26.7"],"8":["2.0"],"9":["5.32","22.1"],"10":["5.11","5.13","15.11","15.13"],"16":["5.32","15.32","22.1","24.12","26.1"],"22":["19.6"],"60":["22.36","24.5","26.36"],"120":["22.34"],"180":["22.34","26.34"],"200":["24.6"],"240":["26.34"],"360":["9.3"],"720":["9.3","19.3"],"1000":["0.8","0.9","0.10","0.16","10.8","24.5","26.2"],"1080":["9.3","19.3"],"5000":["0.14","10.14"],"比较少用":["0.0"],"warning":["0.1","0.5","0.6","0.7","0.8","5.16","5.20","5.22","5.28","5.33","5.41","10.3","10.7","10.14","15.28","20.5","20.13","22.29","22.30","22.31","22.32","22.39","22.42","22.50","23.13","26.2","26.4","26.7","26.17","26.19","26.31","26.32","26.39","26.42","26.50"],"提示":["0.1","5.16","5.20","5.22","5.33","26.2","26.7","26.10","26.17"],"假如直接修改这个":["0.1"],"元素都是以":["0.2"],"开头命名的":["0.2"],"这是所有":["0.2"],"元素的定义":["0.2"],"mouseenter":["0.3"],"mouseleave":["0.3","10.3"],"loading":["0.5","12.49"],"这是所有图标的定义":["0.5"],"types":["0.5","1.6","11.6","25.0","26.50"],"使用":["0.6","24.9"],"只能更新实例化之后的":["0.6"],"to":["0.7","22.2"],"play":["0.7","4.0","5.2","10.7","15.2","21.3","22.2","25.3"],"如果想马上隐藏":["0.7"],"settimeout":["0.8","0.9","0.10","0.12","0.13","0.14","0.15","0.16","5.2","5.3","5.8","5.11","5.13","5.21","6.4","7.4","8.4","9.8","10.8","10.9","10.10","10.16","15.2","15.8","15.11","15.13","16.4","17.4","18.4","19.8"],"false":["0.8","0.9","0.10","0.15","0.16","10.8","22.29","22.31","24.4","26.29","26.31"],"left":["0.9","7.1","10.9"],"true":["0.10","0.12","0.13","2.19","3.5","3.6","3.7","3.28","3.29","5.1","5.14","5.25","5.34","6.3","10.10","12.16","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.39","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.21","15.25","15.34","16.3","19.1","22.25","22.33","26.17","26.25"],"srt":["0.11","5.47","12.28","12.29","12.30","15.47"],"ready":["0.12","5.2","5.3","5.5","5.6","5.7","5.8","5.10","5.17","5.21","5.24","5.25","5.26","5.27","5.29","6.4","7.4","8.4","9.8","10.8","10.9","10.10","10.11","10.12","10.13","10.15","10.16","12.0","12.6","15.2","15.3","15.5","15.8","15.10","15.15","15.17","15.18","15.19","15.21","15.25","15.26","15.29","15.30","16.4","17.4","18.4","19.8","24.17"],"on":["0.17","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","5.1","5.2","5.3","5.4","5.5","5.6","5.7","5.17","5.24","5.25","5.26","5.27","5.29","5.38","5.39","5.40","5.47","8.4","9.8","10.8","10.11","10.12","10.13","10.15","10.16","12.1","12.3","12.4","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.17","12.19","12.20","12.21","12.23","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17","15.1","15.2","15.3","15.5","15.6","15.7","15.8","15.10","15.15","15.17","15.18","15.19","15.21","15.24","15.25","15.26","15.27","15.29","15.38","15.39","15.40","15.47","18.4","19.8","24.15","24.17","26.4"],"非常少使用":["1.0"],"sample":["1.1","3.1","3.3","3.4","3.11","3.12","3.13","3.18","3.21","3.22","3.23","3.24","3.27","3.31","3.32","3.33","3.34","5.4","5.5","5.43","10.11","10.12","11.1","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.21","13.22","13.23","13.28","13.33","13.34","15.4","15.5","15.6","15.7","15.17","15.24","15.26","15.27","15.29","15.38","15.39","15.40","15.42","15.43","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.28","22.35","22.37","22.38","22.41","22.44","22.45","22.46","22.49","22.51","23.10","24.8","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.28","26.35","26.38","26.41","26.44","26.45","26.46","26.48","26.49","26.51"],"video":["1.1","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.21","3.22","3.23","3.24","3.31","3.33","5.4","5.5","5.42","10.11","10.13","10.15","11.1","12.1","12.14","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","15.4","15.24","15.26","15.29","15.39","15.42","19.1","20.10","21.1","22.9","22.28","22.36","23.10","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.28","26.37","26.38","26.42","26.44","26.45","26.46","26.48","26.49"],"mp4":["1.1","3.8","3.9","3.10","3.17","3.22","3.28","3.34","5.4","5.5","5.6","5.7","5.24","5.27","5.29","5.38","5.40","5.42","5.43","10.11","10.12","10.13","10.15","12.1","12.3","12.4","12.5","12.14","12.15","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.40","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.7","15.15","15.17","15.24","15.26","15.27","15.29","15.38","15.39","15.40","15.42","15.43","19.1","20.10","21.1","22.5","22.14","22.15","22.16","22.25","22.36","22.37","22.38","22.42","23.10","24.7","24.8","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.26","26.37","26.38","26.42","26.45","26.46","26.51"],"artplayer":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.2","22.11","22.21","22.22","22.41","22.48"],"d":["1.6"],"info":["1.11","2.12","5.15","5.26","5.29","5.30","5.41","5.42","9.5","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","15.9","15.14","15.15","15.23","15.26","15.29","15.30","15.31","15.32","15.35","15.36","19.5","22.32","24.17","26.32"],"const":["2.0","5.18","5.19","9.5","12.0","15.18","15.19","19.5","20.10","24.13"],"onready":["2.0","12.0"],"console":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","5.25","5.26","5.29","5.39","5.41","5.42","5.43","9.5","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","12.7","12.8","12.9","12.10","12.12","12.13","12.27","12.31","12.41","15.9","15.14","15.15","15.23","15.26","15.29","15.30","15.31","15.35","15.36","15.42","15.43","19.5","20.5","22.32","23.5","24.17","26.32"],"event":["2.5","2.7","2.8","2.9","2.10","2.12","2.13","2.22","2.41","5.41","9.2","9.5","12.5","12.7","12.8","12.9","12.10","12.12","12.13","12.22","12.41","16.1","18.1"],"reconnecttime":["2.11","12.11"],"state":["2.12","2.15","2.16","2.21","2.23","2.24","2.25","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","9.2","9.6","9.7","12.12","12.15","12.21","12.23","12.24","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","19.2","19.7"],"height":["2.18","9.7","19.6","19.7"],"datauri":["2.26","12.26"],"currenttime":["2.27","12.27"],"offset":["2.28"],"cues":["2.29","2.30","2.31","12.29","12.30","12.31"],"option":["2.31","12.31"],"load":["2.46","12.46"],"方法重新加载它":["2.46"],"基本上用不到":["3.0"],"app":["3.1","3.4","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.24","3.25","3.26","3.27","3.31","3.32","3.34","10.11","10.12","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","15.4","15.5","15.42","20.10","22.3","22.6","22.8","22.11","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.28","22.35","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","23.10","23.13","26.3","26.11","26.22","26.35"],"url":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","3.34","10.12","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","15.4","15.5","15.29","15.42","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.28","22.35","22.38","22.44","22.45","22.46","22.48","22.49","22.51","23.10","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.24","26.27","26.28","26.35","26.44","26.48","26.49"],"assets":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","3.34","10.11","10.12","11.1","13.3","13.4","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.18","13.21","13.22","13.23","13.24","13.26","13.27","13.31","13.32","13.33","13.34","15.4","15.5","15.29","15.38","15.39","15.40","15.42","15.43","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.28","22.35","22.37","22.38","22.41","22.44","22.45","22.46","22.48","22.49","22.51","23.10","26.3","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.26","26.27","26.28","26.35","26.38","26.41","26.44","26.45","26.46","26.48","26.49","26.51"],"loop":["3.5","3.6","3.7","13.5","13.6","13.7"],"flip":["3.5","3.6","3.7","13.5","13.6","13.7"],"dblclick":["3.17"],"setting":["3.28","3.29","12.28","13.28","13.29","19.1","24.13"],"playbackrate":["3.28","13.28"],"contextmenu":["3.28","3.29","3.30","13.29","13.30"],"aspectratio":["3.29","10.16","13.29"],"show":["3.29","3.30","9.8","13.30","19.8","22.29","22.31","24.11","24.18","26.29","26.31"],"click":["4.0","5.37","5.41","14.0","15.37"],"marginright":["4.0","14.0"],"比较常用":["5.0"],"muted":["5.1","15.1","15.25"],"seek":["5.8","15.8","15.11","15.13"],"switch":["5.12"],"和":["5.12","7.1","24.5"],"的功能是一样的":["5.12"],"只是":["5.12"],"有的视频是没有时长的":["5.16"],"async":["5.18","5.19","15.18","15.19"],"await":["5.18","5.19","15.18","15.19"],"t":["5.23"],"json":["5.28"],"stringify":["5.28"],"resize":["5.33","24.15"],"当你的容器只有宽度":["5.33"],"playsinline":["5.34","15.34"],"m3u8":["5.35","22.2","26.41"],"000":["5.36"],"right":["5.37","7.1","15.37"],"html":["5.37","10.8","10.9","10.10","15.37","20.1","23.1"],"timeupdate":["5.39"],"green":["5.44","15.44"],"1080p":["5.45","15.45"],"png":["5.46","15.46","22.36","22.39","26.36","26.39"],"组件点击事件":["6.1","8.1"],"mounted":["6.1","8.1","16.1","18.1","22.29","26.29"],"组件挂载后触发":["6.1","8.1"],"get":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"the":["6.2","6.3","6.4","6.5","7.2","7.3","7.4","8.2","8.3","8.4","9.8","16.2","16.3","16.4","16.5","17.2","17.3","17.4","18.2","18.3","18.4","19.8","22.19"],"element":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"of":["6.2","6.3","7.2","7.3","8.2","8.3","10.5","12.53","12.62","15.41","16.2","16.3","17.1","17.2","17.3","18.2","18.3"],"by":["6.2","6.3","6.4","6.5","7.2","7.4","8.4","16.2","16.3","16.4","16.5","17.2","17.4","18.4"],"delete":["6.4","7.4","8.4","9.8","16.4","17.4","18.4","19.8"],"控制控制器出现的左右位置":["7.1"],"selector":["7.1","17.1"],"array":["7.1","17.1"],"return":["7.2","17.2"],"control":["7.2","7.3","7.4","17.2","17.3","17.4"],"200px":["8.5","18.5"],"svg":["9.2","9.6","9.7","19.2","19.6","19.7"],"item":["9.2","9.6","19.2"],"720p":["9.3","19.3"],"360p":["9.3","19.3"],"nextstate":["9.5","19.5"],"src":["9.6","9.7","19.6","19.7"],"pip":["9.9","19.9"],"mode":["9.9","19.9"],"close":["9.9","19.9"],"are":["10.0","11.0","15.0","22.2"],"less":["10.0"],"commonly":["10.0","15.0"],"modify":["10.1","10.4","20.11","20.13"],"this":["10.1","10.2"],"object":["10.1"],"named":["10.2"],"with":["10.2","20.12","23.12"],"a":["10.2","12.48","15.12"],"prefix":["10.2"],"is":["10.2","15.12","20.5"],"definition":["10.2","10.5"],"note":["10.3","10.14","15.28","20.13"],"if":["10.3","10.6","10.7","22.4","22.17"],"you":["10.3","10.6","10.7","15.33","22.47"],"need":["10.3","20.11","20.13","22.47"],"that":["10.3","15.16"],"only":["10.3","10.14","15.5","15.41","22.19"],"exist":["10.3","15.41"],"during":["10.3"],"can":["10.4"],"after":["10.6","10.14","16.1","18.1","22.19"],"instantiation":["10.6"],"want":["10.6","10.7"],"before":["10.6","20.13"],"hide":["10.7","24.18"],"some":["10.8","10.9","10.10"],"text":["10.8","10.9","10.10","24.7","24.9"],"position":["10.9","15.37"],"these":["10.14","15.16"],"take":["10.14","22.19"],"effect":["10.14","22.19"],"subtitleoffset":["10.16"],"something":["10.17"],"dosomething":["10.17"],"very":["11.0"],"rarely":["11.0"],"following":["11.6","20.11"],"address":["11.6"],"off":["12.0"],"having":["12.42"],"stop":["12.42"],"for":["12.42","21.0","22.10","22.30","22.31","22.32"],"stopping":["12.43"],"buffer":["12.43"],"property":["12.45"],"changes":["12.45"],"method":["12.46","15.12"],"called":["12.46"],"end":["12.47"],"point":["12.47"],"supported":["12.48","22.2"],"finished":["12.49"],"lack":["12.53"],"resource":["12.54"],"unexpectedly":["12.58"],"not":["12.58","20.5"],"suspended":["12.59"],"been":["12.60","15.16"],"updated":["12.60"],"future":["13.0"],"and":["13.0","20.11"],"container":["13.1","13.4","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","20.10","22.3","22.18","22.21","22.22","22.35","22.38","22.41","22.44","22.48","23.3","26.35"],"log":["13.2","20.5","23.5"],"new":["13.14","13.15","13.16","13.25","13.34","20.8","20.9","22.11","22.22","22.27","23.8","26.27"],"var":["13.34","22.11","22.22"],"art":["13.34","22.11","22.22","22.27"],"controls":["14.0","17.1"],"tooltip":["14.0"],"which":["15.0"],"returns":["15.12"],"promise":["15.12","24.9"],"it":["15.12","15.33","15.41","20.13"],"resolve":["15.12"],"s":["15.12","15.41","22.47"],"fully":["15.16"],"decoded":["15.16"],"in":["15.16","20.4"],"must":["15.20","22.10"],"have":["15.20","15.22","20.3"],"prior":["15.20","15.22"],"user":["15.20","15.22"],"interaction":["15.20","15.22"],"e":["15.20","15.22","22.7"],"g":["15.20","15.22","22.7"],"has":["15.20","15.22","22.47"],"clicked":["15.22"],"dimension":["15.28"],"an":["15.33","22.4"],"unknown":["15.33"],"calculates":["15.33"],"duration":["15.41"],"lifecycle":["15.41"],"triggered":["16.1","18.1"],"mount":["16.1","18.1"],"list":["17.1"],"objects":["17.1"],"img":["19.6"],"width":["19.6"],"defined":["20.3"],"tip":["20.3","20.9","23.9","23.11"],"see":["20.3"],"more":["20.3","22.10","22.42"],"will":["20.4"],"current":["20.8","23.8"],"full":["20.9"],"typescript":["20.9","23.9"],"support":["20.11"],"even":["20.11"],"older":["20.11"],"configuration":["20.11","22.31","22.32"],"title":["20.12"],"import":["20.12","23.12"],"map":["20.12","23.12"],"displayed":["21.0"],"i18n":["21.0","21.3"],"implementation":["21.0"],"lang":["21.1","25.1"],"window":["21.2","25.2"],"imported":["21.4","25.4"],"use":["22.1"],"aspect":["22.1"],"ratio":["22.1","26.1"],"ogg":["22.2","26.2"],"webm":["22.2","26.2"],"other":["22.2"],"like":["22.2"],"or":["22.2"],"flv":["22.2"],"inside":["22.4"],"callback":["22.4"],"refers":["22.4"],"instance":["22.4"],"however":["22.4"],"arrow":["22.4"],"upon":["22.7"],"next":["22.7"],"initialization":["22.7"],"page":["22.7"],"refresh":["22.7"],"be":["22.10"],"set":["22.10"],"capture":["22.17"],"may":["22.17"],"fail":["22.17"],"source":["22.17"],"player":["22.19"],"gains":["22.19"],"focus":["22.19"],"js":["22.22"],"innerhtml":["22.27"],"component":["22.31","22.32"],"sd":["22.33"],"480p":["22.33","26.33"],"谁でもいいはずなのに":["22.34","26.34"],"夏の想い出がまわる":["22.34","26.34"],"all":["22.39"],"icon":["22.39"],"but":["22.40"],"cannot":["22.40"],"zh":["22.43","26.43"],"cn":["22.43","26.43"],"different":["22.47"],"variable":["22.50"],"reference":["22.50"],"的尺寸":["23.3"],"所以你的容器":["23.3"],"必须是有尺寸的":["23.3"],"非响应式":["23.4"],"在":["23.4"],"400px":["23.5"],"margin":["23.5"],"60px":["23.5"],"auto":["23.5"],"全部":["23.9"],"定义":["23.9"],"volume":["23.10"],"假如你要兼容更古老的浏览器时":["23.11"],"请修改以下配置然后自行构建":["23.11"],"body":["23.12"],"border":["24.4"],"弹幕是否有描边":["24.4"],"默认为":["24.4"],"locktime":["24.5"],"输入框锁定时间":["24.5"],"theme":["24.5"],"dark":["24.5","24.16"],"弹幕主题":["24.5"],"支持":["24.5"],"length":["24.6"],"这是弹幕即将显示的时触发的函数":["24.6"],"当返回true后才表示可以马上发送到播放器里":["24.6"],"弹幕已经出现在播放器里":["24.6"],"你可以访问到弹幕的dom元素里":["24.6"],"plugins":["24.7","24.8"],"artplayerplugindanmuku":["24.7","24.8"],"resovle":["24.9"],"function":["24.10","26.32"],"target":["24.11"],"innertext":["24.11"],"else":["24.11"],"color":["24.12"],"math":["24.12"],"floor":["24.12"],"random":["24.12"],"0xffffff":["24.12"],"tostring":["24.12"],"queryselector":["24.13"],"addeventlistener":["24.13"],"追加":["24.14"],"追加新的弹幕库":["24.14"],"参数类型和option":["24.14"],"danmuku相同":["24.14"],"xml":["24.15","24.17"],"弹幕隐藏":["24.18"],"弹幕显示":["24.18"],"写法参考":["25.0","26.50"],"默认支持三种视频文件格式":["26.2"],"播放器会缓存最后一次音量的大小":["26.7"],"假如希望默认进入页面就能自动播放视频":["26.10"],"必需为":["26.10"],"视频快进":["26.19"],"视频快退":["26.19"],"space":["26.19"],"切换播放":["26.19"],"暂停":["26.19"],"subtitle":["26.25"],"args":["26.32"],"hd":["26.33"],"webkit":["26.38"],"全部图标的定义":["26.39"],"但无法解析这种后缀":["26.40"],"作为":["26.47"],"key":["26.47"],"来缓存播放进度的":["26.47"],"但假如你的同一个视频的":["26.47"]},{"0":["5.10","5.11","5.13","5.16","5.23","15.10","15.11","15.13","15.16","15.23","20.10","23.10"],"1":["5.47","9.7","15.47","19.7","24.7","24.9"],"2":["5.8","15.8","15.31"],"5":["5.6","5.7","9.7","15.6","15.7","15.9","15.15","19.7","20.10","23.10"],"9":["15.32","26.1"],"10":["5.46","9.7","15.46","19.7","22.36","26.36"],"60":["5.46","15.46"],"240":["22.34"],"300":["22.34","26.34"],"360":["19.3"],"404":["3.14","3.15","13.14","13.15"],"1000":["0.13","0.15","10.9","10.10","10.13","10.15","10.16"],"3000":["0.12","5.2","5.3","5.8","5.11","5.13","5.21","5.45","6.4","6.5","7.4","7.5","8.4","8.5","9.8","9.9","10.12","15.2","15.3","15.8","15.11","15.13","15.21","15.45","16.4","16.5","17.4","17.5","18.4","18.5","19.8","19.9"],"对象":["0.1"],"播放器不会马上做出响应":["0.1"],"types":["0.2","2.0","10.2","10.5","20.9","21.0","22.39","22.50","23.9","26.39"],"d":["0.2","0.5","2.0","10.2","10.5","11.6","12.0","21.0","22.39","22.50","25.0","26.39","26.50"],"ts":["0.2","0.5","1.6","2.0","10.2","10.5","11.6","12.0","21.0","22.39","22.50","25.0","26.39","26.50"],"warning":["0.3","0.9","0.10","0.14","0.16","2.0","10.8","10.9","10.10","10.16","12.0","22.1","22.36","22.43","23.5","26.1","26.29","26.30","26.36","26.43"],"提示":["0.3","0.14","5.28","5.41","23.13","26.1","26.4","26.19"],"假如你需要一些":["0.3","5.41"],"事件只存在于播放器的生命周期上时":["0.3","5.41"],"强烈建议使用这些函数":["0.3"],"以避免造成内存泄漏":["0.3","5.41"],"your":["0.4","5.17","10.4","15.17"],"假如想在实例化之前更新":["0.6"],"请使用基础选项的":["0.6"],"来更新":["0.6"],"的显示":["0.7"],"组件配置":["0.8","0.9","0.10","26.29","26.31","26.32"],"请参考以下地址":["0.8","0.9","0.10","0.16","26.29","26.30","26.31","26.32"],"component":["0.8","0.9","0.10","0.16","10.8","10.9","10.10","10.16","22.29","22.30","26.29","26.30","26.31","26.32"],"color":["0.11","10.11","22.37","26.37"],"red":["0.11","10.11"],"false":["0.12","0.13","5.21","9.9","10.9","10.10","10.12","10.13","10.15","10.16","15.21","19.9","22.22","22.45","26.22","26.45"],"只在播放器获得焦点后":["0.14","26.19"],"如点击了播放器后":["0.14","26.19"],"这些快捷键才会生效":["0.14","26.19"],"true":["0.15","3.11","3.12","3.13","3.21","3.22","3.23","3.24","5.24","10.12","10.13","10.15","13.11","13.12","13.13","13.21","13.22","13.23","13.24","15.14","15.24","22.8","22.9","22.11","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.23","22.24","22.26","22.27","22.38","22.44","22.46","22.48","22.49","24.12","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.23","26.24","26.26","26.27","26.38","26.44","26.46","26.48","26.49"],"设置面板":["0.16"],"html":["0.16","10.16","22.42","22.43","24.2","26.42","26.43"],"ready":["0.17","2.0","5.1","5.4","5.47","10.17","15.1","15.4","15.6","15.7","15.24","15.27","15.47"],"off":["2.0"],"全部事件请参考以下地址":["2.0"],"events":["2.0"],"info":["2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","5.18","5.19","5.25","5.38","5.39","5.40","5.43","9.2","9.6","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","15.18","15.19","15.25","15.38","15.39","15.40","15.42","15.43","19.2","19.6"],"console":["2.2","2.6","2.19","2.28","2.39","3.8","3.9","3.10","3.17","5.18","5.19","5.38","5.40","9.2","9.6","12.1","12.2","12.3","12.4","12.5","12.6","12.11","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.28","12.29","12.30","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.8","13.9","13.10","13.17","15.18","15.19","15.25","15.38","15.39","15.40","19.2","19.6"],"log":["2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17"],"video":["3.1","3.3","3.4","3.16","3.18","3.19","3.20","3.25","3.26","3.27","3.32","13.3","13.4","13.11","13.12","13.13","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.11","22.12","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.27","22.35","22.44","22.49","26.3","26.11","26.27","26.35"],"mp4":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.20","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","13.34","22.3","22.6","22.8","22.9","22.11","22.12","22.13","22.18","22.20","22.21","22.22","22.23","22.24","22.26","22.27","22.28","22.35","22.44","22.45","22.46","22.48","22.49","22.51","26.3","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.24","26.27","26.28","26.35","26.44","26.48","26.49"],"playbackrate":["3.5","3.6","3.7","13.5","13.6","13.7"],"aspectratio":["3.5","3.6","3.7","13.5","13.6","13.7"],"autoplayback":["3.11","3.12","3.13","13.11","13.12","13.13"],"sample":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","13.1","13.3","13.4","13.14","13.15","13.16","13.18","13.19","13.20","13.24","13.25","13.26","13.27","13.31","13.32","22.3","22.11","22.21","22.22","22.27","22.48","26.3","26.27"],"autoorientation":["3.21","13.21"],"show":["3.22","3.28","13.22","13.28","13.29"],"fastforward":["3.23","3.24","13.23","13.24"],"fullscreenweb":["3.31","13.31"],"miniprogressbar":["3.33","13.33"],"只销毁界面":["3.34"],"不主动清空":["3.34"],"pause":["4.0","14.0"],"layer":["4.0","14.0"],"png":["4.0","14.0"],"仅重置":["5.5"],"不移除界面":["5.5"],"t":["5.10","5.11","5.13","15.10","15.11","15.13","15.23"],"方法会返回":["5.12"],"promise":["5.12"],"当":["5.12"],"resolve":["5.12"],"时表示新地址是可以播放":["5.12"],"reject":["5.12","15.12"],"时表示新地址加载错误":["5.12"],"例如直播中的视频或者没被解码完成的视频":["5.16"],"这个时候获取的时长会是":["5.16"],"name":["5.17","15.17"],"由于浏览器安全机制":["5.20","5.22","26.17"],"触发窗口全屏前":["5.20"],"页面必须先存在交互":["5.20","5.22"],"例如用户点击过页面":["5.20","5.22"],"触发画中画前":["5.22"],"默认":["5.26"],"尺寸和坐标信息是通过":["5.28"],"getboundingclientrect":["5.28","15.28"],"获取的":["5.28"],"但不知道具体高度时":["5.33"],"这个属性很有用":["5.33"],"它能自动计算出视频的高度":["5.33"],"但你需要确定设置这个属性的时机":["5.33"],"强烈建议使用该函数":["5.41"],"4k":["5.45","15.45"],"number":["5.46","15.46","24.13"],"column":["5.46","15.46"],"tooltip":["6.1","8.1","16.1","18.1"],"组件的提示文本":["6.1","8.1"],"remove":["6.4","7.4","8.4","9.8","16.4","17.4","18.4"],"选择列表的对象数组":["7.1"],"onselect":["7.1","17.1"],"选择列表的元素被点击时触发的函数":["7.1"],"by":["7.3","8.2","8.3","9.8","17.3","18.2","18.3","19.8","22.19"],"left":["8.5","18.5","22.2"],"return":["9.2","9.5","9.6","19.2","19.5","19.6"],"switchquality":["9.3","19.3"],"open":["9.5","19.5"],"event":["9.6"],"x":["9.6","19.6"],"range":["9.7","19.7"],"switch":["9.9","19.9"],"used":["10.0","11.0","13.0","15.0","22.4"],"will":["10.1","15.16","20.5","22.4","22.7"],"not":["10.1","13.0","13.34","15.5","22.4"],"respond":["10.1"],"immediately":["10.1","10.7"],"s":["10.3"],"lifecycle":["10.3"],"strongly":["10.3","15.41"],"recommended":["10.3","15.41"],"use":["10.3","10.6","15.41","22.40"],"these":["10.3"],"functions":["10.3"],"avoid":["10.3","15.41"],"memory":["10.3","15.41"],"leaks":["10.3","15.41"],"please":["10.6","10.9","10.10","10.16","12.0","22.2","22.10","22.29","22.30","22.31","22.32"],"option":["10.6"],"in":["10.6","20.5"],"basic":["10.6"],"options":["10.6","22.1"],"refer":["10.8","10.9","10.10","10.16","12.0","22.2","22.29","22.30","22.31","22.32"],"following":["10.8","20.3"],"address":["10.8"],"for":["10.8","10.9","10.10","10.16","12.0","22.4","22.29","22.47"],"configuration":["10.8","10.9","10.10","22.29"],"srt":["10.11","22.25","26.25"],"settimeout":["10.12","10.13","10.15","15.3","15.21"],"gains":["10.14"],"focus":["10.14"],"e":["10.14","22.19"],"g":["10.14","22.19"],"clicking":["10.14","22.19"],"on":["10.17","15.4","15.20","15.22","22.2","22.19","24.6"],"a":["12.0"],"complete":["12.0"],"list":["12.0"],"of":["12.0"],"state":["12.39"],"further":["12.42"],"buffering":["12.42"],"content":["12.43"],"to":["12.46","15.33","22.29","22.30","22.31","22.32"],"reload":["12.46"],"it":["12.46","20.11"],"format":["12.48"],"data":["12.53","12.62"],"forthcoming":["12.58"],"generally":["13.0"],"assets":["13.1","13.14","13.15","13.16","13.19","13.20","13.25","22.3","22.11","22.27"],"dblclick":["13.17"],"contextmenu":["13.28"],"destroys":["13.34"],"does":["13.34"],"clear":["13.34"],"play":["14.0"],"do":["15.5"],"interface":["15.5"],"playable":["15.12"],"fails":["15.12"],"load":["15.12"],"cases":["15.16"],"obtained":["15.16","15.28"],"be":["15.16"],"clicked":["15.20","17.1"],"before":["15.20","15.22"],"triggering":["15.20","15.22"],"default":["15.26"],"is":["15.28","22.17"],"via":["15.28"],"need":["15.33"],"determine":["15.33"],"appropriate":["15.33"],"timing":["15.33"],"m3u8":["15.35","22.41","26.2"],"000":["15.36"],"timeupdate":["15.39"],"this":["15.41","22.7"],"text":["16.1","18.1"],"when":["17.1"],"item":["17.1"],"script":["20.1","23.1","24.2"],"examples":["20.3"],"at":["20.3"],"link":["20.3"],"example":["20.3","23.3"],"update":["20.4","20.5"],"the":["20.4","20.5"],"player":["20.4","20.12","23.12"],"reactive":["20.5"],"directly":["20.5"],"modifying":["20.5"],"definitions":["20.9","22.39"],"packages":["20.9","23.9"],"volume":["20.10"],"art8":["20.10","23.10"],"new":["20.10","23.10"],"yourself":["20.11"],"scripts":["20.11","23.11"],"reference":["20.11","21.0"],"documentation":["20.11"],"browserslist":["20.11","23.11"],"body":["20.12"],"div":["20.12","23.12"],"id":["20.12","23.12"],"importing":["20.13"],"dependency":["20.13"],"take":["20.13"],"effect":["20.13"],"see":["21.0"],"or":["21.1","25.1"],"note":["22.1"],"among":["22.1"],"all":["22.1"],"only":["22.1"],"required":["22.1"],"third":["22.2"],"party":["22.2"],"libraries":["22.2"],"section":["22.2"],"point":["22.4"],"jpg":["22.5","26.5"],"ffad00":["22.6","26.6"],"read":["22.7","22.10"],"cached":["22.7"],"value":["22.7"],"information":["22.10"],"policy":["22.10","26.10"],"changes":["22.10","26.10"],"url":["22.11","22.27"],"setting":["22.14","22.15","22.16","22.25","26.14","26.15","26.16","26.25"],"cross":["22.17"],"origin":["22.17"],"with":["22.17"],"website":["22.17"],"disable":["22.22"],"hd":["22.33"],"720p":["22.33","26.33"],"こんなとこにあるはずもないのに":["22.34","26.34"],"终わり":["22.34","26.34"],"generate":["22.36"],"online":["22.36"],"tool":["22.36","26.36"],"03a9f4":["22.37","26.37"],"font":["22.37","24.5","26.37"],"size":["22.37","24.5","26.37"],"30px":["22.37","26.37"],"webkit":["22.38"],"playsinline":["22.38","26.38"],"therefore":["22.40"],"if":["22.40"],"you":["22.40"],"best":["22.40"],"also":["22.40"],"settings":["22.42","22.43"],"start":["22.42","22.43","26.42","26.43"],"i18n":["22.42","26.42"],"tw":["22.43","26.43"],"more":["22.43"],"identify":["22.47"],"unique":["22.47"],"document":["22.51","26.51"],"createelement":["22.51","26.51"],"tip":["23.3"],"以下链接可以看到更多的使用例子":["23.3"],"里直接修改":["23.4","23.5"],"是不会改变播放器的":["23.4","23.5"],"非响应式":["23.5"],"在":["23.5"],"构建配置":["23.11"],"build":["23.11"],"参考文档":["23.11"],"你需要在引入":["23.13"],"依赖前来修改它才会生效":["23.13"],"style":["24.4"],"弹幕自定义样式":["24.4"],"默认为空对象":["24.4"],"light":["24.5"],"只在自定义挂载时生效":["24.5"],"不透明度配置项":["24.5"],"弹幕字号配置项":["24.5"],"显示区域配置项":["24.5"],"弹幕速度配置项":["24.5"],"颜色列表配置项":["24.5"],"ref":["24.6"],"innerhtml":["24.6"],"ଘ":["24.6"],"੭ˊᵕˋ":["24.6"],"੭":["24.6"],"使用数组":["24.7"],"time":["24.7","24.9"],"异步返回":["24.9"],"显示弹幕":["24.10","24.11"],"hide":["24.11"],"border":["24.12"],"change":["24.13"],"fontsize":["24.13"],"const":["24.14"],"target":["24.14"],"xml":["24.16"],"也可以手动挂载":["24.16"],"reset":["24.18"],"弹幕重置":["24.18"],"destroy":["24.18"],"弹幕销毁":["24.18"],"全部选项里":["26.1"],"只有":["26.1"],"是必填的":["26.1"],"如需要播放":["26.2"],"或者":["26.2"],"flv":["26.2"],"等其它格式":["26.2"],"请参考左侧的":["26.2"],"第三方库":["26.2"],"回调函数里的":["26.4"],"就是播放器实例":["26.4"],"但回调函数假如使用了箭头函数":["26.4"],"则不会指向播放器实例":["26.4"],"下次初始化时":["26.7"],"如刷新页面":["26.7"],"播放器会读取该缓存值":["26.7"],"更多信息请阅读":["26.10"],"假如视频源地址和网站是跨域的":["26.17"],"可能会出现截图失败":["26.17"],"关闭毛玻璃效果":["26.22"],"在线生成预览图":["26.36"],"thumbnail":["26.36"],"所以假如你使用了":["26.40"],"最好同时要指明":["26.40"],"function":["26.41"],"更多的语言设置":["26.42","26.43"],"是不同的话":["26.47"],"那么你需要使用":["26.47"],"来标识视频的唯一":["26.47"]}]'},t={"0.0":{t:"# 高级属性",p:`这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用 -`,l:"advanced/built-in.html",a:"高级属性"},"0.1":{t:"`option`",p:`播放器的选项 -<div className="run-code">▶ Run Code< ...`,l:"advanced/built-in.html#option",a:"option"},"0.2":{t:"`template`",p:`管理播放器所有的 DOM 元素 -<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#template",a:"template"},"0.3":{t:"`events`",p:"管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener ...",l:"advanced/built-in.html#events",a:"events"},"0.4":{t:"`storage`",p:`管理播放器的本地存储 - -name 属性用于设置缓存的 key -set 方法用于设置缓存 -get 方法用于获取缓存 -del 方 ...`,l:"advanced/built-in.html#storage",a:"storage"},"0.5":{t:"`icons`",p:`管理播放器所有的 svg 图标 -<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#icons",a:"icons"},"0.6":{t:"`i18n`",p:`管理播放器的 i18n - -get 方法用于获取 i18n 的值 -update 方法用于更新 i18n 对象 - -<div ...`,l:"advanced/built-in.html#i18n",a:"i18n"},"0.7":{t:"`notice`",p:`管理播放器的提示语,只有一个 show 属性用于显示提示语 -<div className="run-code ...`,l:"advanced/built-in.html#notice",a:"notice"},"0.8":{t:"`layers`",p:`管理播放器的层 - -add 方法用于动态添加层 -remove 方法用于动态删除层 -update 方法用于动态更新层 -show ...`,l:"advanced/built-in.html#layers",a:"layers"},"0.9":{t:"`controls`",p:`管理播放器的控制器 - -add 方法用于动态添加控制器 -remove 方法用于动态删除控制器 -update 方法用于动态更新控 ...`,l:"advanced/built-in.html#controls",a:"controls"},"0.10":{t:"`contextmenu`",p:`管理播放器的右键菜单 - -add 方法用于动态添加菜单 -remove 方法用于动态删除菜单 -update 方法用于动态更新菜单 ...`,l:"advanced/built-in.html#contextmenu",a:"contextmenu"},"0.11":{t:"`subtitle`",p:`管理播放器的字幕功能 - -url 属性设置和返回当前字幕地址 -style 方法设置当前字幕的样式 -switch 方法设置当前字 ...`,l:"advanced/built-in.html#subtitle",a:"subtitle"},"0.12":{t:"`info`",p:`管理播放器的信息面板,常用于查看当前播放器和视频的运行状态,例如版本号、分辨率、时长等。 - -通过 art.info.show ...`,l:"advanced/built-in.html#info",a:"info"},"0.13":{t:"`loading`",p:`管理播放器的加载层 - -show 属性用于设置是否显示加载层 -toggle 属性用于切换是否显示加载层 - -<div cl ...`,l:"advanced/built-in.html#loading",a:"loading"},"0.14":{t:"`hotkey`",p:`管理播放器的快捷键功能 - -add 方法用于添加快捷键 -remove 方法用于删除快捷键 - -<div className ...`,l:"advanced/built-in.html#hotkey",a:"hotkey"},"0.15":{t:"`mask`",p:`管理播放器的遮罩层 - -show 属性用于设置是否显示遮罩层 -toggle 属性用于切换是否显示遮罩层 - -<div cl ...`,l:"advanced/built-in.html#mask",a:"mask"},"0.16":{t:"`setting`",p:`管理播放器的设置面板 - -add 方法用于动态添加设置项 -remove 方法用于动态删除设置项 -update 方法用于动态更新 ...`,l:"advanced/built-in.html#setting",a:"setting"},"0.17":{t:"`plugins`",p:`管理播放器的插件功能,只有一个方法 add 用于动态添加插件 -<div className="run-cod ...`,l:"advanced/built-in.html#plugins",a:"plugins"},"1.0":{t:"# 静态属性",p:`这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用 -`,l:"advanced/class.html",a:"静态属性"},"1.1":{t:"`instances`",p:`返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性 -<div className=" ...`,l:"advanced/class.html#instances",a:"instances"},"1.2":{t:"`version`",p:`返回播放器的版本信息 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#version",a:"version"},"1.3":{t:"`env`",p:`返回播放器的环境变量 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#env",a:"env"},"1.4":{t:"`build`",p:`返回播放器的打包时间 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#build",a:"build"},"1.5":{t:"`config`",p:`返回视频的默认配置 -<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#config",a:"config"},"1.6":{t:"`utils`",p:`返回播放器的工具函数集合 -<div className="run-code">▶ Run C ...`,l:"advanced/class.html#utils",a:"utils"},"1.7":{t:"`scheme`",p:`返回播放器选项的校验方案 -<div className="run-code">▶ Run C ...`,l:"advanced/class.html#scheme",a:"scheme"},"1.8":{t:"`Emitter`",p:`返回事件分发器的构造函数 -<div className="run-code">▶ Run C ...`,l:"advanced/class.html#emitter",a:"emitter"},"1.9":{t:"`validator`",p:`返回选项的校验函数 -<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#validator",a:"validator"},"1.10":{t:"`kindOf`",p:`返回类型检测的函数工具 -<div className="run-code">▶ Run Co ...`,l:"advanced/class.html#kindof",a:"kindof"},"1.11":{t:"`html`",p:`返回播放器所需的 html 字符串 -<div className="run-code">▶ ...`,l:"advanced/class.html#html",a:"html"},"1.12":{t:"`option`",p:`返回播放器的默认选项 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#option",a:"option"},"2.0":{t:"# 实例事件",p:`播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件 -监听事件: -<div cl ...`,l:"advanced/event.html",a:"实例事件"},"2.1":{t:"`ready`",p:`当播放器首次可以播放器时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#ready",a:"ready"},"2.2":{t:"`restart`",p:`当播放器切换地址后并可以播放时触发 -<div className="run-code">▶ ...`,l:"advanced/event.html#restart",a:"restart"},"2.3":{t:"`pause`",p:`当播放器暂停时触发 -<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#pause",a:"pause"},"2.4":{t:"`play`",p:`当播放器播放时触发 -<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#play",a:"play"},"2.5":{t:"`hotkey`",p:`当播放器热键被按下时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#hotkey",a:"hotkey"},"2.6":{t:"`destroy`",p:`当播放器销毁时触发 -<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#destroy",a:"destroy"},"2.7":{t:"`focus`",p:`当播放器获得焦点时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#focus",a:"focus"},"2.8":{t:"`blur`",p:`当播放器失去焦点时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#blur",a:"blur"},"2.9":{t:"`dblclick`",p:`当播放器被双击时触发 -<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#dblclick",a:"dblclick"},"2.10":{t:"`click`",p:`当播放器被单击时触发 -<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#click",a:"click"},"2.11":{t:"`error`",p:`当播放器加载视频发生错误时触发 -<div className="run-code">▶ Ru ...`,l:"advanced/event.html#error",a:"error"},"2.12":{t:"`hover`",p:`当播放器被鼠标移出或者移入时触发 -<div className="run-code">▶ R ...`,l:"advanced/event.html#hover",a:"hover"},"2.13":{t:"`mousemove`",p:`当播放器被鼠标经过时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mousemove",a:"mousemove"},"2.14":{t:"`resize`",p:`当播放器尺寸变化时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#resize",a:"resize"},"2.15":{t:"`view`",p:`当播放器出现在视口时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#view",a:"view"},"2.16":{t:"`lock`",p:`在移动端,当锁定的状态发生变化时触发 -<div className="run-code">▶ ...`,l:"advanced/event.html#lock",a:"lock"},"2.17":{t:"`aspectRatio`",p:`当播放器长宽比变化时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#aspectratio",a:"aspectratio"},"2.18":{t:"`autoHeight`",p:`当播放器自动设置高度时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#autoheight",a:"autoheight"},"2.19":{t:"`autoSize`",p:`当播放器自动设置尺寸时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#autosize",a:"autosize"},"2.20":{t:"`flip`",p:`当播放器发生翻转时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#flip",a:"flip"},"2.21":{t:"`fullscreen`",p:`当播放器发生窗口全屏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreen",a:"fullscreen"},"2.22":{t:"`fullscreenError`",p:`当播放器发生窗口全屏错误时触发 -<div className="run-code">▶ Ru ...`,l:"advanced/event.html#fullscreenerror",a:"fullscreenerror"},"2.23":{t:"`fullscreenWeb`",p:`当播放器发生网页全屏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreenweb",a:"fullscreenweb"},"2.24":{t:"`mini`",p:`当播放器进入迷你模式时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#mini",a:"mini"},"2.25":{t:"`pip`",p:`当播放器进入画中画时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#pip",a:"pip"},"2.26":{t:"`screenshot`",p:`当播放器被截图时触发 -<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#screenshot",a:"screenshot"},"2.27":{t:"`seek`",p:`当播放器发生时间跳转时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#seek",a:"seek"},"2.28":{t:"`subtitleOffset`",p:`当播放器发生字幕偏移时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#subtitleoffset",a:"subtitleoffset"},"2.29":{t:"`subtitleBeforeUpdate`",p:`当字幕更新前触发 -<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"2.30":{t:"`subtitleAfterUpdate`",p:`当字幕更新后触发 -<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"2.31":{t:"`subtitleLoad`",p:`当字幕加载时触发 -<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleload",a:"subtitleload"},"2.32":{t:"`info`",p:`当信息面板显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#info",a:"info"},"2.33":{t:"`layer`",p:`当自定义层显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#layer",a:"layer"},"2.34":{t:"`loading`",p:`当加载器显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#loading",a:"loading"},"2.35":{t:"`mask`",p:`当遮罩层显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mask",a:"mask"},"2.36":{t:"`subtitle`",p:`当字幕层显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#subtitle",a:"subtitle"},"2.37":{t:"`contextmenu`",p:`当右键菜单显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#contextmenu",a:"contextmenu"},"2.38":{t:"`control`",p:`当控制器显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#control",a:"control"},"2.39":{t:"`setting`",p:`当设置面板显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#setting",a:"setting"},"2.40":{t:"`muted`",p:`当静音的状态变化时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#muted",a:"muted"},"2.41":{t:"`keydown`",p:`监听来自 document 的 keydown 事件 -<div className="run-code&qu ...`,l:"advanced/event.html#keydown",a:"keydown"},"2.42":{t:"`video:canplay`",p:`浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容 -`,l:"advanced/event.html#video-canplay",a:"video-canplay"},"2.43":{t:"`video:canplaythrough`",p:`浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束 -`,l:"advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"2.44":{t:"`video:complete`",p:`OfflineAudioContext 渲染完成 -`,l:"advanced/event.html#video-complete",a:"video-complete"},"2.45":{t:"`video:durationchange`",p:`duration 属性的值改变时触发 -`,l:"advanced/event.html#video-durationchange",a:"video-durationchange"},"2.46":{t:"`video:emptied`",p:"媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载 ...",l:"advanced/event.html#video-emptied",a:"video-emptied"},"2.47":{t:"`video:ended`",p:`视频停止播放,因为 media 已经到达结束点 -`,l:"advanced/event.html#video-ended",a:"video-ended"},"2.48":{t:"`video:error`",p:`获取媒体数据时出错,或者资源类型不是受支持的媒体格式 -`,l:"advanced/event.html#video-error",a:"video-error"},"2.49":{t:"`video:loadeddata`",p:`media 中的首帧已经完成加载 -`,l:"advanced/event.html#video-loadeddata",a:"video-loadeddata"},"2.50":{t:"`video:loadedmetadata`",p:`已加载元数据 -`,l:"advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"2.51":{t:"`video:pause`",p:`播放已暂停 -`,l:"advanced/event.html#video-pause",a:"video-pause"},"2.52":{t:"`video:play`",p:`播放已开始 -`,l:"advanced/event.html#video-play",a:"video-play"},"2.53":{t:"`video:playing`",p:`由于缺乏数据而暂停或延迟后,播放准备开始 -`,l:"advanced/event.html#video-playing",a:"video-playing"},"2.54":{t:"`video:progress`",p:`在浏览器加载资源时周期性触发 -`,l:"advanced/event.html#video-progress",a:"video-progress"},"2.55":{t:"`video:ratechange`",p:`播放速率发生变化 -`,l:"advanced/event.html#video-ratechange",a:"video-ratechange"},"2.56":{t:"`video:seeked`",p:`跳帧(seek)操作完成 -`,l:"advanced/event.html#video-seeked",a:"video-seeked"},"2.57":{t:"`video:seeking`",p:`跳帧(seek)操作开始 -`,l:"advanced/event.html#video-seeking",a:"video-seeking"},"2.58":{t:"`video:stalled`",p:`用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现 -`,l:"advanced/event.html#video-stalled",a:"video-stalled"},"2.59":{t:"`video:suspend`",p:`媒体数据加载已暂停 -`,l:"advanced/event.html#video-suspend",a:"video-suspend"},"2.60":{t:"`video:timeupdate`",p:`currentTime 属性指定的时间发生变化 -`,l:"advanced/event.html#video-timeupdate",a:"video-timeupdate"},"2.61":{t:"`video:volumechange`",p:`音量发生变化 -`,l:"advanced/event.html#video-volumechange",a:"video-volumechange"},"2.62":{t:"`video:waiting`",p:`由于暂时缺少数据,播放已停止 -`,l:"advanced/event.html#video-waiting",a:"video-waiting"},"3.0":{t:"# 全局属性",p:`这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到 -`,l:"advanced/global.html",a:"全局属性"},"3.1":{t:"DEBUG",p:`是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭 -<div className="run- ...`,l:"advanced/global.html#debug",a:"debug"},"3.2":{t:"STYLE",p:`返回播放器样式文本 -<div className="run-code">▶ Run Code ...`,l:"advanced/global.html#style",a:"style"},"3.3":{t:"CONTEXTMENU",p:`是否开启右键菜单,默认开启 -<div className="run-code">▶ Run ...`,l:"advanced/global.html#contextmenu",a:"contextmenu"},"3.4":{t:"NOTICE_TIME",p:`提示信息的显示时长,单位为毫秒,默认为 2000 -<div className="run-code" ...`,l:"advanced/global.html#notice-time",a:"notice-time"},"3.5":{t:"SETTING_WIDTH",p:`设置面板的默认宽度,单位为像素,默认为 250 -<div className="run-code" ...`,l:"advanced/global.html#setting-width",a:"setting-width"},"3.6":{t:"SETTING_ITEM_WIDTH",p:`设置面板的设置项的默认宽度,单位为像素,默认为 200 -<div className="run-code&q ...`,l:"advanced/global.html#setting-item-width",a:"setting-item-width"},"3.7":{t:"SETTING_ITEM_HEIGHT",p:`设置面板的设置项的默认高度,单位为像素,默认为 35 -<div className="run-code&qu ...`,l:"advanced/global.html#setting-item-height",a:"setting-item-height"},"3.8":{t:"RESIZE_TIME",p:`resize 事件的节流时间,单位为毫秒,默认为 200 -<div className="run-code& ...`,l:"advanced/global.html#resize-time",a:"resize-time"},"3.9":{t:"SCROLL_TIME",p:`scroll 事件的节流时间,单位为毫秒,默认为 200 -<div className="run-code& ...`,l:"advanced/global.html#scroll-time",a:"scroll-time"},"3.10":{t:"SCROLL_GAP",p:`view 事件的边界容差距离,单位为像素,默认为 50 -<div className="run-code&q ...`,l:"advanced/global.html#scroll-gap",a:"scroll-gap"},"3.11":{t:"AUTO_PLAYBACK_MAX",p:`自动回放功能的最大记录数,默认为 10 -<div className="run-code"> ...`,l:"advanced/global.html#auto-playback-max",a:"auto-playback-max"},"3.12":{t:"AUTO_PLAYBACK_MIN",p:`自动回放功能的最小记录时长,单位为秒,默认为 5 -<div className="run-code" ...`,l:"advanced/global.html#auto-playback-min",a:"auto-playback-min"},"3.13":{t:"AUTO_PLAYBACK_TIMEOUT",p:`自动回放功能的隐藏延迟时长,单位为毫秒,默认为 3000 -<div className="run-code& ...`,l:"advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"3.14":{t:"RECONNECT_TIME_MAX",p:`发生连接错误时,自动连接的最大次数,默认为 5 -<div className="run-code" ...`,l:"advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"3.15":{t:"RECONNECT_SLEEP_TIME",p:`发生连接错误时,自动连接的延迟时间,单位为毫秒,默认为 1000 -<div className="run-c ...`,l:"advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"3.16":{t:"CONTROL_HIDE_TIME",p:`底部控制栏的自动隐藏的延迟时间,单位为毫秒,默认为 3000 -<div className="run-cod ...`,l:"advanced/global.html#control-hide-time",a:"control-hide-time"},"3.17":{t:"DBCLICK_TIME",p:`双击事件的延迟事件,单位为毫秒,默认为 300 -<div className="run-code" ...`,l:"advanced/global.html#dbclick-time",a:"dbclick-time"},"3.18":{t:"DBCLICK_FULLSCREEN",p:`在桌面端,是否双击切换全屏,默认为 true -<div className="run-code"& ...`,l:"advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"3.19":{t:"MOBILE_DBCLICK_PLAY",p:`在移动端,是否双击切换播放暂停,默认为 true -<div className="run-code" ...`,l:"advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"3.20":{t:"MOBILE_CLICK_PLAY",p:`在移动端,是否单击切换播放暂停,默认为 false -<div className="run-code&quo ...`,l:"advanced/global.html#mobile-click-play",a:"mobile-click-play"},"3.21":{t:"AUTO_ORIENTATION_TIME",p:`在移动端,自动旋屏的延迟时间,单位为毫秒,默认为 200 -<div className="run-code& ...`,l:"advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"3.22":{t:"INFO_LOOP_TIME",p:`信息面板的刷新时间,单位为毫秒,默认为 1000 -<div className="run-code" ...`,l:"advanced/global.html#info-loop-time",a:"info-loop-time"},"3.23":{t:"FAST_FORWARD_VALUE",p:`在移动端,长按加速的速率倍数,默认为 3 -<div className="run-code"> ...`,l:"advanced/global.html#fast-forward-value",a:"fast-forward-value"},"3.24":{t:"FAST_FORWARD_TIME",p:`在移动端,长按加速的延迟时间,单位为毫秒,默认为 1000 -<div className="run-code ...`,l:"advanced/global.html#fast-forward-time",a:"fast-forward-time"},"3.25":{t:"TOUCH_MOVE_RATIO",p:`在移动端,左右滑动进度的速率倍数,默认为 0.5 -<div className="run-code" ...`,l:"advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"3.26":{t:"VOLUME_STEP",p:`快捷键调节音量的幅度比例,默认为 0.1 -<div className="run-code"> ...`,l:"advanced/global.html#volume-step",a:"volume-step"},"3.27":{t:"SEEK_STEP",p:`快捷键调节播放进度的幅度,单位为秒,默认为 5 -<div className="run-code" ...`,l:"advanced/global.html#seek-step",a:"seek-step"},"3.28":{t:"PLAYBACK_RATE",p:`内置播放速率的列表,默认为 [0.5, 0.75, 1, 1.25, 1.5, 2] -<div className=& ...`,l:"advanced/global.html#playback-rate",a:"playback-rate"},"3.29":{t:"ASPECT_RATIO",p:`内置视频长宽比的列表,默认为 ['default', '4:3', '16:9'] -<div className=&q ...`,l:"advanced/global.html#aspect-ratio",a:"aspect-ratio"},"3.30":{t:"FLIP",p:`内置视频翻转的列表,默认为 ['normal', 'horizontal', 'vertical'] -<div cla ...`,l:"advanced/global.html#flip",a:"flip"},"3.31":{t:"FULLSCREEN_WEB_IN_BODY",p:`网页全屏时,是否把播放器挂在在 body 元素下,默认为 true -<div className="run- ...`,l:"advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"3.32":{t:"LOG_VERSION",p:`设置是否打印播放器版本,默认为 true -<div className="run-code"> ...`,l:"advanced/global.html#log-version",a:"log-version"},"3.33":{t:"USE_RAF",p:`设置是否使用 requestAnimationFrame ,默认为 false,目前主要用于进度条的平滑效果 -<div ...`,l:"advanced/global.html#use-raf",a:"use-raf"},"3.34":{t:"REMOVE_SRC_WHEN_DESTROY",p:`在销毁播放器时,是否同时移除视频的 src 属性并调用 load() 以主动释放媒体资源,默认为 true。 -开启后可以在单 ...`,l:"advanced/global.html#remove-src-when-destroy",a:"remove-src-when-destroy"},"4.0":{t:"# 编写插件",p:`但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事 -可以在实例化的时候加载插件的函数 -<div cla ...`,l:"advanced/plugin.html",a:"编写插件"},"5.0":{t:"# 实例属性",p:`这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用 -`,l:"advanced/property.html",a:"实例属性"},"5.1":{t:"`play`",p:` -Type: Function - -播放视频 -<div className="run-code"&g ...`,l:"advanced/property.html#play",a:"play"},"5.2":{t:"`pause`",p:` -Type: Function - -暂停视频 -<div className="run-code"&g ...`,l:"advanced/property.html#pause",a:"pause"},"5.3":{t:"`toggle`",p:` -Type: Function - -切换视频的播放和暂停 -<div className="run-code&q ...`,l:"advanced/property.html#toggle",a:"toggle"},"5.4":{t:"`destroy`",p:` -Type: Function -Parameter: Boolean - -销毁播放器,接受一个参数表示是否销毁后同时移除播放器 ...`,l:"advanced/property.html#destroy",a:"destroy"},"5.5":{t:"`reset`",p:` -Type: Function - -重置播放器的视频元素:会移除当前 src 并调用一次 load(),常用于在单页应用中手动 ...`,l:"advanced/property.html#reset",a:"reset"},"5.6":{t:"`seek`",p:` -Type: Setter -Parameter: Number - -视频时间跳转,单位秒 -<div className= ...`,l:"advanced/property.html#seek",a:"seek"},"5.7":{t:"`forward`",p:` -Type: Setter -Parameter: Number - -视频时间快进,单位秒 -<div className= ...`,l:"advanced/property.html#forward",a:"forward"},"5.8":{t:"`backward`",p:` -Type: Setter -Parameter: Number - -视频时间快退,单位秒 -<div className= ...`,l:"advanced/property.html#backward",a:"backward"},"5.9":{t:"`volume`",p:` -Type: Setter/Getter -Parameter: Number - -设置和获取视频音量,范围在:[0, 1] -& ...`,l:"advanced/property.html#volume",a:"volume"},"5.10":{t:"`url`",p:` -Type: Setter/Getter -Parameter: String - -设置和获取视频地址 -<div clas ...`,l:"advanced/property.html#url",a:"url"},"5.11":{t:"`switch`",p:` -Type: Setter -Parameter: String - -设置视频地址,设置时和 art.url 类似,但会执行一些 ...`,l:"advanced/property.html#switch",a:"switch"},"5.12":{t:"`switchUrl`",p:` -Type: Function -Parameter: String - -设置视频地址,设置时和 art.url 类似,但会执行 ...`,l:"advanced/property.html#switchurl",a:"switchurl"},"5.13":{t:"`switchQuality`",p:` -Type: Function -Parameter: String - -设置视频画质地址,和 art.switchUrl 类似 ...`,l:"advanced/property.html#switchquality",a:"switchquality"},"5.14":{t:"`muted`",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取视频是否静音 -<div c ...`,l:"advanced/property.html#muted",a:"muted"},"5.15":{t:"`currentTime`",p:` -Type: Setter/Getter -Parameter: Number - -设置和获取视频当前时间,设置时间时和 see ...`,l:"advanced/property.html#currenttime",a:"currenttime"},"5.16":{t:"`duration`",p:` -Type: Getter - -获取视频时长 -<div className="run-code"&g ...`,l:"advanced/property.html#duration",a:"duration"},"5.17":{t:"`screenshot`",p:` -Type: Function - -下载当前视频帧的截图, 可选参数为截图名字 -<div className=" ...`,l:"advanced/property.html#screenshot",a:"screenshot"},"5.18":{t:"`getDataURL`",p:` -Type: Function - -获取当前视频帧的截图的base64地址,返回的是一个 Promise -<div cl ...`,l:"advanced/property.html#getdataurl",a:"getdataurl"},"5.19":{t:"`getBlobUrl`",p:` -Type: Function - -获取当前视频帧的截图的blob地址,返回的是一个 Promise -<div clas ...`,l:"advanced/property.html#getbloburl",a:"getbloburl"},"5.20":{t:"`fullscreen`",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器窗口全屏 -<div ...`,l:"advanced/property.html#fullscreen",a:"fullscreen"},"5.21":{t:"`fullscreenWeb`",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器网页全屏 -<div ...`,l:"advanced/property.html#fullscreenweb",a:"fullscreenweb"},"5.22":{t:"`pip`",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器画中画模式 -<div ...`,l:"advanced/property.html#pip",a:"pip"},"5.23":{t:"`poster`",p:` -Type: Setter/Getter -Parameter: String - -设置和获取视频海报,只有在视频播放前才能看到 ...`,l:"advanced/property.html#poster",a:"poster"},"5.24":{t:"`mini`",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器迷你模式 -<div ...`,l:"advanced/property.html#mini",a:"mini"},"5.25":{t:"`playing`",p:` -Type: Getter -Parameter: Boolean - -获取视频是否正在播放中 -<div classNam ...`,l:"advanced/property.html#playing",a:"playing"},"5.26":{t:"`state`",p:` -Type: Setter/Getter -Parameter: String - -获取或设置播放器当前状态,支持:standa ...`,l:"advanced/property.html#state",a:"state"},"5.27":{t:"`autoSize`",p:` -Type: Function - -设置视频是否自适应尺寸 -<div className="run-code& ...`,l:"advanced/property.html#autosize",a:"autosize"},"5.28":{t:"`rect`",p:` -Type: Getter - -获取播放器的尺寸和坐标信息 -<div className="run-code& ...`,l:"advanced/property.html#rect",a:"rect"},"5.29":{t:"`bottom` / `top` / `left` / `right` / `x` / `y` / `width` / `height`",p:` -Type: Getter - -这些属性是对 rect 的快捷访问: - -bottom, top, left, right, x ...`,l:"advanced/property.html#bottom-top-left-right-x-y-width-height",a:"bottom-top-left-right-x-y-width-height"},"5.30":{t:"`flip`",p:` -Type: Setter/Getter -Parameter: String - -设置和获取播放器翻转,支持normal, ...`,l:"advanced/property.html#flip",a:"flip"},"5.31":{t:"`playbackRate`",p:` -Type: Setter/Getter -Parameter: Number - -设置和获取播放器播放速度 -<div c ...`,l:"advanced/property.html#playbackrate",a:"playbackrate"},"5.32":{t:"`aspectRatio`",p:` -Type: Setter/Getter -Parameter: String - -设置和获取播放器长宽比 -<div cl ...`,l:"advanced/property.html#aspectratio",a:"aspectratio"},"5.33":{t:"`autoHeight`",p:` -Type: Function - -当容器只有宽度,该属性可以自动计算出并设置视频的高度 -<div className= ...`,l:"advanced/property.html#autoheight",a:"autoheight"},"5.34":{t:"`attr`",p:` -Type: Function -Parameter: String - -动态获取和设置 video 元素的属性 -<div ...`,l:"advanced/property.html#attr",a:"attr"},"5.35":{t:"`type`",p:` -Type: Setter/Getter -Parameter: String - -动态获取和设置视频类型 -<div cl ...`,l:"advanced/property.html#type",a:"type"},"5.36":{t:"`theme`",p:` -Type: Setter/Getter -Parameter: String - -动态获取和设置播放器主题颜色 -<div ...`,l:"advanced/property.html#theme",a:"theme"},"5.37":{t:"`airplay`",p:` -Type: Function - -开启隔空播放 -<div className="run-code" ...`,l:"advanced/property.html#airplay",a:"airplay"},"5.38":{t:"`loaded`",p:` -Type: Getter - -视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 -&l ...`,l:"advanced/property.html#loaded",a:"loaded"},"5.39":{t:"`loadedTime`",p:` -Type: Getter - -已缓存的媒体时长,单位为秒。通常与 loaded 一起使用,用于展示缓冲进度细节。 -<d ...`,l:"advanced/property.html#loadedtime",a:"loadedtime"},"5.40":{t:"`played`",p:` -Type: Getter - -视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 -&l ...`,l:"advanced/property.html#played",a:"played"},"5.41":{t:"`proxy`",p:` -Type: Function - -DOM 事件的代理函数,实质上代理了 addEventListener 和 removeE ...`,l:"advanced/property.html#proxy",a:"proxy"},"5.42":{t:"`query`",p:` -Type: Function - -DOM 的查询函数,类似 document.querySelector,但被查询的对象局限 ...`,l:"advanced/property.html#query",a:"query"},"5.43":{t:"`video`",p:` -Type: Element - -快捷返回播放器的 video 元素 -<div className="run- ...`,l:"advanced/property.html#video",a:"video"},"5.44":{t:"`cssVar`",p:` -Type: Function - -动态获取或设置 css 变量 -<div className="run-co ...`,l:"advanced/property.html#cssvar",a:"cssvar"},"5.45":{t:"`quality`",p:` -Type: Setter -Parameter: Array - -动态设置画质列表 -<div className=&qu ...`,l:"advanced/property.html#quality",a:"quality"},"5.46":{t:"`thumbnails`",p:` -Type: Setter/Getter -Parameter: Object - -动态设置缩略图 -<div classN ...`,l:"advanced/property.html#thumbnails",a:"thumbnails"},"5.47":{t:"`subtitleOffset`",p:` -Type: Setter/Getter -Parameter: Number - -动态设置字幕偏移 -<div class ...`,l:"advanced/property.html#subtitleoffset",a:"subtitleoffset"},"6.0":{t:"# 右键菜单",p:"",l:"component/contextmenu.html",a:"右键菜单"},"6.1":{t:"配置",p:` - - -属性 -类型 -描述 - - - - -disable -Boolean -是否禁用组件 - - -name -String -组件唯一名称,用于 ...`,l:"component/contextmenu.html#配置",a:"配置"},"6.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#创建",a:"创建"},"6.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#添加",a:"添加"},"6.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#删除",a:"删除"},"6.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#更新",a:"更新"},"7.0":{t:"# 控制器",p:"",l:"component/controls.html",a:"控制器"},"7.1":{t:"配置",p:` - - -属性 -类型 -描述 - - - - -disable -Boolean -是否禁用组件 - - -name -String -组件唯一名称,用于 ...`,l:"component/controls.html#配置",a:"配置"},"7.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#创建",a:"创建"},"7.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#添加",a:"添加"},"7.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#删除",a:"删除"},"7.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#更新",a:"更新"},"8.0":{t:"# 业务层",p:"",l:"component/layers.html",a:"业务层"},"8.1":{t:"配置",p:` - - -属性 -类型 -描述 - - - - -disable -Boolean -是否禁用组件 - - -name -String -组件唯一名称,用于 ...`,l:"component/layers.html#配置",a:"配置"},"8.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#创建",a:"创建"},"8.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#添加",a:"添加"},"8.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#删除",a:"删除"},"8.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#更新",a:"更新"},"9.0":{t:"# 设置面板",p:"",l:"component/setting.html",a:"设置面板"},"9.1":{t:"内置",p:"须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOf ...",l:"component/setting.html#内置",a:"内置"},"9.2":{t:"创建 - 按钮",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM - - -icon -String, El ...`,l:"component/setting.html#创建-按钮",a:"创建-按钮"},"9.3":{t:"创建 - 选择列表",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM - - -icon -String, El ...`,l:"component/setting.html#创建-选择列表",a:"创建-选择列表"},"9.4":{t:"创建 - 列表嵌套",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#创建-列表嵌套",a:"创建-列表嵌套"},"9.5":{t:"创建 - 切换按钮",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM 元素 - - -icon -String, ...`,l:"component/setting.html#创建-切换按钮",a:"创建-切换按钮"},"9.6":{t:"创建 - 范围滑块",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM 元素 - - -icon -String, ...`,l:"component/setting.html#创建-范围滑块",a:"创建-范围滑块"},"9.7":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#添加",a:"添加"},"9.8":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#删除",a:"删除"},"9.9":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#更新",a:"更新"},"10.0":{t:"# Advanced Properties",p:"The Advanced Properties here refer to the secondary properties ...",l:"en/advanced/built-in.html",a:"advanced-properties"},"10.1":{t:"`option`",p:`The player's options. -<div className="run-code"&g ...`,l:"en/advanced/built-in.html#option",a:"option"},"10.2":{t:"`template`",p:`Manages all DOM elements of the player. -<div className=&quo ...`,l:"en/advanced/built-in.html#template",a:"template"},"10.3":{t:"`events`",p:"Manages all DOM events for the player. It essentially proxies ...",l:"en/advanced/built-in.html#events",a:"events"},"10.4":{t:"`storage`",p:`Manages the player's local storage. - -The name property is used ...`,l:"en/advanced/built-in.html#storage",a:"storage"},"10.5":{t:"`icons`",p:`Manages all svg icons for the player. -<div className=" ...`,l:"en/advanced/built-in.html#icons",a:"icons"},"10.6":{t:"`i18n`",p:`Manages the player's i18n. - -The get method is used to get an i ...`,l:"en/advanced/built-in.html#i18n",a:"i18n"},"10.7":{t:"`notice`",p:"Manages the player's notifications. It only has a show propert ...",l:"en/advanced/built-in.html#notice",a:"notice"},"10.8":{t:"`layers`",p:`Manages the player's layers. - -The add method is used to dynami ...`,l:"en/advanced/built-in.html#layers",a:"layers"},"10.9":{t:"`controls`",p:`Manages the player's controls. - - -The add method is used to dyn ...`,l:"en/advanced/built-in.html#controls",a:"controls"},"10.10":{t:"`contextmenu`",p:`Manages the player's context menu - -The add method is used to d ...`,l:"en/advanced/built-in.html#contextmenu",a:"contextmenu"},"10.11":{t:"`subtitle`",p:`Manages the player's subtitle functionality - -The url property ...`,l:"en/advanced/built-in.html#subtitle",a:"subtitle"},"10.12":{t:"`info`",p:"Manages the player's information panel, commonly used to view ...",l:"en/advanced/built-in.html#info",a:"info"},"10.13":{t:"`loading`",p:`Manages the player's loading layer - -The show property is used ...`,l:"en/advanced/built-in.html#loading",a:"loading"},"10.14":{t:"`hotkey`",p:`Manages the player's hotkey functionality - -The add method is u ...`,l:"en/advanced/built-in.html#hotkey",a:"hotkey"},"10.15":{t:"`mask`",p:`Manages the player's mask layer - -The show property is used to ...`,l:"en/advanced/built-in.html#mask",a:"mask"},"10.16":{t:"`setting`",p:`Manages the player's settings panel - -The add method is used to ...`,l:"en/advanced/built-in.html#setting",a:"setting"},"10.17":{t:"`plugins`",p:"Manages the player's plugin functionality, with only the add m ...",l:"en/advanced/built-in.html#plugins",a:"plugins"},"11.0":{t:"# Static Properties",p:"Here, Static Properties refer to the top-level properties moun ...",l:"en/advanced/class.html",a:"static-properties"},"11.1":{t:"`instances`",p:"Returns an array of all player instances. This property can be ...",l:"en/advanced/class.html#instances",a:"instances"},"11.2":{t:"`version`",p:`Returns the version information of the player. -<div classNa ...`,l:"en/advanced/class.html#version",a:"version"},"11.3":{t:"`env`",p:`Returns the environment variables of the player. -<div class ...`,l:"en/advanced/class.html#env",a:"env"},"11.4":{t:"`build`",p:`Returns the build time of the player. -<div className=" ...`,l:"en/advanced/class.html#build",a:"build"},"11.5":{t:"`config`",p:`Returns the default configuration for videos. -<div classNam ...`,l:"en/advanced/class.html#config",a:"config"},"11.6":{t:"`utils`",p:`Returns the collection of utility functions for the player. -&l ...`,l:"en/advanced/class.html#utils",a:"utils"},"11.7":{t:"`scheme`",p:`Returns the validation schema for player options. -<div clas ...`,l:"en/advanced/class.html#scheme",a:"scheme"},"11.8":{t:"`Emitter`",p:`Returns the constructor function for the event emitter. -<di ...`,l:"en/advanced/class.html#emitter",a:"emitter"},"11.9":{t:"`validator`",p:`Returns the validation function for options. -<div className ...`,l:"en/advanced/class.html#validator",a:"validator"},"11.10":{t:"`kindOf`",p:`Returns the utility function for type detection. -<div class ...`,l:"en/advanced/class.html#kindof",a:"kindof"},"11.11":{t:"`html`",p:`Returns the html string required by the player. -<div classN ...`,l:"en/advanced/class.html#html",a:"html"},"11.12":{t:"`option`",p:`Returns the default options for the player. -<div className= ...`,l:"en/advanced/class.html#option",a:"option"},"12.0":{t:"# Instance Events",p:"Player events are divided into two types: native events (prefi ...",l:"en/advanced/event.html",a:"instance-events"},"12.1":{t:"`ready`",p:`Triggered when the player is ready for the first time -<div ...`,l:"en/advanced/event.html#ready",a:"ready"},"12.2":{t:"`restart`",p:`Triggered when the player switches URL and becomes playable -&l ...`,l:"en/advanced/event.html#restart",a:"restart"},"12.3":{t:"`pause`",p:`Triggered when the player is paused -<div className="ru ...`,l:"en/advanced/event.html#pause",a:"pause"},"12.4":{t:"`play`",p:`Triggered when the player starts playing -<div className=&qu ...`,l:"en/advanced/event.html#play",a:"play"},"12.5":{t:"`hotkey`",p:`Triggered when a hotkey is pressed on the player -<div class ...`,l:"en/advanced/event.html#hotkey",a:"hotkey"},"12.6":{t:"`destroy`",p:`Triggered when the player is destroyed -<div className=" ...`,l:"en/advanced/event.html#destroy",a:"destroy"},"12.7":{t:"`focus`",p:`Triggered when the player gains focus -<div className=" ...`,l:"en/advanced/event.html#focus",a:"focus"},"12.8":{t:"`blur`",p:`Triggered when the player loses focus -<div className=" ...`,l:"en/advanced/event.html#blur",a:"blur"},"12.9":{t:"`dblclick`",p:`Triggered when the player is double-clicked -<div className= ...`,l:"en/advanced/event.html#dblclick",a:"dblclick"},"12.10":{t:"`click`",p:`Triggered when the player is clicked -<div className="r ...`,l:"en/advanced/event.html#click",a:"click"},"12.11":{t:"`error`",p:`Triggered when an error occurs while loading the video -<div ...`,l:"en/advanced/event.html#error",a:"error"},"12.12":{t:"`hover`",p:`Triggered when the mouse enters or leaves the player -<div c ...`,l:"en/advanced/event.html#hover",a:"hover"},"12.13":{t:"`mousemove`",p:`Triggered when the mouse moves over the player -<div classNa ...`,l:"en/advanced/event.html#mousemove",a:"mousemove"},"12.14":{t:"`resize`",p:`Triggered when the player's dimensions change -<div classNam ...`,l:"en/advanced/event.html#resize",a:"resize"},"12.15":{t:"`view`",p:`Triggered when the player enters or leaves the viewport -<di ...`,l:"en/advanced/event.html#view",a:"view"},"12.16":{t:"`lock`",p:`Triggered when the lock state changes on mobile devices -<di ...`,l:"en/advanced/event.html#lock",a:"lock"},"12.17":{t:"`aspectRatio`",p:`Triggered when the player's aspect ratio changes -<div class ...`,l:"en/advanced/event.html#aspectratio",a:"aspectratio"},"12.18":{t:"`autoHeight`",p:`Triggered when the player automatically adjusts its height -< ...`,l:"en/advanced/event.html#autoheight",a:"autoheight"},"12.19":{t:"`autoSize`",p:`Triggered when the player automatically adjusts its size -<d ...`,l:"en/advanced/event.html#autosize",a:"autosize"},"12.20":{t:"`flip`",p:`Triggered when the player is flipped -<div className="r ...`,l:"en/advanced/event.html#flip",a:"flip"},"12.21":{t:"`fullscreen`",p:"Triggered when the player enters or exits window fullscreen mo ...",l:"en/advanced/event.html#fullscreen",a:"fullscreen"},"12.22":{t:"`fullscreenError`",p:`Triggered when a window fullscreen error occurs -<div classN ...`,l:"en/advanced/event.html#fullscreenerror",a:"fullscreenerror"},"12.23":{t:"`fullscreenWeb`",p:`Triggered when the player enters or exits web fullscreen mode - ...`,l:"en/advanced/event.html#fullscreenweb",a:"fullscreenweb"},"12.24":{t:"`mini`",p:`Triggered when the player enters or exits mini mode -<div cl ...`,l:"en/advanced/event.html#mini",a:"mini"},"12.25":{t:"`pip`",p:"Triggered when the player enters or exits picture-in-picture m ...",l:"en/advanced/event.html#pip",a:"pip"},"12.26":{t:"`screenshot`",p:`Triggered when the player captures a screenshot -<div classN ...`,l:"en/advanced/event.html#screenshot",a:"screenshot"},"12.27":{t:"`seek`",p:`Triggered when the player performs a time seek -<div classNa ...`,l:"en/advanced/event.html#seek",a:"seek"},"12.28":{t:"`subtitleOffset`",p:`Triggered when subtitle offset changes in the player -<div c ...`,l:"en/advanced/event.html#subtitleoffset",a:"subtitleoffset"},"12.29":{t:"`subtitleBeforeUpdate`",p:`Triggered before subtitles are updated -<div className=" ...`,l:"en/advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"12.30":{t:"`subtitleAfterUpdate`",p:`Triggered after subtitles are updated -<div className=" ...`,l:"en/advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"12.31":{t:"`subtitleLoad`",p:`Triggered when subtitles are loaded -<div className="ru ...`,l:"en/advanced/event.html#subtitleload",a:"subtitleload"},"12.32":{t:"`info`",p:`Triggered when the info panel is shown or hidden -<div class ...`,l:"en/advanced/event.html#info",a:"info"},"12.33":{t:"`layer`",p:`Triggered when custom layers are shown or hidden -<div class ...`,l:"en/advanced/event.html#layer",a:"layer"},"12.34":{t:"`loading`",p:`Triggered when the loader is shown or hidden -<div className ...`,l:"en/advanced/event.html#loading",a:"loading"},"12.35":{t:"`mask`",p:`Triggered when the mask layer is shown or hidden -<div class ...`,l:"en/advanced/event.html#mask",a:"mask"},"12.36":{t:"`subtitle`",p:`Triggered when the subtitle layer is shown or hidden -<div c ...`,l:"en/advanced/event.html#subtitle",a:"subtitle"},"12.37":{t:"`contextmenu`",p:`Triggered when the context menu is shown or hidden -<div cla ...`,l:"en/advanced/event.html#contextmenu",a:"contextmenu"},"12.38":{t:"`control`",p:`Triggered when the controls are shown or hidden -<div classN ...`,l:"en/advanced/event.html#control",a:"control"},"12.39":{t:"`setting`",p:`Triggered when the settings panel is shown or hidden -<div c ...`,l:"en/advanced/event.html#setting",a:"setting"},"12.40":{t:"`muted`",p:`Triggered when the mute state changes -<div className=" ...`,l:"en/advanced/event.html#muted",a:"muted"},"12.41":{t:"`keydown`",p:`Listens for keydown events from the document -<div className ...`,l:"en/advanced/event.html#keydown",a:"keydown"},"12.42":{t:"`video:canplay`",p:"The browser can start playing the media, but estimates there i ...",l:"en/advanced/event.html#video-canplay",a:"video-canplay"},"12.43":{t:"`video:canplaythrough`",p:"The browser estimates it can play the media through to the end ...",l:"en/advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"12.44":{t:"`video:complete`",p:`OfflineAudioContext rendering is complete -`,l:"en/advanced/event.html#video-complete",a:"video-complete"},"12.45":{t:"`video:durationchange`",p:`Triggered when the value of the duration property changes -`,l:"en/advanced/event.html#video-durationchange",a:"video-durationchange"},"12.46":{t:"`video:emptied`",p:"The media has become empty; for example, this event is sent wh ...",l:"en/advanced/event.html#video-emptied",a:"video-emptied"},"12.47":{t:"`video:ended`",p:"Playback has stopped because the media has reached its end poi ...",l:"en/advanced/event.html#video-ended",a:"video-ended"},"12.48":{t:"`video:error`",p:"An error occurred while fetching media data, or the resource t ...",l:"en/advanced/event.html#video-error",a:"video-error"},"12.49":{t:"`video:loadeddata`",p:`The first frame of the media has finished loading -`,l:"en/advanced/event.html#video-loadeddata",a:"video-loadeddata"},"12.50":{t:"`video:loadedmetadata`",p:`Metadata has been loaded -`,l:"en/advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"12.51":{t:"`video:pause`",p:`Playback has been paused -`,l:"en/advanced/event.html#video-pause",a:"video-pause"},"12.52":{t:"`video:play`",p:`Playback has begun -`,l:"en/advanced/event.html#video-play",a:"video-play"},"12.53":{t:"`video:playing`",p:"Playback is ready to start after having been paused or delayed ...",l:"en/advanced/event.html#video-playing",a:"video-playing"},"12.54":{t:"`video:progress`",p:"Periodically triggered while the browser is loading the resour ...",l:"en/advanced/event.html#video-progress",a:"video-progress"},"12.55":{t:"`video:ratechange`",p:`The playback rate has changed -`,l:"en/advanced/event.html#video-ratechange",a:"video-ratechange"},"12.56":{t:"`video:seeked`",p:`A seek operation has completed -`,l:"en/advanced/event.html#video-seeked",a:"video-seeked"},"12.57":{t:"`video:seeking`",p:`A seek operation has begun -`,l:"en/advanced/event.html#video-seeking",a:"video-seeking"},"12.58":{t:"`video:stalled`",p:"The user agent is trying to fetch media data, but data is unex ...",l:"en/advanced/event.html#video-stalled",a:"video-stalled"},"12.59":{t:"`video:suspend`",p:`Media data loading has been suspended -`,l:"en/advanced/event.html#video-suspend",a:"video-suspend"},"12.60":{t:"`video:timeupdate`",p:"The time indicated by the currentTime attribute has been updat ...",l:"en/advanced/event.html#video-timeupdate",a:"video-timeupdate"},"12.61":{t:"`video:volumechange`",p:`The volume has changed -`,l:"en/advanced/event.html#video-volumechange",a:"video-volumechange"},"12.62":{t:"`video:waiting`",p:`Playback has stopped due to temporary lack of data -`,l:"en/advanced/event.html#video-waiting",a:"video-waiting"},"13.0":{t:"# Global Properties",p:"These global properties refer to the top-level properties moun ...",l:"en/advanced/global.html",a:"global-properties"},"13.1":{t:"DEBUG",p:"Whether to enable debug mode, which can print all built-in eve ...",l:"en/advanced/global.html#debug",a:"debug"},"13.2":{t:"STYLE",p:`Returns the player style text. -<div className="run-cod ...`,l:"en/advanced/global.html#style",a:"style"},"13.3":{t:"CONTEXTMENU",p:`Whether to enable the context menu. Default is on. -<div cla ...`,l:"en/advanced/global.html#contextmenu",a:"contextmenu"},"13.4":{t:"NOTICE_TIME",p:"The display duration for notification messages, in millisecond ...",l:"en/advanced/global.html#notice-time",a:"notice-time"},"13.5":{t:"SETTING_WIDTH",p:"The default width of the settings panel, in pixels. Default is ...",l:"en/advanced/global.html#setting-width",a:"setting-width"},"13.6":{t:"SETTING_ITEM_WIDTH",p:"The default width of settings items in the settings panel, in ...",l:"en/advanced/global.html#setting-item-width",a:"setting-item-width"},"13.7":{t:"SETTING_ITEM_HEIGHT",p:"The default height of settings items in the settings panel, in ...",l:"en/advanced/global.html#setting-item-height",a:"setting-item-height"},"13.8":{t:"RESIZE_TIME",p:"The throttle time for the resize event, in milliseconds. Defau ...",l:"en/advanced/global.html#resize-time",a:"resize-time"},"13.9":{t:"SCROLL_TIME",p:"The throttle time for the scroll event, in milliseconds. Defau ...",l:"en/advanced/global.html#scroll-time",a:"scroll-time"},"13.10":{t:"SCROLL_GAP",p:"The boundary tolerance distance for the view event, in pixels. ...",l:"en/advanced/global.html#scroll-gap",a:"scroll-gap"},"13.11":{t:"AUTO_PLAYBACK_MAX",p:"The maximum record count for the auto-playback feature. Defaul ...",l:"en/advanced/global.html#auto-playback-max",a:"auto-playback-max"},"13.12":{t:"AUTO_PLAYBACK_MIN",p:"The minimum record duration for the auto-playback feature, in ...",l:"en/advanced/global.html#auto-playback-min",a:"auto-playback-min"},"13.13":{t:"AUTO_PLAYBACK_TIMEOUT",p:"The hide delay duration for the auto-playback feature, in mill ...",l:"en/advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"13.14":{t:"RECONNECT_TIME_MAX",p:"The maximum number of automatic reconnection attempts when a c ...",l:"en/advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"13.15":{t:"RECONNECT_SLEEP_TIME",p:"The delay time for automatic reconnection when a connection er ...",l:"en/advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"13.16":{t:"CONTROL_HIDE_TIME",p:"The delay time in milliseconds for auto-hiding the bottom cont ...",l:"en/advanced/global.html#control-hide-time",a:"control-hide-time"},"13.17":{t:"DBCLICK_TIME",p:"The delay time in milliseconds for double-click events. Defaul ...",l:"en/advanced/global.html#dbclick-time",a:"dbclick-time"},"13.18":{t:"DBCLICK_FULLSCREEN",p:"On desktop, whether double-click toggles fullscreen mode. Defa ...",l:"en/advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"13.19":{t:"MOBILE_DBCLICK_PLAY",p:"On mobile devices, whether double-click toggles play/pause. De ...",l:"en/advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"13.20":{t:"MOBILE_CLICK_PLAY",p:"On mobile devices, whether single-click toggles play/pause. De ...",l:"en/advanced/global.html#mobile-click-play",a:"mobile-click-play"},"13.21":{t:"AUTO_ORIENTATION_TIME",p:"On mobile devices, the delay time in milliseconds for automati ...",l:"en/advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"13.22":{t:"INFO_LOOP_TIME",p:"The refresh interval in milliseconds for the information panel ...",l:"en/advanced/global.html#info-loop-time",a:"info-loop-time"},"13.23":{t:"FAST_FORWARD_VALUE",p:"On mobile devices, the speed multiplier for fast-forward durin ...",l:"en/advanced/global.html#fast-forward-value",a:"fast-forward-value"},"13.24":{t:"FAST_FORWARD_TIME",p:"On mobile devices, the delay time in milliseconds for activati ...",l:"en/advanced/global.html#fast-forward-time",a:"fast-forward-time"},"13.25":{t:"TOUCH_MOVE_RATIO",p:"On mobile devices, the speed multiplier for seeking when swipi ...",l:"en/advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"13.26":{t:"VOLUME_STEP",p:"The volume adjustment step for keyboard shortcuts. Default is ...",l:"en/advanced/global.html#volume-step",a:"volume-step"},"13.27":{t:"SEEK_STEP",p:"The seeking step in seconds for keyboard shortcuts. Default is ...",l:"en/advanced/global.html#seek-step",a:"seek-step"},"13.28":{t:"PLAYBACK_RATE",p:"The built-in list of playback rates. Default is [0.5, 0.75, 1, ...",l:"en/advanced/global.html#playback-rate",a:"playback-rate"},"13.29":{t:"ASPECT_RATIO",p:"The built-in list of video aspect ratios. Default is ['default ...",l:"en/advanced/global.html#aspect-ratio",a:"aspect-ratio"},"13.30":{t:"FLIP",p:"The built-in list of video flip modes. Default is ['normal', ' ...",l:"en/advanced/global.html#flip",a:"flip"},"13.31":{t:"FULLSCREEN_WEB_IN_BODY",p:"Determines whether to mount the player under the body element ...",l:"en/advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"13.32":{t:"LOG_VERSION",p:`Sets whether to print the player version. Defaults to true. -&l ...`,l:"en/advanced/global.html#log-version",a:"log-version"},"13.33":{t:"USE_RAF",p:"Sets whether to use requestAnimationFrame. Defaults to false. ...",l:"en/advanced/global.html#use-raf",a:"use-raf"},"13.34":{t:"REMOVE_SRC_WHEN_DESTROY",p:"Determines whether to remove the video's src attribute and cal ...",l:"en/advanced/global.html#remove-src-when-destroy",a:"remove-src-when-destroy"},"14.0":{t:"# Writing Plugins",p:"Once you are familiar with the player's properties, methods, a ...",l:"en/advanced/plugin.html",a:"writing-plugins"},"15.0":{t:"# Instance Properties",p:"Here, Instance Properties refer to the first-level properties ...",l:"en/advanced/property.html",a:"instance-properties"},"15.1":{t:"`play`",p:` -Type: Function - -Play the video. -<div className="run-c ...`,l:"en/advanced/property.html#play",a:"play"},"15.2":{t:"`pause`",p:` -Type: Function - -Pause the video. -<div className="run- ...`,l:"en/advanced/property.html#pause",a:"pause"},"15.3":{t:"`toggle`",p:` -Type: Function - -Toggle video playback and pause. -<div clas ...`,l:"en/advanced/property.html#toggle",a:"toggle"},"15.4":{t:"`destroy`",p:` -Type: Function -Parameter: Boolean - -Destroy the player. Accept ...`,l:"en/advanced/property.html#destroy",a:"destroy"},"15.5":{t:"`reset`",p:` -Type: Function - -Reset the player's video element: removes the ...`,l:"en/advanced/property.html#reset",a:"reset"},"15.6":{t:"`seek`",p:` -Type: Setter -Parameter: Number - -Seek to a specific time in th ...`,l:"en/advanced/property.html#seek",a:"seek"},"15.7":{t:"`forward`",p:` -Type: Setter -Parameter: Number - -Fast forward the video time, ...`,l:"en/advanced/property.html#forward",a:"forward"},"15.8":{t:"`backward`",p:` -Type: Setter -Parameter: Number - -Rewind the video time, in sec ...`,l:"en/advanced/property.html#backward",a:"backward"},"15.9":{t:"`volume`",p:` -Type: Setter/Getter -Parameter: Number - -Set and get the video ...`,l:"en/advanced/property.html#volume",a:"volume"},"15.10":{t:"`url`",p:` -Type: Setter/Getter -Parameter: String - -Set and get the video ...`,l:"en/advanced/property.html#url",a:"url"},"15.11":{t:"`switch`",p:` -Type: Setter -Parameter: String - -Set the video URL. Similar to ...`,l:"en/advanced/property.html#switch",a:"switch"},"15.12":{t:"`switchUrl`",p:` -Type: Function -Parameter: String - -Set the video URL. Similar ...`,l:"en/advanced/property.html#switchurl",a:"switchurl"},"15.13":{t:"`switchQuality`",p:` -Type: Function -Parameter: String - -Sets the video quality URL. ...`,l:"en/advanced/property.html#switchquality",a:"switchquality"},"15.14":{t:"`muted`",p:` -Type: Setter/Getter -Parameter: Boolean - -Sets and gets whether ...`,l:"en/advanced/property.html#muted",a:"muted"},"15.15":{t:"`currentTime`",p:` -Type: Setter/Getter -Parameter: Number - -Sets and gets the curr ...`,l:"en/advanced/property.html#currenttime",a:"currenttime"},"15.16":{t:"`duration`",p:` -Type: Getter - -Gets the duration of the video. -<div classNa ...`,l:"en/advanced/property.html#duration",a:"duration"},"15.17":{t:"`screenshot`",p:` -Type: Function - -Downloads a screenshot of the current video f ...`,l:"en/advanced/property.html#screenshot",a:"screenshot"},"15.18":{t:"`getDataURL`",p:` -Type: Function - -Gets the base64 URL of a screenshot of the cu ...`,l:"en/advanced/property.html#getdataurl",a:"getdataurl"},"15.19":{t:"`getBlobUrl`",p:` -Type: Function - -Gets the blob URL of a screenshot of the curr ...`,l:"en/advanced/property.html#getbloburl",a:"getbloburl"},"15.20":{t:"`fullscreen`",p:` -Type: Setter/Getter -Parameter: Boolean - -Sets and gets the pla ...`,l:"en/advanced/property.html#fullscreen",a:"fullscreen"},"15.21":{t:"`fullscreenWeb`",p:` -Type: Setter/Getter -Parameter: Boolean - -Sets and gets the pla ...`,l:"en/advanced/property.html#fullscreenweb",a:"fullscreenweb"},"15.22":{t:"`pip`",p:` -Type: Setter/Getter -Parameter: Boolean - -Sets and gets the pla ...`,l:"en/advanced/property.html#pip",a:"pip"},"15.23":{t:"`poster`",p:` -Type: Setter/Getter -Parameter: String - -Sets and gets the vide ...`,l:"en/advanced/property.html#poster",a:"poster"},"15.24":{t:"`mini`",p:` -Type: Setter/Getter -Parameter: Boolean - -Sets and gets the pla ...`,l:"en/advanced/property.html#mini",a:"mini"},"15.25":{t:"`playing`",p:` -Type: Getter -Parameter: Boolean - -Gets whether the video is cu ...`,l:"en/advanced/property.html#playing",a:"playing"},"15.26":{t:"`state`",p:` -Type: Setter/Getter -Parameter: String - -Gets or sets the playe ...`,l:"en/advanced/property.html#state",a:"state"},"15.27":{t:"`autoSize`",p:` -Type: Function - -Sets whether the video adapts its size automa ...`,l:"en/advanced/property.html#autosize",a:"autosize"},"15.28":{t:"`rect`",p:` -Type: Getter - -Gets the player's dimensions and coordinate inf ...`,l:"en/advanced/property.html#rect",a:"rect"},"15.29":{t:"`bottom` / `top` / `left` / `right` / `x` / `y` / `width` / `height`",p:` -Type: Getter - -These properties provide shortcut access to rec ...`,l:"en/advanced/property.html#bottom-top-left-right-x-y-width-height",a:"bottom-top-left-right-x-y-width-height"},"15.30":{t:"`flip`",p:` -Type: Setter/Getter -Parameter: String - -Sets and gets the play ...`,l:"en/advanced/property.html#flip",a:"flip"},"15.31":{t:"`playbackRate`",p:` -Type: Setter/Getter -Parameter: Number - -Sets and gets the play ...`,l:"en/advanced/property.html#playbackrate",a:"playbackrate"},"15.32":{t:"`aspectRatio`",p:` -Type: Setter/Getter -Parameter: String - -Sets and gets the play ...`,l:"en/advanced/property.html#aspectratio",a:"aspectratio"},"15.33":{t:"`autoHeight`",p:` -Type: Function - -When the container only has a defined width, ...`,l:"en/advanced/property.html#autoheight",a:"autoheight"},"15.34":{t:"`attr`",p:` -Type: Function -Parameter: String - -Dynamically gets and sets a ...`,l:"en/advanced/property.html#attr",a:"attr"},"15.35":{t:"`type`",p:` -Type: Setter/Getter -Parameter: String - -Dynamically gets and s ...`,l:"en/advanced/property.html#type",a:"type"},"15.36":{t:"`theme`",p:` -Type: Setter/Getter -Parameter: String - -Dynamically gets and s ...`,l:"en/advanced/property.html#theme",a:"theme"},"15.37":{t:"`airplay`",p:` -Type: Function - -Initiates AirPlay. -<div className="ru ...`,l:"en/advanced/property.html#airplay",a:"airplay"},"15.38":{t:"`loaded`",p:` -Type: Getter - -The proportion of the video that has been buffe ...`,l:"en/advanced/property.html#loaded",a:"loaded"},"15.39":{t:"`loadedTime`",p:` -Type: Getter - -The amount of media that has been buffered, in ...`,l:"en/advanced/property.html#loadedtime",a:"loadedtime"},"15.40":{t:"`played`",p:` -Type: Getter - -The proportion of the video that has been playe ...`,l:"en/advanced/property.html#played",a:"played"},"15.41":{t:"`proxy`",p:` -Type: Function - -A proxy function for DOM events, essentially ...`,l:"en/advanced/property.html#proxy",a:"proxy"},"15.42":{t:"`query`",p:` -Type: Function - -A DOM query function, similar to document.que ...`,l:"en/advanced/property.html#query",a:"query"},"15.43":{t:"`video`",p:` -Type: Element - -Quickly returns the player's video element. -&l ...`,l:"en/advanced/property.html#video",a:"video"},"15.44":{t:"`cssVar`",p:` -Type: Function - -Dynamically gets or sets CSS variables. -<d ...`,l:"en/advanced/property.html#cssvar",a:"cssvar"},"15.45":{t:"`quality`",p:` -Type: Setter -Parameter: Array - -Dynamically sets the list of a ...`,l:"en/advanced/property.html#quality",a:"quality"},"15.46":{t:"`thumbnails`",p:` -Type: Setter/Getter -Parameter: Object - -Dynamically set thumbn ...`,l:"en/advanced/property.html#thumbnails",a:"thumbnails"},"15.47":{t:"`subtitleOffset`",p:` -Type: Setter/Getter -Parameter: Number - -Dynamically set subtit ...`,l:"en/advanced/property.html#subtitleoffset",a:"subtitleoffset"},"16.0":{t:"# Context Menu",p:"",l:"en/component/contextmenu.html",a:"context-menu"},"16.1":{t:"Configuration",p:` - - -Property -Type -Description - - - - -disable -Boolean -Whether to di ...`,l:"en/component/contextmenu.html#configuration",a:"configuration"},"16.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#creation",a:"creation"},"16.3":{t:"Addition",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#addition",a:"addition"},"16.4":{t:"Removal",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#removal",a:"removal"},"16.5":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#update",a:"update"},"17.0":{t:"# Controls",p:"",l:"en/component/controls.html",a:"controls"},"17.1":{t:"Configuration",p:` - - -Property -Type -Description - - - - -disable -Boolean -Whether to di ...`,l:"en/component/controls.html#configuration",a:"configuration"},"17.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#creation",a:"creation"},"17.3":{t:"Adding",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#adding",a:"adding"},"17.4":{t:"Removal",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#removal",a:"removal"},"17.5":{t:"Updating",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#updating",a:"updating"},"18.0":{t:"# Layer",p:"",l:"en/component/layers.html",a:"layer"},"18.1":{t:"Configuration",p:` - - -Property -Type -Description - - - - -disable -Boolean -Whether to di ...`,l:"en/component/layers.html#configuration",a:"configuration"},"18.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#creation",a:"creation"},"18.3":{t:"Addition",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#addition",a:"addition"},"18.4":{t:"Removal",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#removal",a:"removal"},"18.5":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#update",a:"update"},"19.0":{t:"# Settings Panel",p:"",l:"en/component/setting.html",a:"settings-panel"},"19.1":{t:"Built-in",p:"First, you need to open the settings panel. It comes with four ...",l:"en/component/setting.html#built-in",a:"built-in"},"19.2":{t:"Creating - Buttons",p:` - - -Property -Type -Description - - - - -html -String, Element -Element ...`,l:"en/component/setting.html#creating-buttons",a:"creating-buttons"},"19.3":{t:"Creating - Selection Lists",p:` - - -Property -Type -Description - - - - -html -String, Element -Element ...`,l:"en/component/setting.html#creating-selection-lists",a:"creating-selection-lists"},"19.4":{t:"Creating - Nested Lists",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#creating-nested-lists",a:"creating-nested-lists"},"19.5":{t:"Create - Toggle Button",p:` - - -Property -Type -Description - - - - -html -String, Element -DOM elem ...`,l:"en/component/setting.html#create-toggle-button",a:"create-toggle-button"},"19.6":{t:"Create - Range Slider",p:` - - -Property -Type -Description - - - - -html -String, Element -DOM elem ...`,l:"en/component/setting.html#create-range-slider",a:"create-range-slider"},"19.7":{t:"Add",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#add",a:"add"},"19.8":{t:"Remove",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#remove",a:"remove"},"19.9":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#update",a:"update"},"20.0":{t:"# Installation & Usage",p:"",l:"en/index.html",a:"installation-usage"},"20.1":{t:"Installation",p:`::: code-group -npm install artplayer - -yarn add artplayer - -pnpm ...`,l:"en/index.html#installation",a:"installation"},"20.2":{t:"`CDN`",p:`::: code-group -https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"en/index.html#cdn",a:"cdn"},"20.3":{t:"Usage",p:`::: code-group -<html> - <head> - <title ...`,l:"en/index.html#usage",a:"usage"},"20.4":{t:"`Vue.js`",p:`::: code-group -<template> - <div ref="$container ...`,l:"en/index.html#vue-js",a:"vue-js"},"20.5":{t:"`React.js`",p:`::: code-group -import Artplayer from 'artplayer' -import { useE ...`,l:"en/index.html#react-js",a:"react-js"},"20.6":{t:"TypeScript",p:"artplayer.d.ts is automatically imported when importing Artpla ...",l:"en/index.html#typescript",a:"typescript"},"20.7":{t:"Vue.js",p:` - -`,l:"en/index.html#vue-js",a:"vue-js"},"20.8":{t:"React.js",p:`import Artplayer from 'artplayer'; -const art = useRef<Artpl ...`,l:"en/index.html#react-js",a:"react-js"},"20.9":{t:"Option",p:`You can also use the option type. -import Artplayer, { type Opt ...`,l:"en/index.html#option",a:"option"},"20.10":{t:"JavaScript",p:"Sometimes your js files may lose TypeScript type hints. In suc ...",l:"en/index.html#javascript",a:"javascript"},"20.11":{t:"Legacy Browsers",p:"The production build artplayer.js only supports the latest maj ...",l:"en/index.html#legacy-browsers",a:"legacy-browsers"},"20.12":{t:"ECMAScript Module",p:`::: tip ESM Demo: -https://artplayer.org/esm.html -::: -Starting ...`,l:"en/index.html#ecmascript-module",a:"ecmascript-module"},"20.13":{t:"Custom userAgent",p:"Currently, the detection for whether a device is mobile is not ...",l:"en/index.html#custom-useragent",a:"custom-useragent"},"21.0":{t:"# Language Settings",p:`::: danger -Due to the increasing number of bundled multilingua ...`,l:"en/start/i18n.html",a:"language-settings"},"21.1":{t:"Default Languages",p:"The default languages are: en, zh-cn. No manual import is requ ...",l:"en/start/i18n.html#default-languages",a:"default-languages"},"21.2":{t:"Importing Languages",p:"Language files before bundling are located at: artplayer/src/i ...",l:"en/start/i18n.html#importing-languages",a:"importing-languages"},"21.3":{t:"Adding a New Language",p:`var art = new Artplayer({ - container: '.artplayer-app', - ...`,l:"en/start/i18n.html#adding-a-new-language",a:"adding-a-new-language"},"21.4":{t:"Modifying Languages",p:`import zhTw from 'artplayer/i18n/zh-tw'; - -var art = new Artpla ...`,l:"en/start/i18n.html#modifying-languages",a:"modifying-languages"},"22.0":{t:"# Basic Options",p:"",l:"en/start/option.html",a:"basic-options"},"22.1":{t:"`container`",p:` -Type: String, Element -Default: #artplayer - -The DOM container ...`,l:"en/start/option.html#container",a:"container"},"22.2":{t:"`url`",p:` -Type: String -Default: '' - -The video source URL. -<div class ...`,l:"en/start/option.html#url",a:"url"},"22.3":{t:"`id`",p:` -Type: String -Default: '' - -The unique identifier for the playe ...`,l:"en/start/option.html#id",a:"id"},"22.4":{t:"`onReady`",p:` -Type: Function -Default: undefined - -The constructor accepts a ...`,l:"en/start/option.html#onready",a:"onready"},"22.5":{t:"`poster`",p:` -Type: String -Default: '' - -The video poster image, which only ...`,l:"en/start/option.html#poster",a:"poster"},"22.6":{t:"`theme`",p:` -Type: String -Default: #f00 - -The player's theme color, current ...`,l:"en/start/option.html#theme",a:"theme"},"22.7":{t:"`volume`",p:` -Type: Number -Default: 0.7 - -The default volume of the player. - ...`,l:"en/start/option.html#volume",a:"volume"},"22.8":{t:"`isLive`",p:` -Type: Boolean -Default: false - -Enable live streaming mode, whi ...`,l:"en/start/option.html#islive",a:"islive"},"22.9":{t:"`muted`",p:` -Type: Boolean -Default: false - -Whether to mute by default. -< ...`,l:"en/start/option.html#muted",a:"muted"},"22.10":{t:"`autoplay`",p:` -Type: Boolean -Default: false - -Whether to autoplay. -<div cl ...`,l:"en/start/option.html#autoplay",a:"autoplay"},"22.11":{t:"`autoSize`",p:` -Type: Boolean -Default: false - -By default, the player's dimens ...`,l:"en/start/option.html#autosize",a:"autosize"},"22.12":{t:"`autoMini`",p:` -Type: Boolean -Default: false - -Automatically enters mini playe ...`,l:"en/start/option.html#automini",a:"automini"},"22.13":{t:"`loop`",p:` -Type: Boolean -Default: false - -Whether to enable video looping ...`,l:"en/start/option.html#loop",a:"loop"},"22.14":{t:"`flip`",p:` -Type: Boolean -Default: false - -Whether to display the video fl ...`,l:"en/start/option.html#flip",a:"flip"},"22.15":{t:"`playbackRate`",p:` -Type: Boolean -Default: false - -Whether to display the video pl ...`,l:"en/start/option.html#playbackrate",a:"playbackrate"},"22.16":{t:"`aspectRatio`",p:` -Type: Boolean -Default: false - -Whether to display the video as ...`,l:"en/start/option.html#aspectratio",a:"aspectratio"},"22.17":{t:"`screenshot`",p:` -Type: Boolean -Default: false - -Whether to display the Video Sc ...`,l:"en/start/option.html#screenshot",a:"screenshot"},"22.18":{t:"`setting`",p:` -Type: Boolean -Default: false - -Whether to display the toggle b ...`,l:"en/start/option.html#setting",a:"setting"},"22.19":{t:"`hotkey`",p:` -Type: Boolean -Default: true - -Whether to enable hotkeys. -<d ...`,l:"en/start/option.html#hotkey",a:"hotkey"},"22.20":{t:"`pip`",p:` -Type: Boolean -Default: false - -Whether to display the Picture- ...`,l:"en/start/option.html#pip",a:"pip"},"22.21":{t:"`mutex`",p:` -Type: Boolean -Default: true - -If multiple players exist simult ...`,l:"en/start/option.html#mutex",a:"mutex"},"22.22":{t:"`backdrop`",p:` -Type: Boolean -Default: true - -Whether to enable the backdrop b ...`,l:"en/start/option.html#backdrop",a:"backdrop"},"22.23":{t:"`fullscreen`",p:` -Type: Boolean -Default: false - -Whether to display the player W ...`,l:"en/start/option.html#fullscreen",a:"fullscreen"},"22.24":{t:"`fullscreenWeb`",p:` -Type: Boolean -Default: false - -Whether to display the player W ...`,l:"en/start/option.html#fullscreenweb",a:"fullscreenweb"},"22.25":{t:"`subtitleOffset`",p:` -Type: Boolean -Default: false - -Subtitle timing offset, range w ...`,l:"en/start/option.html#subtitleoffset",a:"subtitleoffset"},"22.26":{t:"`miniProgressBar`",p:` -Type: Boolean -Default: false - -Mini progress bar that appears ...`,l:"en/start/option.html#miniprogressbar",a:"miniprogressbar"},"22.27":{t:"`useSSR`",p:` -Type: Boolean -Default: false - -Whether to use SSR mount mode. ...`,l:"en/start/option.html#usessr",a:"usessr"},"22.28":{t:"`playsInline`",p:` -Type: Boolean -Default: true - -Whether to use playsInline mode ...`,l:"en/start/option.html#playsinline",a:"playsinline"},"22.29":{t:"`layers`",p:` -Type: Array -Default: [] - -Initialize custom layers. -<div cl ...`,l:"en/start/option.html#layers",a:"layers"},"22.30":{t:"`settings`",p:` -Type: Array -Default: [] - -Initialize custom settings panel. -&l ...`,l:"en/start/option.html#settings",a:"settings"},"22.31":{t:"`contextmenu`",p:` -Type: Array -Default: [] - -Initialize custom context menu. -< ...`,l:"en/start/option.html#contextmenu",a:"contextmenu"},"22.32":{t:"`controls`",p:` -Type: Array -Default: [] - -Initialize custom bottom control bar ...`,l:"en/start/option.html#controls",a:"controls"},"22.33":{t:"`quality`",p:` -Type: Array -Default: [] - -Whether to display the Quality Selec ...`,l:"en/start/option.html#quality",a:"quality"},"22.34":{t:"`highlight`",p:` -Type: Array -Default: [] - -Display Highlight Information on the ...`,l:"en/start/option.html#highlight",a:"highlight"},"22.35":{t:"`plugins`",p:` -Type: Array -Default: [] - -Initialize custom plugins. -<div c ...`,l:"en/start/option.html#plugins",a:"plugins"},"22.36":{t:"`thumbnails`",p:` -Type: Object -Default: {} - -Set Preview Thumbnails on the progr ...`,l:"en/start/option.html#thumbnails",a:"thumbnails"},"22.37":{t:"`subtitle`",p:` -Type: Object -Default: {} - -Set the video subtitle. Supported s ...`,l:"en/start/option.html#subtitle",a:"subtitle"},"22.38":{t:"`moreVideoAttr`",p:` -Type: Object -Default: {'controls': false, 'preload': 'metadat ...`,l:"en/start/option.html#morevideoattr",a:"morevideoattr"},"22.39":{t:"`icons`",p:` -Type: Object -Default: {} - -Used to replace default icons, supp ...`,l:"en/start/option.html#icons",a:"icons"},"22.40":{t:"`type`",p:` -Type: String -Default: '' - -Used to specify the video format. I ...`,l:"en/start/option.html#type",a:"type"},"22.41":{t:"`customType`",p:` -Type: Object -Default: {} - -Matches based on the video's type a ...`,l:"en/start/option.html#customtype",a:"customtype"},"22.42":{t:"`lang`",p:` -Type: String -Default: navigator.language.toLowerCase() - -The d ...`,l:"en/start/option.html#lang",a:"lang"},"22.43":{t:"`i18n`",p:` -Type: Object -Default: {} - -Custom i18n configuration. This con ...`,l:"en/start/option.html#i18n",a:"i18n"},"22.44":{t:"`lock`",p:` -Type: Boolean -Default: false - -Whether to display a lock butto ...`,l:"en/start/option.html#lock",a:"lock"},"22.45":{t:"`gesture`",p:` -Type: Boolean -Default: true - -Whether to enable gesture events ...`,l:"en/start/option.html#gesture",a:"gesture"},"22.46":{t:"`fastForward`",p:` -Type: Boolean -Default: false - -Whether to add a long-press vid ...`,l:"en/start/option.html#fastforward",a:"fastforward"},"22.47":{t:"`autoPlayback`",p:` -Type: Boolean -Default: false - -Whether to use the automatic pl ...`,l:"en/start/option.html#autoplayback",a:"autoplayback"},"22.48":{t:"`autoOrientation`",p:` -Type: Boolean -Default: false - -Whether to rotate the player du ...`,l:"en/start/option.html#autoorientation",a:"autoorientation"},"22.49":{t:"`airplay`",p:` -Type: Boolean -Default: false - -Whether to display the airplay ...`,l:"en/start/option.html#airplay",a:"airplay"},"22.50":{t:"`cssVar`",p:` -Type: Object -Default: {} - -Used to modify built-in CSS variabl ...`,l:"en/start/option.html#cssvar",a:"cssvar"},"22.51":{t:"`proxy`",p:` -Type: function -Default: undefined - -The function can return a ...`,l:"en/start/option.html#proxy",a:"proxy"},"23.0":{t:"# 安装使用",p:"",l:"index.html",a:"安装使用"},"23.1":{t:"安装",p:`::: code-group -npm install artplayer - -yarn add artplayer - -pnpm ...`,l:"index.html#安装",a:"安装"},"23.2":{t:"`CDN`",p:`::: code-group -https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"index.html#cdn",a:"cdn"},"23.3":{t:"使用",p:`::: code-group -<html> - <head> - <title ...`,l:"index.html#使用",a:"使用"},"23.4":{t:"`Vue.js`",p:`::: code-group -<template> - <div ref="$container ...`,l:"index.html#vue-js",a:"vue-js"},"23.5":{t:"`React.js`",p:`::: code-group -import Artplayer from 'artplayer' -import { useE ...`,l:"index.html#react-js",a:"react-js"},"23.6":{t:"TypeScript",p:`导入 Artplayer 时会自动导入的 artplayer.d.ts -`,l:"index.html#typescript",a:"typescript"},"23.7":{t:"Vue.js",p:` - -`,l:"index.html#vue-js",a:"vue-js"},"23.8":{t:"React.js",p:`import Artplayer from 'artplayer'; -const art = useRef<Artpl ...`,l:"index.html#react-js",a:"react-js"},"23.9":{t:"Option",p:`你也可以使用选项的类型 -import Artplayer, { type Option } from 'artplayer' ...`,l:"index.html#option",a:"option"},"23.10":{t:"JavaScript",p:`有时你的 js 文件会丢失 TypeScript 的类型提示,这时候你可以手动导入类型 -变量: -/** - * @type { ...`,l:"index.html#javascript",a:"javascript"},"23.11":{t:"古老的浏览器",p:`生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version -对于 ...`,l:"index.html#古老的浏览器",a:"古老的浏览器"},"23.12":{t:"ECMAScript Module",p:`::: tip ESM Demo: -https://artplayer.org/esm.html -::: -从 5.2.6 开 ...`,l:"index.html#ecmascript-module",a:"ecmascript-module"},"23.13":{t:"自定义 userAgent",p:"目前对于是否移动设备的判断并不准确,有时候希望通过改变 userAgent 来调整播放器的UI, 所以在 5.2.4 开始新 ...",l:"index.html#自定义-useragent",a:"自定义-useragent"},"24.0":{t:"# 弹幕库",p:"",l:"plugin/danmuku.html",a:"弹幕库"},"24.1":{t:"演示",p:`👉 查看完整演示 -`,l:"plugin/danmuku.html#演示",a:"演示"},"24.2":{t:"安装",p:`::: code-group -npm install artplayer-plugin-danmuku - -yarn add ...`,l:"plugin/danmuku.html#安装",a:"安装"},"24.3":{t:"CDN",p:`::: code-group -https://cdn.jsdelivr.net/npm/artplayer-plugin-d ...`,l:"plugin/danmuku.html#cdn",a:"cdn"},"24.4":{t:"弹幕结构",p:`每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数 -{ - t ...`,l:"plugin/danmuku.html#弹幕结构",a:"弹幕结构"},"24.5":{t:"全部选项",p:`只有danmuku是必须的参数,其余都是非必填 -{ - danmuku: [], // 弹幕数据 - speed: ...`,l:"plugin/danmuku.html#全部选项",a:"全部选项"},"24.6":{t:"生命周期",p:`来自用户输入的弹幕: -beforeEmit -> filter -> beforeVisible -> a ...`,l:"plugin/danmuku.html#生命周期",a:"生命周期"},"24.7":{t:"使用弹幕数组",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用弹幕数组",a:"使用弹幕数组"},"24.8":{t:"使用弹幕 XML",p:`弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致 -<div className="run-cod ...`,l:"plugin/danmuku.html#使用弹幕-xml",a:"使用弹幕-xml"},"24.9":{t:"使用异步返回",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用异步返回",a:"使用异步返回"},"24.10":{t:"`hide/show`",p:`通过方法 hide 和 show 进行隐藏或者显示弹幕 -<div className="run-code&q ...`,l:"plugin/danmuku.html#hide-show",a:"hide-show"},"24.11":{t:"`isHide`",p:`通过属性 isHide 判断当前弹幕是隐藏或者显示 -<div className="run-code&quo ...`,l:"plugin/danmuku.html#ishide",a:"ishide"},"24.12":{t:"`emit`",p:`通过方法 emit 发送一条实时弹幕 -<div className="run-code" data ...`,l:"plugin/danmuku.html#emit",a:"emit"},"24.13":{t:"`config`",p:`通过方法 config 实时改变弹幕配置 -<div className="run-code" da ...`,l:"plugin/danmuku.html#config",a:"config"},"24.14":{t:"`load`",p:`通过 load 方法可以重载弹幕库,或者切换新弹幕库,或者追加新的弹幕库 -<div className="r ...`,l:"plugin/danmuku.html#load",a:"load"},"24.15":{t:"`reset`",p:`用于清空当前显示的弹幕 -<div className="run-code" data-libs=& ...`,l:"plugin/danmuku.html#reset",a:"reset"},"24.16":{t:"`mount`",p:`在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。 -当 ...`,l:"plugin/danmuku.html#mount",a:"mount"},"24.17":{t:"`option`",p:`用于获取当前弹幕配置 -<div className="run-code" data-libs=&q ...`,l:"plugin/danmuku.html#option",a:"option"},"24.18":{t:"事件",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#事件",a:"事件"},"25.0":{t:"# 语言设置",p:`::: danger -鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 ...`,l:"start/i18n.html",a:"语言设置"},"25.1":{t:"默认语言",p:`默认语言有: en, zh-cn, 无需手动导入 -var art = new Artplayer({ - contain ...`,l:"start/i18n.html#默认语言",a:"默认语言"},"25.2":{t:"导入语言",p:`打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言 -打包后的语言文件存放于: a ...`,l:"start/i18n.html#导入语言",a:"导入语言"},"25.3":{t:"新增语言",p:`var art = new Artplayer({ - container: '.artplayer-app', - ...`,l:"start/i18n.html#新增语言",a:"新增语言"},"25.4":{t:"修改语言",p:`import zhTw from 'artplayer/i18n/zh-tw'; - -var art = new Artpla ...`,l:"start/i18n.html#修改语言",a:"修改语言"},"26.0":{t:"# 基础选项",p:"",l:"start/option.html",a:"基础选项"},"26.1":{t:"`container`",p:` -Type: String, Element -Default: #artplayer - -播放器挂载的 DOM 容器 -< ...`,l:"start/option.html#container",a:"container"},"26.2":{t:"`url`",p:` -Type: String -Default: '' - -视频源地址 -<div className="run-c ...`,l:"start/option.html#url",a:"url"},"26.3":{t:"`id`",p:` -Type: String -Default: '' - -播放器的唯一标识,目前只用于记忆播放 autoplayback -< ...`,l:"start/option.html#id",a:"id"},"26.4":{t:"`onReady`",p:` -Type: Function -Default: undefined - -构造函数接受一个函数作为第二个参数,播放器初始化成功 ...`,l:"start/option.html#onready",a:"onready"},"26.5":{t:"`poster`",p:` -Type: String -Default: '' - -视频的海报,只会出现在播放器初始化且未播放的状态下 -<div c ...`,l:"start/option.html#poster",a:"poster"},"26.6":{t:"`theme`",p:` -Type: String -Default: #f00 - -播放器主题颜色,目前用于 进度条 和 高亮元素 上 -<div ...`,l:"start/option.html#theme",a:"theme"},"26.7":{t:"`volume`",p:` -Type: Number -Default: 0.7 - -播放器的默认音量 -<div className="r ...`,l:"start/option.html#volume",a:"volume"},"26.8":{t:"`isLive`",p:` -Type: Boolean -Default: false - -使用直播模式,会隐藏进度条和播放时间 -<div clas ...`,l:"start/option.html#islive",a:"islive"},"26.9":{t:"`muted`",p:` -Type: Boolean -Default: false - -是否默认静音 -<div className=" ...`,l:"start/option.html#muted",a:"muted"},"26.10":{t:"`autoplay`",p:` -Type: Boolean -Default: false - -是否自动播放 -<div className=" ...`,l:"start/option.html#autoplay",a:"autoplay"},"26.11":{t:"`autoSize`",p:` -Type: Boolean -Default: false - -播放器的尺寸默认会填充整个 container 容器尺寸,所以 ...`,l:"start/option.html#autosize",a:"autosize"},"26.12":{t:"`autoMini`",p:` -Type: Boolean -Default: false - -当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式 -&l ...`,l:"start/option.html#automini",a:"automini"},"26.13":{t:"`loop`",p:` -Type: Boolean -Default: false - -是否循环播放 -<div className=" ...`,l:"start/option.html#loop",a:"loop"},"26.14":{t:"`flip`",p:` -Type: Boolean -Default: false - -是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#flip",a:"flip"},"26.15":{t:"`playbackRate`",p:` -Type: Boolean -Default: false - -是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#playbackrate",a:"playbackrate"},"26.16":{t:"`aspectRatio`",p:` -Type: Boolean -Default: false - -是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里 - ...`,l:"start/option.html#aspectratio",a:"aspectratio"},"26.17":{t:"`screenshot`",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示 视频截图 功能 -<div cla ...`,l:"start/option.html#screenshot",a:"screenshot"},"26.18":{t:"`setting`",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示 设置面板 的开关按钮 -<div ...`,l:"start/option.html#setting",a:"setting"},"26.19":{t:"`hotkey`",p:` -Type: Boolean -Default: true - -是否使用快捷键 -<div className=" ...`,l:"start/option.html#hotkey",a:"hotkey"},"26.20":{t:"`pip`",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示 画中画 的开关按钮 -<div c ...`,l:"start/option.html#pip",a:"pip"},"26.21":{t:"`mutex`",p:` -Type: Boolean -Default: true - -假如页面里同时存在多个播放器,是否只能让一个播放器播放 -< ...`,l:"start/option.html#mutex",a:"mutex"},"26.22":{t:"`backdrop`",p:` -Type: Boolean -Default: true - -是否开启播放器 UI 的背景虚化效果。开启后,设置面板、右键菜单 ...`,l:"start/option.html#backdrop",a:"backdrop"},"26.23":{t:"`fullscreen`",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示播放器 窗口全屏 按钮 -<div ...`,l:"start/option.html#fullscreen",a:"fullscreen"},"26.24":{t:"`fullscreenWeb`",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示播放器 网页全屏 按钮 -<div ...`,l:"start/option.html#fullscreenweb",a:"fullscreenweb"},"26.25":{t:"`subtitleOffset`",p:` -Type: Boolean -Default: false - -字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里 ...`,l:"start/option.html#subtitleoffset",a:"subtitleoffset"},"26.26":{t:"`miniProgressBar`",p:` -Type: Boolean -Default: false - -迷你进度条,只在播放器失去焦点后且正在播放时出现 -<di ...`,l:"start/option.html#miniprogressbar",a:"miniprogressbar"},"26.27":{t:"`useSSR`",p:` -Type: Boolean -Default: false - -是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲 ...`,l:"start/option.html#usessr",a:"usessr"},"26.28":{t:"`playsInline`",p:` -Type: Boolean -Default: true - -在移动端是否使用 playsInline 模式 -<div ...`,l:"start/option.html#playsinline",a:"playsinline"},"26.29":{t:"`layers`",p:` -Type: Array -Default: [] - -初始化自定义的 层 -<div className="ru ...`,l:"start/option.html#layers",a:"layers"},"26.30":{t:"`settings`",p:` -Type: Array -Default: [] - -初始化自定义的 设置面板 -<div className=" ...`,l:"start/option.html#settings",a:"settings"},"26.31":{t:"`contextmenu`",p:` -Type: Array -Default: [] - -初始化自定义的 右键菜单 -<div className=" ...`,l:"start/option.html#contextmenu",a:"contextmenu"},"26.32":{t:"`controls`",p:` -Type: Array -Default: [] - -初始化自定义的底部 控制栏 -<div className=&quo ...`,l:"start/option.html#controls",a:"controls"},"26.33":{t:"`quality`",p:` -Type: Array -Default: [] - -是否在底部控制栏里显示 画质选择 列表 - - - -属性 -类型 -描述 - - - - - ...`,l:"start/option.html#quality",a:"quality"},"26.34":{t:"`highlight`",p:` -Type: Array -Default: [] - -在进度条上显示 高亮信息 - - - -属性 -类型 -描述 - - - - -time -Nu ...`,l:"start/option.html#highlight",a:"highlight"},"26.35":{t:"`plugins`",p:` -Type: Array -Default: [] - -初始化自定义的 插件 -<div className="r ...`,l:"start/option.html#plugins",a:"plugins"},"26.36":{t:"`thumbnails`",p:` -Type: Object -Default: {} - -在进度条上设置 预览图 - - - -属性 -类型 -描述 - - - - -url -Str ...`,l:"start/option.html#thumbnails",a:"thumbnails"},"26.37":{t:"`subtitle`",p:` -Type: Object -Default: {} - -设置视频的字幕,支持字幕格式:vtt, srt, ass - - - -属性 - ...`,l:"start/option.html#subtitle",a:"subtitle"},"26.38":{t:"`moreVideoAttr`",p:` -Type: Object -Default: {'controls': false, 'preload': 'metadat ...`,l:"start/option.html#morevideoattr",a:"morevideoattr"},"26.39":{t:"`icons`",p:` -Type: Object -Default: {} - -用于替换默认图标,支持 Html 字符串和 HTMLElement -& ...`,l:"start/option.html#icons",a:"icons"},"26.40":{t:"`type`",p:` -Type: String -Default: '' - -用于指明视频的格式,需要配合 customType 一起使用,默认视频 ...`,l:"start/option.html#type",a:"type"},"26.41":{t:"`customType`",p:` -Type: Object -Default: {} - -通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处 ...`,l:"start/option.html#customtype",a:"customtype"},"26.42":{t:"`lang`",p:` -Type: String -Default: navigator.language.toLowerCase() - -默认显示语 ...`,l:"start/option.html#lang",a:"lang"},"26.43":{t:"`i18n`",p:` -Type: Object -Default: {} - -自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并 -新增 ...`,l:"start/option.html#i18n",a:"i18n"},"26.44":{t:"`lock`",p:` -Type: Boolean -Default: false - -是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏 -< ...`,l:"start/option.html#lock",a:"lock"},"26.45":{t:"`gesture`",p:` -Type: Boolean -Default: true - -是否在移动端启用视频元素上的手势事件 -<div class ...`,l:"start/option.html#gesture",a:"gesture"},"26.46":{t:"`fastForward`",p:` -Type: Boolean -Default: false - -是否在移动端添加长按视频快进功能 -<div classN ...`,l:"start/option.html#fastforward",a:"fastforward"},"26.47":{t:"`autoPlayback`",p:` -Type: Boolean -Default: false - -是否使用自动 回放功能 -<div className=& ...`,l:"start/option.html#autoplayback",a:"autoplayback"},"26.48":{t:"`autoOrientation`",p:` -Type: Boolean -Default: false - -是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器 - ...`,l:"start/option.html#autoorientation",a:"autoorientation"},"26.49":{t:"`airplay`",p:` -Type: Boolean -Default: false - -是否显示 airplay 按钮,当前只有部分浏览器支持该功能 - ...`,l:"start/option.html#airplay",a:"airplay"},"26.50":{t:"`cssVar`",p:` -Type: Object -Default: {} - -用于改变内置的css变量 -<div className=&quo ...`,l:"start/option.html#cssvar",a:"cssvar"},"26.51":{t:"`proxy`",p:` -Type: function -Default: undefined - -函数可以返回一个第三方的 HTMLCanvasEle ...`,l:"start/option.html#proxy",a:"proxy"}},n={previewLength:62,buttonLabel:"Search",placeholder:"Search docs",allow:[],ignore:[]},a={INDEX_DATA:e,PREVIEW_LOOKUP:t,Options:n};export{a as default}; diff --git a/docs/document/assets/en_advanced_built-in.md.B_F31aPz.js b/docs/document/assets/en_advanced_built-in.md.CCHa0pnS.js similarity index 90% rename from docs/document/assets/en_advanced_built-in.md.B_F31aPz.js rename to docs/document/assets/en_advanced_built-in.md.CCHa0pnS.js index b52f4a836..04fbb57fa 100644 --- a/docs/document/assets/en_advanced_built-in.md.B_F31aPz.js +++ b/docs/document/assets/en_advanced_built-in.md.CCHa0pnS.js @@ -1,4 +1,4 @@ -import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1772869976000}'),p={name:"en/advanced/built-in.md"};function t(h,a,k,r,E,d){return l(),e("div",null,a[0]||(a[0]=[s('

Advanced Properties ​

The Advanced Properties here refer to the secondary properties attached to the instance, which are less commonly used.

option ​

The player's options.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1772946913000}'),p={name:"en/advanced/built-in.md"};function t(h,a,k,r,E,d){return l(),e("div",null,a[0]||(a[0]=[s('

Advanced Properties ​

The Advanced Properties here refer to the secondary properties attached to the instance, which are less commonly used.

option ​

The player's options.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -9,7 +9,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 });
 
 console.info(art.template);
-console.info(art.template.$video);

Note

To easily distinguish between DOM elements and regular objects, all DOM elements within the player are named with a $ prefix.

This is the definition of all DOM elements: artplayer/types/template.d.ts

events ​

Manages all DOM events for the player. It essentially proxies addEventListener and removeEventListener. When using the following methods to handle events, the event will be automatically destroyed when the player is destroyed.

  • The proxy method is used to proxy DOM events.
  • The hover method is used to proxy custom hover events.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
+console.info(art.template.$video);

Note

To easily distinguish between DOM elements and regular objects, all DOM elements within the player are named with a $ prefix.

This is the definition of all DOM elements: artplayer/types/template.d.ts

events ​

Manages all DOM events for the player. It essentially proxies addEventListener and removeEventListener. When using the following methods to handle events, the events will also be automatically destroyed when the player is destroyed.

  • The proxy method is used to proxy DOM events.
  • The hover method is used to proxy custom hover events.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
     container: container,
@@ -24,7 +24,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info('mouseenter', event);
 }, (event) => {
     console.info('mouseleave', event);
-});

Note

If you need DOM events that only exist during the player's lifecycle, it is strongly recommended to use these functions to avoid memory leaks.

storage ​

Manages the player's local storage.

  • The name property is used to set the cache key.
  • The set method is used to set a cache value.
  • The get method is used to get a cache value.
  • The del method is used to delete a cache value.
  • The clear method is used to clear all cache.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

If you need DOM events that should only exist during the player's lifecycle, it is strongly recommended to use these functions to avoid memory leaks.

storage ​

Manages the player's local storage.

  • The name property is used to set the cache key.
  • The set method is used to set a cache.
  • The get method is used to retrieve a cache.
  • The del method is used to delete a cache.
  • The clear method is used to clear all caches.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -44,7 +44,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     url: '/assets/sample/video.mp4',
 });
 
-console.info(art.icons.loading);

This is the definition of all icons:

artplayer/types/icons.d.ts

i18n ​

Manages the player's i18n.

  • The get method is used to get an i18n value.
  • The update method is used to update the i18n object.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+console.info(art.icons.loading);

This is the definition of all icons:

artplayer/types/icons.d.ts

i18n ​

Manages the player's i18n.

  • The get method is used to retrieve an i18n value.
  • The update method is used to update the i18n object.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -55,14 +55,14 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     'zh-cn': {
         Play: 'Your Play'
     }
-});

WARNING

Using art.i18n.update can only update the i18n after instantiation. If you want to update the i18n before instantiation, please use the i18n option in the basic options.

notice ​

Manages the player's notifications. It only has a show property for displaying notifications.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

WARNING

Using art.i18n.update can only update the i18n after instantiation. If you want to update i18n before instantiation, please use the i18n option in the basic settings.

notice ​

Manages the player's notifications. It only has a show property for displaying notifications.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.notice.show = 'Video Ready To Play';
-})

WARNING

If you want to hide the notice immediately: art.notice.show = '';

layers ​

Manages the player's layers.

  • The add method is used to dynamically add a layer.
  • The remove method is used to dynamically remove a layer.
  • The update method is used to dynamically update a layer.
  • The show property is used to set whether all layers are visible.
  • The toggle method is used to toggle the visibility of all layers.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+})

WARNING

If you want to hide the notice immediately: art.notice.show = '';

layers ​

Manages the player's layers.

  • The add method is used to dynamically add a layer.
  • The remove method is used to dynamically remove a layer.
  • The update method is used to dynamically update a layer.
  • The show property is used to set whether all layers are displayed.
  • The toggle method is used to toggle the display of all layers.
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -75,7 +75,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 	setTimeout(() => {
 		art.layers.show = false;
 	}, 1000);
-});

Refer to the following address for Component Configuration:

/component/layers.html

controls ​

Manages the player's controls.

  • The add method is used to dynamically add a control.

  • The remove method is used to dynamically remove a control.

  • The update method is used to dynamically update controls

  • The show property is used to set whether to display all controls

  • The toggle method is used to toggle the display of all controls

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

For Component Configuration, please refer to:

/component/layers.html

controls ​

Manages the player's controls.

  • The add method is used to dynamically add a control.

  • The remove method is used to dynamically remove a control.

  • The update method is used to dynamically update controls

  • The show property is used to set whether to display all controls

  • The toggle method is used to toggle the display of all controls

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -173,7 +173,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 	setTimeout(() => {
 		art.setting.show = false;
 	}, 1000);
-});

For the Settings Panel, please refer to:

/component/setting.html

plugins ​

Manages the player's plugin functionality, with only the add method for dynamically adding plugins

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

For Settings Panel, please refer to

/component/setting.html

plugins ​

Manages the player's plugin functionality, with only one method add for dynamically adding plugins

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
diff --git a/docs/document/assets/en_advanced_built-in.md.B_F31aPz.lean.js b/docs/document/assets/en_advanced_built-in.md.CCHa0pnS.lean.js
similarity index 95%
rename from docs/document/assets/en_advanced_built-in.md.B_F31aPz.lean.js
rename to docs/document/assets/en_advanced_built-in.md.CCHa0pnS.lean.js
index f1019c825..f804934f4 100644
--- a/docs/document/assets/en_advanced_built-in.md.B_F31aPz.lean.js
+++ b/docs/document/assets/en_advanced_built-in.md.CCHa0pnS.lean.js
@@ -1 +1 @@
-import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1772869976000}'),p={name:"en/advanced/built-in.md"};function t(h,a,k,r,E,d){return l(),e("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default};
+import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1772946913000}'),p={name:"en/advanced/built-in.md"};function t(h,a,k,r,E,d){return l(),e("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default};
diff --git a/docs/document/assets/en_advanced_class.md.D17lDToP.js b/docs/document/assets/en_advanced_class.md.D17lDToP.js
deleted file mode 100644
index 9f4341356..000000000
--- a/docs/document/assets/en_advanced_class.md.D17lDToP.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import{_ as i,c as n,o as t,ak as s,j as a}from"./chunks/framework.xxfEszSJ.js";const u=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1772869976000}'),l={name:"en/advanced/class.md"};function r(p,e,d,h,o,c){return t(),n("div",null,e[0]||(e[0]=[s('

Static Properties ​

Here, Static Properties refer to the top-level properties mounted on the constructor function, which are very rarely used.

instances ​

Returns an array of all player instances. This property can be useful when you need to manage multiple player instances simultaneously.

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
console.info([...Artplayer.instances]);
-
-var art = new Artplayer({
-    container: '.artplayer-app',
-    url: '/assets/sample/video.mp4',
-});
-
-console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

`,3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.env);

build ​

Returns the build time of the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.build);

config ​

Returns the default configuration for videos.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.config);

utils ​

Returns the collection of utility functions for the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.utils);

For all utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation schema for player options.

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor function for the event emitter.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.validator);

kindOf ​

Returns the utility function for type detection.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required by the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.html);

option ​

Returns the default options for the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.option);
',1)]))}const _=i(l,[["render",r]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/en_advanced_class.md.SSD-Ahrs.js b/docs/document/assets/en_advanced_class.md.SSD-Ahrs.js new file mode 100644 index 000000000..e82d1b92a --- /dev/null +++ b/docs/document/assets/en_advanced_class.md.SSD-Ahrs.js @@ -0,0 +1,8 @@ +import{_ as i,c as n,o as t,ak as s,j as a}from"./chunks/framework.xxfEszSJ.js";const u=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1772946913000}'),l={name:"en/advanced/class.md"};function r(p,e,d,h,o,c){return t(),n("div",null,e[0]||(e[0]=[s('

Static Properties ​

Here, static properties refer to the first-level properties attached to the constructor, which are rarely used.

instances ​

Returns an array of all player instances. This property can be useful when you need to manage multiple players simultaneously.

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
console.info([...Artplayer.instances]);
+
+var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+});
+
+console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

`,3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.env);

build ​

Returns the build timestamp of the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.build);

config ​

Returns the default configuration for videos.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.config);

utils ​

Returns the collection of utility functions for the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.utils);

For all utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation schema for player options.

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor of the event emitter.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.validator);

kindOf ​

Returns the type detection utility function.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required by the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.html);

option ​

Returns the default options of the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.option);
',1)]))}const _=i(l,[["render",r]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/en_advanced_class.md.D17lDToP.lean.js b/docs/document/assets/en_advanced_class.md.SSD-Ahrs.lean.js similarity index 94% rename from docs/document/assets/en_advanced_class.md.D17lDToP.lean.js rename to docs/document/assets/en_advanced_class.md.SSD-Ahrs.lean.js index 38d871b6f..4b386171e 100644 --- a/docs/document/assets/en_advanced_class.md.D17lDToP.lean.js +++ b/docs/document/assets/en_advanced_class.md.SSD-Ahrs.lean.js @@ -1 +1 @@ -import{_ as i,c as n,o as t,ak as s,j as a}from"./chunks/framework.xxfEszSJ.js";const u=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1772869976000}'),l={name:"en/advanced/class.md"};function r(p,e,d,h,o,c){return t(),n("div",null,e[0]||(e[0]=[s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const _=i(l,[["render",r]]);export{u as __pageData,_ as default}; +import{_ as i,c as n,o as t,ak as s,j as a}from"./chunks/framework.xxfEszSJ.js";const u=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1772946913000}'),l={name:"en/advanced/class.md"};function r(p,e,d,h,o,c){return t(),n("div",null,e[0]||(e[0]=[s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const _=i(l,[["render",r]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/en_advanced_event.md.Cw7LYSEa.lean.js b/docs/document/assets/en_advanced_event.md.Cw7LYSEa.lean.js deleted file mode 100644 index 26c73e8f4..000000000 --- a/docs/document/assets/en_advanced_event.md.Cw7LYSEa.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Instance Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1772869976000}'),h={name:"en/advanced/event.md"};function t(k,n,r,E,d,g){return p(),l("div",null,n[0]||(n[0]=[s("h1",{id:"instance-events",tabindex:"-1"},[a("Instance Events "),s("a",{class:"header-anchor",href:"#instance-events","aria-label":'Permalink to "Instance Events"'},"​")],-1),s("p",null,[a("Player events are divided into two types: "),s("code",null,"native events"),a(" (prefixed with "),s("code",null,"video:"),a(") and "),s("code",null,"custom events"),a(".")],-1),s("p",null,"Listen to an event:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",4),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",43)]))}const o=e(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/en_advanced_event.md.Cw7LYSEa.js b/docs/document/assets/en_advanced_event.md.DEsqIUNQ.js similarity index 81% rename from docs/document/assets/en_advanced_event.md.Cw7LYSEa.js rename to docs/document/assets/en_advanced_event.md.DEsqIUNQ.js index 897141eb2..63531897b 100644 --- a/docs/document/assets/en_advanced_event.md.Cw7LYSEa.js +++ b/docs/document/assets/en_advanced_event.md.DEsqIUNQ.js @@ -1,23 +1,23 @@ -import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Instance Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1772869976000}'),h={name:"en/advanced/event.md"};function t(k,n,r,E,d,g){return p(),l("div",null,n[0]||(n[0]=[s("h1",{id:"instance-events",tabindex:"-1"},[a("Instance Events "),s("a",{class:"header-anchor",href:"#instance-events","aria-label":'Permalink to "Instance Events"'},"​")],-1),s("p",null,[a("Player events are divided into two types: "),s("code",null,"native events"),a(" (prefixed with "),s("code",null,"video:"),a(") and "),s("code",null,"custom events"),a(".")],-1),s("p",null,"Listen to an event:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Instance Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1772946913000}'),h={name:"en/advanced/event.md"};function t(k,n,r,E,d,g){return p(),l("div",null,n[0]||(n[0]=[s("h1",{id:"instance-events",tabindex:"-1"},[a("Instance Events "),s("a",{class:"header-anchor",href:"#instance-events","aria-label":'Permalink to "Instance Events"'},"​")],-1),s("p",null,[a("Player events are divided into two types: "),s("code",null,"native events"),a(" of the video (prefixed with "),s("code",null,"video:"),a("), and "),s("code",null,"custom events"),a(".")],-1),s("p",null,"Listening to events:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:canplay', () => {
     console.info('video:canplay');
-});

Listen to an event only once:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

Listening to an event only once:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.once('video:canplay', () => {
     console.info('video:canplay');
-});

Manually trigger an event:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

Manually triggering an event:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.emit('focus');

Remove an event listener:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+art.emit('focus');

Removing an event:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -27,14 +27,14 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
     art.off('ready', onReady);
 }
 
-art.on('ready', onReady);

For a complete list of events, please refer to:

artplayer/types/events.d.ts

ready ​

Triggered when the player is ready for the first time

`,4),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+art.on('ready', onReady);

For a complete list of events, please refer to:

artplayer/types/events.d.ts

ready ​

Triggered when the player is ready for the first time.

`,4),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info('ready');
-});

restart ​

Triggered when the player switches URL and becomes playable

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

restart ​

Triggered when the player switches URLs and becomes ready to play.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -45,28 +45,28 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('restart', (url) => {
     console.info('restart', url);
-});

pause ​

Triggered when the player is paused

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

pause ​

Triggered when the player is paused.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('pause', () => {
     console.info('pause');
-});

play ​

Triggered when the player starts playing

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

play ​

Triggered when the player starts playing.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('play', () => {
     console.info('play');
-});

hotkey ​

Triggered when a hotkey is pressed on the player

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

hotkey ​

Triggered when a player hotkey is pressed.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hotkey', (event) => {
     console.info('hotkey', event);
-});

destroy ​

Triggered when the player is destroyed

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

destroy ​

Triggered when the player is destroyed.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -77,70 +77,70 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('destroy', () => {
     console.info('destroy');
-});

focus ​

Triggered when the player gains focus

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

focus ​

Triggered when the player gains focus.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('focus', (event) => {
     console.info('focus', event);
-});

blur ​

Triggered when the player loses focus

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

blur ​

Triggered when the player loses focus.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('blur', (event) => {
     console.info('blur', event);
-});

dblclick ​

Triggered when the player is double-clicked

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

dblclick ​

Triggered when the player is double-clicked.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('dblclick', (event) => {
     console.info('dblclick', event);
-});

click ​

Triggered when the player is clicked

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

click ​

Triggered when the player is clicked.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('click', (event) => {
     console.info('click', event);
-});

error ​

Triggered when an error occurs while loading the video

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

error ​

Triggered when an error occurs while the player is loading a video.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
 });
 
 art.on('error', (error, reconnectTime) => {
     console.info(error, reconnectTime);
-});

hover ​

Triggered when the mouse enters or leaves the player

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

hover ​

Triggered when the mouse enters or leaves the player.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hover', (state, event) => {
     console.info('hover', state, event);
-});

mousemove ​

Triggered when the mouse moves over the player

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

mousemove ​

Triggered when the mouse moves over the player.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mousemove', (event) => {
     console.info('mousemove', event);
-});

resize ​

Triggered when the player's dimensions change

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

resize ​

Triggered when the player's dimensions change.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('resize', () => {
     console.info('resize');
-});

view ​

Triggered when the player enters or leaves the viewport

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

view ​

Triggered when the player enters the viewport.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('view', (state) => {
     console.info('view', state);
-});

lock ​

Triggered when the lock state changes on mobile devices

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

lock ​

Triggered when the lock state changes on mobile devices.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
@@ -148,7 +148,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('lock', (state) => {
     console.info('lock', state);
-});

aspectRatio ​

Triggered when the player's aspect ratio changes

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

aspectRatio ​

Triggered when the player's aspect ratio changes.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
@@ -157,7 +157,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('aspectRatio', (aspectRatio) => {
     console.info('aspectRatio', aspectRatio);
-});

autoHeight ​

Triggered when the player automatically adjusts its height

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

autoHeight ​

Triggered when the player's height is automatically set.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -168,7 +168,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('autoHeight', (height) => {
     console.info('autoHeight', height);
-});

autoSize ​

Triggered when the player automatically adjusts its size

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

autoSize ​

Triggered when the player's size is automatically set.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -176,7 +176,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('autoSize', () => {
     console.info('autoSize');
-});

flip ​

Triggered when the player is flipped

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

flip ​

Triggered when the player is flipped.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
@@ -185,7 +185,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('flip', (flip) => {
     console.info('flip', flip);
-});

fullscreen ​

Triggered when the player enters or exits window fullscreen mode

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

fullscreen ​

Triggered when the player enters or exits windowed fullscreen mode.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -193,7 +193,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('fullscreen', (state) => {
     console.info('fullscreen', state);
-});

fullscreenError ​

Triggered when a window fullscreen error occurs

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

fullscreenError ​

Triggered when a windowed fullscreen error occurs.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -204,7 +204,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('fullscreenError', (event) => {
     console.info('fullscreenError', event);
-});

fullscreenWeb ​

Triggered when the player enters or exits web fullscreen mode

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

fullscreenWeb ​

Triggered when the player enters or exits web fullscreen mode.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -212,7 +212,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('fullscreenWeb', (state) => {
     console.info('fullscreenWeb', state);
-});

mini ​

Triggered when the player enters or exits mini mode

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

mini ​

Triggered when the player enters or exits mini mode.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -223,7 +223,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('mini', (state) => {
     console.info('mini', state);
-});

pip ​

Triggered when the player enters or exits picture-in-picture mode

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

pip ​

Triggered when the player enters or exits Picture-in-Picture mode.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
@@ -231,7 +231,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('pip', (state) => {
     console.info('pip', state);
-});

screenshot ​

Triggered when the player captures a screenshot

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

screenshot ​

Triggered when the player takes a screenshot.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
@@ -239,14 +239,14 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('screenshot', (dataUri) => {
     console.info('screenshot', dataUri);
-});

seek ​

Triggered when the player performs a time seek

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

seek ​

Triggered when the player performs a time seek.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('seek', (currentTime) => {
     console.info('seek', currentTime);
-});

subtitleOffset ​

Triggered when subtitle offset changes in the player

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

subtitleOffset ​

Triggered when the subtitle offset changes in the player.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -258,7 +258,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('subtitleOffset', (offset) => {
     console.info('subtitleOffset', offset);
-});

subtitleBeforeUpdate ​

Triggered before subtitles are updated

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

subtitleBeforeUpdate ​

Triggered before subtitles are updated.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -268,7 +268,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('subtitleBeforeUpdate', (cues) => {
     console.info('subtitleBeforeUpdate', cues);
-});

subtitleAfterUpdate ​

Triggered after subtitles are updated

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

subtitleAfterUpdate ​

Triggered after subtitles are updated.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -278,7 +278,7 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('subtitleAfterUpdate', (cues) => {
     console.info('subtitleAfterUpdate', cues);
-});

subtitleLoad ​

Triggered when subtitles are loaded

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

subtitleLoad ​

Triggered when subtitles are loaded.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -288,56 +288,56 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('subtitleLoad', (option, cues) => {
     console.info('subtitleLoad', cues, option);
-});

info ​

Triggered when the info panel is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

info ​

Triggered when the info panel is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('info', (state) => {
     console.log(state);
-});

layer ​

Triggered when custom layers are shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

layer ​

Triggered when a custom layer is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('layer', (state) => {
     console.log(state);
-});

loading ​

Triggered when the loader is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

loading ​

Triggered when the loader is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('loading', (state) => {
     console.log(state);
-});

mask ​

Triggered when the mask layer is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

mask ​

Triggered when the mask layer is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mask', (state) => {
     console.log(state);
-});

subtitle ​

Triggered when the subtitle layer is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

subtitle ​

Triggered when the subtitle layer is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('subtitle', (state) => {
     console.log(state);
-});

contextmenu ​

Triggered when the context menu is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

contextmenu ​

Triggered when the context menu is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('contextmenu', (state) => {
     console.log(state);
-});

control ​

Triggered when the controls are shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

control ​

Triggered when the control bar is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('control', (state) => {
     console.log(state);
-});

setting ​

Triggered when the settings panel is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

setting ​

Triggered when the settings panel is shown or hidden.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -345,11 +345,11 @@ import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js
 
 art.on('setting', (state) => {
     console.log(state);
-});

muted ​

Triggered when the mute state changes

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
+});

muted ​

Triggered when the muted state changes.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('muted', (state) => {
     console.log(state);
-});

keydown ​

Listens for keydown events from the document

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('keydown', (event) => {\n    console.log(event.code);\n});

video:canplay ​

The browser can start playing the media, but estimates there isn't enough data to play through to the end without having to stop for further buffering

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping to buffer content

video:complete ​

OfflineAudioContext rendering is complete

video:durationchange ​

Triggered when the value of the duration property changes

video:emptied ​

The media has become empty; for example, this event is sent when the media has already been loaded (or partially loaded), and the load() method is called to reload it

video:ended ​

Playback has stopped because the media has reached its end point

video:error ​

An error occurred while fetching media data, or the resource type is not a supported media format

video:loadeddata ​

The first frame of the media has finished loading

video:loadedmetadata ​

Metadata has been loaded

video:pause ​

Playback has been paused

video:play ​

Playback has begun

video:playing ​

Playback is ready to start after having been paused or delayed due to lack of data

video:progress ​

Periodically triggered while the browser is loading the resource

video:ratechange ​

The playback rate has changed

video:seeked ​

A seek operation has completed

video:seeking ​

A seek operation has begun

video:stalled ​

The user agent is trying to fetch media data, but data is unexpectedly not forthcoming

video:suspend ​

Media data loading has been suspended

video:timeupdate ​

The time indicated by the currentTime attribute has been updated

video:volumechange ​

The volume has changed

video:waiting ​

Playback has stopped due to temporary lack of data

',43)]))}const o=e(h,[["render",t]]);export{y as __pageData,o as default}; +});

keydown ​

Listens for the keydown event from the document.

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('keydown', (event) => {\n    console.log(event.code);\n});

video:canplay ​

The browser can start playing the media, but estimates there is not enough data to play through to the end without stopping for further buffering.

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping for buffering.

video:complete ​

The OfflineAudioContext rendering is complete.

video:durationchange ​

Triggered when the value of the duration property changes.

video:emptied ​

The media has become empty; for example, this event is sent when the media has already been loaded (or partially loaded), and the load() method is called to reload it.

video:ended ​

Playback has stopped because the media has reached its end.

video:error ​

An error occurred while fetching the media data, or the resource type is not a supported media format.

video:loadeddata ​

The first frame of the media has finished loading.

video:loadedmetadata ​

Metadata has been loaded.

video:pause ​

Playback has been paused.

video:play ​

Playback has begun.

video:playing ​

Playback is ready to start after having been paused or delayed due to lack of data.

video:progress ​

Fired periodically as the browser loads the resource.

video:ratechange ​

The playback rate has changed.

video:seeked ​

A seek operation has completed.

video:seeking ​

A seek operation has begun.

video:stalled ​

The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.

video:suspend ​

Media data loading has been suspended.

video:timeupdate ​

The time indicated by the currentTime property has changed.

video:volumechange ​

The volume has changed.

video:waiting ​

Playback has stopped because of a temporary lack of data.

',43)]))}const o=e(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/en_advanced_event.md.DEsqIUNQ.lean.js b/docs/document/assets/en_advanced_event.md.DEsqIUNQ.lean.js new file mode 100644 index 000000000..d5dc62834 --- /dev/null +++ b/docs/document/assets/en_advanced_event.md.DEsqIUNQ.lean.js @@ -0,0 +1 @@ +import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Instance Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1772946913000}'),h={name:"en/advanced/event.md"};function t(k,n,r,E,d,g){return p(),l("div",null,n[0]||(n[0]=[s("h1",{id:"instance-events",tabindex:"-1"},[a("Instance Events "),s("a",{class:"header-anchor",href:"#instance-events","aria-label":'Permalink to "Instance Events"'},"​")],-1),s("p",null,[a("Player events are divided into two types: "),s("code",null,"native events"),a(" of the video (prefixed with "),s("code",null,"video:"),a("), and "),s("code",null,"custom events"),a(".")],-1),s("p",null,"Listening to events:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",4),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",43)]))}const o=e(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/en_advanced_global.md.DwHxhtQU.js b/docs/document/assets/en_advanced_global.md.3hwkL6RS.js similarity index 84% rename from docs/document/assets/en_advanced_global.md.DwHxhtQU.js rename to docs/document/assets/en_advanced_global.md.3hwkL6RS.js index bf531bb60..116d197ee 100644 --- a/docs/document/assets/en_advanced_global.md.DwHxhtQU.js +++ b/docs/document/assets/en_advanced_global.md.3hwkL6RS.js @@ -1,4 +1,4 @@ -import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Global Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1772869976000}'),p={name:"en/advanced/global.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Global Properties ​

These global properties refer to the top-level properties mounted on the constructor. The property names are all in uppercase. They are subject to change in the future and are generally not used.

DEBUG ​

Whether to enable debug mode, which can print all built-in events of the video. Default is off.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DEBUG = true;
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Global Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1772946913000}'),p={name:"en/advanced/global.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Global Properties ​

The global properties here refer to the top-level properties mounted on the constructor. All property names are in uppercase. These are subject to change in the future and are rarely used.

DEBUG ​

Whether to enable debug mode, which can print all built-in video events. Default is off.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DEBUG = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -8,7 +8,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

NOTICE_TIME ​

The display duration for notification messages, in milliseconds. Default is 2000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.NOTICE_TIME = 5000;
+});

NOTICE_TIME ​

The display duration of notification messages, in milliseconds. Default is 2000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.NOTICE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -23,7 +23,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_WIDTH ​

The default width of settings items in the settings panel, in pixels. Default is 200.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_WIDTH = 300;
+});

SETTING_ITEM_WIDTH ​

The default width of a setting item in the settings panel, in pixels. Default is 200.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_WIDTH = 300;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -33,7 +33,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_HEIGHT ​

The default height of settings items in the settings panel, in pixels. Default is 35.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
+});

SETTING_ITEM_HEIGHT ​

The default height of a setting item in the settings panel, in pixels. Default is 35.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -98,12 +98,12 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
-});

CONTROL_HIDE_TIME ​

The delay time in milliseconds for auto-hiding the bottom control bar. Default is 3000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.CONTROL_HIDE_TIME = 5000;
+});

CONTROL_HIDE_TIME ​

The auto-hide delay time for the bottom control bar, in milliseconds. Default is 3000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.CONTROL_HIDE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

DBCLICK_TIME ​

The delay time in milliseconds for double-click events. Default is 300.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_TIME = 500;
+});

DBCLICK_TIME ​

The delay time for the double-click event, in milliseconds. Default is 300.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -112,57 +112,57 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.on('dblclick', () => {
     console.log('dblclick');
-});

DBCLICK_FULLSCREEN ​

On desktop, whether double-click toggles fullscreen mode. Default is true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_FULLSCREEN = false;
+});

DBCLICK_FULLSCREEN ​

On desktop, whether double-click toggles fullscreen. Default is true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_FULLSCREEN = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_DBCLICK_PLAY ​

On mobile devices, whether double-click toggles play/pause. Default is true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
+});

MOBILE_DBCLICK_PLAY ​

On mobile, whether double-click toggles play/pause. Default is true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_CLICK_PLAY ​

On mobile devices, whether single-click toggles play/pause. Default is false.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
+});

MOBILE_CLICK_PLAY ​

On mobile, whether single-click toggles play/pause. Default is false.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

AUTO_ORIENTATION_TIME ​

On mobile devices, the delay time in milliseconds for automatic screen rotation. Default is 200.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
+});

AUTO_ORIENTATION_TIME ​

On mobile, the delay time for auto-rotation, in milliseconds. Default is 200.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
-});

INFO_LOOP_TIME ​

The refresh interval in milliseconds for the information panel. Default is 1000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.INFO_LOOP_TIME = 2000;
+});

INFO_LOOP_TIME ​

The refresh interval for the info panel, in milliseconds. Default is 1000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.INFO_LOOP_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.info.show = true;

FAST_FORWARD_VALUE ​

On mobile devices, the speed multiplier for fast-forward during long-press. Default is 3.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_VALUE = 5;
+art.info.show = true;

FAST_FORWARD_VALUE ​

On mobile, the speed multiplier for long-press fast-forward. Default is 3.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_VALUE = 5;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

FAST_FORWARD_TIME ​

On mobile devices, the delay time in milliseconds for activating fast-forward during long-press. Default is 1000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_TIME = 2000;
+});

FAST_FORWARD_TIME ​

On mobile, the delay time for long-press fast-forward, in milliseconds. Default is 1000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

TOUCH_MOVE_RATIO ​

On mobile devices, the speed multiplier for seeking when swiping left/right. Default is 0.5.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.TOUCH_MOVE_RATIO = 1;
+});

TOUCH_MOVE_RATIO ​

On mobile, the speed multiplier for left/right swipe to seek. Default is 0.5.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.TOUCH_MOVE_RATIO = 1;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

VOLUME_STEP ​

The volume adjustment step for keyboard shortcuts. Default is 0.1.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.VOLUME_STEP = 0.2;
+});

VOLUME_STEP ​

The step size for volume adjustment via keyboard shortcuts. Default is 0.1.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.VOLUME_STEP = 0.2;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

SEEK_STEP ​

The seeking step in seconds for keyboard shortcuts. Default is 5.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SEEK_STEP = 10;
+});

SEEK_STEP ​

The step size for seeking via keyboard shortcuts, in seconds. Default is 5.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SEEK_STEP = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -187,7 +187,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FLIP ​

The built-in list of video flip modes. Default is ['normal', 'horizontal', 'vertical'].

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FLIP = ['normal', 'horizontal'];
+art.setting.show = true;

FLIP ​

The built-in list of video flip options. Default is ['normal', 'horizontal', 'vertical'].

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FLIP = ['normal', 'horizontal'];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -197,29 +197,29 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

Determines whether to mount the player under the body element during web fullscreen mode. Defaults to true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FULLSCREEN_WEB_IN_BODY = false;
+art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

Whether to mount the player under the body element during web fullscreen mode. Default is true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FULLSCREEN_WEB_IN_BODY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

LOG_VERSION ​

Sets whether to print the player version. Defaults to true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.LOG_VERSION = false;
+});

LOG_VERSION ​

Sets whether to print the player version. Default is true.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.LOG_VERSION = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

USE_RAF ​

Sets whether to use requestAnimationFrame. Defaults to false. Currently mainly used for smooth progress bar effects.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.USE_RAF = true;
+});

USE_RAF ​

Sets whether to use requestAnimationFrame. Default is false. Currently, it is primarily used for smooth progress bar effects.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.USE_RAF = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});

REMOVE_SRC_WHEN_DESTROY ​

Determines whether to remove the video's src attribute and call load() to actively release media resources when destroying the player. Defaults to true.

When enabled, this can reduce video resource usage in single-page applications or scenarios where players are frequently created/destroyed. If you wish to preserve the video element's state and only remove the UI, set this to false.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.REMOVE_SRC_WHEN_DESTROY = false;
+});

REMOVE_SRC_WHEN_DESTROY ​

Whether to remove the video's src attribute and call load() to actively release media resources when destroying the player. Default is true.

Enabling this can reduce video resource usage in single-page applications or scenarios where players are frequently created/destroyed. If you wish to preserve the state of the video element and only remove the UI, you can set this to false.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.REMOVE_SRC_WHEN_DESTROY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-// Only destroys the UI, does not actively clear src
+// Only destroy the UI, do not actively clear the src
 art.destroy();
`,1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_advanced_global.md.DwHxhtQU.lean.js b/docs/document/assets/en_advanced_global.md.3hwkL6RS.lean.js similarity index 97% rename from docs/document/assets/en_advanced_global.md.DwHxhtQU.lean.js rename to docs/document/assets/en_advanced_global.md.3hwkL6RS.lean.js index 69420ccaa..a7ed89f31 100644 --- a/docs/document/assets/en_advanced_global.md.DwHxhtQU.lean.js +++ b/docs/document/assets/en_advanced_global.md.3hwkL6RS.lean.js @@ -1 +1 @@ -import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Global Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1772869976000}'),p={name:"en/advanced/global.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; +import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Global Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1772946913000}'),p={name:"en/advanced/global.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_advanced_plugin.md.Cnaq654P.js b/docs/document/assets/en_advanced_plugin.md.C8AgK5Nt.js similarity index 93% rename from docs/document/assets/en_advanced_plugin.md.Cnaq654P.js rename to docs/document/assets/en_advanced_plugin.md.C8AgK5Nt.js index 3f6d0fdb5..39f33c7e9 100644 --- a/docs/document/assets/en_advanced_plugin.md.Cnaq654P.js +++ b/docs/document/assets/en_advanced_plugin.md.C8AgK5Nt.js @@ -1,4 +1,4 @@ -import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1772869976000}'),e={name:"en/advanced/plugin.md"};function k(t,n,E,r,d,g){return h(),p("div",null,n[0]||(n[0]=[s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),s("p",null,[i("Once you are familiar with the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing plugins becomes very straightforward.")],-1),s("p",null,"You can load plugin functions during instantiation:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function myPlugin(art) {
+import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1772946913000}'),e={name:"en/advanced/plugin.md"};function k(t,n,E,r,d,g){return h(),p("div",null,n[0]||(n[0]=[s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),s("p",null,[i("Once you are familiar with the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing a plugin becomes a very straightforward task.")],-1),s("p",null,"You can load a plugin function during instantiation.",-1),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -17,7 +17,7 @@ import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.xxfEsz
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

You can also load plugin functions after instantiation:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function myPlugin(art) {
+});

You can also load a plugin function after instantiation.

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -37,7 +37,7 @@ import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.xxfEsz
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

For example, let's say I want to write a plugin that displays an image ad when the video is paused:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function adsPlugin(option) {
+});

For example, let's say I want to write a plugin that displays an image ad when the video is paused.

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function adsPlugin(option) {
     return (art) => {
         art.layers.add({
             name: 'ads',
diff --git a/docs/document/assets/en_advanced_plugin.md.Cnaq654P.lean.js b/docs/document/assets/en_advanced_plugin.md.C8AgK5Nt.lean.js
similarity index 58%
rename from docs/document/assets/en_advanced_plugin.md.Cnaq654P.lean.js
rename to docs/document/assets/en_advanced_plugin.md.C8AgK5Nt.lean.js
index 750327d6b..e755c4fa9 100644
--- a/docs/document/assets/en_advanced_plugin.md.Cnaq654P.lean.js
+++ b/docs/document/assets/en_advanced_plugin.md.C8AgK5Nt.lean.js
@@ -1 +1 @@
-import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1772869976000}'),e={name:"en/advanced/plugin.md"};function k(t,n,E,r,d,g){return h(),p("div",null,n[0]||(n[0]=[s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),s("p",null,[i("Once you are familiar with the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing plugins becomes very straightforward.")],-1),s("p",null,"You can load plugin functions during instantiation:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),a("",2),s("div",{className:"run-code"},"▶ Run Code",-1),a("",2),s("div",{className:"run-code"},"▶ Run Code",-1),a("",1)]))}const b=l(e,[["render",k]]);export{y as __pageData,b as default};
+import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1772946913000}'),e={name:"en/advanced/plugin.md"};function k(t,n,E,r,d,g){return h(),p("div",null,n[0]||(n[0]=[s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),s("p",null,[i("Once you are familiar with the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing a plugin becomes a very straightforward task.")],-1),s("p",null,"You can load a plugin function during instantiation.",-1),s("div",{className:"run-code"},"▶ Run Code",-1),a("",2),s("div",{className:"run-code"},"▶ Run Code",-1),a("",2),s("div",{className:"run-code"},"▶ Run Code",-1),a("",1)]))}const b=l(e,[["render",k]]);export{y as __pageData,b as default};
diff --git a/docs/document/assets/en_advanced_property.md.JV0Ib3j3.js b/docs/document/assets/en_advanced_property.md.CaOAGGTk.js
similarity index 89%
rename from docs/document/assets/en_advanced_property.md.JV0Ib3j3.js
rename to docs/document/assets/en_advanced_property.md.CaOAGGTk.js
index 640c95708..e59841dc4 100644
--- a/docs/document/assets/en_advanced_property.md.JV0Ib3j3.js
+++ b/docs/document/assets/en_advanced_property.md.CaOAGGTk.js
@@ -1,4 +1,4 @@
-import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1772869976000}'),p={name:"en/advanced/property.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Instance Properties ​

Here, Instance Properties refer to the first-level properties mounted on the instance, which are commonly used.

play ​

  • Type: Function

Play the video.

',5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1772946913000}'),p={name:"en/advanced/property.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Instance Properties ​

Here, Instance Properties refer to the first-level properties mounted on the instance, which are commonly used.

play ​

  • Type: Function

Play the video.

',5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -18,7 +18,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     setTimeout(() => {
         art.pause();
     }, 3000);
-});

toggle ​

  • Type: Function

Toggle video playback and pause.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

toggle ​

  • Type: Function

Toggle video play and pause.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -30,7 +30,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     setTimeout(() => {
         art.toggle();
     }, 3000);
-});

destroy ​

  • Type: Function
  • Parameter: Boolean

Destroy the player. Accepts a parameter indicating whether to remove the player's html after destruction. Defaults to true.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

destroy ​

  • Type: Function
  • Parameter: Boolean

Destroy the player. Accepts a parameter indicating whether to also remove the player's html after destruction. Defaults to true.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -52,7 +52,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.on('ready', () => {
     art.seek = 5;
-});

forward ​

  • Type: Setter
  • Parameter: Number

Fast forward the video time, in seconds.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

forward ​

  • Type: Setter
  • Parameter: Number

Fast-forward the video time, in seconds.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -116,7 +116,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     setTimeout(() => {
         art.switchQuality('/assets/sample/video.mp4?t=0');
     }, 3000);
-});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets whether the video is muted.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets whether the video is muted.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -125,7 +125,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info(art.muted);
     art.muted = true;
     console.info(art.muted);
-});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the current playback time of the video. Setting the time is similar to seek, but it does not trigger additional events.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

Sets or gets the current playback time of the video. Setting the time is similar to seek, but it does not trigger additional events.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -141,7 +141,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.on('ready', () => {
     console.info(art.duration);
-});

Note

Some videos may not have a duration, such as live streams or videos that have not been fully decoded. In these cases, the obtained duration will be 0.

screenshot ​

  • Type: Function

Downloads a screenshot of the current video frame. An optional parameter specifies the screenshot filename.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

Some videos may not have a duration, such as live streams or videos that have not been fully decoded. In such cases, the obtained duration will be 0.

screenshot ​

  • Type: Function

Downloads a screenshot of the current video frame. An optional parameter specifies the screenshot filename.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -164,7 +164,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 art.on('ready', async () => {
     const url = await art.getBlobUrl();
     console.info(url);
-});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets the player's window fullscreen state.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets the player's window fullscreen state.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -176,7 +176,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

Note

Due to browser security mechanisms, the page must have prior user interaction (e.g., the user has clicked on the page) before triggering window fullscreen.

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets the player's web page fullscreen state.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, a user interaction (e.g., a click on the page) must occur before triggering window fullscreen.

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets the player's web page fullscreen state.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -188,7 +188,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     setTimeout(() => {
         art.fullscreenWeb = false;
     }, 3000);
-});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets the player's Picture-in-Picture mode.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets the player's Picture-in-Picture (PIP) mode.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -200,7 +200,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

Note

Due to browser security mechanisms, the page must have prior user interaction (e.g., the user has clicked on the page) before triggering Picture-in-Picture.

poster ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the video poster. The poster effect is only visible before video playback starts.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, a user interaction (e.g., a click on the page) must occur before triggering Picture-in-Picture.

poster ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the video poster. The poster effect is only visible before the video starts playing.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     poster: '/assets/sample/poster.jpg',
@@ -225,13 +225,13 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.on('ready', () => {
     console.info(art.playing);
-});

state ​

  • Type: Setter/Getter
  • Parameter: String

Gets or sets the player's current state. Supported values: standard (normal), mini (mini window), pip (picture-in-picture), fullscreen (fullscreen window), fullscreenWeb (webpage fullscreen).

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

state ​

  • Type: Setter/Getter
  • Parameter: String

Gets or sets the player's current state. Supported values: standard (normal), mini (mini window), pip (picture-in-picture), fullscreen (window fullscreen), fullscreenWeb (webpage fullscreen).

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
-    console.info(art.state); // Default: standard
+    console.info(art.state); // Default is 'standard'
     art.state = 'mini';
 });

autoSize ​

  • Type: Function

Sets whether the video adapts its size automatically.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
@@ -240,14 +240,14 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.on('ready', () => {
     art.autoSize();
-});

rect ​

  • Type: Getter

Gets the player's dimensions and coordinate information.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('ready', () => {\n    console.info(JSON.stringify(art.rect));\n});

Note

The dimension and coordinate information is obtained via getBoundingClientRect.

bottom / top / left / right / x / y / width / height ​

  • Type: Getter

These properties provide shortcut access to rect:

  • bottom, top, left, right, x, y: Correspond to the fields of the same name in DOMRect
  • width, height: The player's current visible width and height
',6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

rect ​

  • Type: Getter

Gets the player's dimensions and coordinate information.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('ready', () => {\n    console.info(JSON.stringify(art.rect));\n});

Note

The dimension and coordinate information is obtained via getBoundingClientRect.

bottom / top / left / right / x / y / width / height ​

  • Type: Getter

These properties provide quick access to rect:

  • bottom, top, left, right, x, y: Correspond to the fields of the same name in DOMRect.
  • width, height: The player's current visible width and height.
',6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info(art.width, art.height, art.left, art.top);
-});

flip ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the player flip state. Supported values: normal, horizontal, vertical.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

flip ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the player's flip state. Supported values: normal, horizontal, vertical.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -256,7 +256,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info(art.flip);
     art.flip = 'horizontal';
     console.info(art.flip);
-});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the player's playback rate.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the player's playback speed.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -274,7 +274,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info(art.aspectRatio);
     art.aspectRatio = '16:9';
     console.info(art.aspectRatio);
-});

autoHeight ​

  • Type: Function

When the container only has a defined width, this property can automatically calculate and set the video height.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

autoHeight ​

  • Type: Function

When the container only has a defined width, this property can automatically calculate and set the video's height.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -285,7 +285,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.on('resize', () => {
     art.autoHeight();
-});

Note

This property is useful when your container has only a defined width but an unknown height. It automatically calculates the video height, but you need to determine the appropriate timing to set this property.

attr ​

  • Type: Function
  • Parameter: String

Dynamically gets and sets attributes of the video element.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

This property is useful when your container has only a width but the exact height is unknown. It can automatically calculate the video height, but you need to determine the timing for setting this property.

attr ​

  • Type: Function
  • Parameter: String

Dynamically get and set attributes of the video element.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -294,7 +294,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info(art.attr('playsInline'));
     art.attr('playsInline', true);
     console.info(art.attr('playsInline'));
-});

type ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically gets and sets the video type.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

type ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the video type.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -303,7 +303,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info(art.type);
     art.type = 'm3u8';
     console.info(art.type);
-});

theme ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically gets and sets the player's theme color.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

theme ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the player's theme color.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -312,7 +312,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.info(art.theme);
     art.theme = '#000';
     console.info(art.theme);
-});

airplay ​

  • Type: Function

Initiates AirPlay.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

airplay ​

  • Type: Function

Initiate AirPlay.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -324,28 +324,28 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

loaded ​

  • Type: Getter

The proportion of the video that has been buffered, ranging from [0, 1]. Often used with the video:timeupdate event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

loaded ​

  • Type: Getter

The proportion of video buffered, ranging from [0, 1]. Often used with the video:timeupdate event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.loaded);
-});

loadedTime ​

  • Type: Getter

The amount of media that has been buffered, in seconds. Typically used alongside loaded to display detailed buffering progress.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

loadedTime ​

  • Type: Getter

The buffered media duration in seconds. Typically used alongside loaded to display detailed buffering progress.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.loadedTime);
-});

played ​

  • Type: Getter

The proportion of the video that has been played, ranging from [0, 1]. Often used with the video:timeupdate event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

played ​

  • Type: Getter

The proportion of video played, ranging from [0, 1]. Often used with the video:timeupdate event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.played);
-});

proxy ​

  • Type: Function

A proxy function for DOM events, essentially proxying addEventListener and removeEventListener. When using proxy to handle events, the event is automatically removed when the player is destroyed.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
+});

proxy ​

  • Type: Function

A proxy function for DOM events, essentially proxying addEventListener and removeEventListener. When using proxy to handle events, the event is automatically cleaned up when the player is destroyed.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
 	container: container,
@@ -354,7 +354,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 
 art.proxy(container, 'click', event => {
 	console.info(event);
-});

Note

If you need DOM events to exist only for the duration of the player's lifecycle, it is strongly recommended to use this function to avoid memory leaks.

query ​

  • Type: Function

A DOM query function, similar to document.querySelector, but the search is scoped to the current player instance, preventing errors from duplicate class names.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

If you need certain DOM events to exist only for the player's lifecycle, it is strongly recommended to use this function to avoid memory leaks.

query ​

  • Type: Function

A DOM query function, similar to document.querySelector, but the search is scoped to the current player, preventing errors with duplicate class names.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -364,7 +364,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 	url: '/assets/sample/video.mp4',
 });
 
-console.info(art.video);

cssVar ​

  • Type: Function

Dynamically gets or sets CSS variables.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+console.info(art.video);

cssVar ​

  • Type: Function

Dynamically get or set CSS variables.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -373,7 +373,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     console.log(art.cssVar('--art-theme'));
     art.cssVar('--art-theme', 'green');
     console.log(art.cssVar('--art-theme'));
-});

quality ​

  • Type: Setter
  • Parameter: Array

Dynamically sets the list of available quality levels.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

quality ​

  • Type: Setter
  • Parameter: Array

Dynamically set the quality list.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 	quality: [
@@ -403,7 +403,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 			},
 		];
 	}, 3000);
-})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

Dynamically set thumbnails

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

Dynamically set thumbnails.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -414,7 +414,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
         number: 60,
         column: 10,
     };
-});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

Dynamically set subtitle offset

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

Dynamically set subtitle offset.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
     subtitle: {
diff --git a/docs/document/assets/en_advanced_property.md.JV0Ib3j3.lean.js b/docs/document/assets/en_advanced_property.md.CaOAGGTk.lean.js
similarity index 97%
rename from docs/document/assets/en_advanced_property.md.JV0Ib3j3.lean.js
rename to docs/document/assets/en_advanced_property.md.CaOAGGTk.lean.js
index 6c8401ed4..ed5d27652 100644
--- a/docs/document/assets/en_advanced_property.md.JV0Ib3j3.lean.js
+++ b/docs/document/assets/en_advanced_property.md.CaOAGGTk.lean.js
@@ -1 +1 @@
-import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1772869976000}'),p={name:"en/advanced/property.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default};
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1772946913000}'),p={name:"en/advanced/property.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default};
diff --git a/docs/document/assets/en_component_contextmenu.md.Dn3gMYMB.js b/docs/document/assets/en_component_contextmenu.md.CsJAr6Ey.js
similarity index 91%
rename from docs/document/assets/en_component_contextmenu.md.Dn3gMYMB.js
rename to docs/document/assets/en_component_contextmenu.md.CsJAr6Ey.js
index 4c33a5932..2460d3ce4 100644
--- a/docs/document/assets/en_component_contextmenu.md.Dn3gMYMB.js
+++ b/docs/document/assets/en_component_contextmenu.md.CsJAr6Ey.js
@@ -1,4 +1,4 @@
-import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1772869976000}'),p={name:"en/component/contextmenu.md"};function t(h,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementComponent DOM element
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringComponent tooltip text

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1772946913000}'),p={name:"en/component/contextmenu.md"};function t(h,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementDOM element of the component
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringTooltip text for the component

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -33,7 +33,7 @@ import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 art.contextmenu.show = true;
 
 // Get the Element of contextmenu by name
-console.info(art.contextmenu['your-menu']);

Removal ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+console.info(art.contextmenu['your-menu']);

Deletion ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
diff --git a/docs/document/assets/en_component_contextmenu.md.Dn3gMYMB.lean.js b/docs/document/assets/en_component_contextmenu.md.CsJAr6Ey.lean.js
similarity index 90%
rename from docs/document/assets/en_component_contextmenu.md.Dn3gMYMB.lean.js
rename to docs/document/assets/en_component_contextmenu.md.CsJAr6Ey.lean.js
index 6852d8e7a..d2726034a 100644
--- a/docs/document/assets/en_component_contextmenu.md.Dn3gMYMB.lean.js
+++ b/docs/document/assets/en_component_contextmenu.md.CsJAr6Ey.lean.js
@@ -1 +1 @@
-import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1772869976000}'),p={name:"en/component/contextmenu.md"};function t(h,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const o=n(p,[["render",t]]);export{g as __pageData,o as default};
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1772946913000}'),p={name:"en/component/contextmenu.md"};function t(h,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const o=n(p,[["render",t]]);export{g as __pageData,o as default};
diff --git a/docs/document/assets/en_component_controls.md.BRzTYykf.js b/docs/document/assets/en_component_controls.md.t1Ub-agE.js
similarity index 94%
rename from docs/document/assets/en_component_controls.md.BRzTYykf.js
rename to docs/document/assets/en_component_controls.md.t1Ub-agE.js
index 53d4a6da5..f2ced8381 100644
--- a/docs/document/assets/en_component_controls.md.BRzTYykf.js
+++ b/docs/document/assets/en_component_controls.md.t1Ub-agE.js
@@ -1,4 +1,4 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Controls","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1772869976000}'),h={name:"en/component/controls.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Controls ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the control
nameStringUnique control name for CSS class identification
indexNumberControl index for display priority
htmlString, ElementControl's DOM element
styleObjectControl style object
clickFunctionControl click event handler
mountedFunctionTriggered after control is mounted
tooltipStringControl tooltip text
positionStringleft or right - controls display position
selectorArrayArray of selector list objects
onSelectFunctionFunction triggered when selector item is clicked

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Controls","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1772946913000}'),h={name:"en/component/controls.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Controls ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the control
nameStringUnique name of the control, used for class marking
indexNumberControl index, determines display priority
htmlString, ElementDOM element of the control
styleObjectStyle object for the control
clickFunctionClick event handler for the control
mountedFunctionTriggered after the control is mounted
tooltipStringTooltip text for the control
positionStringleft or right - controls which side the control appears on
selectorArrayArray of objects for selection list
onSelectFunctionFunction triggered when a selection list item is clicked

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
diff --git a/docs/document/assets/en_component_controls.md.BRzTYykf.lean.js b/docs/document/assets/en_component_controls.md.t1Ub-agE.lean.js
similarity index 90%
rename from docs/document/assets/en_component_controls.md.BRzTYykf.lean.js
rename to docs/document/assets/en_component_controls.md.t1Ub-agE.lean.js
index 06d2a7b66..942a1ce27 100644
--- a/docs/document/assets/en_component_controls.md.BRzTYykf.lean.js
+++ b/docs/document/assets/en_component_controls.md.t1Ub-agE.lean.js
@@ -1 +1 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Controls","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1772869976000}'),h={name:"en/component/controls.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{g as __pageData,y as default};
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Controls","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1772946913000}'),h={name:"en/component/controls.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{g as __pageData,y as default};
diff --git a/docs/document/assets/en_component_layers.md.B88JJHwY.lean.js b/docs/document/assets/en_component_layers.md.B88JJHwY.lean.js
deleted file mode 100644
index 9ff5e6c45..000000000
--- a/docs/document/assets/en_component_layers.md.B88JJHwY.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Layer","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1772869976000}'),h={name:"en/component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{c as __pageData,y as default};
diff --git a/docs/document/assets/en_component_layers.md.B88JJHwY.js b/docs/document/assets/en_component_layers.md.Yo2RXBZy.js
similarity index 92%
rename from docs/document/assets/en_component_layers.md.B88JJHwY.js
rename to docs/document/assets/en_component_layers.md.Yo2RXBZy.js
index f87481714..22c2f55cc 100644
--- a/docs/document/assets/en_component_layers.md.B88JJHwY.js
+++ b/docs/document/assets/en_component_layers.md.Yo2RXBZy.js
@@ -1,4 +1,4 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Layer","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1772869976000}'),h={name:"en/component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Layer ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementComponent DOM element
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringComponent tooltip text

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1772946913000}'),h={name:"en/component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Layers ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementComponent DOM element
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringComponent tooltip text

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
diff --git a/docs/document/assets/en_component_layers.md.Yo2RXBZy.lean.js b/docs/document/assets/en_component_layers.md.Yo2RXBZy.lean.js
new file mode 100644
index 000000000..e026e32e8
--- /dev/null
+++ b/docs/document/assets/en_component_layers.md.Yo2RXBZy.lean.js
@@ -0,0 +1 @@
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1772946913000}'),h={name:"en/component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{c as __pageData,y as default};
diff --git a/docs/document/assets/en_component_setting.md.C5z-_-Yy.js b/docs/document/assets/en_component_setting.md.Be0gsY-X.js
similarity index 89%
rename from docs/document/assets/en_component_setting.md.C5z-_-Yy.js
rename to docs/document/assets/en_component_setting.md.Be0gsY-X.js
index dba59cf3a..2258676d3 100644
--- a/docs/document/assets/en_component_setting.md.C5z-_-Yy.js
+++ b/docs/document/assets/en_component_setting.md.Be0gsY-X.js
@@ -1,12 +1,12 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1772869976000}'),t={name:"en/component/setting.md"};function e(h,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Settings Panel ​

Built-in ​

First, you need to open the settings panel. It comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset

',3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1772946913000}'),t={name:"en/component/setting.md"};function e(h,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Settings Panel ​

Built-in ​

First, you need to open the settings panel. It comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset.

',3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-	setting: true,
+    setting: true,
     flip: true,
     playbackRate: true,
     aspectRatio: true,
     subtitleOffset: true,
-});

Creating - Buttons ​

PropertyTypeDescription
htmlString, ElementElement DOM
iconString, ElementElement icon
onClickFunctionElement click event
widthNumberList width
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Create - Button ​

PropertyTypeDescription
htmlString, ElementThe DOM element
iconString, ElementThe icon element
onClickFunctionThe click event
widthNumberThe list width
tooltipStringThe tooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -15,13 +15,13 @@ import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             html: 'Button',
             icon: '<img width="22" height="22" src="/assets/img/state.svg">',
             tooltip: 'tooltip',
-			onClick(item, $dom, event) {
+            onClick(item, $dom, event) {
                 console.info(item, $dom, event);
-				return 'new tooltip'
-			}
+                return 'new tooltip';
+            },
         },
     ],
-});

Creating - Selection Lists ​

PropertyTypeDescription
htmlString, ElementElement DOM
iconString, ElementElement icon
selectorArrayElement list
onSelectFunctionElement click event
widthNumberList width
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Create - Selection List ​

PropertyTypeDescription
htmlString, ElementThe DOM element
iconString, ElementThe icon element
selectorArrayThe list of elements
onSelectFunctionThe click event
widthNumberThe list width
tooltipStringThe tooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -73,7 +73,7 @@ import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

Creating - Nested Lists ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Create - Nested List ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -116,7 +116,7 @@ import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             ],
         },
     ],
-});

Create - Toggle Button ​

PropertyTypeDescription
htmlString, ElementDOM element of the item
iconString, ElementIcon of the item
switchBooleanDefault state of the button
onSwitchFunctionButton toggle event
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Create - Toggle Button ​

PropertyTypeDescription
htmlString, ElementDOM element for the item
iconString, ElementIcon for the item
switchBooleanDefault state of the button
onSwitchFunctionButton toggle event
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -135,7 +135,7 @@ import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

Create - Range Slider ​

PropertyTypeDescription
htmlString, ElementDOM element of the item
iconString, ElementIcon of the item
rangeArrayDefault state array
onRangeFunctionEvent triggered on completion
onChangeFunctionEvent triggered on change
tooltipStringTooltip text
js
const range = [5, 1, 10, 1];
+});

Create - Range Slider ​

PropertyTypeDescription
htmlString, ElementDOM element for the item
iconString, ElementIcon for the item
rangeArrayDefault state array
onRangeFunctionEvent triggered on completion
onChangeFunctionEvent triggered on change
tooltipStringTooltip text
js
const range = [5, 1, 10, 1];
 const value = range[0];
 const min = range[1];
 const max = range[2];
diff --git a/docs/document/assets/en_component_setting.md.C5z-_-Yy.lean.js b/docs/document/assets/en_component_setting.md.Be0gsY-X.lean.js
similarity index 93%
rename from docs/document/assets/en_component_setting.md.C5z-_-Yy.lean.js
rename to docs/document/assets/en_component_setting.md.Be0gsY-X.lean.js
index c163454cd..450ee5be0 100644
--- a/docs/document/assets/en_component_setting.md.C5z-_-Yy.lean.js
+++ b/docs/document/assets/en_component_setting.md.Be0gsY-X.lean.js
@@ -1 +1 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1772869976000}'),t={name:"en/component/setting.md"};function e(h,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(t,[["render",e]]);export{c as __pageData,y as default};
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const c=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1772946913000}'),t={name:"en/component/setting.md"};function e(h,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(t,[["render",e]]);export{c as __pageData,y as default};
diff --git a/docs/document/assets/en_index.md.D_XAyEyy.lean.js b/docs/document/assets/en_index.md.D_XAyEyy.lean.js
deleted file mode 100644
index e41d652b3..000000000
--- a/docs/document/assets/en_index.md.D_XAyEyy.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Installation & Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1767420511000}'),p={name:"en/index.md"};function t(e,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l("",50)]))}const c=i(p,[["render",t]]);export{g as __pageData,c as default};
diff --git a/docs/document/assets/en_index.md.D_XAyEyy.js b/docs/document/assets/en_index.md.L9xnqmbw.js
similarity index 80%
rename from docs/document/assets/en_index.md.D_XAyEyy.js
rename to docs/document/assets/en_index.md.L9xnqmbw.js
index 8d999c48d..eff59f8d0 100644
--- a/docs/document/assets/en_index.md.D_XAyEyy.js
+++ b/docs/document/assets/en_index.md.L9xnqmbw.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Installation & Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1767420511000}'),p={name:"en/index.md"};function t(e,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l(`

Installation & Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
+import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Installation and Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1772946913000}'),p={name:"en/index.md"};function t(e,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l(`

Installation and Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -19,7 +19,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
           });
         </script>
     </body>
-</html>

Note

The player's dimensions depend on the size of its container container, so your container must have defined dimensions.

See more usage examples at the following link:

/example

Vue.js ​

vue
<template>
+</html>

Note

The player's dimensions depend on the dimensions of its container. Therefore, your container must have defined dimensions.

See more usage examples at the following link

/example

Vue.js ​

vue
<template>
   <div ref="$container" />
 </template>
 
@@ -51,7 +51,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
   art.value.destroy(false)
 })
 </script>
vue
<template>
-  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
+  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
 </template>
 
 <script setup>
@@ -71,7 +71,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
 function getInstance(art) {
   console.log(art)
 }
-</script>

Artplayer is not reactive:

Directly modifying option in Vue.js will not update the player.

React.js ​

jsx
import Artplayer from 'artplayer'
+</script>

Artplayer is not reactive:

Directly modifying the option in Vue.js will not update the player.

React.js ​

jsx
import Artplayer from 'artplayer'
 import { useEffect, useRef } from 'react'
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -111,13 +111,13 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
   )
 }
 
-export default App

Artplayer is not reactive:

Directly modifying option in React.js will not update the player.

TypeScript ​

artplayer.d.ts is automatically imported when importing Artplayer.

Vue.js ​

vue
<script setup>
+export default App

Artplayer is not reactive:

Directly modifying the option in React.js will not update the player.

TypeScript ​

The artplayer.d.ts file is automatically imported when you import Artplayer.

Vue.js ​

vue
<script setup>
 import Artplayer from 'artplayer';
 const art = shallowRef<Artplayer>(null);
 art.value = new Artplayer();
 </script>

React.js ​

jsx
import Artplayer from 'artplayer';
 const art = useRef<Artplayer>(null);
-art.current = new Artplayer();

Option ​

You can also use the option type.

ts
import Artplayer, { type Option } from 'artplayer';
+art.current = new Artplayer();

Option ​

You can also use the type for the options.

ts
import Artplayer, { type Option } from 'artplayer';
 
 const option: Option = {
     container: '.artplayer-app',
@@ -126,7 +126,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
 
 option.volume = 0.5;
 
-const art = new Artplayer(option);

Full TypeScript definitions

packages/artplayer/types

JavaScript ​

Sometimes your js files may lose TypeScript type hints. In such cases, you can manually import the types.

Variable:

js
/**
+const art = new Artplayer(option);

Full TypeScript Definitions

packages/artplayer/types

JavaScript ​

Sometimes your js files may lose TypeScript type hints. In such cases, you can manually import the types.

Variable:

js
/**
  * @type {import("artplayer")}
  */
 let art = null;

Parameter:

js
/**
@@ -154,7 +154,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

Legacy Browsers ​

The production build artplayer.js only supports the latest major version of Chrome: last 1 Chrome version

For legacy browsers, you can use the artplayer.legacy.js file, which supports compatibility down to: IE 11

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, modify the following configuration and build it yourself:

Build configuration: scripts/build.js

Reference documentation: browserslist

ECMAScript Module ​

Starting from 5.2.6, artplayer and all plugins also provide an ESM version mjs, such as:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
+const art8 = new Artplayer(option);

Legacy Browsers ​

The production build artplayer.js only supports the latest major version of Chrome: last 1 Chrome version.

For legacy browsers, you can use the artplayer.legacy.js file, which is compatible down to: IE 11.

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, modify the following configuration and build it yourself:

Build configuration: scripts/build.js

Reference documentation: browserslist

ECMAScript Module ​

Starting from version 5.2.6, artplayer and all plugins also provide an ESM version in mjs format, such as:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
 <html lang="en">
 
 <head>
@@ -189,7 +189,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
     </script>
 </body>
 
-</html>

Custom userAgent ​

Currently, the detection for whether a device is mobile is not entirely accurate. Sometimes you may want to adjust the player's UI by changing the userAgent. Therefore, starting from 5.2.4, a new global variable globalThis.CUSTOM_USER_AGENT has been added.

html
<html>
+</html>

Custom userAgent ​

Currently, the detection of whether a device is mobile is not always accurate. Sometimes you may want to adjust the player's UI by changing the userAgent. Therefore, starting from version 5.2.4, a global variable globalThis.CUSTOM_USER_AGENT has been added.

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
diff --git a/docs/document/assets/en_index.md.L9xnqmbw.lean.js b/docs/document/assets/en_index.md.L9xnqmbw.lean.js
new file mode 100644
index 000000000..2c46cdd73
--- /dev/null
+++ b/docs/document/assets/en_index.md.L9xnqmbw.lean.js
@@ -0,0 +1 @@
+import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Installation and Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1772946913000}'),p={name:"en/index.md"};function t(e,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l("",50)]))}const c=i(p,[["render",t]]);export{g as __pageData,c as default};
diff --git a/docs/document/assets/en_start_i18n.md.fbCR_PMw.js b/docs/document/assets/en_start_i18n.md.Btgstn_9.js
similarity index 81%
rename from docs/document/assets/en_start_i18n.md.fbCR_PMw.js
rename to docs/document/assets/en_start_i18n.md.Btgstn_9.js
index 80a90ccea..6f00492da 100644
--- a/docs/document/assets/en_start_i18n.md.fbCR_PMw.js
+++ b/docs/document/assets/en_start_i18n.md.Btgstn_9.js
@@ -1,8 +1,8 @@
-import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1772869976000}'),e={name:"en/start/i18n.md"};function p(t,s,h,r,k,E){return n(),i("div",null,s[0]||(s[0]=[l(`

Language Settings ​

DANGER

Due to the increasing number of bundled multilingual resources, starting from version 5.1.0, the core artplayer.js code will only include Simplified Chinese and English. Other languages are no longer bundled by default and must be imported manually as needed.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n implementation reference, see: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn. No manual import is required.

js
var art = new Artplayer({
+import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1772946913000}'),e={name:"en/start/i18n.md"};function p(t,s,h,r,k,E){return n(),i("div",null,s[0]||(s[0]=[l(`

Language Settings ​

DANGER

Due to the increasing number of bundled multilingual resources, starting from version 5.1.0, the core artplayer.js code will no longer bundle any languages other than Simplified Chinese and English. You will need to manually import any other languages you require.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n syntax reference, see: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn. No manual import is required.

js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

Importing Languages ​

Language files before bundling are located at: artplayer/src/i18n/*.js. Contributions to add your language are welcome.

Language files after bundling are located at: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
+});

Importing Languages ​

Language files before bundling are located at: artplayer/src/i18n/*.js. Contributions for new languages are welcome.

Bundled language files are located at: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
 import zhTw from 'artplayer/i18n/zh-tw';
 
 var art = new Artplayer({
@@ -33,7 +33,7 @@ import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
             Play: 'Your Play'
         },
     },
-});

Modifying Languages ​

js
import zhTw from 'artplayer/i18n/zh-tw';
+});

Modifying a Language ​

js
import zhTw from 'artplayer/i18n/zh-tw';
 
 var art = new Artplayer({
     container: '.artplayer-app',
diff --git a/docs/document/assets/en_start_i18n.md.fbCR_PMw.lean.js b/docs/document/assets/en_start_i18n.md.Btgstn_9.lean.js
similarity index 70%
rename from docs/document/assets/en_start_i18n.md.fbCR_PMw.lean.js
rename to docs/document/assets/en_start_i18n.md.Btgstn_9.lean.js
index 7f3455868..7ac994154 100644
--- a/docs/document/assets/en_start_i18n.md.fbCR_PMw.lean.js
+++ b/docs/document/assets/en_start_i18n.md.Btgstn_9.lean.js
@@ -1 +1 @@
-import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1772869976000}'),e={name:"en/start/i18n.md"};function p(t,s,h,r,k,E){return n(),i("div",null,s[0]||(s[0]=[l("",14)]))}const c=a(e,[["render",p]]);export{g as __pageData,c as default};
+import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1772946913000}'),e={name:"en/start/i18n.md"};function p(t,s,h,r,k,E){return n(),i("div",null,s[0]||(s[0]=[l("",14)]))}const c=a(e,[["render",p]]);export{g as __pageData,c as default};
diff --git a/docs/document/assets/en_start_option.md.Bei8B6RP.js b/docs/document/assets/en_start_option.md.C2vGTVOZ.js
similarity index 85%
rename from docs/document/assets/en_start_option.md.Bei8B6RP.js
rename to docs/document/assets/en_start_option.md.C2vGTVOZ.js
index 2dcd3e2c5..53577ec04 100644
--- a/docs/document/assets/en_start_option.md.Bei8B6RP.js
+++ b/docs/document/assets/en_start_option.md.C2vGTVOZ.js
@@ -1,8 +1,8 @@
-import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1772869976000}'),p={name:"en/start/option.md"};function t(h,a,r,k,d,E){return l(),e("div",null,a[0]||(a[0]=[s('

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player is mounted.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
-    container: '.artplayer-app', 
+import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1772946913000}'),p={name:"en/start/option.md"};function t(h,a,r,k,d,E){return l(),e("div",null,a[0]||(a[0]=[s('

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player is mounted.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+    container: '.artplayer-app',
     // container: document.querySelector('.artplayer-app'),
     url: '/assets/sample/video.mp4',
-});

You may need to initialize the size of the container element, for example:

css
.artplayer-app {
+});

You may need to set the size of the container element, for example:

css
.artplayer-app {
     width: 400px;
     height: 300px;
 }

Or use aspect-ratio:

css
.artplayer-app {
@@ -10,17 +10,17 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
 }

Note

Among all options, only container is required.

url ​

  • Type: String
  • Default: ''

The video source URL.

`,9),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

Sometimes the url is not known immediately; in such cases, you can set the url asynchronously.

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Sometimes the url is not known immediately. In such cases, you can set the url asynchronously.

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
 });
 
 setTimeout(() => {
     art.url = '/assets/sample/video.mp4';
-}, 1000);

Note

By default, three video file formats are supported: .mp4, .ogg, .webm.

To play other formats like .m3u8 or .flv, please refer to the Third-party Libraries section on the left.

id ​

  • Type: String
  • Default: ''

The unique identifier for the player, currently only used for playback resumption autoplayback.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+}, 1000);

Note

By default, three video file formats are supported: .mp4, .ogg, .webm.

To play other formats like .m3u8 or .flv, please refer to the Third-party Libraries section on the left.

id ​

  • Type: String
  • Default: ''

The unique identifier for the player. Currently used only for playback memory autoplayback.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     id: 'your-url-id',
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

onReady ​

  • Type: Function
  • Default: undefined

The constructor accepts a function as the second parameter, which is triggered when the player is successfully initialized and the video is ready to play, similar to the ready event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer(
+});

onReady ​

  • Type: Function
  • Default: undefined

The constructor accepts a function as the second parameter. This function is triggered when the player is successfully initialized and the video is ready to play, similar to the ready event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer(
     {
         container: '.artplayer-app',
         url: '/assets/sample/video.mp4',
@@ -45,15 +45,15 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     theme: '#ffad00',
-});

volume ​

  • Type: Number
  • Default: 0.7

The default volume of the player.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

volume ​

  • Type: Number
  • Default: 0.7

The player's default volume.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     volume: 0.5,
-});

Note

The player caches the last volume level; upon next initialization (e.g., page refresh), the player will read this cached value.

isLive ​

  • Type: Boolean
  • Default: false

Enable live streaming mode, which hides the progress bar and playback time.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

The player caches the last volume setting. Upon the next initialization (e.g., page refresh), the player will read this cached value.

isLive ​

  • Type: Boolean
  • Default: false

Enable live streaming mode. This will hide the progress bar and playback time.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     isLive: true,
-});

muted ​

  • Type: Boolean
  • Default: false

Whether to mute by default.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

muted ​

  • Type: Boolean
  • Default: false

Whether to start muted by default.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -62,54 +62,54 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     url: '/assets/sample/video.mp4',
     autoplay: true,
     muted: true,
-});

Note

If you want the video to autoplay immediately upon page load, muted must be set to true. For more information, please read Autoplay Policy Changes.

autoSize ​

  • Type: Boolean
  • Default: false

By default, the player's dimensions fill the entire container size, often resulting in black bars. This option automatically adjusts the player size to hide the black bars, similar to object-fit: cover; in CSS.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

If you want the video to autoplay immediately upon page load, muted must be set to true. For more information, please read Autoplay Policy Changes.

autoSize ​

  • Type: Boolean
  • Default: false

By default, the player's dimensions fill the entire container, often resulting in black bars. This option automatically adjusts the player size to hide black bars, similar to css's object-fit: cover;.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
-});

autoMini ​

  • Type: Boolean
  • Default: false

Automatically enters mini player mode when the player scrolls out of the browser viewport.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

autoMini ​

  • Type: Boolean
  • Default: false

Automatically enters Mini Player mode when the player scrolls out of the browser viewport.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoMini: true,
-});

loop ​

  • Type: Boolean
  • Default: false

Whether to enable video looping.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

loop ​

  • Type: Boolean
  • Default: false

Whether to loop playback.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     loop: true,
-});

flip ​

  • Type: Boolean
  • Default: false

Whether to display the video flip functionality. Currently appears in the Settings Panel and Context Menu.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

flip ​

  • Type: Boolean
  • Default: false

Whether to display the video flip function. Currently only appears in the Settings Panel and Context Menu.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
     setting: true,
-});

playbackRate ​

  • Type: Boolean
  • Default: false

Whether to display the video playback rate functionality. Appears in the Settings Panel and Context Menu.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Boolean
  • Default: false

Whether to display the video playback speed function. It will appear in the Settings Panel and Context Menu.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     playbackRate: true,
     setting: true,
-});

aspectRatio ​

  • Type: Boolean
  • Default: false

Whether to display the video aspect ratio functionality. Appears in the Settings Panel and Context Menu.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

aspectRatio ​

  • Type: Boolean
  • Default: false

Whether to display the video aspect ratio function. It will appear in the Settings Panel and Context Menu.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
     setting: true,
-});

screenshot ​

  • Type: Boolean
  • Default: false

Whether to display the Video Screenshot functionality in the bottom control bar.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

screenshot ​

  • Type: Boolean
  • Default: false

Whether to display the Screenshot function in the bottom control bar.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
-});

Note

Due to browser security mechanisms, screenshot capture may fail if the video source URL is cross-origin with the website.

setting ​

  • Type: Boolean
  • Default: false

Whether to display the toggle button for the Settings Panel in the bottom control bar.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, screenshotting may fail if the video source URL is cross-origin with the website.

setting ​

  • Type: Boolean
  • Default: false

Whether to display the toggle button for the Settings Panel in the bottom control bar.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
-});

hotkey ​

  • Type: Boolean
  • Default: true

Whether to enable hotkeys.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

hotkey ​

  • Type: Boolean
  • Default: true

Whether to use hotkeys.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     hotkey: true,
-});
HotkeyDescription
↑Increase volume
↓Decrease volume
←Seek forward
→Seek backward
spaceToggle play/pause

Note

These hotkeys only take effect after the player gains focus (e.g., by clicking on the player).

pip ​

  • Type: Boolean
  • Default: false

Whether to display the Picture-in-Picture toggle button in the bottom control bar.

`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});
HotkeyDescription
↑Increase volume
↓Decrease volume
←Seek forward
→Seek backward
spaceToggle play/pause

Note

These hotkeys only take effect after the player gains focus (e.g., after clicking on the player).

pip ​

  • Type: Boolean
  • Default: false

Whether to display the Picture-in-Picture toggle button in the bottom control bar.

`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
-});

mutex ​

  • Type: Boolean
  • Default: true

If multiple players exist simultaneously on the page, whether only one player is allowed to play at a time.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

mutex ​

  • Type: Boolean
  • Default: true

If multiple players exist on the page simultaneously, whether only one player is allowed to play at a time.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     mutex: true,
-});

backdrop ​

  • Type: Boolean
  • Default: true

Whether to enable the backdrop blur effect for the player UI. When enabled, overlays such as the settings panel, context menu, and volume bar will apply a backdrop-filter frosted glass effect for a more transparent appearance. However, this may cause performance or compatibility issues on some low-performance devices or older browsers.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

backdrop ​

  • Type: Boolean
  • Default: true

Whether to enable the backdrop blur effect for the player UI. When enabled, overlays such as the settings panel, context menu, and volume bar will apply a backdrop-filter frosted glass effect for a more transparent look. However, this may cause performance or compatibility issues on some low-performance devices or older browsers.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     backdrop: false, // Disable frosted glass effect
@@ -117,11 +117,11 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
-});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

Whether to display the player Webpage Fullscreen button in the bottom control bar.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

Whether to display the player Web Fullscreen button in the bottom control bar.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

subtitleOffset ​

  • Type: Boolean
  • Default: false

Subtitle timing offset, range within [-5s, 5s]. Appears in the Settings Panel.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Boolean
  • Default: false

Subtitle time offset, ranging from [-5s, 5s]. Appears in the Settings Panel.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -129,11 +129,11 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
         url: '/assets/sample/subtitle.srt',
     },
     setting: true,
-});

miniProgressBar ​

  • Type: Boolean
  • Default: false

Mini progress bar that appears only when the player loses focus and is playing.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

miniProgressBar ​

  • Type: Boolean
  • Default: false

A mini progress bar that only appears when the player loses focus and is playing.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});

useSSR ​

  • Type: Boolean
  • Default: false

Whether to use SSR mount mode. Useful if you want to pre-render the player's required HTML before mounting.

You can access the player's required HTML via Artplayer.html.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var $container = document.querySelector('.artplayer-app');
+});

useSSR ​

  • Type: Boolean
  • Default: false

Whether to use SSR (Server-Side Rendering) mount mode. Useful if you want to pre-render the player's required HTML before the player is mounted.

You can access the player's required HTML via Artplayer.html.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var $container = document.querySelector('.artplayer-app');
 $container.innerHTML = Artplayer.html;
 
 var art = new Artplayer({
@@ -167,7 +167,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

For Component Configuration, please refer to:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

Initialize custom settings panel.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

For Component Configuration, please refer to:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

Initialize custom settings panels.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -201,7 +201,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

For Settings Panel, please refer to:

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

Initialize custom context menu.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

For Settings Panel, please refer to:

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

Initialize custom context menus.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -229,7 +229,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             },
         },
     ],
-});

For Component Configuration, please refer to:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

Whether to display the Quality Selection list in the bottom control bar.

PropertyTypeDescription
defaultBooleanDefault quality
htmlStringQuality name
urlStringQuality URL
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

For Component Configuration, please refer to the following address:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

Whether to display the Quality Selection list in the bottom control bar.

PropertyTypeDescription
defaultBooleanDefault quality
htmlStringQuality name
urlStringQuality URL
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     quality: [
@@ -291,7 +291,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
         number: 60,
         column: 10,
     },
-});

Generate Thumbnails Online

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

Set the video subtitle. Supported subtitle formats: vtt, srt, ass.

PropertyTypeDescription
nameStringSubtitle name
urlStringSubtitle URL
typeStringSubtitle type, options: vtt, srt, ass
styleObjectSubtitle style
encodingStringSubtitle encoding, default: utf-8
escapeBooleanWhether to escape html tags, default: true
onVttLoadFunctionFunction for modifying vtt text
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Generate Thumbnails Online

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

Set video subtitles. Supported subtitle formats: vtt, srt, ass.

PropertyTypeDescription
nameStringSubtitle name
urlStringSubtitle URL
typeStringSubtitle type, options: vtt, srt, ass
styleObjectSubtitle style
encodingStringSubtitle encoding, default utf-8
escapeBooleanWhether to escape html tags, default true
onVttLoadFunctionFunction for modifying vtt text
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -304,25 +304,25 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
             'font-size': '30px',
         },
     },
-});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false, 'preload': 'metadata'} (In Safari, it automatically adjusts to preload: 'auto' for better loading experience).

More video attributes. These attributes will be directly written into the video element.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false, 'preload': 'metadata'} (In Safari, it will automatically adjust to preload: 'auto' for better loading experience.)

More video attributes. These attributes will be written directly into the video element.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     moreVideoAttr: {
         'webkit-playsinline': true,
         playsInline: true,
     },
-});

icons ​

  • Type: Object
  • Default: {}

Used to replace default icons, supports both Html strings and HTMLElement.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

icons ​

  • Type: Object
  • Default: {}

Used to replace default icons. Supports Html strings and HTMLElement.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     icons: {
         loading: '<img src="/assets/img/ploading.gif">',
         state: '<img src="/assets/img/state.png">',
     },
-});

All Icon Definitions

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

Used to specify the video format. It needs to be used in conjunction with customType. By default, the video format is determined by the suffix of the video URL (e.g., .m3u8, .mkv, .ts). However, sometimes the video URL lacks the correct suffix, so explicit specification is necessary.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

All Icon Definitions

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

Used to specify the video format. It needs to be used together with customType. By default, the video format is determined by the suffix of the video URL (e.g., .m3u8, .mkv, .ts). However, sometimes the video URL may not have the correct suffix, so it needs to be explicitly specified.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     type: 'm3u8',
-});

Suffix Recognition

The player can only parse suffixes like this: /assets/sample/video.m3u8

But cannot parse suffixes like this: /assets/sample/video?type=m3u8

Therefore, if you use customType, it is best to also specify the type.

customType ​

  • Type: Object
  • Default: {}

Matches based on the video's type and delegates video decoding to third-party programs. The handler function receives three parameters:

  • video: The video DOM element
  • url: The video URL
  • art: The current instance
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Suffix Recognition

The player can only parse suffixes like this: /assets/sample/video.m3u8

But cannot parse suffixes like this: /assets/sample/video?type=m3u8

Therefore, if you use customType, it's best to also specify the type.

customType ​

  • Type: Object
  • Default: {}

Matches based on the video's type and delegates video decoding to third-party programs for processing. The processing function can receive three parameters:

  • video: The video DOM element
  • url: The video URL
  • art: The current instance
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     customType: {
@@ -371,7 +371,7 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     url: '/assets/sample/video.mp4',
     id: 'your-url-id',
     autoPlayback: true,
-});

Note

By default, the player uses the url as the key to cache the playback progress.

However, if the same video has different urls, you need to use the id to identify the unique key for the video.

autoOrientation ​

  • Type: Boolean
  • Default: false

Whether to rotate the player during fullscreen mode on mobile web, based on the video dimensions and viewport size.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Note

Because the player uses the url as the key to cache playback progress by default.

However, if the url for the same video is different, then you need to use id to identify the unique key for the video.

autoOrientation ​

  • Type: Boolean
  • Default: false

Whether to rotate the player in fullscreen mode on mobile web, based on the video dimensions and viewport dimensions.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
@@ -379,13 +379,13 @@ import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     airplay: true,
-});

cssVar ​

  • Type: Object
  • Default: {}

Used to modify built-in CSS variables.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

cssVar ​

  • Type: Object
  • Default: {}

Used to modify the built-in CSS variables.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     cssVar: {
         //
     },
-});

CSS Variable Reference

artplayer/types/cssVar.d.ts

proxy ​

  • Type: function
  • Default: undefined

The function can return a third-party HTMLCanvasElement or HTMLVideoElement. For example, it can proxy an existing video DOM element.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+});

Reference for cssVar Syntax

artplayer/types/cssVar.d.ts

proxy ​

  • Type: function
  • Default: undefined

The function can return a third-party HTMLCanvasElement or HTMLVideoElement. For example, it can proxy an existing video DOM element.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     proxy: () => document.createElement('video')
diff --git a/docs/document/assets/en_start_option.md.Bei8B6RP.lean.js b/docs/document/assets/en_start_option.md.C2vGTVOZ.lean.js
similarity index 98%
rename from docs/document/assets/en_start_option.md.Bei8B6RP.lean.js
rename to docs/document/assets/en_start_option.md.C2vGTVOZ.lean.js
index 40bbf6b7c..a47094c4b 100644
--- a/docs/document/assets/en_start_option.md.Bei8B6RP.lean.js
+++ b/docs/document/assets/en_start_option.md.C2vGTVOZ.lean.js
@@ -1 +1 @@
-import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1772869976000}'),p={name:"en/start/option.md"};function t(h,a,r,k,d,E){return l(),e("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",9),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",7),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default};
+import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const o=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1772946913000}'),p={name:"en/start/option.md"};function t(h,a,r,k,d,E){return l(),e("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",9),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",7),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default};
diff --git a/docs/document/assets/index.md.BaNZbFwu.js b/docs/document/assets/index.md.CpfWSd2Y.js
similarity index 96%
rename from docs/document/assets/index.md.BaNZbFwu.js
rename to docs/document/assets/index.md.CpfWSd2Y.js
index 680a05f66..ec6c0c95a 100644
--- a/docs/document/assets/index.md.BaNZbFwu.js
+++ b/docs/document/assets/index.md.CpfWSd2Y.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1767420511000}'),p={name:"index.md"};function t(e,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l(`

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
+import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1767420511000}'),p={name:"index.md"};function t(e,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l(`

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -19,7 +19,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
           });
         </script>
     </body>
-</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/example

Vue.js ​

vue
<template>
+</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/example

Vue.js ​

vue
<template>
   <div ref="$container" />
 </template>
 
@@ -51,7 +51,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
   art.value.destroy(false)
 })
 </script>
vue
<template>
-  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
+  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
 </template>
 
 <script setup>
@@ -71,7 +71,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
 function getInstance(art) {
   console.log(art)
 }
-</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import Artplayer from 'artplayer'
+</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import Artplayer from 'artplayer'
 import { useEffect, useRef } from 'react'
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -154,7 +154,7 @@ import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const g
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

ECMAScript Module ​

从 5.2.6 开始,artplayer 和所有插件还会提供一个 ESM 版本的 mjs,如:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
+const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

ECMAScript Module ​

从 5.2.6 开始,artplayer 和所有插件还会提供一个 ESM 版本的 mjs,如:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
 <html lang="en">
 
 <head>
diff --git a/docs/document/assets/index.md.BaNZbFwu.lean.js b/docs/document/assets/index.md.CpfWSd2Y.lean.js
similarity index 100%
rename from docs/document/assets/index.md.BaNZbFwu.lean.js
rename to docs/document/assets/index.md.CpfWSd2Y.lean.js
diff --git a/docs/document/assets/plugin_danmuku.md.Dz71RGDv.js b/docs/document/assets/plugin_danmuku.md.NzG4PBIi.js
similarity index 99%
rename from docs/document/assets/plugin_danmuku.md.Dz71RGDv.js
rename to docs/document/assets/plugin_danmuku.md.NzG4PBIi.js
index 6f6e055b2..c33049b6e 100644
--- a/docs/document/assets/plugin_danmuku.md.Dz71RGDv.js
+++ b/docs/document/assets/plugin_danmuku.md.NzG4PBIi.js
@@ -1,4 +1,4 @@
-import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1734270991000}'),h={name:"plugin/danmuku.md"};function e(k,a,t,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s(`

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.xxfEszSJ.js";const y=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1734270991000}'),h={name:"plugin/danmuku.md"};function e(k,a,t,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s(`

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
     text: '', // 弹幕文本
     time: 10, // 弹幕时间, 默认为当前播放器时间
     mode: 0, // 弹幕模式: 0: 滚动(默认),1: 顶部,2: 底部
diff --git a/docs/document/assets/plugin_danmuku.md.Dz71RGDv.lean.js b/docs/document/assets/plugin_danmuku.md.NzG4PBIi.lean.js
similarity index 100%
rename from docs/document/assets/plugin_danmuku.md.Dz71RGDv.lean.js
rename to docs/document/assets/plugin_danmuku.md.NzG4PBIi.lean.js
diff --git a/docs/document/assets/start_i18n.md.CpGYSiAS.js b/docs/document/assets/start_i18n.md.uSeNmo_b.js
similarity index 98%
rename from docs/document/assets/start_i18n.md.CpGYSiAS.js
rename to docs/document/assets/start_i18n.md.uSeNmo_b.js
index 4e8fb1511..e4f3e33df 100644
--- a/docs/document/assets/start_i18n.md.CpGYSiAS.js
+++ b/docs/document/assets/start_i18n.md.uSeNmo_b.js
@@ -2,7 +2,7 @@ import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.xxfEszSJ.js";const c
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
+});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
 import zhTw from 'artplayer/i18n/zh-tw';
 
 var art = new Artplayer({
diff --git a/docs/document/assets/start_i18n.md.CpGYSiAS.lean.js b/docs/document/assets/start_i18n.md.uSeNmo_b.lean.js
similarity index 100%
rename from docs/document/assets/start_i18n.md.CpGYSiAS.lean.js
rename to docs/document/assets/start_i18n.md.uSeNmo_b.lean.js
diff --git a/docs/document/component/contextmenu.html b/docs/document/component/contextmenu.html
index 856e6f2c2..8d1f88558 100644
--- a/docs/document/component/contextmenu.html
+++ b/docs/document/component/contextmenu.html
@@ -9,9 +9,9 @@
     
     
     
-    
+    
     
-    
+    
     
     
     
@@ -106,7 +106,7 @@
         })
     }, 3000);
 });
- + \ No newline at end of file diff --git a/docs/document/component/controls.html b/docs/document/component/controls.html index f605241ff..ab40df85b 100644 --- a/docs/document/component/controls.html +++ b/docs/document/component/controls.html @@ -9,9 +9,9 @@ - + - + @@ -153,7 +153,7 @@ }); }, 3000); });
- + \ No newline at end of file diff --git a/docs/document/component/layers.html b/docs/document/component/layers.html index cf2fed27e..53c0825f5 100644 --- a/docs/document/component/layers.html +++ b/docs/document/component/layers.html @@ -9,9 +9,9 @@ - + - + @@ -125,7 +125,7 @@ }); }, 3000); });
- + \ No newline at end of file diff --git a/docs/document/component/setting.html b/docs/document/component/setting.html index 5f8946935..830f8efc8 100644 --- a/docs/document/component/setting.html +++ b/docs/document/component/setting.html @@ -9,9 +9,9 @@ - + - + @@ -245,7 +245,7 @@ }); }, 3000); });
- + \ No newline at end of file diff --git a/docs/document/en/advanced/built-in.html b/docs/document/en/advanced/built-in.html index 2d9424d98..12f93f3e2 100644 --- a/docs/document/en/advanced/built-in.html +++ b/docs/document/en/advanced/built-in.html @@ -9,11 +9,11 @@ - + - + - + @@ -34,7 +34,7 @@ }); console.info(art.template); -console.info(art.template.$video);

Note

To easily distinguish between DOM elements and regular objects, all DOM elements within the player are named with a $ prefix.

This is the definition of all DOM elements: artplayer/types/template.d.ts

events ​

Manages all DOM events for the player. It essentially proxies addEventListener and removeEventListener. When using the following methods to handle events, the event will be automatically destroyed when the player is destroyed.

  • The proxy method is used to proxy DOM events.
  • The hover method is used to proxy custom hover events.
▶ Run Code
js
var container = document.querySelector('.artplayer-app');
+console.info(art.template.$video);

Note

To easily distinguish between DOM elements and regular objects, all DOM elements within the player are named with a $ prefix.

This is the definition of all DOM elements: artplayer/types/template.d.ts

events ​

Manages all DOM events for the player. It essentially proxies addEventListener and removeEventListener. When using the following methods to handle events, the events will also be automatically destroyed when the player is destroyed.

  • The proxy method is used to proxy DOM events.
  • The hover method is used to proxy custom hover events.
▶ Run Code
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
     container: container,
@@ -49,7 +49,7 @@
     console.info('mouseenter', event);
 }, (event) => {
     console.info('mouseleave', event);
-});

Note

If you need DOM events that only exist during the player's lifecycle, it is strongly recommended to use these functions to avoid memory leaks.

storage ​

Manages the player's local storage.

  • The name property is used to set the cache key.
  • The set method is used to set a cache value.
  • The get method is used to get a cache value.
  • The del method is used to delete a cache value.
  • The clear method is used to clear all cache.
▶ Run Code
js
var art = new Artplayer({
+});

Note

If you need DOM events that should only exist during the player's lifecycle, it is strongly recommended to use these functions to avoid memory leaks.

storage ​

Manages the player's local storage.

  • The name property is used to set the cache key.
  • The set method is used to set a cache.
  • The get method is used to retrieve a cache.
  • The del method is used to delete a cache.
  • The clear method is used to clear all caches.
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -69,7 +69,7 @@
     url: '/assets/sample/video.mp4',
 });
 
-console.info(art.icons.loading);

This is the definition of all icons:

artplayer/types/icons.d.ts

i18n ​

Manages the player's i18n.

  • The get method is used to get an i18n value.
  • The update method is used to update the i18n object.
▶ Run Code
js
var art = new Artplayer({
+console.info(art.icons.loading);

This is the definition of all icons:

artplayer/types/icons.d.ts

i18n ​

Manages the player's i18n.

  • The get method is used to retrieve an i18n value.
  • The update method is used to update the i18n object.
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -80,14 +80,14 @@
     'zh-cn': {
         Play: 'Your Play'
     }
-});

WARNING

Using art.i18n.update can only update the i18n after instantiation. If you want to update the i18n before instantiation, please use the i18n option in the basic options.

notice ​

Manages the player's notifications. It only has a show property for displaying notifications.

▶ Run Code
js
var art = new Artplayer({
+});

WARNING

Using art.i18n.update can only update the i18n after instantiation. If you want to update i18n before instantiation, please use the i18n option in the basic settings.

notice ​

Manages the player's notifications. It only has a show property for displaying notifications.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.notice.show = 'Video Ready To Play';
-})

WARNING

If you want to hide the notice immediately: art.notice.show = '';

layers ​

Manages the player's layers.

  • The add method is used to dynamically add a layer.
  • The remove method is used to dynamically remove a layer.
  • The update method is used to dynamically update a layer.
  • The show property is used to set whether all layers are visible.
  • The toggle method is used to toggle the visibility of all layers.
▶ Run Code
js
var art = new Artplayer({
+})

WARNING

If you want to hide the notice immediately: art.notice.show = '';

layers ​

Manages the player's layers.

  • The add method is used to dynamically add a layer.
  • The remove method is used to dynamically remove a layer.
  • The update method is used to dynamically update a layer.
  • The show property is used to set whether all layers are displayed.
  • The toggle method is used to toggle the display of all layers.
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -100,7 +100,7 @@
 	setTimeout(() => {
 		art.layers.show = false;
 	}, 1000);
-});

Refer to the following address for Component Configuration:

/component/layers.html

controls ​

Manages the player's controls.

  • The add method is used to dynamically add a control.

  • The remove method is used to dynamically remove a control.

  • The update method is used to dynamically update controls

  • The show property is used to set whether to display all controls

  • The toggle method is used to toggle the display of all controls

▶ Run Code
js
var art = new Artplayer({
+});

For Component Configuration, please refer to:

/component/layers.html

controls ​

Manages the player's controls.

  • The add method is used to dynamically add a control.

  • The remove method is used to dynamically remove a control.

  • The update method is used to dynamically update controls

  • The show property is used to set whether to display all controls

  • The toggle method is used to toggle the display of all controls

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -198,7 +198,7 @@
 	setTimeout(() => {
 		art.setting.show = false;
 	}, 1000);
-});

For the Settings Panel, please refer to:

/component/setting.html

plugins ​

Manages the player's plugin functionality, with only the add method for dynamically adding plugins

▶ Run Code
js
var art = new Artplayer({
+});

For Settings Panel, please refer to

/component/setting.html

plugins ​

Manages the player's plugin functionality, with only one method add for dynamically adding plugins

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -216,8 +216,8 @@
 
 art.on('ready', () => {
     art.plugins.add(myPlugin);
-});
- +}); + \ No newline at end of file diff --git a/docs/document/en/advanced/class.html b/docs/document/en/advanced/class.html index 658daf023..8d1b363e0 100644 --- a/docs/document/en/advanced/class.html +++ b/docs/document/en/advanced/class.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,15 +23,15 @@ -
Skip to content

Static Properties ​

Here, Static Properties refer to the top-level properties mounted on the constructor function, which are very rarely used.

instances ​

Returns an array of all player instances. This property can be useful when you need to manage multiple player instances simultaneously.

▶ Run Code
js
console.info([...Artplayer.instances]);
+    
Skip to content

Static Properties ​

Here, static properties refer to the first-level properties attached to the constructor, which are rarely used.

instances ​

Returns an array of all player instances. This property can be useful when you need to manage multiple players simultaneously.

▶ Run Code
js
console.info([...Artplayer.instances]);
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

▶ Run Code
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

▶ Run Code
js
console.info(Artplayer.env);

build ​

Returns the build time of the player.

▶ Run Code
js
console.info(Artplayer.build);

config ​

Returns the default configuration for videos.

▶ Run Code
js
console.info(Artplayer.config);

utils ​

Returns the collection of utility functions for the player.

▶ Run Code
js
console.info(Artplayer.utils);

For all utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation schema for player options.

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor function for the event emitter.

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options.

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

Returns the utility function for type detection.

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required by the player.

▶ Run Code
js
console.info(Artplayer.html);

option ​

Returns the default options for the player.

▶ Run Code
js
console.info(Artplayer.option);
- +console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

▶ Run Code
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

▶ Run Code
js
console.info(Artplayer.env);

build ​

Returns the build timestamp of the player.

▶ Run Code
js
console.info(Artplayer.build);

config ​

Returns the default configuration for videos.

▶ Run Code
js
console.info(Artplayer.config);

utils ​

Returns the collection of utility functions for the player.

▶ Run Code
js
console.info(Artplayer.utils);

For all utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation schema for player options.

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor of the event emitter.

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options.

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

Returns the type detection utility function.

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required by the player.

▶ Run Code
js
console.info(Artplayer.html);

option ​

Returns the default options of the player.

▶ Run Code
js
console.info(Artplayer.option);
+ \ No newline at end of file diff --git a/docs/document/en/advanced/event.html b/docs/document/en/advanced/event.html index d362f7ba9..ddcb65626 100644 --- a/docs/document/en/advanced/event.html +++ b/docs/document/en/advanced/event.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,26 +23,26 @@ -
Skip to content

Instance Events ​

Player events are divided into two types: native events (prefixed with video:) and custom events.

Listen to an event:

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Instance Events ​

Player events are divided into two types: native events of the video (prefixed with video:), and custom events.

Listening to events:

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:canplay', () => {
     console.info('video:canplay');
-});

Listen to an event only once:

▶ Run Code
js
var art = new Artplayer({
+});

Listening to an event only once:

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.once('video:canplay', () => {
     console.info('video:canplay');
-});

Manually trigger an event:

▶ Run Code
js
var art = new Artplayer({
+});

Manually triggering an event:

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.emit('focus');

Remove an event listener:

▶ Run Code
js
var art = new Artplayer({
+art.emit('focus');

Removing an event:

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -52,14 +52,14 @@
     art.off('ready', onReady);
 }
 
-art.on('ready', onReady);

For a complete list of events, please refer to:

artplayer/types/events.d.ts

ready ​

Triggered when the player is ready for the first time

▶ Run Code
js
var art = new Artplayer({
+art.on('ready', onReady);

For a complete list of events, please refer to:

artplayer/types/events.d.ts

ready ​

Triggered when the player is ready for the first time.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info('ready');
-});

restart ​

Triggered when the player switches URL and becomes playable

▶ Run Code
js
var art = new Artplayer({
+});

restart ​

Triggered when the player switches URLs and becomes ready to play.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -70,28 +70,28 @@
 
 art.on('restart', (url) => {
     console.info('restart', url);
-});

pause ​

Triggered when the player is paused

▶ Run Code
js
var art = new Artplayer({
+});

pause ​

Triggered when the player is paused.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('pause', () => {
     console.info('pause');
-});

play ​

Triggered when the player starts playing

▶ Run Code
js
var art = new Artplayer({
+});

play ​

Triggered when the player starts playing.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('play', () => {
     console.info('play');
-});

hotkey ​

Triggered when a hotkey is pressed on the player

▶ Run Code
js
var art = new Artplayer({
+});

hotkey ​

Triggered when a player hotkey is pressed.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hotkey', (event) => {
     console.info('hotkey', event);
-});

destroy ​

Triggered when the player is destroyed

▶ Run Code
js
var art = new Artplayer({
+});

destroy ​

Triggered when the player is destroyed.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -102,70 +102,70 @@
 
 art.on('destroy', () => {
     console.info('destroy');
-});

focus ​

Triggered when the player gains focus

▶ Run Code
js
var art = new Artplayer({
+});

focus ​

Triggered when the player gains focus.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('focus', (event) => {
     console.info('focus', event);
-});

blur ​

Triggered when the player loses focus

▶ Run Code
js
var art = new Artplayer({
+});

blur ​

Triggered when the player loses focus.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('blur', (event) => {
     console.info('blur', event);
-});

dblclick ​

Triggered when the player is double-clicked

▶ Run Code
js
var art = new Artplayer({
+});

dblclick ​

Triggered when the player is double-clicked.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('dblclick', (event) => {
     console.info('dblclick', event);
-});

click ​

Triggered when the player is clicked

▶ Run Code
js
var art = new Artplayer({
+});

click ​

Triggered when the player is clicked.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('click', (event) => {
     console.info('click', event);
-});

error ​

Triggered when an error occurs while loading the video

▶ Run Code
js
var art = new Artplayer({
+});

error ​

Triggered when an error occurs while the player is loading a video.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
 });
 
 art.on('error', (error, reconnectTime) => {
     console.info(error, reconnectTime);
-});

hover ​

Triggered when the mouse enters or leaves the player

▶ Run Code
js
var art = new Artplayer({
+});

hover ​

Triggered when the mouse enters or leaves the player.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hover', (state, event) => {
     console.info('hover', state, event);
-});

mousemove ​

Triggered when the mouse moves over the player

▶ Run Code
js
var art = new Artplayer({
+});

mousemove ​

Triggered when the mouse moves over the player.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mousemove', (event) => {
     console.info('mousemove', event);
-});

resize ​

Triggered when the player's dimensions change

▶ Run Code
js
var art = new Artplayer({
+});

resize ​

Triggered when the player's dimensions change.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('resize', () => {
     console.info('resize');
-});

view ​

Triggered when the player enters or leaves the viewport

▶ Run Code
js
var art = new Artplayer({
+});

view ​

Triggered when the player enters the viewport.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('view', (state) => {
     console.info('view', state);
-});

lock ​

Triggered when the lock state changes on mobile devices

▶ Run Code
js
var art = new Artplayer({
+});

lock ​

Triggered when the lock state changes on mobile devices.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
@@ -173,7 +173,7 @@
 
 art.on('lock', (state) => {
     console.info('lock', state);
-});

aspectRatio ​

Triggered when the player's aspect ratio changes

▶ Run Code
js
var art = new Artplayer({
+});

aspectRatio ​

Triggered when the player's aspect ratio changes.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
@@ -182,7 +182,7 @@
 
 art.on('aspectRatio', (aspectRatio) => {
     console.info('aspectRatio', aspectRatio);
-});

autoHeight ​

Triggered when the player automatically adjusts its height

▶ Run Code
js
var art = new Artplayer({
+});

autoHeight ​

Triggered when the player's height is automatically set.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -193,7 +193,7 @@
 
 art.on('autoHeight', (height) => {
     console.info('autoHeight', height);
-});

autoSize ​

Triggered when the player automatically adjusts its size

▶ Run Code
js
var art = new Artplayer({
+});

autoSize ​

Triggered when the player's size is automatically set.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -201,7 +201,7 @@
 
 art.on('autoSize', () => {
     console.info('autoSize');
-});

flip ​

Triggered when the player is flipped

▶ Run Code
js
var art = new Artplayer({
+});

flip ​

Triggered when the player is flipped.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
@@ -210,7 +210,7 @@
 
 art.on('flip', (flip) => {
     console.info('flip', flip);
-});

fullscreen ​

Triggered when the player enters or exits window fullscreen mode

▶ Run Code
js
var art = new Artplayer({
+});

fullscreen ​

Triggered when the player enters or exits windowed fullscreen mode.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -218,7 +218,7 @@
 
 art.on('fullscreen', (state) => {
     console.info('fullscreen', state);
-});

fullscreenError ​

Triggered when a window fullscreen error occurs

▶ Run Code
js
var art = new Artplayer({
+});

fullscreenError ​

Triggered when a windowed fullscreen error occurs.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -229,7 +229,7 @@
 
 art.on('fullscreenError', (event) => {
     console.info('fullscreenError', event);
-});

fullscreenWeb ​

Triggered when the player enters or exits web fullscreen mode

▶ Run Code
js
var art = new Artplayer({
+});

fullscreenWeb ​

Triggered when the player enters or exits web fullscreen mode.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -237,7 +237,7 @@
 
 art.on('fullscreenWeb', (state) => {
     console.info('fullscreenWeb', state);
-});

mini ​

Triggered when the player enters or exits mini mode

▶ Run Code
js
var art = new Artplayer({
+});

mini ​

Triggered when the player enters or exits mini mode.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -248,7 +248,7 @@
 
 art.on('mini', (state) => {
     console.info('mini', state);
-});

pip ​

Triggered when the player enters or exits picture-in-picture mode

▶ Run Code
js
var art = new Artplayer({
+});

pip ​

Triggered when the player enters or exits Picture-in-Picture mode.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
@@ -256,7 +256,7 @@
 
 art.on('pip', (state) => {
     console.info('pip', state);
-});

screenshot ​

Triggered when the player captures a screenshot

▶ Run Code
js
var art = new Artplayer({
+});

screenshot ​

Triggered when the player takes a screenshot.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
@@ -264,14 +264,14 @@
 
 art.on('screenshot', (dataUri) => {
     console.info('screenshot', dataUri);
-});

seek ​

Triggered when the player performs a time seek

▶ Run Code
js
var art = new Artplayer({
+});

seek ​

Triggered when the player performs a time seek.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('seek', (currentTime) => {
     console.info('seek', currentTime);
-});

subtitleOffset ​

Triggered when subtitle offset changes in the player

▶ Run Code
js
var art = new Artplayer({
+});

subtitleOffset ​

Triggered when the subtitle offset changes in the player.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -283,7 +283,7 @@
 
 art.on('subtitleOffset', (offset) => {
     console.info('subtitleOffset', offset);
-});

subtitleBeforeUpdate ​

Triggered before subtitles are updated

▶ Run Code
js
var art = new Artplayer({
+});

subtitleBeforeUpdate ​

Triggered before subtitles are updated.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -293,7 +293,7 @@
 
 art.on('subtitleBeforeUpdate', (cues) => {
     console.info('subtitleBeforeUpdate', cues);
-});

subtitleAfterUpdate ​

Triggered after subtitles are updated

▶ Run Code
js
var art = new Artplayer({
+});

subtitleAfterUpdate ​

Triggered after subtitles are updated.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -303,7 +303,7 @@
 
 art.on('subtitleAfterUpdate', (cues) => {
     console.info('subtitleAfterUpdate', cues);
-});

subtitleLoad ​

Triggered when subtitles are loaded

▶ Run Code
js
var art = new Artplayer({
+});

subtitleLoad ​

Triggered when subtitles are loaded.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -313,56 +313,56 @@
 
 art.on('subtitleLoad', (option, cues) => {
     console.info('subtitleLoad', cues, option);
-});

info ​

Triggered when the info panel is shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

info ​

Triggered when the info panel is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('info', (state) => {
     console.log(state);
-});

layer ​

Triggered when custom layers are shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

layer ​

Triggered when a custom layer is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('layer', (state) => {
     console.log(state);
-});

loading ​

Triggered when the loader is shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

loading ​

Triggered when the loader is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('loading', (state) => {
     console.log(state);
-});

mask ​

Triggered when the mask layer is shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

mask ​

Triggered when the mask layer is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mask', (state) => {
     console.log(state);
-});

subtitle ​

Triggered when the subtitle layer is shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

subtitle ​

Triggered when the subtitle layer is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('subtitle', (state) => {
     console.log(state);
-});

contextmenu ​

Triggered when the context menu is shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

contextmenu ​

Triggered when the context menu is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('contextmenu', (state) => {
     console.log(state);
-});

control ​

Triggered when the controls are shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

control ​

Triggered when the control bar is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('control', (state) => {
     console.log(state);
-});

setting ​

Triggered when the settings panel is shown or hidden

▶ Run Code
js
var art = new Artplayer({
+});

setting ​

Triggered when the settings panel is shown or hidden.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -370,22 +370,22 @@
 
 art.on('setting', (state) => {
     console.log(state);
-});

muted ​

Triggered when the mute state changes

▶ Run Code
js
var art = new Artplayer({
+});

muted ​

Triggered when the muted state changes.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('muted', (state) => {
     console.log(state);
-});

keydown ​

Listens for keydown events from the document

▶ Run Code
js
var art = new Artplayer({
+});

keydown ​

Listens for the keydown event from the document.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('keydown', (event) => {
     console.log(event.code);
-});

video:canplay ​

The browser can start playing the media, but estimates there isn't enough data to play through to the end without having to stop for further buffering

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping to buffer content

video:complete ​

OfflineAudioContext rendering is complete

video:durationchange ​

Triggered when the value of the duration property changes

video:emptied ​

The media has become empty; for example, this event is sent when the media has already been loaded (or partially loaded), and the load() method is called to reload it

video:ended ​

Playback has stopped because the media has reached its end point

video:error ​

An error occurred while fetching media data, or the resource type is not a supported media format

video:loadeddata ​

The first frame of the media has finished loading

video:loadedmetadata ​

Metadata has been loaded

video:pause ​

Playback has been paused

video:play ​

Playback has begun

video:playing ​

Playback is ready to start after having been paused or delayed due to lack of data

video:progress ​

Periodically triggered while the browser is loading the resource

video:ratechange ​

The playback rate has changed

video:seeked ​

A seek operation has completed

video:seeking ​

A seek operation has begun

video:stalled ​

The user agent is trying to fetch media data, but data is unexpectedly not forthcoming

video:suspend ​

Media data loading has been suspended

video:timeupdate ​

The time indicated by the currentTime attribute has been updated

video:volumechange ​

The volume has changed

video:waiting ​

Playback has stopped due to temporary lack of data

- +});

video:canplay ​

The browser can start playing the media, but estimates there is not enough data to play through to the end without stopping for further buffering.

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping for buffering.

video:complete ​

The OfflineAudioContext rendering is complete.

video:durationchange ​

Triggered when the value of the duration property changes.

video:emptied ​

The media has become empty; for example, this event is sent when the media has already been loaded (or partially loaded), and the load() method is called to reload it.

video:ended ​

Playback has stopped because the media has reached its end.

video:error ​

An error occurred while fetching the media data, or the resource type is not a supported media format.

video:loadeddata ​

The first frame of the media has finished loading.

video:loadedmetadata ​

Metadata has been loaded.

video:pause ​

Playback has been paused.

video:play ​

Playback has begun.

video:playing ​

Playback is ready to start after having been paused or delayed due to lack of data.

video:progress ​

Fired periodically as the browser loads the resource.

video:ratechange ​

The playback rate has changed.

video:seeked ​

A seek operation has completed.

video:seeking ​

A seek operation has begun.

video:stalled ​

The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.

video:suspend ​

Media data loading has been suspended.

video:timeupdate ​

The time indicated by the currentTime property has changed.

video:volumechange ​

The volume has changed.

video:waiting ​

Playback has stopped because of a temporary lack of data.

+ \ No newline at end of file diff --git a/docs/document/en/advanced/global.html b/docs/document/en/advanced/global.html index 1b1fb124d..8ddeb8df0 100644 --- a/docs/document/en/advanced/global.html +++ b/docs/document/en/advanced/global.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

Global Properties ​

These global properties refer to the top-level properties mounted on the constructor. The property names are all in uppercase. They are subject to change in the future and are generally not used.

DEBUG ​

Whether to enable debug mode, which can print all built-in events of the video. Default is off.

▶ Run Code
js
Artplayer.DEBUG = true;
+    
Skip to content

Global Properties ​

The global properties here refer to the top-level properties mounted on the constructor. All property names are in uppercase. These are subject to change in the future and are rarely used.

DEBUG ​

Whether to enable debug mode, which can print all built-in video events. Default is off.

▶ Run Code
js
Artplayer.DEBUG = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -33,7 +33,7 @@
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

NOTICE_TIME ​

The display duration for notification messages, in milliseconds. Default is 2000.

▶ Run Code
js
Artplayer.NOTICE_TIME = 5000;
+});

NOTICE_TIME ​

The display duration of notification messages, in milliseconds. Default is 2000.

▶ Run Code
js
Artplayer.NOTICE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -48,7 +48,7 @@
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_WIDTH ​

The default width of settings items in the settings panel, in pixels. Default is 200.

▶ Run Code
js
Artplayer.SETTING_ITEM_WIDTH = 300;
+});

SETTING_ITEM_WIDTH ​

The default width of a setting item in the settings panel, in pixels. Default is 200.

▶ Run Code
js
Artplayer.SETTING_ITEM_WIDTH = 300;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -58,7 +58,7 @@
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_HEIGHT ​

The default height of settings items in the settings panel, in pixels. Default is 35.

▶ Run Code
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
+});

SETTING_ITEM_HEIGHT ​

The default height of a setting item in the settings panel, in pixels. Default is 35.

▶ Run Code
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -123,12 +123,12 @@
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
-});

CONTROL_HIDE_TIME ​

The delay time in milliseconds for auto-hiding the bottom control bar. Default is 3000.

▶ Run Code
js
Artplayer.CONTROL_HIDE_TIME = 5000;
+});

CONTROL_HIDE_TIME ​

The auto-hide delay time for the bottom control bar, in milliseconds. Default is 3000.

▶ Run Code
js
Artplayer.CONTROL_HIDE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

DBCLICK_TIME ​

The delay time in milliseconds for double-click events. Default is 300.

▶ Run Code
js
Artplayer.DBCLICK_TIME = 500;
+});

DBCLICK_TIME ​

The delay time for the double-click event, in milliseconds. Default is 300.

▶ Run Code
js
Artplayer.DBCLICK_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -137,57 +137,57 @@
 
 art.on('dblclick', () => {
     console.log('dblclick');
-});

DBCLICK_FULLSCREEN ​

On desktop, whether double-click toggles fullscreen mode. Default is true.

▶ Run Code
js
Artplayer.DBCLICK_FULLSCREEN = false;
+});

DBCLICK_FULLSCREEN ​

On desktop, whether double-click toggles fullscreen. Default is true.

▶ Run Code
js
Artplayer.DBCLICK_FULLSCREEN = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_DBCLICK_PLAY ​

On mobile devices, whether double-click toggles play/pause. Default is true.

▶ Run Code
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
+});

MOBILE_DBCLICK_PLAY ​

On mobile, whether double-click toggles play/pause. Default is true.

▶ Run Code
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_CLICK_PLAY ​

On mobile devices, whether single-click toggles play/pause. Default is false.

▶ Run Code
js
Artplayer.MOBILE_CLICK_PLAY = true;
+});

MOBILE_CLICK_PLAY ​

On mobile, whether single-click toggles play/pause. Default is false.

▶ Run Code
js
Artplayer.MOBILE_CLICK_PLAY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

AUTO_ORIENTATION_TIME ​

On mobile devices, the delay time in milliseconds for automatic screen rotation. Default is 200.

▶ Run Code
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
+});

AUTO_ORIENTATION_TIME ​

On mobile, the delay time for auto-rotation, in milliseconds. Default is 200.

▶ Run Code
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
-});

INFO_LOOP_TIME ​

The refresh interval in milliseconds for the information panel. Default is 1000.

▶ Run Code
js
Artplayer.INFO_LOOP_TIME = 2000;
+});

INFO_LOOP_TIME ​

The refresh interval for the info panel, in milliseconds. Default is 1000.

▶ Run Code
js
Artplayer.INFO_LOOP_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.info.show = true;

FAST_FORWARD_VALUE ​

On mobile devices, the speed multiplier for fast-forward during long-press. Default is 3.

▶ Run Code
js
Artplayer.FAST_FORWARD_VALUE = 5;
+art.info.show = true;

FAST_FORWARD_VALUE ​

On mobile, the speed multiplier for long-press fast-forward. Default is 3.

▶ Run Code
js
Artplayer.FAST_FORWARD_VALUE = 5;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

FAST_FORWARD_TIME ​

On mobile devices, the delay time in milliseconds for activating fast-forward during long-press. Default is 1000.

▶ Run Code
js
Artplayer.FAST_FORWARD_TIME = 2000;
+});

FAST_FORWARD_TIME ​

On mobile, the delay time for long-press fast-forward, in milliseconds. Default is 1000.

▶ Run Code
js
Artplayer.FAST_FORWARD_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

TOUCH_MOVE_RATIO ​

On mobile devices, the speed multiplier for seeking when swiping left/right. Default is 0.5.

▶ Run Code
js
Artplayer.TOUCH_MOVE_RATIO = 1;
+});

TOUCH_MOVE_RATIO ​

On mobile, the speed multiplier for left/right swipe to seek. Default is 0.5.

▶ Run Code
js
Artplayer.TOUCH_MOVE_RATIO = 1;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

VOLUME_STEP ​

The volume adjustment step for keyboard shortcuts. Default is 0.1.

▶ Run Code
js
Artplayer.VOLUME_STEP = 0.2;
+});

VOLUME_STEP ​

The step size for volume adjustment via keyboard shortcuts. Default is 0.1.

▶ Run Code
js
Artplayer.VOLUME_STEP = 0.2;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

SEEK_STEP ​

The seeking step in seconds for keyboard shortcuts. Default is 5.

▶ Run Code
js
Artplayer.SEEK_STEP = 10;
+});

SEEK_STEP ​

The step size for seeking via keyboard shortcuts, in seconds. Default is 5.

▶ Run Code
js
Artplayer.SEEK_STEP = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -212,7 +212,7 @@
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FLIP ​

The built-in list of video flip modes. Default is ['normal', 'horizontal', 'vertical'].

▶ Run Code
js
Artplayer.FLIP = ['normal', 'horizontal'];
+art.setting.show = true;

FLIP ​

The built-in list of video flip options. Default is ['normal', 'horizontal', 'vertical'].

▶ Run Code
js
Artplayer.FLIP = ['normal', 'horizontal'];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -222,33 +222,33 @@
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

Determines whether to mount the player under the body element during web fullscreen mode. Defaults to true.

▶ Run Code
js
Artplayer.FULLSCREEN_WEB_IN_BODY = false;
+art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

Whether to mount the player under the body element during web fullscreen mode. Default is true.

▶ Run Code
js
Artplayer.FULLSCREEN_WEB_IN_BODY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

LOG_VERSION ​

Sets whether to print the player version. Defaults to true.

▶ Run Code
js
Artplayer.LOG_VERSION = false;
+});

LOG_VERSION ​

Sets whether to print the player version. Default is true.

▶ Run Code
js
Artplayer.LOG_VERSION = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

USE_RAF ​

Sets whether to use requestAnimationFrame. Defaults to false. Currently mainly used for smooth progress bar effects.

▶ Run Code
js
Artplayer.USE_RAF = true;
+});

USE_RAF ​

Sets whether to use requestAnimationFrame. Default is false. Currently, it is primarily used for smooth progress bar effects.

▶ Run Code
js
Artplayer.USE_RAF = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});

REMOVE_SRC_WHEN_DESTROY ​

Determines whether to remove the video's src attribute and call load() to actively release media resources when destroying the player. Defaults to true.

When enabled, this can reduce video resource usage in single-page applications or scenarios where players are frequently created/destroyed. If you wish to preserve the video element's state and only remove the UI, set this to false.

▶ Run Code
js
Artplayer.REMOVE_SRC_WHEN_DESTROY = false;
+});

REMOVE_SRC_WHEN_DESTROY ​

Whether to remove the video's src attribute and call load() to actively release media resources when destroying the player. Default is true.

Enabling this can reduce video resource usage in single-page applications or scenarios where players are frequently created/destroyed. If you wish to preserve the state of the video element and only remove the UI, you can set this to false.

▶ Run Code
js
Artplayer.REMOVE_SRC_WHEN_DESTROY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-// Only destroys the UI, does not actively clear src
-art.destroy();
- +// Only destroy the UI, do not actively clear the src +art.destroy();
+ \ No newline at end of file diff --git a/docs/document/en/advanced/plugin.html b/docs/document/en/advanced/plugin.html index b4defc3e0..9d0729301 100644 --- a/docs/document/en/advanced/plugin.html +++ b/docs/document/en/advanced/plugin.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

Writing Plugins ​

Once you are familiar with the player's properties, methods, and events, writing plugins becomes very straightforward.

You can load plugin functions during instantiation:

▶ Run Code
js
function myPlugin(art) {
+    
Skip to content

Writing Plugins ​

Once you are familiar with the player's properties, methods, and events, writing a plugin becomes a very straightforward task.

You can load a plugin function during instantiation.

▶ Run Code
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -42,7 +42,7 @@
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

You can also load plugin functions after instantiation:

▶ Run Code
js
function myPlugin(art) {
+});

You can also load a plugin function after instantiation.

▶ Run Code
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -62,7 +62,7 @@
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

For example, let's say I want to write a plugin that displays an image ad when the video is paused:

▶ Run Code
js
function adsPlugin(option) {
+});

For example, let's say I want to write a plugin that displays an image ad when the video is paused.

▶ Run Code
js
function adsPlugin(option) {
     return (art) => {
         art.layers.add({
             name: 'ads',
@@ -121,8 +121,8 @@
             url: '/assets/sample/layer.png'
         })
     ],
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/advanced/property.html b/docs/document/en/advanced/property.html index cebb44d72..b9c70243e 100644 --- a/docs/document/en/advanced/property.html +++ b/docs/document/en/advanced/property.html @@ -9,11 +9,11 @@ - + - + - + @@ -43,7 +43,7 @@ setTimeout(() => { art.pause(); }, 3000); -});

toggle ​

  • Type: Function

Toggle video playback and pause.

▶ Run Code
js
var art = new Artplayer({
+});

toggle ​

  • Type: Function

Toggle video play and pause.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -55,7 +55,7 @@
     setTimeout(() => {
         art.toggle();
     }, 3000);
-});

destroy ​

  • Type: Function
  • Parameter: Boolean

Destroy the player. Accepts a parameter indicating whether to remove the player's html after destruction. Defaults to true.

▶ Run Code
js
var art = new Artplayer({
+});

destroy ​

  • Type: Function
  • Parameter: Boolean

Destroy the player. Accepts a parameter indicating whether to also remove the player's html after destruction. Defaults to true.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -77,7 +77,7 @@
 
 art.on('ready', () => {
     art.seek = 5;
-});

forward ​

  • Type: Setter
  • Parameter: Number

Fast forward the video time, in seconds.

▶ Run Code
js
var art = new Artplayer({
+});

forward ​

  • Type: Setter
  • Parameter: Number

Fast-forward the video time, in seconds.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -141,7 +141,7 @@
     setTimeout(() => {
         art.switchQuality('/assets/sample/video.mp4?t=0');
     }, 3000);
-});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets whether the video is muted.

▶ Run Code
js
var art = new Artplayer({
+});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets whether the video is muted.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -150,7 +150,7 @@
     console.info(art.muted);
     art.muted = true;
     console.info(art.muted);
-});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the current playback time of the video. Setting the time is similar to seek, but it does not trigger additional events.

▶ Run Code
js
var art = new Artplayer({
+});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

Sets or gets the current playback time of the video. Setting the time is similar to seek, but it does not trigger additional events.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -166,7 +166,7 @@
 
 art.on('ready', () => {
     console.info(art.duration);
-});

Note

Some videos may not have a duration, such as live streams or videos that have not been fully decoded. In these cases, the obtained duration will be 0.

screenshot ​

  • Type: Function

Downloads a screenshot of the current video frame. An optional parameter specifies the screenshot filename.

▶ Run Code
js
var art = new Artplayer({
+});

Note

Some videos may not have a duration, such as live streams or videos that have not been fully decoded. In such cases, the obtained duration will be 0.

screenshot ​

  • Type: Function

Downloads a screenshot of the current video frame. An optional parameter specifies the screenshot filename.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -189,7 +189,7 @@
 art.on('ready', async () => {
     const url = await art.getBlobUrl();
     console.info(url);
-});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets the player's window fullscreen state.

▶ Run Code
js
var art = new Artplayer({
+});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets the player's window fullscreen state.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -201,7 +201,7 @@
             },
         },
     ],
-});

Note

Due to browser security mechanisms, the page must have prior user interaction (e.g., the user has clicked on the page) before triggering window fullscreen.

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets the player's web page fullscreen state.

▶ Run Code
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, a user interaction (e.g., a click on the page) must occur before triggering window fullscreen.

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets the player's web page fullscreen state.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -213,7 +213,7 @@
     setTimeout(() => {
         art.fullscreenWeb = false;
     }, 3000);
-});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets and gets the player's Picture-in-Picture mode.

▶ Run Code
js
var art = new Artplayer({
+});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

Sets or gets the player's Picture-in-Picture (PIP) mode.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -225,7 +225,7 @@
             },
         },
     ],
-});

Note

Due to browser security mechanisms, the page must have prior user interaction (e.g., the user has clicked on the page) before triggering Picture-in-Picture.

poster ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the video poster. The poster effect is only visible before video playback starts.

▶ Run Code
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, a user interaction (e.g., a click on the page) must occur before triggering Picture-in-Picture.

poster ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the video poster. The poster effect is only visible before the video starts playing.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     poster: '/assets/sample/poster.jpg',
@@ -250,13 +250,13 @@
 
 art.on('ready', () => {
     console.info(art.playing);
-});

state ​

  • Type: Setter/Getter
  • Parameter: String

Gets or sets the player's current state. Supported values: standard (normal), mini (mini window), pip (picture-in-picture), fullscreen (fullscreen window), fullscreenWeb (webpage fullscreen).

▶ Run Code
js
var art = new Artplayer({
+});

state ​

  • Type: Setter/Getter
  • Parameter: String

Gets or sets the player's current state. Supported values: standard (normal), mini (mini window), pip (picture-in-picture), fullscreen (window fullscreen), fullscreenWeb (webpage fullscreen).

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
-    console.info(art.state); // Default: standard
+    console.info(art.state); // Default is 'standard'
     art.state = 'mini';
 });

autoSize ​

  • Type: Function

Sets whether the video adapts its size automatically.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
@@ -272,14 +272,14 @@
 
 art.on('ready', () => {
     console.info(JSON.stringify(art.rect));
-});

Note

The dimension and coordinate information is obtained via getBoundingClientRect.

bottom / top / left / right / x / y / width / height ​

  • Type: Getter

These properties provide shortcut access to rect:

  • bottom, top, left, right, x, y: Correspond to the fields of the same name in DOMRect
  • width, height: The player's current visible width and height
▶ Run Code
js
var art = new Artplayer({
+});

Note

The dimension and coordinate information is obtained via getBoundingClientRect.

bottom / top / left / right / x / y / width / height ​

  • Type: Getter

These properties provide quick access to rect:

  • bottom, top, left, right, x, y: Correspond to the fields of the same name in DOMRect.
  • width, height: The player's current visible width and height.
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info(art.width, art.height, art.left, art.top);
-});

flip ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the player flip state. Supported values: normal, horizontal, vertical.

▶ Run Code
js
var art = new Artplayer({
+});

flip ​

  • Type: Setter/Getter
  • Parameter: String

Sets and gets the player's flip state. Supported values: normal, horizontal, vertical.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -288,7 +288,7 @@
     console.info(art.flip);
     art.flip = 'horizontal';
     console.info(art.flip);
-});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the player's playback rate.

▶ Run Code
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the player's playback speed.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -306,7 +306,7 @@
     console.info(art.aspectRatio);
     art.aspectRatio = '16:9';
     console.info(art.aspectRatio);
-});

autoHeight ​

  • Type: Function

When the container only has a defined width, this property can automatically calculate and set the video height.

▶ Run Code
js
var art = new Artplayer({
+});

autoHeight ​

  • Type: Function

When the container only has a defined width, this property can automatically calculate and set the video's height.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -317,7 +317,7 @@
 
 art.on('resize', () => {
     art.autoHeight();
-});

Note

This property is useful when your container has only a defined width but an unknown height. It automatically calculates the video height, but you need to determine the appropriate timing to set this property.

attr ​

  • Type: Function
  • Parameter: String

Dynamically gets and sets attributes of the video element.

▶ Run Code
js
var art = new Artplayer({
+});

Note

This property is useful when your container has only a width but the exact height is unknown. It can automatically calculate the video height, but you need to determine the timing for setting this property.

attr ​

  • Type: Function
  • Parameter: String

Dynamically get and set attributes of the video element.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -326,7 +326,7 @@
     console.info(art.attr('playsInline'));
     art.attr('playsInline', true);
     console.info(art.attr('playsInline'));
-});

type ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically gets and sets the video type.

▶ Run Code
js
var art = new Artplayer({
+});

type ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the video type.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -335,7 +335,7 @@
     console.info(art.type);
     art.type = 'm3u8';
     console.info(art.type);
-});

theme ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically gets and sets the player's theme color.

▶ Run Code
js
var art = new Artplayer({
+});

theme ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the player's theme color.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -344,7 +344,7 @@
     console.info(art.theme);
     art.theme = '#000';
     console.info(art.theme);
-});

airplay ​

  • Type: Function

Initiates AirPlay.

▶ Run Code
js
var art = new Artplayer({
+});

airplay ​

  • Type: Function

Initiate AirPlay.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -356,28 +356,28 @@
             },
         },
     ],
-});

loaded ​

  • Type: Getter

The proportion of the video that has been buffered, ranging from [0, 1]. Often used with the video:timeupdate event.

▶ Run Code
js
var art = new Artplayer({
+});

loaded ​

  • Type: Getter

The proportion of video buffered, ranging from [0, 1]. Often used with the video:timeupdate event.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.loaded);
-});

loadedTime ​

  • Type: Getter

The amount of media that has been buffered, in seconds. Typically used alongside loaded to display detailed buffering progress.

▶ Run Code
js
var art = new Artplayer({
+});

loadedTime ​

  • Type: Getter

The buffered media duration in seconds. Typically used alongside loaded to display detailed buffering progress.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.loadedTime);
-});

played ​

  • Type: Getter

The proportion of the video that has been played, ranging from [0, 1]. Often used with the video:timeupdate event.

▶ Run Code
js
var art = new Artplayer({
+});

played ​

  • Type: Getter

The proportion of video played, ranging from [0, 1]. Often used with the video:timeupdate event.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.played);
-});

proxy ​

  • Type: Function

A proxy function for DOM events, essentially proxying addEventListener and removeEventListener. When using proxy to handle events, the event is automatically removed when the player is destroyed.

▶ Run Code
js
var container = document.querySelector('.artplayer-app');
+});

proxy ​

  • Type: Function

A proxy function for DOM events, essentially proxying addEventListener and removeEventListener. When using proxy to handle events, the event is automatically cleaned up when the player is destroyed.

▶ Run Code
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
 	container: container,
@@ -386,7 +386,7 @@
 
 art.proxy(container, 'click', event => {
 	console.info(event);
-});

Note

If you need DOM events to exist only for the duration of the player's lifecycle, it is strongly recommended to use this function to avoid memory leaks.

query ​

  • Type: Function

A DOM query function, similar to document.querySelector, but the search is scoped to the current player instance, preventing errors from duplicate class names.

▶ Run Code
js
var art = new Artplayer({
+});

Note

If you need certain DOM events to exist only for the player's lifecycle, it is strongly recommended to use this function to avoid memory leaks.

query ​

  • Type: Function

A DOM query function, similar to document.querySelector, but the search is scoped to the current player, preventing errors with duplicate class names.

▶ Run Code
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -396,7 +396,7 @@
 	url: '/assets/sample/video.mp4',
 });
 
-console.info(art.video);

cssVar ​

  • Type: Function

Dynamically gets or sets CSS variables.

▶ Run Code
js
var art = new Artplayer({
+console.info(art.video);

cssVar ​

  • Type: Function

Dynamically get or set CSS variables.

▶ Run Code
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -405,7 +405,7 @@
     console.log(art.cssVar('--art-theme'));
     art.cssVar('--art-theme', 'green');
     console.log(art.cssVar('--art-theme'));
-});

quality ​

  • Type: Setter
  • Parameter: Array

Dynamically sets the list of available quality levels.

▶ Run Code
js
var art = new Artplayer({
+});

quality ​

  • Type: Setter
  • Parameter: Array

Dynamically set the quality list.

▶ Run Code
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 	quality: [
@@ -435,7 +435,7 @@
 			},
 		];
 	}, 3000);
-})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

Dynamically set thumbnails

▶ Run Code
js
var art = new Artplayer({
+})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

Dynamically set thumbnails.

▶ Run Code
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -446,7 +446,7 @@
         number: 60,
         column: 10,
     };
-});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

Dynamically set subtitle offset

▶ Run Code
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

Dynamically set subtitle offset.

▶ Run Code
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
     subtitle: {
@@ -456,8 +456,8 @@
 
 art.on('ready', () => {
     art.subtitleOffset = 1;
-});
- +}); + \ No newline at end of file diff --git a/docs/document/en/component/contextmenu.html b/docs/document/en/component/contextmenu.html index bb25aa902..5787cb119 100644 --- a/docs/document/en/component/contextmenu.html +++ b/docs/document/en/component/contextmenu.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementComponent DOM element
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringComponent tooltip text

Creation ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementDOM element of the component
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringTooltip text for the component

Creation ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -58,7 +58,7 @@
 art.contextmenu.show = true;
 
 // Get the Element of contextmenu by name
-console.info(art.contextmenu['your-menu']);

Removal ​

▶ Run Code
js
var art = new Artplayer({
+console.info(art.contextmenu['your-menu']);

Deletion ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -105,8 +105,8 @@
             html: 'Your New Menu',
         })
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/controls.html b/docs/document/en/component/controls.html index 667b4fb4d..1866e2bcf 100644 --- a/docs/document/en/component/controls.html +++ b/docs/document/en/component/controls.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

Controls ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the control
nameStringUnique control name for CSS class identification
indexNumberControl index for display priority
htmlString, ElementControl's DOM element
styleObjectControl style object
clickFunctionControl click event handler
mountedFunctionTriggered after control is mounted
tooltipStringControl tooltip text
positionStringleft or right - controls display position
selectorArrayArray of selector list objects
onSelectFunctionFunction triggered when selector item is clicked

Creation ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Controls ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the control
nameStringUnique name of the control, used for class marking
indexNumberControl index, determines display priority
htmlString, ElementDOM element of the control
styleObjectStyle object for the control
clickFunctionClick event handler for the control
mountedFunctionTriggered after the control is mounted
tooltipStringTooltip text for the control
positionStringleft or right - controls which side the control appears on
selectorArrayArray of objects for selection list
onSelectFunctionFunction triggered when a selection list item is clicked

Creation ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -152,8 +152,8 @@
             ],
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/layers.html b/docs/document/en/component/layers.html index 8724a88e3..71134afe2 100644 --- a/docs/document/en/component/layers.html +++ b/docs/document/en/component/layers.html @@ -3,17 +3,17 @@ - Layer | Artplayer.js + Layers | Artplayer.js - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

Layer ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementComponent DOM element
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringComponent tooltip text

Creation ​

▶ Run Code
js
var img = '/assets/sample/layer.png';
+    
Skip to content

Layers ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique component name for CSS class
indexNumberComponent index for display priority
htmlString, ElementComponent DOM element
styleObjectComponent style object
clickFunctionComponent click event
mountedFunctionTriggered after component mount
tooltipStringComponent tooltip text

Creation ​

▶ Run Code
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -124,8 +124,8 @@
             },
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/setting.html b/docs/document/en/component/setting.html index 2249350f3..e98e3ab5a 100644 --- a/docs/document/en/component/setting.html +++ b/docs/document/en/component/setting.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,15 +23,15 @@ -
Skip to content

Settings Panel ​

Built-in ​

First, you need to open the settings panel. It comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Settings Panel ​

Built-in ​

First, you need to open the settings panel. It comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-	setting: true,
+    setting: true,
     flip: true,
     playbackRate: true,
     aspectRatio: true,
     subtitleOffset: true,
-});

Creating - Buttons ​

PropertyTypeDescription
htmlString, ElementElement DOM
iconString, ElementElement icon
onClickFunctionElement click event
widthNumberList width
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
+});

Create - Button ​

PropertyTypeDescription
htmlString, ElementThe DOM element
iconString, ElementThe icon element
onClickFunctionThe click event
widthNumberThe list width
tooltipStringThe tooltip text
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -40,13 +40,13 @@
             html: 'Button',
             icon: '<img width="22" height="22" src="/assets/img/state.svg">',
             tooltip: 'tooltip',
-			onClick(item, $dom, event) {
+            onClick(item, $dom, event) {
                 console.info(item, $dom, event);
-				return 'new tooltip'
-			}
+                return 'new tooltip';
+            },
         },
     ],
-});

Creating - Selection Lists ​

PropertyTypeDescription
htmlString, ElementElement DOM
iconString, ElementElement icon
selectorArrayElement list
onSelectFunctionElement click event
widthNumberList width
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
+});

Create - Selection List ​

PropertyTypeDescription
htmlString, ElementThe DOM element
iconString, ElementThe icon element
selectorArrayThe list of elements
onSelectFunctionThe click event
widthNumberThe list width
tooltipStringThe tooltip text
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -98,7 +98,7 @@
             },
         },
     ],
-});

Creating - Nested Lists ​

▶ Run Code
js
var art = new Artplayer({
+});

Create - Nested List ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -141,7 +141,7 @@
             ],
         },
     ],
-});

Create - Toggle Button ​

PropertyTypeDescription
htmlString, ElementDOM element of the item
iconString, ElementIcon of the item
switchBooleanDefault state of the button
onSwitchFunctionButton toggle event
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
+});

Create - Toggle Button ​

PropertyTypeDescription
htmlString, ElementDOM element for the item
iconString, ElementIcon for the item
switchBooleanDefault state of the button
onSwitchFunctionButton toggle event
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -160,7 +160,7 @@
             },
         },
     ],
-});

Create - Range Slider ​

PropertyTypeDescription
htmlString, ElementDOM element of the item
iconString, ElementIcon of the item
rangeArrayDefault state array
onRangeFunctionEvent triggered on completion
onChangeFunctionEvent triggered on change
tooltipStringTooltip text
js
const range = [5, 1, 10, 1];
+});

Create - Range Slider ​

PropertyTypeDescription
htmlString, ElementDOM element for the item
iconString, ElementIcon for the item
rangeArrayDefault state array
onRangeFunctionEvent triggered on completion
onChangeFunctionEvent triggered on change
tooltipStringTooltip text
js
const range = [5, 1, 10, 1];
 const value = range[0];
 const min = range[1];
 const max = range[2];
@@ -244,8 +244,8 @@
             switch: false,
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/index.html b/docs/document/en/index.html index b6e5ded35..24b90b6ad 100644 --- a/docs/document/en/index.html +++ b/docs/document/en/index.html @@ -3,17 +3,17 @@ - Installation & Usage | Artplayer.js + Installation and Usage | Artplayer.js - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

Installation & Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
+    
Skip to content

Installation and Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -44,7 +44,7 @@
           });
         </script>
     </body>
-</html>

Note

The player's dimensions depend on the size of its container container, so your container must have defined dimensions.

See more usage examples at the following link:

/example

Vue.js ​

vue
<template>
+</html>

Note

The player's dimensions depend on the dimensions of its container. Therefore, your container must have defined dimensions.

See more usage examples at the following link

/example

Vue.js ​

vue
<template>
   <div ref="$container" />
 </template>
 
@@ -76,7 +76,7 @@
   art.value.destroy(false)
 })
 </script>
vue
<template>
-  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
+  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
 </template>
 
 <script setup>
@@ -96,7 +96,7 @@
 function getInstance(art) {
   console.log(art)
 }
-</script>

Artplayer is not reactive:

Directly modifying option in Vue.js will not update the player.

React.js ​

jsx
import Artplayer from 'artplayer'
+</script>

Artplayer is not reactive:

Directly modifying the option in Vue.js will not update the player.

React.js ​

jsx
import Artplayer from 'artplayer'
 import { useEffect, useRef } from 'react'
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -136,13 +136,13 @@
   )
 }
 
-export default App

Artplayer is not reactive:

Directly modifying option in React.js will not update the player.

TypeScript ​

artplayer.d.ts is automatically imported when importing Artplayer.

Vue.js ​

vue
<script setup>
+export default App

Artplayer is not reactive:

Directly modifying the option in React.js will not update the player.

TypeScript ​

The artplayer.d.ts file is automatically imported when you import Artplayer.

Vue.js ​

vue
<script setup>
 import Artplayer from 'artplayer';
 const art = shallowRef<Artplayer>(null);
 art.value = new Artplayer();
 </script>

React.js ​

jsx
import Artplayer from 'artplayer';
 const art = useRef<Artplayer>(null);
-art.current = new Artplayer();

Option ​

You can also use the option type.

ts
import Artplayer, { type Option } from 'artplayer';
+art.current = new Artplayer();

Option ​

You can also use the type for the options.

ts
import Artplayer, { type Option } from 'artplayer';
 
 const option: Option = {
     container: '.artplayer-app',
@@ -151,7 +151,7 @@
 
 option.volume = 0.5;
 
-const art = new Artplayer(option);

Full TypeScript definitions

packages/artplayer/types

JavaScript ​

Sometimes your js files may lose TypeScript type hints. In such cases, you can manually import the types.

Variable:

js
/**
+const art = new Artplayer(option);

Full TypeScript Definitions

packages/artplayer/types

JavaScript ​

Sometimes your js files may lose TypeScript type hints. In such cases, you can manually import the types.

Variable:

js
/**
  * @type {import("artplayer")}
  */
 let art = null;

Parameter:

js
/**
@@ -179,7 +179,7 @@
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

Legacy Browsers ​

The production build artplayer.js only supports the latest major version of Chrome: last 1 Chrome version

For legacy browsers, you can use the artplayer.legacy.js file, which supports compatibility down to: IE 11

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, modify the following configuration and build it yourself:

Build configuration: scripts/build.js

Reference documentation: browserslist

ECMAScript Module ​

Starting from 5.2.6, artplayer and all plugins also provide an ESM version mjs, such as:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
+const art8 = new Artplayer(option);

Legacy Browsers ​

The production build artplayer.js only supports the latest major version of Chrome: last 1 Chrome version.

For legacy browsers, you can use the artplayer.legacy.js file, which is compatible down to: IE 11.

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, modify the following configuration and build it yourself:

Build configuration: scripts/build.js

Reference documentation: browserslist

ECMAScript Module ​

Starting from version 5.2.6, artplayer and all plugins also provide an ESM version in mjs format, such as:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
 <html lang="en">
 
 <head>
@@ -214,7 +214,7 @@
     </script>
 </body>
 
-</html>

Custom userAgent ​

Currently, the detection for whether a device is mobile is not entirely accurate. Sometimes you may want to adjust the player's UI by changing the userAgent. Therefore, starting from 5.2.4, a new global variable globalThis.CUSTOM_USER_AGENT has been added.

html
<html>
+</html>

Custom userAgent ​

Currently, the detection of whether a device is mobile is not always accurate. Sometimes you may want to adjust the player's UI by changing the userAgent. Therefore, starting from version 5.2.4, a global variable globalThis.CUSTOM_USER_AGENT has been added.

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -236,8 +236,8 @@
           });
         </script>
     </body>
-</html>

Note

You need to modify it before importing the Artplayer dependency for it to take effect.

- +</html>

Note

You need to modify it before importing the Artplayer dependency for it to take effect.

+ \ No newline at end of file diff --git a/docs/document/en/start/i18n.html b/docs/document/en/start/i18n.html index e9b1ef9e4..b3475e2a4 100644 --- a/docs/document/en/start/i18n.html +++ b/docs/document/en/start/i18n.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,11 +23,11 @@ -
Skip to content

Language Settings ​

DANGER

Due to the increasing number of bundled multilingual resources, starting from version 5.1.0, the core artplayer.js code will only include Simplified Chinese and English. Other languages are no longer bundled by default and must be imported manually as needed.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n implementation reference, see: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn. No manual import is required.

js
var art = new Artplayer({
+    
Skip to content

Language Settings ​

DANGER

Due to the increasing number of bundled multilingual resources, starting from version 5.1.0, the core artplayer.js code will no longer bundle any languages other than Simplified Chinese and English. You will need to manually import any other languages you require.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n syntax reference, see: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn. No manual import is required.

js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

Importing Languages ​

Language files before bundling are located at: artplayer/src/i18n/*.js. Contributions to add your language are welcome.

Language files after bundling are located at: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
+});

Importing Languages ​

Language files before bundling are located at: artplayer/src/i18n/*.js. Contributions for new languages are welcome.

Bundled language files are located at: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
 import zhTw from 'artplayer/i18n/zh-tw';
 
 var art = new Artplayer({
@@ -58,7 +58,7 @@
             Play: 'Your Play'
         },
     },
-});

Modifying Languages ​

js
import zhTw from 'artplayer/i18n/zh-tw';
+});

Modifying a Language ​

js
import zhTw from 'artplayer/i18n/zh-tw';
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -74,8 +74,8 @@
             Play: 'Your Play'
         },
     },
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/start/option.html b/docs/document/en/start/option.html index 699be562d..7783a858d 100644 --- a/docs/document/en/start/option.html +++ b/docs/document/en/start/option.html @@ -9,11 +9,11 @@ - + - + - + @@ -24,10 +24,10 @@
Skip to content

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player is mounted.

▶ Run Code
js
var art = new Artplayer({
-    container: '.artplayer-app', 
+    container: '.artplayer-app',
     // container: document.querySelector('.artplayer-app'),
     url: '/assets/sample/video.mp4',
-});

You may need to initialize the size of the container element, for example:

css
.artplayer-app {
+});

You may need to set the size of the container element, for example:

css
.artplayer-app {
     width: 400px;
     height: 300px;
 }

Or use aspect-ratio:

css
.artplayer-app {
@@ -35,17 +35,17 @@
 }

Note

Among all options, only container is required.

url ​

  • Type: String
  • Default: ''

The video source URL.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

Sometimes the url is not known immediately; in such cases, you can set the url asynchronously.

▶ Run Code
js
var art = new Artplayer({
+});

Sometimes the url is not known immediately. In such cases, you can set the url asynchronously.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
 });
 
 setTimeout(() => {
     art.url = '/assets/sample/video.mp4';
-}, 1000);

Note

By default, three video file formats are supported: .mp4, .ogg, .webm.

To play other formats like .m3u8 or .flv, please refer to the Third-party Libraries section on the left.

id ​

  • Type: String
  • Default: ''

The unique identifier for the player, currently only used for playback resumption autoplayback.

▶ Run Code
js
var art = new Artplayer({
+}, 1000);

Note

By default, three video file formats are supported: .mp4, .ogg, .webm.

To play other formats like .m3u8 or .flv, please refer to the Third-party Libraries section on the left.

id ​

  • Type: String
  • Default: ''

The unique identifier for the player. Currently used only for playback memory autoplayback.

▶ Run Code
js
var art = new Artplayer({
     id: 'your-url-id',
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

onReady ​

  • Type: Function
  • Default: undefined

The constructor accepts a function as the second parameter, which is triggered when the player is successfully initialized and the video is ready to play, similar to the ready event.

▶ Run Code
js
var art = new Artplayer(
+});

onReady ​

  • Type: Function
  • Default: undefined

The constructor accepts a function as the second parameter. This function is triggered when the player is successfully initialized and the video is ready to play, similar to the ready event.

▶ Run Code
js
var art = new Artplayer(
     {
         container: '.artplayer-app',
         url: '/assets/sample/video.mp4',
@@ -70,15 +70,15 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     theme: '#ffad00',
-});

volume ​

  • Type: Number
  • Default: 0.7

The default volume of the player.

▶ Run Code
js
var art = new Artplayer({
+});

volume ​

  • Type: Number
  • Default: 0.7

The player's default volume.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     volume: 0.5,
-});

Note

The player caches the last volume level; upon next initialization (e.g., page refresh), the player will read this cached value.

isLive ​

  • Type: Boolean
  • Default: false

Enable live streaming mode, which hides the progress bar and playback time.

▶ Run Code
js
var art = new Artplayer({
+});

Note

The player caches the last volume setting. Upon the next initialization (e.g., page refresh), the player will read this cached value.

isLive ​

  • Type: Boolean
  • Default: false

Enable live streaming mode. This will hide the progress bar and playback time.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     isLive: true,
-});

muted ​

  • Type: Boolean
  • Default: false

Whether to mute by default.

▶ Run Code
js
var art = new Artplayer({
+});

muted ​

  • Type: Boolean
  • Default: false

Whether to start muted by default.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -87,54 +87,54 @@
     url: '/assets/sample/video.mp4',
     autoplay: true,
     muted: true,
-});

Note

If you want the video to autoplay immediately upon page load, muted must be set to true. For more information, please read Autoplay Policy Changes.

autoSize ​

  • Type: Boolean
  • Default: false

By default, the player's dimensions fill the entire container size, often resulting in black bars. This option automatically adjusts the player size to hide the black bars, similar to object-fit: cover; in CSS.

▶ Run Code
js
var art = new Artplayer({
+});

Note

If you want the video to autoplay immediately upon page load, muted must be set to true. For more information, please read Autoplay Policy Changes.

autoSize ​

  • Type: Boolean
  • Default: false

By default, the player's dimensions fill the entire container, often resulting in black bars. This option automatically adjusts the player size to hide black bars, similar to css's object-fit: cover;.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
-});

autoMini ​

  • Type: Boolean
  • Default: false

Automatically enters mini player mode when the player scrolls out of the browser viewport.

▶ Run Code
js
var art = new Artplayer({
+});

autoMini ​

  • Type: Boolean
  • Default: false

Automatically enters Mini Player mode when the player scrolls out of the browser viewport.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoMini: true,
-});

loop ​

  • Type: Boolean
  • Default: false

Whether to enable video looping.

▶ Run Code
js
var art = new Artplayer({
+});

loop ​

  • Type: Boolean
  • Default: false

Whether to loop playback.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     loop: true,
-});

flip ​

  • Type: Boolean
  • Default: false

Whether to display the video flip functionality. Currently appears in the Settings Panel and Context Menu.

▶ Run Code
js
var art = new Artplayer({
+});

flip ​

  • Type: Boolean
  • Default: false

Whether to display the video flip function. Currently only appears in the Settings Panel and Context Menu.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
     setting: true,
-});

playbackRate ​

  • Type: Boolean
  • Default: false

Whether to display the video playback rate functionality. Appears in the Settings Panel and Context Menu.

▶ Run Code
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Boolean
  • Default: false

Whether to display the video playback speed function. It will appear in the Settings Panel and Context Menu.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     playbackRate: true,
     setting: true,
-});

aspectRatio ​

  • Type: Boolean
  • Default: false

Whether to display the video aspect ratio functionality. Appears in the Settings Panel and Context Menu.

▶ Run Code
js
var art = new Artplayer({
+});

aspectRatio ​

  • Type: Boolean
  • Default: false

Whether to display the video aspect ratio function. It will appear in the Settings Panel and Context Menu.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
     setting: true,
-});

screenshot ​

  • Type: Boolean
  • Default: false

Whether to display the Video Screenshot functionality in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
+});

screenshot ​

  • Type: Boolean
  • Default: false

Whether to display the Screenshot function in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
-});

Note

Due to browser security mechanisms, screenshot capture may fail if the video source URL is cross-origin with the website.

setting ​

  • Type: Boolean
  • Default: false

Whether to display the toggle button for the Settings Panel in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, screenshotting may fail if the video source URL is cross-origin with the website.

setting ​

  • Type: Boolean
  • Default: false

Whether to display the toggle button for the Settings Panel in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
-});

hotkey ​

  • Type: Boolean
  • Default: true

Whether to enable hotkeys.

▶ Run Code
js
var art = new Artplayer({
+});

hotkey ​

  • Type: Boolean
  • Default: true

Whether to use hotkeys.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     hotkey: true,
-});
HotkeyDescription
↑Increase volume
↓Decrease volume
←Seek forward
→Seek backward
spaceToggle play/pause

Note

These hotkeys only take effect after the player gains focus (e.g., by clicking on the player).

pip ​

  • Type: Boolean
  • Default: false

Whether to display the Picture-in-Picture toggle button in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
+});
HotkeyDescription
↑Increase volume
↓Decrease volume
←Seek forward
→Seek backward
spaceToggle play/pause

Note

These hotkeys only take effect after the player gains focus (e.g., after clicking on the player).

pip ​

  • Type: Boolean
  • Default: false

Whether to display the Picture-in-Picture toggle button in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
-});

mutex ​

  • Type: Boolean
  • Default: true

If multiple players exist simultaneously on the page, whether only one player is allowed to play at a time.

▶ Run Code
js
var art = new Artplayer({
+});

mutex ​

  • Type: Boolean
  • Default: true

If multiple players exist on the page simultaneously, whether only one player is allowed to play at a time.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     mutex: true,
-});

backdrop ​

  • Type: Boolean
  • Default: true

Whether to enable the backdrop blur effect for the player UI. When enabled, overlays such as the settings panel, context menu, and volume bar will apply a backdrop-filter frosted glass effect for a more transparent appearance. However, this may cause performance or compatibility issues on some low-performance devices or older browsers.

▶ Run Code
js
var art = new Artplayer({
+});

backdrop ​

  • Type: Boolean
  • Default: true

Whether to enable the backdrop blur effect for the player UI. When enabled, overlays such as the settings panel, context menu, and volume bar will apply a backdrop-filter frosted glass effect for a more transparent look. However, this may cause performance or compatibility issues on some low-performance devices or older browsers.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     backdrop: false, // Disable frosted glass effect
@@ -142,11 +142,11 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
-});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

Whether to display the player Webpage Fullscreen button in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
+});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

Whether to display the player Web Fullscreen button in the bottom control bar.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

subtitleOffset ​

  • Type: Boolean
  • Default: false

Subtitle timing offset, range within [-5s, 5s]. Appears in the Settings Panel.

▶ Run Code
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Boolean
  • Default: false

Subtitle time offset, ranging from [-5s, 5s]. Appears in the Settings Panel.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -154,11 +154,11 @@
         url: '/assets/sample/subtitle.srt',
     },
     setting: true,
-});

miniProgressBar ​

  • Type: Boolean
  • Default: false

Mini progress bar that appears only when the player loses focus and is playing.

▶ Run Code
js
var art = new Artplayer({
+});

miniProgressBar ​

  • Type: Boolean
  • Default: false

A mini progress bar that only appears when the player loses focus and is playing.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});

useSSR ​

  • Type: Boolean
  • Default: false

Whether to use SSR mount mode. Useful if you want to pre-render the player's required HTML before mounting.

You can access the player's required HTML via Artplayer.html.

▶ Run Code
js
var $container = document.querySelector('.artplayer-app');
+});

useSSR ​

  • Type: Boolean
  • Default: false

Whether to use SSR (Server-Side Rendering) mount mode. Useful if you want to pre-render the player's required HTML before the player is mounted.

You can access the player's required HTML via Artplayer.html.

▶ Run Code
js
var $container = document.querySelector('.artplayer-app');
 $container.innerHTML = Artplayer.html;
 
 var art = new Artplayer({
@@ -192,7 +192,7 @@
             },
         },
     ],
-});

For Component Configuration, please refer to:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

Initialize custom settings panel.

▶ Run Code
js
var art = new Artplayer({
+});

For Component Configuration, please refer to:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

Initialize custom settings panels.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -226,7 +226,7 @@
             },
         },
     ],
-});

For Settings Panel, please refer to:

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

Initialize custom context menu.

▶ Run Code
js
var art = new Artplayer({
+});

For Settings Panel, please refer to:

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

Initialize custom context menus.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -254,7 +254,7 @@
             },
         },
     ],
-});

For Component Configuration, please refer to:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

Whether to display the Quality Selection list in the bottom control bar.

PropertyTypeDescription
defaultBooleanDefault quality
htmlStringQuality name
urlStringQuality URL
▶ Run Code
js
var art = new Artplayer({
+});

For Component Configuration, please refer to the following address:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

Whether to display the Quality Selection list in the bottom control bar.

PropertyTypeDescription
defaultBooleanDefault quality
htmlStringQuality name
urlStringQuality URL
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     quality: [
@@ -316,7 +316,7 @@
         number: 60,
         column: 10,
     },
-});

Generate Thumbnails Online

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

Set the video subtitle. Supported subtitle formats: vtt, srt, ass.

PropertyTypeDescription
nameStringSubtitle name
urlStringSubtitle URL
typeStringSubtitle type, options: vtt, srt, ass
styleObjectSubtitle style
encodingStringSubtitle encoding, default: utf-8
escapeBooleanWhether to escape html tags, default: true
onVttLoadFunctionFunction for modifying vtt text
▶ Run Code
js
var art = new Artplayer({
+});

Generate Thumbnails Online

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

Set video subtitles. Supported subtitle formats: vtt, srt, ass.

PropertyTypeDescription
nameStringSubtitle name
urlStringSubtitle URL
typeStringSubtitle type, options: vtt, srt, ass
styleObjectSubtitle style
encodingStringSubtitle encoding, default utf-8
escapeBooleanWhether to escape html tags, default true
onVttLoadFunctionFunction for modifying vtt text
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -329,25 +329,25 @@
             'font-size': '30px',
         },
     },
-});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false, 'preload': 'metadata'} (In Safari, it automatically adjusts to preload: 'auto' for better loading experience).

More video attributes. These attributes will be directly written into the video element.

▶ Run Code
js
var art = new Artplayer({
+});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false, 'preload': 'metadata'} (In Safari, it will automatically adjust to preload: 'auto' for better loading experience.)

More video attributes. These attributes will be written directly into the video element.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     moreVideoAttr: {
         'webkit-playsinline': true,
         playsInline: true,
     },
-});

icons ​

  • Type: Object
  • Default: {}

Used to replace default icons, supports both Html strings and HTMLElement.

▶ Run Code
js
var art = new Artplayer({
+});

icons ​

  • Type: Object
  • Default: {}

Used to replace default icons. Supports Html strings and HTMLElement.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     icons: {
         loading: '<img src="/assets/img/ploading.gif">',
         state: '<img src="/assets/img/state.png">',
     },
-});

All Icon Definitions

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

Used to specify the video format. It needs to be used in conjunction with customType. By default, the video format is determined by the suffix of the video URL (e.g., .m3u8, .mkv, .ts). However, sometimes the video URL lacks the correct suffix, so explicit specification is necessary.

▶ Run Code
js
var art = new Artplayer({
+});

All Icon Definitions

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

Used to specify the video format. It needs to be used together with customType. By default, the video format is determined by the suffix of the video URL (e.g., .m3u8, .mkv, .ts). However, sometimes the video URL may not have the correct suffix, so it needs to be explicitly specified.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     type: 'm3u8',
-});

Suffix Recognition

The player can only parse suffixes like this: /assets/sample/video.m3u8

But cannot parse suffixes like this: /assets/sample/video?type=m3u8

Therefore, if you use customType, it is best to also specify the type.

customType ​

  • Type: Object
  • Default: {}

Matches based on the video's type and delegates video decoding to third-party programs. The handler function receives three parameters:

  • video: The video DOM element
  • url: The video URL
  • art: The current instance
▶ Run Code
js
var art = new Artplayer({
+});

Suffix Recognition

The player can only parse suffixes like this: /assets/sample/video.m3u8

But cannot parse suffixes like this: /assets/sample/video?type=m3u8

Therefore, if you use customType, it's best to also specify the type.

customType ​

  • Type: Object
  • Default: {}

Matches based on the video's type and delegates video decoding to third-party programs for processing. The processing function can receive three parameters:

  • video: The video DOM element
  • url: The video URL
  • art: The current instance
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     customType: {
@@ -396,7 +396,7 @@
     url: '/assets/sample/video.mp4',
     id: 'your-url-id',
     autoPlayback: true,
-});

Note

By default, the player uses the url as the key to cache the playback progress.

However, if the same video has different urls, you need to use the id to identify the unique key for the video.

autoOrientation ​

  • Type: Boolean
  • Default: false

Whether to rotate the player during fullscreen mode on mobile web, based on the video dimensions and viewport size.

▶ Run Code
js
var art = new Artplayer({
+});

Note

Because the player uses the url as the key to cache playback progress by default.

However, if the url for the same video is different, then you need to use id to identify the unique key for the video.

autoOrientation ​

  • Type: Boolean
  • Default: false

Whether to rotate the player in fullscreen mode on mobile web, based on the video dimensions and viewport dimensions.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
@@ -404,18 +404,18 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     airplay: true,
-});

cssVar ​

  • Type: Object
  • Default: {}

Used to modify built-in CSS variables.

▶ Run Code
js
var art = new Artplayer({
+});

cssVar ​

  • Type: Object
  • Default: {}

Used to modify the built-in CSS variables.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     cssVar: {
         //
     },
-});

CSS Variable Reference

artplayer/types/cssVar.d.ts

proxy ​

  • Type: function
  • Default: undefined

The function can return a third-party HTMLCanvasElement or HTMLVideoElement. For example, it can proxy an existing video DOM element.

▶ Run Code
js
var art = new Artplayer({
+});

Reference for cssVar Syntax

artplayer/types/cssVar.d.ts

proxy ​

  • Type: function
  • Default: undefined

The function can return a third-party HTMLCanvasElement or HTMLVideoElement. For example, it can proxy an existing video DOM element.

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     proxy: () => document.createElement('video')
-});
- +}); + \ No newline at end of file diff --git a/docs/document/hashmap.json b/docs/document/hashmap.json index 0280d69d4..aeb95b1d0 100644 --- a/docs/document/hashmap.json +++ b/docs/document/hashmap.json @@ -1 +1 @@ -{"advanced_built-in.md":"DiyRIcIA","advanced_class.md":"Da3aE0pP","advanced_event.md":"mrsB0MsK","advanced_global.md":"Bdw3azKs","advanced_plugin.md":"B3Pobmcq","advanced_property.md":"CA7GaeI3","component_contextmenu.md":"ClKmcIKr","component_controls.md":"Cl62yW1F","component_layers.md":"Cys52VMi","component_setting.md":"BP5674ir","en_advanced_built-in.md":"B_F31aPz","en_advanced_class.md":"D17lDToP","en_advanced_event.md":"Cw7LYSEa","en_advanced_global.md":"DwHxhtQU","en_advanced_plugin.md":"Cnaq654P","en_advanced_property.md":"JV0Ib3j3","en_component_contextmenu.md":"Dn3gMYMB","en_component_controls.md":"BRzTYykf","en_component_layers.md":"B88JJHwY","en_component_setting.md":"C5z-_-Yy","en_index.md":"D_XAyEyy","en_start_i18n.md":"fbCR_PMw","en_start_option.md":"Bei8B6RP","index.md":"BaNZbFwu","plugin_danmuku.md":"Dz71RGDv","start_i18n.md":"CpGYSiAS","start_option.md":"D52S8Ynf"} +{"advanced_built-in.md":"DiyRIcIA","advanced_class.md":"Da3aE0pP","advanced_event.md":"mrsB0MsK","advanced_global.md":"Bdw3azKs","advanced_plugin.md":"B3Pobmcq","advanced_property.md":"CA7GaeI3","component_contextmenu.md":"ClKmcIKr","component_controls.md":"Cl62yW1F","component_layers.md":"Cys52VMi","component_setting.md":"BP5674ir","en_advanced_built-in.md":"CCHa0pnS","en_advanced_class.md":"SSD-Ahrs","en_advanced_event.md":"DEsqIUNQ","en_advanced_global.md":"3hwkL6RS","en_advanced_plugin.md":"C8AgK5Nt","en_advanced_property.md":"CaOAGGTk","en_component_contextmenu.md":"CsJAr6Ey","en_component_controls.md":"t1Ub-agE","en_component_layers.md":"Yo2RXBZy","en_component_setting.md":"Be0gsY-X","en_index.md":"L9xnqmbw","en_start_i18n.md":"Btgstn_9","en_start_option.md":"C2vGTVOZ","index.md":"CpfWSd2Y","plugin_danmuku.md":"NzG4PBIi","start_i18n.md":"uSeNmo_b","start_option.md":"D52S8Ynf"} diff --git a/docs/document/index.html b/docs/document/index.html index b67b34fd6..8df026b28 100644 --- a/docs/document/index.html +++ b/docs/document/index.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
+    
Skip to content

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -44,7 +44,7 @@
           });
         </script>
     </body>
-</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/example

Vue.js ​

vue
<template>
+</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/example

Vue.js ​

vue
<template>
   <div ref="$container" />
 </template>
 
@@ -76,7 +76,7 @@
   art.value.destroy(false)
 })
 </script>
vue
<template>
-  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
+  <Artplayer :option="option" :style="style" @get-instance="getInstance" />
 </template>
 
 <script setup>
@@ -96,7 +96,7 @@
 function getInstance(art) {
   console.log(art)
 }
-</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import Artplayer from 'artplayer'
+</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import Artplayer from 'artplayer'
 import { useEffect, useRef } from 'react'
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -179,7 +179,7 @@
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

ECMAScript Module ​

从 5.2.6 开始,artplayer 和所有插件还会提供一个 ESM 版本的 mjs,如:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
+const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/legacy'
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

ECMAScript Module ​

从 5.2.6 开始,artplayer 和所有插件还会提供一个 ESM 版本的 mjs,如:

  • artplayer/dist/artplayer.mjs
  • artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs
html
<!DOCTYPE html>
 <html lang="en">
 
 <head>
@@ -237,7 +237,7 @@
         </script>
     </body>
 </html>

提示

你需要在引入 Artplayer 依赖前来修改它才会生效

- + \ No newline at end of file diff --git a/docs/document/plugin/danmuku.html b/docs/document/plugin/danmuku.html index 2d7d498f5..526ac5ade 100644 --- a/docs/document/plugin/danmuku.html +++ b/docs/document/plugin/danmuku.html @@ -9,11 +9,11 @@ - + - + - + @@ -23,7 +23,7 @@ -
Skip to content

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
+    
Skip to content

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
     text: '', // 弹幕文本
     time: 10, // 弹幕时间, 默认为当前播放器时间
     mode: 0, // 弹幕模式: 0: 滚动(默认),1: 顶部,2: 底部
@@ -367,7 +367,7 @@
 art.on('artplayerPluginDanmuku:destroy', () => {
     console.info('弹幕销毁');
 });
- + \ No newline at end of file diff --git a/docs/document/start/i18n.html b/docs/document/start/i18n.html index b21275985..be6fec8af 100644 --- a/docs/document/start/i18n.html +++ b/docs/document/start/i18n.html @@ -9,11 +9,11 @@ - + - + - + @@ -27,7 +27,7 @@ container: '.artplayer-app', url: '/assets/sample/video.mp4', lang: 'zh-cn', // or 'en' -});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
+});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

js
import id from 'artplayer/i18n/id';
 import zhTw from 'artplayer/i18n/zh-tw';
 
 var art = new Artplayer({
@@ -75,7 +75,7 @@
         },
     },
 });
- + \ No newline at end of file diff --git a/docs/document/start/option.html b/docs/document/start/option.html index dfeb8c007..43aa81851 100644 --- a/docs/document/start/option.html +++ b/docs/document/start/option.html @@ -9,9 +9,9 @@ - + - + @@ -415,7 +415,7 @@ url: '/assets/sample/video.mp4', proxy: () => document.createElement('video') });
- + \ No newline at end of file diff --git a/package.json b/package.json index 351502993..62a95f68a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "artplayer-packages", "type": "module", - "version": "6.0.0", + "version": "6.1.0", "private": true, "description": "ArtPlayer.js is a modern and full featured HTML5 video player", "workspaces": [ diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js index ea40bc7c0..445dbac42 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ads.js v2.0.1 + * artplayer-plugin-ads.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js index fb83bf891..3ff5d0dc3 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ads.js v2.0.1 + * artplayer-plugin-ads.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.mjs b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.mjs index b5132a64f..6d707e371 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.mjs +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ads.js v2.0.1 + * artplayer-plugin-ads.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-ads/package.json b/packages/artplayer-plugin-ads/package.json index b74782b43..ae0abe798 100644 --- a/packages/artplayer-plugin-ads/package.json +++ b/packages/artplayer-plugin-ads/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-ads", - "version": "2.0.1", + "version": "2.1.0", "description": "Ads plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js index 9d2c0789a..a55f58bc3 100644 --- a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js +++ b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ambilight.js v1.0.1 + * artplayer-plugin-ambilight.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js index 9d2c0789a..a55f58bc3 100644 --- a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js +++ b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ambilight.js v1.0.1 + * artplayer-plugin-ambilight.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.mjs b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.mjs index 19196e4c8..0a79f243c 100644 --- a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.mjs +++ b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-ambilight.js v1.0.1 + * artplayer-plugin-ambilight.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-ambilight/package.json b/packages/artplayer-plugin-ambilight/package.json index 417eadeb8..9e7ae2d7c 100644 --- a/packages/artplayer-plugin-ambilight/package.json +++ b/packages/artplayer-plugin-ambilight/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-ambilight", - "version": "1.0.1", + "version": "1.1.0", "description": "ambilight plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.js b/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.js index e3d6ed33f..eba061fb8 100644 --- a/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.js +++ b/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-asr.js v2.0.1 + * artplayer-plugin-asr.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.legacy.js b/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.legacy.js index d3e9fd649..71d3bc90c 100644 --- a/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.legacy.js +++ b/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-asr.js v2.0.1 + * artplayer-plugin-asr.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.mjs b/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.mjs index 691a4e3a1..37fc36858 100644 --- a/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.mjs +++ b/packages/artplayer-plugin-asr/dist/artplayer-plugin-asr.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-asr.js v2.0.1 + * artplayer-plugin-asr.js v2.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-asr/package.json b/packages/artplayer-plugin-asr/package.json index 3e200696e..f3a364521 100644 --- a/packages/artplayer-plugin-asr/package.json +++ b/packages/artplayer-plugin-asr/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-asr", - "version": "2.0.1", + "version": "2.1.0", "description": "Asr plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.js b/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.js index 20eec294f..73bcbdb50 100644 --- a/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.js +++ b/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-audio-track.js v1.0.2 + * artplayer-plugin-audio-track.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.legacy.js b/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.legacy.js index 2bc1d846d..671c9653a 100644 --- a/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.legacy.js +++ b/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-audio-track.js v1.0.2 + * artplayer-plugin-audio-track.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.mjs b/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.mjs index 65bc77c9e..32277977d 100644 --- a/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.mjs +++ b/packages/artplayer-plugin-audio-track/dist/artplayer-plugin-audio-track.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-audio-track.js v1.0.2 + * artplayer-plugin-audio-track.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-audio-track/package.json b/packages/artplayer-plugin-audio-track/package.json index 8a2272179..6d07e0c0e 100644 --- a/packages/artplayer-plugin-audio-track/package.json +++ b/packages/artplayer-plugin-audio-track/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-audio-track", - "version": "1.0.2", + "version": "1.1.0", "description": "audio-track plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.js b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.js index 1b03715ae..32a90e93e 100644 --- a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.js +++ b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-auto-thumbnail.js v1.0.2 + * artplayer-plugin-auto-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js index b652cd5f5..130e2be79 100644 --- a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js +++ b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-auto-thumbnail.js v1.0.2 + * artplayer-plugin-auto-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.mjs b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.mjs index 057c7208f..534add23f 100644 --- a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.mjs +++ b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-auto-thumbnail.js v1.0.2 + * artplayer-plugin-auto-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-auto-thumbnail/package.json b/packages/artplayer-plugin-auto-thumbnail/package.json index 979922c4a..cec8e9001 100644 --- a/packages/artplayer-plugin-auto-thumbnail/package.json +++ b/packages/artplayer-plugin-auto-thumbnail/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-auto-thumbnail", - "version": "1.0.2", + "version": "1.1.0", "description": "auto-thumbnail plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.js b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.js index f87cdc7d2..015e3f482 100644 --- a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.js +++ b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chapter.js v1.0.3 + * artplayer-plugin-chapter.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js index f87cdc7d2..015e3f482 100644 --- a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js +++ b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chapter.js v1.0.3 + * artplayer-plugin-chapter.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.mjs b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.mjs index fff9ff1f3..89a98a3d3 100644 --- a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.mjs +++ b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chapter.js v1.0.3 + * artplayer-plugin-chapter.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-chapter/package.json b/packages/artplayer-plugin-chapter/package.json index 4a59657ee..36a137f82 100644 --- a/packages/artplayer-plugin-chapter/package.json +++ b/packages/artplayer-plugin-chapter/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-chapter", - "version": "1.0.3", + "version": "1.1.0", "description": "chapter plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js index c9af83721..f6a65e412 100644 --- a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js +++ b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chromecast.js v1.0.2 + * artplayer-plugin-chromecast.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js index c8822c840..a9bf8d244 100644 --- a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js +++ b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chromecast.js v1.0.2 + * artplayer-plugin-chromecast.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.mjs b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.mjs index 1a828128a..394e29f20 100644 --- a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.mjs +++ b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-chromecast.js v1.0.2 + * artplayer-plugin-chromecast.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-chromecast/package.json b/packages/artplayer-plugin-chromecast/package.json index f4ece261d..b385dd834 100644 --- a/packages/artplayer-plugin-chromecast/package.json +++ b/packages/artplayer-plugin-chromecast/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-chromecast", - "version": "1.0.2", + "version": "1.1.0", "description": "Chromecast plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.js b/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.js index 098b1dbcb..fada1a94e 100644 --- a/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.js +++ b/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku-mask.js v1.0.1 + * artplayer-plugin-danmuku-mask.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.legacy.js b/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.legacy.js index 692455d96..b77fb2283 100644 --- a/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.legacy.js +++ b/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku-mask.js v1.0.1 + * artplayer-plugin-danmuku-mask.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.mjs b/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.mjs index 5b74e387a..03cda29b0 100644 --- a/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.mjs +++ b/packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku-mask.js v1.0.1 + * artplayer-plugin-danmuku-mask.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-danmuku-mask/package.json b/packages/artplayer-plugin-danmuku-mask/package.json index b0568ee0a..5991c46fc 100644 --- a/packages/artplayer-plugin-danmuku-mask/package.json +++ b/packages/artplayer-plugin-danmuku-mask/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-danmuku-mask", - "version": "1.0.1", + "version": "1.1.0", "description": "Danmuku mask plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js index 13ad5ddc2..7869ed8ba 100644 --- a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js +++ b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js @@ -1,7 +1,7 @@ /*! - * artplayer-plugin-danmuku.js v5.2.1 + * artplayer-plugin-danmuku.js v5.3.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";function t(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function e(e){if("string"!==typeof e)return[];const i=e.matchAll(/]*?p="(?

[^"]+)"[^>]*>(?.*?)<\/d>/gs);return Array.from(i).map(e=>{const i=e.groups.p.split(",");if(i.length>=8){return{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(i[0]),mode:t(Number(i[1])),fontSize:Number(i[2]),color:`#${Number(i[3]).toString(16)}`,timestamp:Number(i[4]),pool:Number(i[5]),userID:i[6],rowID:Number(i[7])}}return null}).filter(Boolean)}function i({data:t}){const{xml:i,id:a}=t;if(!a||!i)return;const n=e(i);globalThis.postMessage({danmus:n,id:a})}function a(){const a=`\n ${t.toString()}\n ${e.toString()}\n onmessage = ${i.toString()}\n `,n=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}const n='/*!\n * artplayer-plugin-danmuku.js v5.2.1\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',s="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",n],{type:"text/javascript;charset=utf-8"});function o(t){let e;try{if(e=s&&(self.URL||self.webkitURL).createObjectURL(s),!e)throw"";const i=new Worker(e,{type:"module",name:t?.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(n),{type:"module",name:t?.name})}}class r{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=r.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new o,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return r.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=r.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){const{errorHandle:i}=this.utils;let n=[];const s=t||this.option.danmuku;try{"function"===typeof s?n=await s():s instanceof Promise?n=await s:"string"===typeof s?n=await(o=s,new Promise(async t=>{const i=await fetch(o),n=await i.text();try{const e=a();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:n,id:Date.now()})}catch(s){console.error("Error parsing Bilibili Danmu:",s);const i=e(n);t(i)}})):Array.isArray(s)&&(n=s),i(Array.isArray(n),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},r.option,this.option,t),this.validator(this.option,r.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=r.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const l={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function d(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,o=null;function r(r=[]){if(s=null,o=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(r)&&r.length)h=[...r];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const g=h.map(t=>t[1]),f=(Math.min(...g)+Math.max(...g))/2;for(let t=0;tf?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(i**2+a**2),angle:Math.atan2(a,i)}}(e||t,i||t),s=l.map(Math.cos(n.angle)*p.flattening,0,1,1,0),o=n.angle*s+(a?Math.PI:0),r=n.length*p.smoothing;return[t[0]+Math.cos(o)*r,t[1]+Math.sin(o)*r]},v=h.map(t=>[l.map(t[0],p.xMin,p.xMax,0,d.w),l.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),o=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&o&&(s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&o&&"played"===t&&(s.setAttribute("offset",100*e+"%"),o.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>r()),t.on("resize",()=>r()),t.on("artplayerPluginDanmuku:loaded",()=>r()),t.on("artplayerPluginDanmuku:points",t=>r(t))}})}const p='',h='',u='',c='',m='',g='',f='',y='',v='',k='',$='',x='';class w{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:$,$off:k,$config:u,$style:x,$mode_0_off:c,$mode_0_on:m,$mode_1_off:g,$mode_1_on:f,$mode_2_off:y,$mode_2_on:v,$check_on:h,$check_off:p}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${$}${k}\n
\n
\n ${u}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${c}${m}\n
\u6eda\u52a8
\n
\n
\n ${g}${f}\n
\u9876\u90e8
\n
\n
\n ${y}${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${h}${p}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${h}${p}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${x}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${m}\n
\u6eda\u52a8
\n
\n
\n ${f}\n
\u9876\u90e8
\n
\n
\n ${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}async emit(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function b(t){return e=>{const i=new r(e,t),a=new w(e,i);return i.option.heatmap&&d(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return b.icons=w.icons,b}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";function t(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function e(e){if("string"!==typeof e)return[];const i=e.matchAll(/]*?p="(?

[^"]+)"[^>]*>(?.*?)<\/d>/gs);return Array.from(i).map(e=>{const i=e.groups.p.split(",");if(i.length>=8){return{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(i[0]),mode:t(Number(i[1])),fontSize:Number(i[2]),color:`#${Number(i[3]).toString(16)}`,timestamp:Number(i[4]),pool:Number(i[5]),userID:i[6],rowID:Number(i[7])}}return null}).filter(Boolean)}function i({data:t}){const{xml:i,id:a}=t;if(!a||!i)return;const n=e(i);globalThis.postMessage({danmus:n,id:a})}function a(){const a=`\n ${t.toString()}\n ${e.toString()}\n onmessage = ${i.toString()}\n `,n=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}const n='/*!\n * artplayer-plugin-danmuku.js v5.3.0\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',s="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",n],{type:"text/javascript;charset=utf-8"});function o(t){let e;try{if(e=s&&(self.URL||self.webkitURL).createObjectURL(s),!e)throw"";const i=new Worker(e,{type:"module",name:t?.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(n),{type:"module",name:t?.name})}}class r{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=r.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new o,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return r.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return r.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=r.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){const{errorHandle:i}=this.utils;let n=[];const s=t||this.option.danmuku;try{"function"===typeof s?n=await s():s instanceof Promise?n=await s:"string"===typeof s?n=await(o=s,new Promise(async t=>{const i=await fetch(o),n=await i.text();try{const e=a();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:n,id:Date.now()})}catch(s){console.error("Error parsing Bilibili Danmu:",s);const i=e(n);t(i)}})):Array.isArray(s)&&(n=s),i(Array.isArray(n),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},r.option,this.option,t),this.validator(this.option,r.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=r.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const l={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function d(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,o=null;function r(r=[]){if(s=null,o=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(r)&&r.length)h=[...r];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const g=h.map(t=>t[1]),f=(Math.min(...g)+Math.max(...g))/2;for(let t=0;tf?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(i**2+a**2),angle:Math.atan2(a,i)}}(e||t,i||t),s=l.map(Math.cos(n.angle)*p.flattening,0,1,1,0),o=n.angle*s+(a?Math.PI:0),r=n.length*p.smoothing;return[t[0]+Math.cos(o)*r,t[1]+Math.sin(o)*r]},v=h.map(t=>[l.map(t[0],p.xMin,p.xMax,0,d.w),l.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),o=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&o&&(s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&o&&"played"===t&&(s.setAttribute("offset",100*e+"%"),o.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>r()),t.on("resize",()=>r()),t.on("artplayerPluginDanmuku:loaded",()=>r()),t.on("artplayerPluginDanmuku:points",t=>r(t))}})}const p='',h='',u='',c='',m='',g='',f='',y='',v='',k='',$='',x='';class w{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:$,$off:k,$config:u,$style:x,$mode_0_off:c,$mode_0_on:m,$mode_1_off:g,$mode_1_on:f,$mode_2_off:y,$mode_2_on:v,$check_on:h,$check_off:p}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${$}${k}\n
\n
\n ${u}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${c}${m}\n
\u6eda\u52a8
\n
\n
\n ${g}${f}\n
\u9876\u90e8
\n
\n
\n ${y}${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${h}${p}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${h}${p}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${x}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${m}\n
\u6eda\u52a8
\n
\n
\n ${f}\n
\u9876\u90e8
\n
\n
\n ${v}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}async emit(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function b(t){return e=>{const i=new r(e,t),a=new w(e,i);return i.option.heatmap&&d(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return b.icons=w.icons,b}); diff --git a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js index a08a3fac2..83a1130ab 100644 --- a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js +++ b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js @@ -1,7 +1,7 @@ /*! - * artplayer-plugin-danmuku.js v5.2.1 + * artplayer-plugin-danmuku.js v5.3.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,o=Math.pow,r=(e,i,a)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,l=(t,e)=>{for(var i in e||(e={}))n.call(e,i)&&r(t,i,e[i]);if(a)for(var i of a(e))s.call(e,i)&&r(t,i,e[i]);return t},d=(t,a)=>e(t,i(a)),p=(t,e,i)=>new Promise((a,n)=>{var s=t=>{try{r(i.next(t))}catch(e){n(e)}},o=t=>{try{r(i.throw(t))}catch(e){n(e)}},r=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);r((i=i.apply(t,e)).next())});function h(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function u(t){if("string"!==typeof t)return[];const e=new RegExp(']*?p="(?

[^"]+)"[^>]*>(?.*?)<\\/d>',"gs"),i=t.matchAll(e);return Array.from(i).map(t=>{const e=t.groups.p.split(",");if(e.length>=8){return{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:h(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}return null}).filter(Boolean)}function c({data:t}){const{xml:e,id:i}=t;if(!i||!e)return;const a=u(e);globalThis.postMessage({danmus:a,id:i})}function m(){const t=`\n ${h.toString()}\n ${u.toString()}\n onmessage = ${c.toString()}\n `,e=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(e))}const f='/*!\n * artplayer-plugin-danmuku.js v5.2.1\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',g="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",f],{type:"text/javascript;charset=utf-8"});function y(t){let e;try{if(e=g&&(self.URL||self.webkitURL).createObjectURL(g),!e)throw"";const i=new Worker(e,{type:"module",name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(f),{type:"module",name:null==t?void 0:t.name})}}class v{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=v.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new y,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){var t,e;return null==(e=null==(t=this.art.plugins)?void 0:t.autoOrientation)?void 0:e.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return v.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=v.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}load(t){return p(this,null,function*(){const{errorHandle:e}=this.utils;let i=[];const a=t||this.option.danmuku;try{"function"===typeof a?i=yield a():a instanceof Promise?i=yield a:"string"===typeof a?i=yield(n=a,new Promise(t=>p(null,null,function*(){const e=yield fetch(n),i=yield e.text();try{const e=m();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:i,id:Date.now()})}catch(a){console.error("Error parsing Bilibili Danmu:",a);const e=u(i);t(e)}}))):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},v.option,this.option,t),this.validator(this.option,v.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=v.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(()=>p(this,null,function*(){if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const k={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function x(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,r=null;function l(l=[]){if(s=null,r=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(l)&&l.length)h=[...l];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const f=h.map(t=>t[1]),g=(Math.min(...f)+Math.max(...f))/2;for(let t=0;tg?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(o(i,2)+o(a,2)),angle:Math.atan2(a,i)}}(e||t,i||t),s=k.map(Math.cos(n.angle)*p.flattening,0,1,1,0),r=n.angle*s+(a?Math.PI:0),l=n.length*p.smoothing;return[t[0]+Math.cos(r)*l,t[1]+Math.sin(r)*l]},v=h.map(t=>[k.map(t[0],p.xMin,p.xMax,0,d.w),k.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),r=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&r&&(s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&r&&"played"===t&&(s.setAttribute("offset",100*e+"%"),r.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>l()),t.on("resize",()=>l()),t.on("artplayerPluginDanmuku:loaded",()=>l()),t.on("artplayerPluginDanmuku:points",t=>l(t))}})}const $='',w='',b='',S='',M='',z='',E='',T='',C='',F='',A='',P='';class D{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:A,$off:F,$config:b,$style:P,$mode_0_off:S,$mode_0_on:M,$mode_1_off:z,$mode_1_on:E,$mode_2_off:T,$mode_2_on:C,$check_on:w,$check_off:$}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${A}${F}\n
\n
\n ${b}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${S}${M}\n
\u6eda\u52a8
\n
\n
\n ${z}${E}\n
\u9876\u90e8
\n
\n
\n ${T}${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${w}${$}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${w}${$}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${P}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${M}\n
\u6eda\u52a8
\n
\n
\n ${E}\n
\u9876\u90e8
\n
\n
\n ${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return l({min:0,max:100,steps:[]},this.option.OPACITY)}get FONT_SIZE(){return l({min:12,max:120,steps:[]},this.option.FONT_SIZE)}get MARGIN(){return l({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}]},this.option.MARGIN)}get SPEED(){return l({min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}]},this.option.SPEED)}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider(d(l({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider(d(l({},this.MARGIN),{container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}})),this.slider.fontSize=this.createSlider(d(l({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider(d(l({},this.SPEED),{container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}}))}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}emit(){return p(this,null,function*(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=yield this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}})}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function O(t){return e=>{const i=new v(e,t),a=new D(e,i);return i.option.heatmap&&x(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return O.icons=D.icons,O}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.artplayerPluginDanmuku=e(),define(function(){return t.artplayerPluginDanmuku})):(t="undefined"!==typeof globalThis?globalThis:t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,o=Math.pow,r=(e,i,a)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,l=(t,e)=>{for(var i in e||(e={}))n.call(e,i)&&r(t,i,e[i]);if(a)for(var i of a(e))s.call(e,i)&&r(t,i,e[i]);return t},d=(t,a)=>e(t,i(a)),p=(t,e,i)=>new Promise((a,n)=>{var s=t=>{try{r(i.next(t))}catch(e){n(e)}},o=t=>{try{r(i.throw(t))}catch(e){n(e)}},r=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);r((i=i.apply(t,e)).next())});function h(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function u(t){if("string"!==typeof t)return[];const e=new RegExp(']*?p="(?

[^"]+)"[^>]*>(?.*?)<\\/d>',"gs"),i=t.matchAll(e);return Array.from(i).map(t=>{const e=t.groups.p.split(",");if(e.length>=8){return{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:h(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}return null}).filter(Boolean)}function c({data:t}){const{xml:e,id:i}=t;if(!i||!e)return;const a=u(e);globalThis.postMessage({danmus:a,id:i})}function m(){const t=`\n ${h.toString()}\n ${u.toString()}\n onmessage = ${c.toString()}\n `,e=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(e))}const f='/*!\n * artplayer-plugin-danmuku.js v5.3.0\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction t({target:t,visibles:e,clientWidth:i,clientHeight:h,marginBottom:n,marginTop:o,antiOverlap:s}){const r=h-n,p=e.filter(e=>e.mode===t.mode&&e.top<=r).sort((t,e)=>t.top-e.top);if(0===p.length)return 2===t.mode?r-t.height:o;if(p.unshift({type:"top",top:0,left:0,right:0,height:o,width:i,speed:0,distance:i}),p.push({type:"bottom",top:r,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===t.mode)for(let g=p.length-2;g>=0;g-=1){const e=p[g],i=p[g+1],h=e.top+e.height;if(i.top-h>=t.height)return i.top-t.height}else for(let g=1;g=t.height)return h}const a=[];for(let g=1;g{const i=Math.min(...e.map(t=>t.right)),h=Math.min(...t.map(t=>t.right));return i*e.length-h*t.length});break;case 1:case 2:a.sort((t,e)=>{const i=Math.max(...e.map(t=>t.width));return Math.max(...t.map(t=>t.width))*t.length-i*e.length})}return a[0][0].top}switch(t.mode){case 0:{const e=a.find(e=>e.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:case 2:return}}onmessage=e=>{const{data:i}=e;if(!i.id||!i.type)return;const h=(0,{getDanmuTop:t}[i.type])(i);globalThis.postMessage({result:h,id:i.id})};\n',g="undefined"!==typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",f],{type:"text/javascript;charset=utf-8"});function y(t){let e;try{if(e=g&&(self.URL||self.webkitURL).createObjectURL(g),!e)throw"";const i=new Worker(e,{type:"module",name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(i){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(f),{type:"module",name:null==t?void 0:t.name})}}class v{constructor(t,e){const{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=v.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e,!0),this.worker=new y,this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return'\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 '}get isRotate(){var t,e;return null==(e=null==(t=this.art.plugins)?void 0:t.autoOrientation)?void 0:e.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"===typeof e)return t(e,0,i);if("string"===typeof e&&e.endsWith("%")){return t(i*(Number.parseFloat(e)/100),0,i)}return v.option.margin[1]}get fontSize(){const{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;if("number"===typeof i)return Math.round(t(i,12,e));if("string"===typeof i&&i.endsWith("%")){const a=Number.parseFloat(i)/100;return Math.round(t(e*a,12,e))}return v.option.fontSize}get $ref(){const t=this.$refs.pop()||document.createElement("div");return t.style.cssText=v.cssText,t.dataset.mode="",t.dataset.id="",t.className="",t}get readys(){const{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{const n=a.$ref.offsetTop,s=this.getLeft(a.$ref)-i,o=a.$ref.clientHeight,r=a.$ref.clientWidth,l=s+r,d=e-l,p=l/a.$restTime,h={};h.top=n,h.left=s,h.height=o,h.width=r,h.right=d,h.speed=p,h.distance=l,h.time=a.$restTime,h.mode=a.mode,t.push(h)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}load(t){return p(this,null,function*(){const{errorHandle:e}=this.utils;let i=[];const a=t||this.option.danmuku;try{"function"===typeof a?i=yield a():a instanceof Promise?i=yield a:"string"===typeof a?i=yield(n=a,new Promise(t=>p(null,null,function*(){const e=yield fetch(n),i=yield e.text();try{const e=m();e.onmessage=i=>{const{danmus:a,id:n}=i.data;n&&a&&(t(a),e.terminate())},e.postMessage({xml:i,id:Date.now()})}catch(a){console.error("Error parsing Bilibili Danmu:",a);const e=u(i);t(e)}}))):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.textContent="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))||e?(this.option=Object.assign({},v.option,this.option,t),this.validator(this.option,v.scheme),this.option.mode=i(this.option.mode,0,2),this.option.speed=i(this.option.speed,1,10),this.option.opacity=i(this.option.opacity,0,1),this.option.lockTime=i(this.option.lockTime,1,60),this.option.maxLength=i(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||a,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this):this}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){const i=this.states[t]||[];for(let a=0;ae!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=v.cssText,t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}update(){const{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(()=>p(this,null,function*(){if(this.art.playing&&!this.isHide){this.filter("emit",t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});const e=this.readys;for(let i=0;i{if(0===e.mode)e.$ref.style.left=`${t}px`}),this.filter("emit",e=>{switch(e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",e=>{switch(this.setState(e,"emit"),e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}}),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",e=>{switch(this.setState(e,"stop"),e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}const k={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){const a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}};function x(t,e,i){const{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let s=null,r=null;function l(l=[]){if(s=null,r=null,n.innerHTML="",!t.duration||t.option.isLive)return;const d={w:n.offsetWidth,h:n.offsetHeight},p={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"===typeof i&&Object.assign(p,i);let h=[];if(Array.isArray(l)&&l.length)h=[...l];else{const i=t.duration/d.w;for(let t=0;t<=d.w;t+=p.sampling){const a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+p.sampling)*i).length;h.push([t,a])}}if(0===h.length)return;const u=h[h.length-1],c=u[0],m=u[1];c!==d.w&&h.push([d.w,m]);const f=h.map(t=>t[1]),g=(Math.min(...f)+Math.max(...f))/2;for(let t=0;tg?1+p.scale:1-p.scale)+p.minHeight}const y=(t,e,i,a)=>{const n=function(t,e){const i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(o(i,2)+o(a,2)),angle:Math.atan2(a,i)}}(e||t,i||t),s=k.map(Math.cos(n.angle)*p.flattening,0,1,1,0),r=n.angle*s+(a?Math.PI:0),l=n.length*p.smoothing;return[t[0]+Math.cos(r)*l,t[1]+Math.sin(r)*l]},v=h.map(t=>[k.map(t[0],p.xMin,p.xMax,0,d.w),k.map(t[1],p.yMin,p.yMax,d.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,i)=>{const a=y(i[e-1],i[e-2],t),n=y(t,i[e-1],i[e+1],!0),s=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${s}`})(e,i,a)}`,"");n.innerHTML=`\n \n \n \n \n \n \n \n \n \n \n \n `,s=a("#heatmap-start",n),r=a("#heatmap-stop",n),s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",()=>{s&&r&&(s.setAttribute("offset",100*t.played+"%"),r.setAttribute("offset",100*t.played+"%"))}),t.on("setBar",(t,e)=>{s&&r&&"played"===t&&(s.setAttribute("offset",100*e+"%"),r.setAttribute("offset",100*e+"%"))}),t.on("ready",()=>l()),t.on("resize",()=>l()),t.on("artplayerPluginDanmuku:loaded",()=>l()),t.on("artplayerPluginDanmuku:points",t=>l(t))}})}const $='',w='',b='',S='',M='',z='',E='',T='',C='',F='',A='',P='';class D{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;const{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:A,$off:F,$config:b,$style:P,$mode_0_off:S,$mode_0_on:M,$mode_1_off:z,$mode_1_on:E,$mode_2_off:T,$mode_2_on:C,$check_on:w,$check_off:$}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){const{option:t}=this;return`\n

\n ${A}${F}\n
\n
\n ${b}\n
\n
\n
\n \u6309\u7c7b\u578b\u5c4f\u853d\n
\n
\n ${S}${M}\n
\u6eda\u52a8
\n
\n
\n ${z}${E}\n
\u9876\u90e8
\n
\n
\n ${T}${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n
\n ${w}${$}\n \u9632\u6b62\u5f39\u5e55\u91cd\u53e0\n
\n
\n ${w}${$}\n \u540c\u6b65\u89c6\u9891\u901f\u5ea6\n
\n
\n
\n \u4e0d\u900f\u660e\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n \u663e\u793a\u533a\u57df\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u5b57\u53f7\n
\n
\u672a\u77e5
\n
\n
\n \u5f39\u5e55\u901f\u5ea6\n
\n
\u672a\u77e5
\n
\n
\n
\n
\n
\n
\n ${P}\n
\n
\n
\n \u6a21\u5f0f\n
\n
\n ${M}\n
\u6eda\u52a8
\n
\n
\n ${E}\n
\u9876\u90e8
\n
\n
\n ${C}\n
\u5e95\u90e8
\n
\n
\n
\n
\n \u989c\u8272\n
\n ${this.COLOR.map(t=>`
`).join("")}\n
\n
\n
\n
\n
\n \n
\u53d1\u9001
\n
\n `}get OPACITY(){return l({min:0,max:100,steps:[]},this.option.OPACITY)}get FONT_SIZE(){return l({min:12,max:120,steps:[]},this.option.FONT_SIZE)}get MARGIN(){return l({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"\u534a\u5c4f",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"\u6ee1\u5c4f",value:[10,10]}]},this.option.MARGIN)}get SPEED(){return l({min:0,max:4,steps:[{name:"\u6781\u6162",value:10},{name:"\u8f83\u6162",value:7.5,hide:!0},{name:"\u9002\u4e2d",value:5},{name:"\u8f83\u5feb",value:2.5,hide:!0},{name:"\u6781\u5feb",value:1}]},this.option.SPEED)}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){const{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){const{append:i}=this.utils;[...t.children].includes(e)||i(t,e)}setData(t,e){const{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){const{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");const{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"\u5173\u95ed\u5f39\u5e55")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"\u6253\u5f00\u5f39\u5e55")})}createEvents(){const{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:s,$send:o,$input:r}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(s,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{const e=t.target.closest(".apd-mode");if(!e)return;const i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{const e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(o,"click",()=>this.emit()),this.art.proxy(r,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider(d(l({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{const{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider(d(l({},this.MARGIN),{container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{const e=this.MARGIN.steps[t];if(!e)return;const{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}})),this.slider.fontSize=this.createSlider(d(l({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{const{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider(d(l({},this.SPEED),{container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{const e=this.SPEED.steps[t];if(!e)return;const{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}}))}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:s=[]}){const{query:o,clamp:r,setStyle:l}=this.utils;l(i,"touch-action","none"),i.innerHTML=`\n
\n
\n ${s.map(()=>'
').join("")}\n
\n
\n
\n
\n
\n ${s.map(t=>t.hide?"":`
${t.name}
`).join("")}\n
\n `;const d=o(".apd-slider-dot",i),p=o(".apd-slider-progress",i);let h=!1;function u(i=a()){if(ie)return;const o=(i-t)/(e-t);d.style.left=100*o+"%",0===s.length&&(p.style.width=d.style.left),n(i)}function c(a){const{top:n,height:s,left:o,width:l}=i.getBoundingClientRect();if(this.art.isRotate){const i=r(a.clientY-n,0,s);u(Math.round(i/s*(e-t)+t))}else{const i=r(a.clientX-o,0,l);u(Math.round(i/l*(e-t)+t))}}return this.art.proxy(i,"click",t=>{c.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{h=0===t.button}),this.art.on("document:pointermove",t=>{h&&c.call(this,t)}),this.art.on("document:pointerup",t=>{h&&(h=!1,c.call(this,t))}),{reset:u}}onFullscreen(t){const{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){const{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=n.width/2-a.width/2,r=s.left-(a.left-o),l=a.right+o-s.right;e.style.left=r>0?`${-o+r}px`:l>0?-o-l+"px":-o+"px"}emit(){return p(this,null,function*(){const{$input:t}=this.template,e=t.value.trim();if(!e.length)return;if(this.isLock)return;if(this.emitting)return;const i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;const e=yield this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(a){console.error("Error emitting danmuku:",a),this.emitting=!1}})}lock(){const{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.textContent=i,t(e,"apd-lock");const a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.textContent=i,a())},1e3)};a()}unlock(){const{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.textContent="\u53d1\u9001",t(e,"apd-lock")}resize(){if(this.outside)return;if(this.art.fullscreen)return;if(this.art.fullscreenWeb)return;const{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());s&&t(s,"apd-active"),e(i,this.option.visible?"\u5173\u95ed\u5f39\u5e55":"\u6253\u5f00\u5f39\u5e55"),this.resize()}mount(t){const{errorHandle:e}=this.utils,i="string"===typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}}if("undefined"!==typeof document){const t="artplayer-plugin-danmuku";let e=document.getElementById(t);e||(e=document.createElement("style"),e.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent='.artplayer-plugin-danmuku{display:flex;position:relative;z-index:99;align-items:center;justify-content:center;font-size:12px;height:32px;width:100%;color:#fff;font-weight:300;flex-shrink:0;gap:10px}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;transition:all .2s ease;fill:#fff}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{position:absolute;bottom:24px;left:0;width:320px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{display:flex;align-items:center;margin-top:5px;gap:20px}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{display:flex;align-items:center;gap:12px}.artplayer-plugin-danmuku .apd-config-slider .apd-value{width:32px;text-align:right}.artplayer-plugin-danmuku .apd-slider{position:relative;flex:1;display:flex;height:20px;align-items:center;justify-content:center;cursor:pointer}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{position:relative;height:2px;width:100%;overflow:hidden;border-radius:3px;background-color:#ffffff40}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{width:2px;height:2px;border-radius:50%;background-color:#ffffff80}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{width:0%;height:100%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{position:absolute;transform:translate(-6px);left:0%;width:12px;height:12px;border-radius:50%;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:-12px;width:calc(100% + 32px);color:#777}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{flex-shrink:0;width:36px;text-align:center;scale:.95}.artplayer-plugin-danmuku .apd-config-other{display:flex;align-items:center;gap:20px}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{display:flex;align-items:center;cursor:pointer;gap:2px}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{display:flex;flex:1;align-items:center;height:100%;background-color:#ffffff40;border-radius:5px}.artplayer-plugin-danmuku .apd-style{position:relative;display:flex;align-items:center;justify-content:center}.artplayer-plugin-danmuku .apd-style .apd-style-panel{position:absolute;bottom:24px;left:0;width:200px;padding:10px;opacity:0;pointer-events:none}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{width:100%;border-radius:3px;background-color:#000000d9;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{display:flex;flex-wrap:wrap;margin-top:5px;gap:8px}.artplayer-plugin-danmuku .apd-colors .apd-color{width:16px;height:16px;border-radius:2px;cursor:pointer}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid black;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{outline:none;height:100%;flex:1;min-width:0;width:auto;border:none;line-height:1;color:#fff;background-color:transparent}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{display:flex;align-items:center;justify-content:center;height:100%;width:60px;flex-shrink:0;cursor:pointer;text-shadow:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#00a1d6}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{width:260px;flex:none}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{height:38px;gap:16px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{width:400px;flex:none}.art-video-player>.artplayer-plugin-danmuku{position:absolute;left:0;right:0;bottom:-40px;padding:0 10px}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'}function O(t){return e=>{const i=new v(e,t),a=new D(e,i);return i.option.heatmap&&x(e,i,i.option.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}return O.icons=D.icons,O}); diff --git a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs index 7eb392f66..fac426cd8 100644 --- a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs +++ b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-danmuku.js v5.2.1 + * artplayer-plugin-danmuku.js v5.3.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. @@ -80,7 +80,7 @@ function bilibiliDanmuParseFromUrl(url) { } }); } -const jsContent = '/*!\n * artplayer-plugin-danmuku.js v5.2.1\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction getDanmuTop({ target, visibles, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {\n const maxTop = clientHeight - marginBottom;\n const danmus = visibles.filter((item) => item.mode === target.mode && item.top <= maxTop).sort((prev, next) => prev.top - next.top);\n if (danmus.length === 0) {\n if (target.mode === 2) {\n return maxTop - target.height;\n } else {\n return marginTop;\n }\n }\n danmus.unshift({\n type: "top",\n top: 0,\n left: 0,\n right: 0,\n height: marginTop,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n danmus.push({\n type: "bottom",\n top: maxTop,\n left: 0,\n right: 0,\n height: marginBottom,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n if (target.mode === 2) {\n for (let index = danmus.length - 2; index >= 0; index -= 1) {\n const item = danmus[index];\n const prev = danmus[index + 1];\n const itemBottom = item.top + item.height;\n const diff = prev.top - itemBottom;\n if (diff >= target.height) {\n return prev.top - target.height;\n }\n }\n } else {\n for (let index = 1; index < danmus.length; index += 1) {\n const item = danmus[index];\n const prev = danmus[index - 1];\n const prevBottom = prev.top + prev.height;\n const diff = item.top - prevBottom;\n if (diff >= target.height) {\n return prevBottom;\n }\n }\n }\n const topMap = [];\n for (let index = 1; index < danmus.length - 1; index += 1) {\n const item = danmus[index];\n if (topMap.length) {\n const last = topMap[topMap.length - 1];\n if (last[0].top === item.top) {\n last.push(item);\n } else {\n topMap.push([item]);\n }\n } else {\n topMap.push([item]);\n }\n }\n if (antiOverlap) {\n switch (target.mode) {\n case 0: {\n const result = topMap.find((list) => {\n return list.every((danmu) => {\n if (clientWidth < danmu.distance)\n return false;\n if (target.speed < danmu.speed)\n return true;\n const overlapTime = danmu.right / (target.speed - danmu.speed);\n if (overlapTime > danmu.time)\n return true;\n return false;\n });\n });\n return result && result[0] ? result[0].top : void 0;\n }\n // 静止弹幕没有重叠问题\n case 1:\n case 2:\n return void 0;\n }\n } else {\n switch (target.mode) {\n case 0:\n topMap.sort((prev, next) => {\n const nextMinRight = Math.min(...next.map((item) => item.right));\n const prevMinRight = Math.min(...prev.map((item) => item.right));\n return nextMinRight * next.length - prevMinRight * prev.length;\n });\n break;\n case 1:\n case 2:\n topMap.sort((prev, next) => {\n const nextMaxWidth = Math.max(...next.map((item) => item.width));\n const prevMaxWidth = Math.max(...prev.map((item) => item.width));\n return prevMaxWidth * prev.length - nextMaxWidth * next.length;\n });\n break;\n }\n return topMap[0][0].top;\n }\n}\nonmessage = (event) => {\n const { data } = event;\n if (!data.id || !data.type)\n return;\n const fns = { getDanmuTop };\n const fn = fns[data.type];\n const result = fn(data);\n globalThis.postMessage({\n result,\n id: data.id\n });\n};\n'; +const jsContent = '/*!\n * artplayer-plugin-danmuku.js v5.3.0\n * Github: https://github.com/zhw2590582/ArtPlayer\n * (c) 2017-2026 Harvey Zhao\n * Released under the MIT License.\n */\nfunction getDanmuTop({ target, visibles, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {\n const maxTop = clientHeight - marginBottom;\n const danmus = visibles.filter((item) => item.mode === target.mode && item.top <= maxTop).sort((prev, next) => prev.top - next.top);\n if (danmus.length === 0) {\n if (target.mode === 2) {\n return maxTop - target.height;\n } else {\n return marginTop;\n }\n }\n danmus.unshift({\n type: "top",\n top: 0,\n left: 0,\n right: 0,\n height: marginTop,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n danmus.push({\n type: "bottom",\n top: maxTop,\n left: 0,\n right: 0,\n height: marginBottom,\n width: clientWidth,\n speed: 0,\n distance: clientWidth\n });\n if (target.mode === 2) {\n for (let index = danmus.length - 2; index >= 0; index -= 1) {\n const item = danmus[index];\n const prev = danmus[index + 1];\n const itemBottom = item.top + item.height;\n const diff = prev.top - itemBottom;\n if (diff >= target.height) {\n return prev.top - target.height;\n }\n }\n } else {\n for (let index = 1; index < danmus.length; index += 1) {\n const item = danmus[index];\n const prev = danmus[index - 1];\n const prevBottom = prev.top + prev.height;\n const diff = item.top - prevBottom;\n if (diff >= target.height) {\n return prevBottom;\n }\n }\n }\n const topMap = [];\n for (let index = 1; index < danmus.length - 1; index += 1) {\n const item = danmus[index];\n if (topMap.length) {\n const last = topMap[topMap.length - 1];\n if (last[0].top === item.top) {\n last.push(item);\n } else {\n topMap.push([item]);\n }\n } else {\n topMap.push([item]);\n }\n }\n if (antiOverlap) {\n switch (target.mode) {\n case 0: {\n const result = topMap.find((list) => {\n return list.every((danmu) => {\n if (clientWidth < danmu.distance)\n return false;\n if (target.speed < danmu.speed)\n return true;\n const overlapTime = danmu.right / (target.speed - danmu.speed);\n if (overlapTime > danmu.time)\n return true;\n return false;\n });\n });\n return result && result[0] ? result[0].top : void 0;\n }\n // 静止弹幕没有重叠问题\n case 1:\n case 2:\n return void 0;\n }\n } else {\n switch (target.mode) {\n case 0:\n topMap.sort((prev, next) => {\n const nextMinRight = Math.min(...next.map((item) => item.right));\n const prevMinRight = Math.min(...prev.map((item) => item.right));\n return nextMinRight * next.length - prevMinRight * prev.length;\n });\n break;\n case 1:\n case 2:\n topMap.sort((prev, next) => {\n const nextMaxWidth = Math.max(...next.map((item) => item.width));\n const prevMaxWidth = Math.max(...prev.map((item) => item.width));\n return prevMaxWidth * prev.length - nextMaxWidth * next.length;\n });\n break;\n }\n return topMap[0][0].top;\n }\n}\nonmessage = (event) => {\n const { data } = event;\n if (!data.id || !data.type)\n return;\n const fns = { getDanmuTop };\n const fn = fns[data.type];\n const result = fn(data);\n globalThis.postMessage({\n result,\n id: data.id\n });\n};\n'; const blob = typeof self !== "undefined" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", jsContent], { type: "text/javascript;charset=utf-8" }); function WorkerWrapper(options) { let objURL; diff --git a/packages/artplayer-plugin-danmuku/package.json b/packages/artplayer-plugin-danmuku/package.json index 79b74b03c..07c075e8a 100644 --- a/packages/artplayer-plugin-danmuku/package.json +++ b/packages/artplayer-plugin-danmuku/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-danmuku", - "version": "5.2.1", + "version": "5.3.0", "description": "Danmuku plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js index 61def74d6..bb42c1d7b 100644 --- a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js +++ b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-dash-control.js v1.0.1 + * artplayer-plugin-dash-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js index 61def74d6..bb42c1d7b 100644 --- a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js +++ b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-dash-control.js v1.0.1 + * artplayer-plugin-dash-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.mjs b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.mjs index 41478eeb1..e2374e353 100644 --- a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.mjs +++ b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-dash-control.js v1.0.1 + * artplayer-plugin-dash-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-dash-control/package.json b/packages/artplayer-plugin-dash-control/package.json index 218b5e8a4..b337d2fda 100644 --- a/packages/artplayer-plugin-dash-control/package.json +++ b/packages/artplayer-plugin-dash-control/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-dash-control", - "version": "1.0.1", + "version": "1.1.0", "description": "Dash control plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.js b/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.js index a62ba9d26..2fdef0b83 100644 --- a/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.js +++ b/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-document-pip.js v1.0.3 + * artplayer-plugin-document-pip.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.legacy.js b/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.legacy.js index a25c03d21..787c05f56 100644 --- a/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.legacy.js +++ b/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-document-pip.js v1.0.3 + * artplayer-plugin-document-pip.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.mjs b/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.mjs index 78872d3a8..451cd5a78 100644 --- a/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.mjs +++ b/packages/artplayer-plugin-document-pip/dist/artplayer-plugin-document-pip.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-document-pip.js v1.0.3 + * artplayer-plugin-document-pip.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-document-pip/package.json b/packages/artplayer-plugin-document-pip/package.json index ccb744fa8..87551eefd 100644 --- a/packages/artplayer-plugin-document-pip/package.json +++ b/packages/artplayer-plugin-document-pip/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-document-pip", - "version": "1.0.3", + "version": "1.1.0", "description": "Document PIP plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js index c2c82b3a1..975adfd0c 100644 --- a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js +++ b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-hls-control.js v1.0.2 + * artplayer-plugin-hls-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js index 220a60abf..29de770fa 100644 --- a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js +++ b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-hls-control.js v1.0.2 + * artplayer-plugin-hls-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.mjs b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.mjs index 8dab51822..8169373f1 100644 --- a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.mjs +++ b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-hls-control.js v1.0.2 + * artplayer-plugin-hls-control.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-hls-control/package.json b/packages/artplayer-plugin-hls-control/package.json index 5ee4d12a4..4f660f8b3 100644 --- a/packages/artplayer-plugin-hls-control/package.json +++ b/packages/artplayer-plugin-hls-control/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-hls-control", - "version": "1.0.2", + "version": "1.1.0", "description": "Hls control plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.js b/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.js index fc245c28f..985434418 100644 --- a/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.js +++ b/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-jassub.js v1.0.1 + * artplayer-plugin-jassub.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.legacy.js b/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.legacy.js index 26ed827a6..908b38a90 100644 --- a/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.legacy.js +++ b/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-jassub.js v1.0.1 + * artplayer-plugin-jassub.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.mjs b/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.mjs index 5b63eb278..b25489f1d 100644 --- a/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.mjs +++ b/packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-jassub.js v1.0.1 + * artplayer-plugin-jassub.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-jassub/package.json b/packages/artplayer-plugin-jassub/package.json index 71ab9c02c..7032f2783 100644 --- a/packages/artplayer-plugin-jassub/package.json +++ b/packages/artplayer-plugin-jassub/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-jassub", - "version": "1.0.1", + "version": "1.1.0", "description": "jassub plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js index 7928ca912..749450150 100644 --- a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js +++ b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-multiple-subtitles.js v1.1.1 + * artplayer-plugin-multiple-subtitles.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js index be3b4ee4d..f6b175bd8 100644 --- a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js +++ b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-multiple-subtitles.js v1.1.1 + * artplayer-plugin-multiple-subtitles.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.mjs b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.mjs index 80bedade6..8a9d230f3 100644 --- a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.mjs +++ b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-multiple-subtitles.js v1.1.1 + * artplayer-plugin-multiple-subtitles.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-multiple-subtitles/package.json b/packages/artplayer-plugin-multiple-subtitles/package.json index da3511bb3..c008a8a68 100644 --- a/packages/artplayer-plugin-multiple-subtitles/package.json +++ b/packages/artplayer-plugin-multiple-subtitles/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-multiple-subtitles", - "version": "1.1.1", + "version": "1.2.0", "description": "multiple subtitles plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js index caab7807b..b86279484 100644 --- a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js +++ b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vast.js v1.1.1 + * artplayer-plugin-vast.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js index 25022105d..104963dd7 100644 --- a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js +++ b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vast.js v1.1.1 + * artplayer-plugin-vast.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.mjs b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.mjs index 507c818d4..fb8194a22 100644 --- a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.mjs +++ b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vast.js v1.1.1 + * artplayer-plugin-vast.js v1.2.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-vast/package.json b/packages/artplayer-plugin-vast/package.json index 18b11eff7..b08c64150 100644 --- a/packages/artplayer-plugin-vast/package.json +++ b/packages/artplayer-plugin-vast/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-vast", - "version": "1.1.1", + "version": "1.2.0", "description": "VAST plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js index ff64ef33a..3627b491f 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js +++ b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vtt-thumbnail.js v1.0.4 + * artplayer-plugin-vtt-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js index edf11e79b..dead67bbf 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js +++ b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vtt-thumbnail.js v1.0.4 + * artplayer-plugin-vtt-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.mjs b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.mjs index 42e603212..ecffe74e3 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.mjs +++ b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-plugin-vtt-thumbnail.js v1.0.4 + * artplayer-plugin-vtt-thumbnail.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-plugin-vtt-thumbnail/package.json b/packages/artplayer-plugin-vtt-thumbnail/package.json index 61336bfb7..db5266e39 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/package.json +++ b/packages/artplayer-plugin-vtt-thumbnail/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-plugin-vtt-thumbnail", - "version": "1.0.4", + "version": "1.1.0", "description": "vtt thumbnail plugin for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.js b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.js index 25e4dddcd..a033c5dc5 100644 --- a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.js +++ b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-canvas.js v1.0.1 + * artplayer-proxy-canvas.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js index 43fd3d2dd..cb5cbd9e7 100644 --- a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js +++ b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-canvas.js v1.0.1 + * artplayer-proxy-canvas.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.mjs b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.mjs index 1d9e45ca4..705b3ca71 100644 --- a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.mjs +++ b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-canvas.js v1.0.1 + * artplayer-proxy-canvas.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-proxy-canvas/package.json b/packages/artplayer-proxy-canvas/package.json index 802746543..05e554a68 100644 --- a/packages/artplayer-proxy-canvas/package.json +++ b/packages/artplayer-proxy-canvas/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-proxy-canvas", - "version": "1.0.1", + "version": "1.1.0", "description": "canvas proxy for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.js b/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.js index 1e6efeeae..d783a9953 100644 --- a/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.js +++ b/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-mediabunny.js v1.0.1 + * artplayer-proxy-mediabunny.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.legacy.js b/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.legacy.js index 760501e5b..979246864 100644 --- a/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.legacy.js +++ b/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-mediabunny.js v1.0.1 + * artplayer-proxy-mediabunny.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.mjs b/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.mjs index 46b93030b..77d3f9981 100644 --- a/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.mjs +++ b/packages/artplayer-proxy-mediabunny/dist/artplayer-proxy-mediabunny.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-proxy-mediabunny.js v1.0.1 + * artplayer-proxy-mediabunny.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-proxy-mediabunny/package.json b/packages/artplayer-proxy-mediabunny/package.json index 12eb235a5..97d0e3d8a 100644 --- a/packages/artplayer-proxy-mediabunny/package.json +++ b/packages/artplayer-proxy-mediabunny/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-proxy-mediabunny", - "version": "1.0.1", + "version": "1.1.0", "description": "mediabunny proxy for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.js b/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.js index 646b56b94..8180b1f34 100644 --- a/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.js +++ b/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-iframe.js v1.0.1 + * artplayer-tool-iframe.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.legacy.js b/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.legacy.js index d3c550a40..4d398aa1e 100644 --- a/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.legacy.js +++ b/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-iframe.js v1.0.1 + * artplayer-tool-iframe.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.mjs b/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.mjs index 65141c663..3e99c0366 100644 --- a/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.mjs +++ b/packages/artplayer-tool-iframe/dist/artplayer-tool-iframe.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-tool-iframe.js v1.0.1 + * artplayer-tool-iframe.js v1.1.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-tool-iframe/package.json b/packages/artplayer-tool-iframe/package.json index 9b250d212..9b8fd25ce 100644 --- a/packages/artplayer-tool-iframe/package.json +++ b/packages/artplayer-tool-iframe/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-tool-iframe", - "version": "1.0.1", + "version": "1.1.0", "description": "Iframe tool for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js index 8b5600dc0..e16cbeccd 100644 --- a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js +++ b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-thumbnail.js v4.3.12 + * artplayer-tool-thumbnail.js v4.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js index 8b5600dc0..e16cbeccd 100644 --- a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js +++ b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js @@ -1,5 +1,5 @@ /*! - * artplayer-tool-thumbnail.js v4.3.12 + * artplayer-tool-thumbnail.js v4.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.mjs b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.mjs index 2ab283089..f0eab6e03 100644 --- a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.mjs +++ b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.mjs @@ -1,5 +1,5 @@ /*! - * artplayer-tool-thumbnail.js v4.3.12 + * artplayer-tool-thumbnail.js v4.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. diff --git a/packages/artplayer-tool-thumbnail/package.json b/packages/artplayer-tool-thumbnail/package.json index f3a38047c..cc05f445b 100644 --- a/packages/artplayer-tool-thumbnail/package.json +++ b/packages/artplayer-tool-thumbnail/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-tool-thumbnail", - "version": "4.3.12", + "version": "4.4.0", "description": "Thumbnail tool for ArtPlayer", "author": "Harvey Zhao ", "license": "MIT", diff --git a/packages/artplayer-vitepress/package.json b/packages/artplayer-vitepress/package.json index d5d63d156..a257e482a 100644 --- a/packages/artplayer-vitepress/package.json +++ b/packages/artplayer-vitepress/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-vitepress", - "version": "1.0.0", + "version": "1.1.0", "scripts": { "dev": "vitepress dev docs", "build": "vitepress build docs", diff --git a/packages/artplayer/dist/artplayer.js b/packages/artplayer/dist/artplayer.js index 2597bb2fa..623b028e0 100644 --- a/packages/artplayer/dist/artplayer.js +++ b/packages/artplayer/dist/artplayer.js @@ -1,7 +1,7 @@ /*! - * artplayer.js v5.3.1 + * artplayer.js v5.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var a=(e||(e=1,r.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(o=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(t){return t.constructor?t.constructor.name:null}function o(t,e){var a=2=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,h="undefined"!==typeof window&&"undefined"!==typeof document;function u(t,e=document){return e.querySelector(t)}function m(t,e=document){return Array.from(e.querySelectorAll(t))}function f(t,e){return t.classList.add(e)}function g(t,e){return t.classList.remove(e)}function v(t,e){return t.classList.contains(e)}function y(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function b(t){return t.parentNode.removeChild(t)}function w(t,e,r){return t.style[e]=r,t}function x(t,e){for(const r in e)w(t,r,e[r]);return t}function k(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function $(t,e){k(t).forEach(t=>g(t,e)),f(t,e)}function T(t,e,r="top"){p||(t.setAttribute("aria-label",e),f(t,"hint--rounded"),f(t,`hint--${r}`))}function E(t,e=0){const r=t.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=a&&r.top+r.height+e>=0,i=r.left-e<=o+e&&r.left+r.width+e>=0;return n&&i}function C(t,e){return R(t).includes(e)}function z(t,e){return e.parentNode.replaceChild(t,e),t}function L(t){return document.createElement(t)}function S(t="",e=""){const r=L("i");return f(r,"art-icon"),f(r,`art-icon-${t}`),y(r,e),r}function M(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function I(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function P(t){return t.getBoundingClientRect()}function A(t,e){return new Promise((r,a)=>{const o=new Image;o.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=o.width*e,n.height=o.height*e,i.drawImage(o,0,0,n.width,n.height),n.toBlob(e=>{const o=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(o),a(new Error(`Image load failed: ${t}`))},n.src=o})}else r(o)},o.onerror=function(){a(new Error(`Image load failed: ${t}`))},o.src=t})}function R(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class O extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function _(t,e){if(!t)throw new O(e);return t}function V(t){return t.includes("?")?V(t.split("?")[0]):t.includes("#")?V(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function Y(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function D(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function N(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),a=Math.floor(t-3600*e-60*r);return(e>0?[e,r,a]:[r,a]).map(t=>t<10?`0${t}`:String(t)).join(":")}function B(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const H=Object.defineProperty,{hasOwnProperty:W}=Object.prototype;function j(t,e){return W.call(t,e)}function U(t,e){return Object.getOwnPropertyDescriptor(t,e)}function q(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(a=>{const o=t[a],n=r[a];Array.isArray(o)&&Array.isArray(n)?t[a]=o.concat(...n):e(o)&&e(n)?t[a]=q(o,n):t[a]=n}),t),{})}function X(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=`${r}00`),2===r.length&&(a=`${r}0`),`${e},${a}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function G(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function K(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const a=t.match(e);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function Z(t=0){return new Promise(e=>setTimeout(e,t))}function J(t,e){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,a)),e)}}function Q(t,e){let r=!1;return function(...a){r||(t.apply(this,a),r=!0,setTimeout(()=>{r=!1},e))}}const tt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:O,addClass:f,append:y,assToVtt:K,capitalize:N,clamp:D,createElement:L,debounce:J,def:H,download:Y,errorHandle:_,escape:B,get:U,getComposedPath:R,getExt:V,getIcon:S,getRect:P,getStyle:function(t,e,r=!0){const a=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(a):a},has:j,hasClass:v,includeFromEvent:C,inverseClass:$,isBrowser:h,isIOS:c,isIOS13:d,isInViewport:E,isMobile:p,isSafari:l,loadImg:A,mergeDeep:q,query:u,queryAll:m,remove:b,removeClass:g,replaceElement:z,secondToTime:F,setStyle:w,setStyleText:M,setStyles:x,siblings:k,sleep:Z,srtToVtt:X,supportsFlex:I,throttle:Q,tooltip:T,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:s,vttToBlob:G},Symbol.toStringTag,{value:"Module"})),et="array",rt="boolean",at="string",ot="number",nt="object",it="function";function st(t,e,r){return _(e===at||e===ot||t instanceof Element,`${r.join(".")} require '${at}' or 'Element' type`)}const lt={html:st,disable:`?${rt}`,name:`?${at}`,index:`?${ot}`,style:`?${nt}`,click:`?${it}`,mounted:`?${it}`,tooltip:`?${at}|${ot}`,width:`?${ot}`,selector:`?${et}`,onSelect:`?${it}`,switch:`?${rt}`,onSwitch:`?${it}`,range:`?${et}`,onRange:`?${it}`,onChange:`?${it}`},ct={id:at,container:st,url:at,poster:at,type:at,theme:at,lang:at,volume:ot,isLive:rt,muted:rt,autoplay:rt,autoSize:rt,autoMini:rt,loop:rt,flip:rt,playbackRate:rt,aspectRatio:rt,screenshot:rt,setting:rt,hotkey:rt,pip:rt,mutex:rt,backdrop:rt,fullscreen:rt,fullscreenWeb:rt,subtitleOffset:rt,miniProgressBar:rt,useSSR:rt,playsInline:rt,lock:rt,gesture:rt,fastForward:rt,autoPlayback:rt,autoOrientation:rt,airplay:rt,proxy:`?${it}`,plugins:[it],layers:[lt],contextmenu:[lt],settings:[lt],controls:[{...lt,position:(t,e,r)=>{const a=["top","left","right"];return _(a.includes(t),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${rt}`,html:at,url:at}],highlight:[{time:ot,text:at}],thumbnails:{url:at,number:ot,column:ot,width:ot,height:ot,scale:ot},subtitle:{url:at,name:at,type:at,style:nt,escape:rt,encoding:at,onVttLoad:it},moreVideoAttr:nt,i18n:nt,icons:nt,cssVar:nt,customType:nt};class dt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return v(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?f(e,r):g(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",o(e,lt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;_(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const a=L("div");f(a,`art-${this.name}`),f(a,`art-${this.name}-${r}`);const n=Array.from(this.$parent.children);a.dataset.index=e.index||this.id;const i=n.find(t=>Number(t.dataset.index)>=Number(a.dataset.index));i?i.insertAdjacentElement("beforebegin",a):y(this.$parent,a),e.html&&y(a,e.html),e.style&&x(a,e.style),e.tooltip&&T(a,e.tooltip);const s=[];if(e.click){const t=this.art.events.proxy(a,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});s.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,a,s),this[r]=a,this.cache.set(r,{$ref:a,events:s,option:e}),e.mounted&&e.mounted.call(this.art,a),a}remove(t){_(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],b(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class pt extends dt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,p||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:a}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:a}}=e,o=a.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return{...t,html:`${r.get("Play Speed")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.playbackRate=Number(a),t.show=!1)},mounted:t=>{const r=u('[data-value="1"]',t);r&&$(r,"art-current"),e.on("video:ratechange",()=>{const r=m("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&$(r,"art-current")})}}}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:a}}=e,o=a.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return{...t,html:`${r.get("Aspect Ratio")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.aspectRatio=a,t.show=!1)},mounted:t=>{const r=u('[data-value="default"]',t);r&&$(r,"art-current"),e.on("aspectRatio",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:a}}=e,o=a.map(t=>`${r.get(N(t))}`).join("");return{...t,html:`${r.get("Video Flip")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.flip=a.toLowerCase(),t.show=!1)},mounted:t=>{const r=u('[data-value="normal"]',t);r&&$(r,"art-current"),e.on("flip",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"flip",index:30})),this.add(function(t){return e=>({...t,html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=h?location.href:"";return{...t,html:`ArtPlayer ${n}`}}({name:"version",index:50})),this.add(function(t){return e=>({...t,html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let o=0;o{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,o=t.clientY,{height:n,width:i,left:s,top:l}=P(r),{height:c,width:d}=P(a);let p=e-s,h=o-l;e+d>s+i&&(p=i-d),o+c>l+n&&(h=n-c),x(a,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{C(t,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function ht(t,e){const{$progress:r}=t.template,{left:a}=P(r),o=D((p?e.touches[0].clientX:e.clientX)-a,0,r.clientWidth),n=o/r.clientWidth*t.duration;return{second:n,time:F(n),width:o,percentage:D(o/r.clientWidth,0,1)}}function ut(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,a=r*t.duration;t.emit("setBar","played",r,e),t.seek=a}else{const{second:r,percentage:a}=ht(t,e);t.emit("setBar","played",a,e),t.seek=r}}function mt(t){return e=>{const{icons:r,option:a,proxy:o}=e,{$player:n}=e.template;return{...t,html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let i=null,s=!1;const l=u(".art-progress-hover",t),c=u(".art-progress-loaded",t),d=u(".art-progress-played",t),h=u(".art-progress-highlight",t),m=u(".art-progress-indicator",t),v=u(".art-progress-tip",t);function b(r,a){const{width:o,time:n}=a||ht(e,r);v.textContent=n||"00:00";const i=v.clientWidth;o<=i/2?w(v,"left",0):o>t.clientWidth-i/2?w(v,"left",t.clientWidth-i+"px"):w(v,"left",o-i/2+"px")}r.indicator?y(m,r.indicator):w(m,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,a,o){const s="played"===r&&o&&p;if("loaded"===r&&w(c,"width",100*a+"%"),"hover"===r&&(w(l,"width",100*a+"%"),C(o,h)?function(r){const{width:a}=ht(e,r),{text:o}=r.target.dataset;v.textContent=o;const n=v.clientWidth;a<=n/2?w(v,"left",0):a>t.clientWidth-n/2?w(v,"left",t.clientWidth-n+"px"):w(v,"left",a-n/2+"px")}(o):b(o),0===a?g(n,"art-progress-hover"):f(n,"art-progress-hover")),"played"===r&&(w(d,"width",100*a+"%"),w(m,"left",100*a+"%")),s){f(n,"art-progress-hover");b(o,{width:t.clientWidth*a,time:F(a*e.duration)}),clearTimeout(i),i=setTimeout(()=>{g(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){h.textContent="";for(let t=0;t`;y(h,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),p||(o(t,"click",t=>{t.target!==m&&ut(e,t)}),o(t,"mousemove",t=>{const{percentage:r}=ht(e,t);e.emit("setBar","hover",r,t)}),o(t,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),o(t,"mousedown",t=>{s=0===t.button}),e.on("document:mousemove",t=>{if(s){const{second:r,percentage:a}=ht(e,t);e.emit("setBar","played",a,t),e.seek=r}}),e.on("document:mouseup",()=>{s&&(s=!1)}))}}}}class ft extends dt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:a}=this.art.template;t.on("mousemove",()=>{p||(this.show=!0)}),t.on("click",()=>{p?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=C(t,a)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(g(r,"art-hide-cursor"),f(r,"art-hover"),this.timer=Date.now()):(f(r,"art-hide-cursor"),g(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(mt({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.play),i=y(t,a.pause);function s(){w(n,"display","flex"),w(i,"display","none")}function l(){w(n,"display","none"),w(i,"display","flex")}T(n,o.get("Play")),T(i,o.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a}=e,o=y(t,a.volume),n=y(t,a.volumeClose),i=y(t,'
'),s=y(i,'
'),l=y(s,'
'),c=y(s,'
'),d=y(c,'
'),h=y(d,'
'),u=y(c,'
');function m(t){const{top:e,height:r}=P(c);return 1-(t.clientY-e)/r}function f(){if(e.muted||0===e.volume)w(o,"display","none"),w(n,"display","flex"),w(u,"top","100%"),w(h,"top","100%"),l.textContent=0;else{const t=100*e.volume;w(o,"display","flex"),w(n,"display","none"),w(u,"top",100-t+"%"),w(h,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(f(),e.on("video:volumechange",f),r(o,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),p)w(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=m(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=m(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>({...t,style:p?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${F(e.currentTime)} / ${F(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let o=0;o{this.art.quality=t.quality}),t.screenshot&&!p&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{T(t,o.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{T(t,o.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenWebOn),i=y(t,a.fullscreenWebOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(T(t,o.get("Exit Web Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Web Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenOn),i=y(t,a.fullscreenOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(T(t,o.get("Exit Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),H(e,"$control_item",{get:()=>r}),H(e,"$control_value",{get:()=>o})}const i=a(n,"click",async e=>{const r=R(e),a=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(a),t.onSelect&&(o.innerHTML=await t.onSelect.call(this.art,a,a.$control_item,e))});r.push(i)}}function gt(t,e,r,a){const o=e-a,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(o)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,o);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class vt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:a,$video:o}}=t;function n(e){C(e,a)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(o,"click",e=>{const a=Date.now();i.push(a);const{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>a-t<=n);switch(c.length){case 1:t.emit("click",e),p?!t.isLock&&o&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),p?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{f(r,"art-hover"),t.emit("hover",!0,e)},e=>{g(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:a}=t;t.on("resize",()=>{const{aspectRatio:e,notice:a}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,a.show=""});const o=J(()=>t.emit("resize"),a.RESIZE_TIME);t.on("window:orientationchange",()=>o()),t.on("window:resize",()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>o())}(t,this),function(t,e){if(p&&!t.option.isLive){const{$video:r,$progress:a}=t.template;let o=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){o===a&&ut(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:a,pageY:n}=e.touches[0],c=gt(i,s,a,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=D((a-i)/t.width,-1,1),d=D((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=o===r?t.constructor.TOUCH_MOVE_RATIO:1,u=D(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",D(u/t.duration,0,1),e),t.notice.show=`${F(u)} / ${F(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,o=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{o=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(a,"touchstart",t=>{o=a,c(t)}),e.proxy(a,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:a}}=t,o=Q(()=>{t.emit("view",E(a,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>o()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],a=["resize","scroll","orientationchange"],o=[];function n(n={}){for(let t=0;t{const a=n.document||i.ownerDocument||document,s=e.proxy(a,r,e=>{t.emit(`document:${r}`,e)});o.push(s)}),a.forEach(r=>{const a=n.window||i.ownerDocument?.defaultView||window,s=e.proxy(a,r,e=>{t.emit(`window:${r}`,e)});o.push(s)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,a={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,a));t.addEventListener(e,r,a);const o=()=>t.removeEventListener(e,r,a);return this.destroyEvents.add(o),o}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class yt{constructor(t){this.art=t,this.keys={},p||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n',...t.option.icons};for(const r in e)H(this,r,{get:()=>S(r,e[r])})}}class kt extends dt{constructor(t){super(t),this.name="info",p||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;t(a,"click",()=>{this.show=!1});let n=null;const i=m("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{w(o,"display","none"),w(n,"display",null)}),a.proxy(e.$state,"click",()=>t.play())}}class Ct{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:a}}=this.art;t?(a.textContent=t instanceof Error?t.message.trim():t,f(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{a.textContent="",g(r,"art-notice-show")},e.NOTICE_TIME)):g(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const zt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Lt=(()=>{if("undefined"===typeof document)return!1;const t=zt[0],e={};for(const r of zt){if(r[1]in document){for(const[a,o]of r.entries())e[t[a]]=o;return e}}return!1})(),St={change:Lt.fullscreenchange,error:Lt.fullscreenerror},Mt={request:(t=document.documentElement,e)=>new Promise((r,a)=>{const o=()=>{Mt.off("change",o),r()};Mt.on("change",o);const n=t[Lt.requestFullscreen](e);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((t,e)=>{if(!Mt.isFullscreen)return void t();const r=()=>{Mt.off("change",r),t()};Mt.on("change",r);const a=document[Lt.exitFullscreen]();a instanceof Promise&&a.then(r).catch(e)}),toggle:(t,e)=>Mt.isFullscreen?Mt.exit():Mt.request(t,e),onchange(t){Mt.on("change",t)},onerror(t){Mt.on("error",t)},on(t,e){const r=St[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=St[t];r&&document.removeEventListener(r,e,!1)},raw:Lt};function It(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;t.once("video:loadedmetadata",()=>{var n;Mt.isEnabled?(n=t,Mt.on("change",()=>{n.emit("fullscreen",Mt.isFullscreen),Mt.isFullscreen?(n.state="fullscreen",f(o,"art-fullscreen")):g(o,"art-fullscreen"),n.emit("resize")}),Mt.on("error",t=>{n.emit("fullscreenError",t)}),H(n,"fullscreen",{get:()=>Mt.isFullscreen,async set(t){t?await Mt.request(o):await Mt.exit()}})):a.webkitSupportsFullscreen?(t=>{t.on("document:webkitfullscreenchange",()=>{t.emit("fullscreen",t.fullscreen),t.emit("resize")}),H(t,"fullscreen",{get:()=>document.fullscreenElement===a,set(e){e?(t.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})})(t):H(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),H(t,"fullscreen",U(t,"fullscreen"))})}function Pt(t){const{icons:e,proxy:r,storage:a,template:{$player:o,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(g(o,"art-mini"),w(e,"display","none"),o.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(w(e,"display","none"),w(r,"display","flex")):(w(e,"display","flex"),w(r,"display","none"))}function p(){const{$mini:e}=t.template,r=P(e),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),w(e,"top",`${o}px`),w(e,"left",`${n}px`)}H(t,"mini",{get:()=>v(o,"art-mini"),set(h){if(h){t.state="mini",f(o,"art-mini");const h=function(){const{$mini:o}=t.template;if(o)return y(o,n),w(o,"display","flex");{const o=L("div");f(o,"art-mini-popup"),y(document.body,o),t.template.$mini=o,y(o,n);const p=y(o,'
');y(p,e.close),r(p,"click",c);const h=y(o,'
'),u=y(h,e.play),m=y(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(o,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){f(o,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;w(o,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,g(o,"art-mini-dragging");const t=P(o);a.set("left",t.left),a.set("top",t.top),w(o,"left",`${t.left}px`),w(o,"top",`${t.top}px`),w(o,"transform",null)}}),o}}(),u=a.get("top"),m=a.get("left");"number"===typeof u&&"number"===typeof m?(w(h,"top",`${u}px`),w(h,"left",`${m}px`),E(h)||p()):p(),t.emit("mini",!0)}else c()}})}function At(t){const{i18n:e,notice:r,template:{$video:a}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:a}=t;e.disablePictureInPicture=!1,H(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw a.show=t,t})):document.exitPictureInPicture().catch(t=>{throw a.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):a.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),H(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):H(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function Rt(t){const{option:e,template:{$progress:r,$video:a}}=t;let o=null,n=!1,i=null;t.on("setBar",async(o,s,l)=>{const c=t.controls?.thumbnails,{url:d,scale:h}=e.thumbnails;if(!c||!d)return;if("hover"===o||"played"===o&&l&&p){if(i||n||(n=!0,i=await A(d,h),n=!1),!i)return;const o=r.clientWidth*s;o>0&&or.clientWidth-h/2?w(n,"left",r.clientWidth-h+"px"):w(n,"left",o-h/2+"px")}(o)}}),H(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(o),o=null,n=!1,i=null)}})}Object.defineProperties(Mt,{isFullscreen:{get:()=>Boolean(document[Lt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Lt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Lt.fullscreenEnabled])}});class Ot{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;H(t,"url",{get:()=>r.src,async set(a){if(a){const o=t.url,n=e.type||V(a),i=e.customType[n];n&&i?(await Z(),t.loading.show=!0,i.call(t,r,a,t)):(URL.revokeObjectURL(o),r.src=a),o!==t.url&&(t.option.url=a,t.isReady&&o&&t.once("video:canplay",()=>{t.emit("restart",a)}))}else await Z(),t.loading.show=!0}})}(t),function(t){const{template:{$video:e}}=t;H(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=t;H(t,"play",{async value(){const i=await n.play();if(r.show=e.get("Play"),t.emit("play"),a.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;H(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${F(t.currentTime)} / ${F(t.duration)}`),t.emit("seek",t.currentTime,r)}}),H(t,"forward",{set(e){t.seek=t.currentTime+e}}),H(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:a,storage:o}=t;H(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=D(t,0,1),a.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&o.set("volume",e.volume)}}),H(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;H(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=D(r,0,t.duration))}})}(t),function(t){H(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((a,o)=>{if(e===t.url)return void a();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),o(e)},metadata:()=>{t.currentTime=r},canplay:async()=>{t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&await t.play(),t.notice.show="",a()}};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}H(t,"switchQuality",{value:r=>e(r,t.currentTime)}),H(t,"switchUrl",{value:t=>e(t,0)}),H(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:a}=t;H(t,"playbackRate",{get:()=>e.playbackRate,set(o){if(o){if(o===e.playbackRate)return;e.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;H(t,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)w(a,"width",null),w(a,"height",null),w(a,"margin",null),delete o.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=o,i=e/r,s=t[0]/t[1];i>s?(w(a,"width",s*r+"px"),w(a,"height","100%"),w(a,"margin","0 auto")):(w(a,"width","100%"),w(a,"height",e/s+"px"),w(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,a=L("canvas");H(t,"getDataURL",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),t(a.toDataURL("image/png"))}catch(n){e.show=n,o(n)}})}),H(t,"getBlobUrl",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,o(n)}})}),H(t,"screenshot",{value:async e=>{const a=await t.getDataURL();return Y(a,`${e||`artplayer_${F(r.currentTime)}`}.png`),t.emit("screenshot",a),a}})}(t),It(t),function(t){const{constructor:e,template:{$container:r,$player:a}}=t;let o="";H(t,"fullscreenWeb",{get:()=>v(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&y(document.body,a),t.state="fullscreenWeb",w(a,"width","100%"),w(a,"height","100%"),f(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&y(r,a),o&&(a.style.cssText=o,o=""),g(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),At(t),function(t){const{$video:e}=t.template;H(t,"loaded",{get:()=>t.loadedTime/e.duration}),H(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){H(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;H(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:a}=t.template;H(t,"autoSize",{value(){const{videoWidth:o,videoHeight:n}=a,{width:i,height:s}=P(e),l=o/n;if(i/s>l)w(r,"width",s*l/i*100+"%"),w(r,"height","100%");else{const t=i/l/s*100;w(r,"width","100%"),w(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){H(t,"rect",{get:()=>P(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[a]})}H(t,"x",{get:()=>t.left+window.pageXOffset}),H(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:a}=t;H(t,"flip",{get:()=>e.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete e.dataset.flip:e.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get(N(o))}`,t.emit("flip",o)}})}(t),Pt(t),function(t){const{template:{$poster:e}}=t;H(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch{return""}},set(t){w(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;H(t,"autoHeight",{value(){const{clientWidth:a}=e,{videoHeight:o,videoWidth:n}=r,i=o*(a/n);w(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;H(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){H(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){H(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];H(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let a=0;aa.$track?.offset||0,set(o){const{cues:n}=t.subtitle;if(!a.$track||0===n.length)return;const i=D(o,-10,10);a.$track.offset=i;for(let e=0;e{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,H(t,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){H(t,"quality",{set(e){const{controls:r,notice:a,i18n:o}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:n?.html||"",selector:e,onSelect:async e=>(await t.switchQuality(e.url),a.show=`${o.get("Switch Video")}: ${e.html}`,e.html)})}})}(t),Rt(t),function(t){const{i18n:e,notice:r,option:a,constructor:o,proxy:n,template:{$player:s,$video:l,$poster:c}}=t;let d=0;for(let p=0;p{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{d=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{a.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",async n=>{d{t.emit("resize"),p&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,w(c,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:a,$poster:o}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(a.volume=D(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(a.volume=D(n,0,1)),e.poster&&w(o,"backgroundImage",`url(${e.poster})`),e.autoplay&&(a.autoplay=e.autoplay),e.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function _t(t){const{notice:e,constructor:r,template:{$player:a,$video:o}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=o,r=document.documentElement.clientWidth,a=document.documentElement.clientHeight;return t>e&&ra}return t.on("fullscreenWeb",e=>{if(e){if(l()){const e=Number(r.AUTO_ORIENTATION_TIME??0);setTimeout(()=>{t.fullscreenWeb&&!v(a,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;w(a,"width",`${r}px`),w(a,"height",`${e}px`),w(a,"transform-origin","0 0"),w(a,"transform",`rotate(90deg) translate(0, -${e}px)`),f(a,n),t.isRotate=!0,t.emit("resize")}()},e)}}else v(a,n)&&(w(a,"width",""),w(a,"height",""),w(a,"transform-origin",""),w(a,"transform",""),g(a,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",async t=>{const r=!!screen?.orientation?.lock;if(t){if(r&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(t),s=!0,f(a,i)}catch(o){s=!1,e.show=o}}else if(v(a,i)&&g(a,i),r&&s){try{screen.orientation.unlock()}catch{}s=!1}}),{name:"autoOrientation",get state(){return v(a,n)}}}function Vt(t){const{i18n:e,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=u(".art-auto-playback-last",s),c=u(".art-auto-playback-jump",s),d=u(".art-auto-playback-close",s);y(d,r.close);let p=null;function h(){const r=(a.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),w(s,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&(w(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${F(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{w(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),w(i,"display","none"),w(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{w(s,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=a.get("times")||{},r=Object.keys(e);r.length>o.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,a.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(t){const e=a.get("times")||{};return delete e[t],a.set("times",e),e}}}function Yt(t){const{constructor:e,proxy:r,template:{$player:a,$video:o}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,g(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,f(a,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return v(a,"art-fast-forward")}}}function Dt(t){const{layers:e,icons:r,template:{$player:a}}=t;function o(){return v(a,"art-lock")}function n(){f(a,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){g(a,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const a=y(e,r.lock),o=y(e,r.unlock);w(a,"display","none"),t.on("lock",t=>{t?(w(a,"display","inline-flex"),w(o,"display","none")):(w(a,"display","none"),w(o,"display","inline-flex"))})},click(){o()?i():n()}}),{name:"lock",get state(){return o()},set state(t){t?n():i()}}}function Nt(t){return t.on("control",e=>{e?g(t.template.$player,"art-mini-progress-bar"):f(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Ft{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Nt),e.lock&&p&&this.add(Dt),e.autoPlayback&&!e.isLive&&this.add(Vt),e.autoOrientation&&p&&this.add(_t),e.fastForward&&p&&!e.isLive&&this.add(Yt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return _(!j(this,r),`Cannot add a plugin that already has the same name: ${r}`),H(this,r,{value:e}),this}}class Bt extends dt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:a}}=t;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=C(t,r.setting),a=C(t,this.$parent);!this.show||e||a||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:a,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:o.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:a,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:o.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=t;function n(t){return e.get(N(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:a,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:o.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:a}=t;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){for(let r=0;r{e.default=e===t,e.default&&e.$item&&$(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,a=[]){for(let o=0;oe}),H(n,"$parents",{get:()=>r}),H(n,"$option",{get:()=>t});const a=[];H(n,"$events",{get:()=>a}),H(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,a)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){const{controls:t,constructor:{SETTING_WIDTH:e,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(t.setting&&this.show){const n=this.active[0]?.$parent?.width||e,{left:i,width:s}=P(t.setting),{left:l,width:c}=P(a),d=i-l+s/2-n/2;if(w(o,"height",`${this.active===this.option?this.active.length*r:(this.active.length+1)*r}px`),w(o,"width",`${n}px`),this.art.isRotate||p)return;d+n>c?(w(o,"left",null),w(o,"right",null)):(w(o,"left",`${d}px`),w(o,"right","auto"))}}inactivate(t){for(let e=0;e'),s=L("div");f(s,"art-setting-item-left-icon"),y(s,a),y(i,s),y(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),y(e,n)}createItem(t,e=!1){if(!this.cache.has(t.$option))return;const r=this.cache.get(t.$option),a=t.$item;let o="selector";j(t,"switch")&&(o="switch"),j(t,"range")&&(o="range"),j(t,"onClick")&&(o="button");const{icons:n,proxy:i,constructor:s}=this.art,l=L("div");f(l,"art-setting-item"),w(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=t.name||"",l.dataset.value=t.value||"";const c=y(l,'
'),d=y(l,'
'),p=L("div");switch(f(p,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":y(p,t.icon||n.config);break;case"selector":t.selector?.length?y(p,t.icon||n.config):y(p,n.check)}y(c,p),H(t,"$icon",{configurable:!0,get:()=>p}),H(t,"icon",{configurable:!0,get:()=>p.innerHTML,set(t){p.innerHTML="",y(p,t)}});const h=L("div");f(h,"art-setting-item-left-text"),y(h,t.html||""),y(c,h),H(t,"$html",{configurable:!0,get:()=>h}),H(t,"html",{configurable:!0,get:()=>h.innerHTML,set(t){h.innerHTML="",y(h,t)}});const u=L("div");switch(f(u,"art-setting-item-right-tooltip"),y(u,t.tooltip||""),y(d,u),H(t,"$tooltip",{configurable:!0,get:()=>u}),H(t,"tooltip",{configurable:!0,get:()=>u.innerHTML,set(t){u.innerHTML="",y(u,t)}}),o){case"switch":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,n.switchOn),a=y(e,n.switchOff);w(t.switch?a:r,"display","none"),y(d,e),H(t,"$switch",{configurable:!0,get:()=>e});let o=t.switch;H(t,"switch",{configurable:!0,get:()=>o,set(t){o=t,t?(w(a,"display","none"),w(r,"display",null)):(w(a,"display",null),w(r,"display","none"))}});break}case"range":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],f(r,"art-setting-range"),y(d,e),H(t,"$range",{configurable:!0,get:()=>r});let a=[...t.range];H(t,"range",{configurable:!0,get:()=>a,set(t){a=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(t.selector?.length){const t=L("div");f(t,"art-setting-item-right-icon"),y(t,n.arrowRight),y(d,t)}}switch(o){case"switch":if(t.onSwitch){const e=i(l,"click",async e=>{t.switch=await t.onSwitch.call(this.art,t,l,e)});t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=i(t.$range,"change",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onRange.call(this.art,t,l,e)});t.$events.push(e)}if(t.onChange){const e=i(t.$range,"input",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onChange.call(this.art,t,l,e)});t.$events.push(e)}}break;case"selector":{const e=i(l,"click",async e=>{t.selector?.length?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=await t.$parent.onSelect.call(this.art,t,l,e)))});t.$events.push(e),t.default&&f(l,"art-current")}break;case"button":if(t.onClick){const e=i(l,"click",async e=>{t.tooltip=await t.onClick.call(this.art,t,l,e)});t.$events.push(e)}}H(t,"$item",{configurable:!0,get:()=>l}),e?z(l,a):y(r,l),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){if(this.active=t,this.cache.has(t)){$(this.cache.get(t),"art-current")}else{const e=L("div");this.cache.set(t,e),f(e,"art-setting-panel"),y(this.$parent,e),$(e,"art-current"),t[0]?.$parent&&this.createHeader(t[0]);for(let r=0;rnull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?x(r,t):w(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?B(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(t,e={}){const{i18n:r,notice:a,option:o}=this.art,n={...o.subtitle,...e,url:t},i=await this.init(n);return e.name&&(a.show=`${r.get("Switch Subtitle")}: ${e.name}`),i}createTrack(t,e){const{template:r,proxy:a,option:o}=this.art,{$video:n,$track:i}=r,s=L("track");s.default=!0,s.kind=t,s.src=e,s.label=o.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,b(i),y(n,s),r.$track=s,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(t){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(o(t,ct.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||V(t.url)){case"srt":{const e=X(r);return G(t.onVttLoad(e))}case"ass":{const e=K(r);return G(t.onVttLoad(e))}case"vtt":return G(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null}}class Ut{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=u(e.container),_(this.$container,`No container element found by ${e.container}`)),_(I(),"The current browser does not support flex layout");const a=this.$container.tagName.toLowerCase();_("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),_(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${n}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return u(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=Ut.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);_(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),z(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&f(this.$player,"art-backdrop"),p&&f(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":f(this.$player,"art-destroy")}}class qt{on(t,e,r){const a=this.e||(this.e={});return(a[t]||(a[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const a=this;function o(...n){a.off(t,o),e.apply(r,n)}return o._=e,this.on(t,o,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let a=0;ae.call(this,this)),Kt.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${Kt.version}`);for(let e=0;et(`Event@${e.type}`))}Gt.push(this)}static get instances(){return Gt}static get version(){return n}static get config(){return i}static get utils(){return tt}static get scheme(){return ct}static get Emitter(){return qt}static get validator(){return o}static get kindOf(){return o.kindOf}static get html(){return Ut.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:l?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){Kt.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),Gt.splice(Gt.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return Kt.STYLE=Wt,Kt.DEBUG=!1,Kt.CONTEXTMENU=!0,Kt.NOTICE_TIME=2e3,Kt.SETTING_WIDTH=250,Kt.SETTING_ITEM_WIDTH=200,Kt.SETTING_ITEM_HEIGHT=35,Kt.RESIZE_TIME=200,Kt.SCROLL_TIME=200,Kt.SCROLL_GAP=50,Kt.AUTO_PLAYBACK_MAX=10,Kt.AUTO_PLAYBACK_MIN=5,Kt.AUTO_PLAYBACK_TIMEOUT=3e3,Kt.RECONNECT_TIME_MAX=5,Kt.RECONNECT_SLEEP_TIME=1e3,Kt.CONTROL_HIDE_TIME=3e3,Kt.DBCLICK_TIME=300,Kt.DBCLICK_FULLSCREEN=!0,Kt.MOBILE_DBCLICK_PLAY=!0,Kt.MOBILE_CLICK_PLAY=!1,Kt.AUTO_ORIENTATION_TIME=200,Kt.INFO_LOOP_TIME=1e3,Kt.FAST_FORWARD_VALUE=3,Kt.FAST_FORWARD_TIME=1e3,Kt.TOUCH_MOVE_RATIO=.5,Kt.VOLUME_STEP=.1,Kt.SEEK_STEP=5,Kt.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],Kt.ASPECT_RATIO=["default","4:3","16:9"],Kt.FLIP=["normal","horizontal","vertical"],Kt.FULLSCREEN_WEB_IN_BODY=!0,Kt.LOG_VERSION=!0,Kt.USE_RAF=!1,Kt.REMOVE_SRC_WHEN_DESTROY=!0,h&&(M("artplayer-style",Wt),setTimeout(()=>{Kt.LOG_VERSION&&console.log(`%c ArtPlayer %c ${Kt.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),Kt}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var a=(e||(e=1,r.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(o=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(t){return t.constructor?t.constructor.name:null}function o(t,e){var a=2=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,h="undefined"!==typeof window&&"undefined"!==typeof document;function u(t,e=document){return e.querySelector(t)}function m(t,e=document){return Array.from(e.querySelectorAll(t))}function f(t,e){return t.classList.add(e)}function g(t,e){return t.classList.remove(e)}function v(t,e){return t.classList.contains(e)}function y(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function b(t){return t.parentNode.removeChild(t)}function w(t,e,r){return t.style[e]=r,t}function x(t,e){for(const r in e)w(t,r,e[r]);return t}function k(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function $(t,e){k(t).forEach(t=>g(t,e)),f(t,e)}function T(t,e,r="top"){p||(t.setAttribute("aria-label",e),f(t,"hint--rounded"),f(t,`hint--${r}`))}function E(t,e=0){const r=t.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=a&&r.top+r.height+e>=0,i=r.left-e<=o+e&&r.left+r.width+e>=0;return n&&i}function C(t,e){return R(t).includes(e)}function z(t,e){return e.parentNode.replaceChild(t,e),t}function L(t){return document.createElement(t)}function S(t="",e=""){const r=L("i");return f(r,"art-icon"),f(r,`art-icon-${t}`),y(r,e),r}function M(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function I(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function P(t){return t.getBoundingClientRect()}function A(t,e){return new Promise((r,a)=>{const o=new Image;o.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=o.width*e,n.height=o.height*e,i.drawImage(o,0,0,n.width,n.height),n.toBlob(e=>{const o=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(o),a(new Error(`Image load failed: ${t}`))},n.src=o})}else r(o)},o.onerror=function(){a(new Error(`Image load failed: ${t}`))},o.src=t})}function R(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class O extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function _(t,e){if(!t)throw new O(e);return t}function V(t){return t.includes("?")?V(t.split("?")[0]):t.includes("#")?V(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function Y(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function D(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function N(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),a=Math.floor(t-3600*e-60*r);return(e>0?[e,r,a]:[r,a]).map(t=>t<10?`0${t}`:String(t)).join(":")}function B(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const H=Object.defineProperty,{hasOwnProperty:W}=Object.prototype;function j(t,e){return W.call(t,e)}function U(t,e){return Object.getOwnPropertyDescriptor(t,e)}function q(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(a=>{const o=t[a],n=r[a];Array.isArray(o)&&Array.isArray(n)?t[a]=o.concat(...n):e(o)&&e(n)?t[a]=q(o,n):t[a]=n}),t),{})}function X(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=`${r}00`),2===r.length&&(a=`${r}0`),`${e},${a}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function G(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function K(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const a=t.match(e);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function Z(t=0){return new Promise(e=>setTimeout(e,t))}function J(t,e){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,a)),e)}}function Q(t,e){let r=!1;return function(...a){r||(t.apply(this,a),r=!0,setTimeout(()=>{r=!1},e))}}const tt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:O,addClass:f,append:y,assToVtt:K,capitalize:N,clamp:D,createElement:L,debounce:J,def:H,download:Y,errorHandle:_,escape:B,get:U,getComposedPath:R,getExt:V,getIcon:S,getRect:P,getStyle:function(t,e,r=!0){const a=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(a):a},has:j,hasClass:v,includeFromEvent:C,inverseClass:$,isBrowser:h,isIOS:c,isIOS13:d,isInViewport:E,isMobile:p,isSafari:l,loadImg:A,mergeDeep:q,query:u,queryAll:m,remove:b,removeClass:g,replaceElement:z,secondToTime:F,setStyle:w,setStyleText:M,setStyles:x,siblings:k,sleep:Z,srtToVtt:X,supportsFlex:I,throttle:Q,tooltip:T,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:s,vttToBlob:G},Symbol.toStringTag,{value:"Module"})),et="array",rt="boolean",at="string",ot="number",nt="object",it="function";function st(t,e,r){return _(e===at||e===ot||t instanceof Element,`${r.join(".")} require '${at}' or 'Element' type`)}const lt={html:st,disable:`?${rt}`,name:`?${at}`,index:`?${ot}`,style:`?${nt}`,click:`?${it}`,mounted:`?${it}`,tooltip:`?${at}|${ot}`,width:`?${ot}`,selector:`?${et}`,onSelect:`?${it}`,switch:`?${rt}`,onSwitch:`?${it}`,range:`?${et}`,onRange:`?${it}`,onChange:`?${it}`},ct={id:at,container:st,url:at,poster:at,type:at,theme:at,lang:at,volume:ot,isLive:rt,muted:rt,autoplay:rt,autoSize:rt,autoMini:rt,loop:rt,flip:rt,playbackRate:rt,aspectRatio:rt,screenshot:rt,setting:rt,hotkey:rt,pip:rt,mutex:rt,backdrop:rt,fullscreen:rt,fullscreenWeb:rt,subtitleOffset:rt,miniProgressBar:rt,useSSR:rt,playsInline:rt,lock:rt,gesture:rt,fastForward:rt,autoPlayback:rt,autoOrientation:rt,airplay:rt,proxy:`?${it}`,plugins:[it],layers:[lt],contextmenu:[lt],settings:[lt],controls:[{...lt,position:(t,e,r)=>{const a=["top","left","right"];return _(a.includes(t),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${rt}`,html:at,url:at}],highlight:[{time:ot,text:at}],thumbnails:{url:at,number:ot,column:ot,width:ot,height:ot,scale:ot},subtitle:{url:at,name:at,type:at,style:nt,escape:rt,encoding:at,onVttLoad:it},moreVideoAttr:nt,i18n:nt,icons:nt,cssVar:nt,customType:nt};class dt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return v(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?f(e,r):g(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",o(e,lt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;_(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const a=L("div");f(a,`art-${this.name}`),f(a,`art-${this.name}-${r}`);const n=Array.from(this.$parent.children);a.dataset.index=e.index||this.id;const i=n.find(t=>Number(t.dataset.index)>=Number(a.dataset.index));i?i.insertAdjacentElement("beforebegin",a):y(this.$parent,a),e.html&&y(a,e.html),e.style&&x(a,e.style),e.tooltip&&T(a,e.tooltip);const s=[];if(e.click){const t=this.art.events.proxy(a,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});s.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,a,s),this[r]=a,this.cache.set(r,{$ref:a,events:s,option:e}),e.mounted&&e.mounted.call(this.art,a),a}remove(t){_(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],b(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class pt extends dt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,p||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:a}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:a}}=e,o=a.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return{...t,html:`${r.get("Play Speed")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.playbackRate=Number(a),t.show=!1)},mounted:t=>{const r=u('[data-value="1"]',t);r&&$(r,"art-current"),e.on("video:ratechange",()=>{const r=m("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&$(r,"art-current")})}}}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:a}}=e,o=a.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return{...t,html:`${r.get("Aspect Ratio")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.aspectRatio=a,t.show=!1)},mounted:t=>{const r=u('[data-value="default"]',t);r&&$(r,"art-current"),e.on("aspectRatio",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:a}}=e,o=a.map(t=>`${r.get(N(t))}`).join("");return{...t,html:`${r.get("Video Flip")}: ${o}`,click:(t,r)=>{const{value:a}=r.target.dataset;a&&(e.flip=a.toLowerCase(),t.show=!1)},mounted:t=>{const r=u('[data-value="normal"]',t);r&&$(r,"art-current"),e.on("flip",e=>{const r=m("span",t).find(t=>t.dataset.value===e);r&&$(r,"art-current")})}}}}({name:"flip",index:30})),this.add(function(t){return e=>({...t,html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=h?location.href:"";return{...t,html:`ArtPlayer ${n}`}}({name:"version",index:50})),this.add(function(t){return e=>({...t,html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let o=0;o{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,o=t.clientY,{height:n,width:i,left:s,top:l}=P(r),{height:c,width:d}=P(a);let p=e-s,h=o-l;e+d>s+i&&(p=i-d),o+c>l+n&&(h=n-c),x(a,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{C(t,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function ht(t,e){const{$progress:r}=t.template,{left:a}=P(r),o=D((p?e.touches[0].clientX:e.clientX)-a,0,r.clientWidth),n=o/r.clientWidth*t.duration;return{second:n,time:F(n),width:o,percentage:D(o/r.clientWidth,0,1)}}function ut(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,a=r*t.duration;t.emit("setBar","played",r,e),t.seek=a}else{const{second:r,percentage:a}=ht(t,e);t.emit("setBar","played",a,e),t.seek=r}}function mt(t){return e=>{const{icons:r,option:a,proxy:o}=e,{$player:n,$progress:i}=e.template;return{...t,html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let s=null,l=!1;const c=u(".art-progress-hover",t),d=u(".art-progress-loaded",t),h=u(".art-progress-played",t),m=u(".art-progress-highlight",t),v=u(".art-progress-indicator",t),b=u(".art-progress-tip",t);function x(r,a){const{width:o,time:n}=a||ht(e,r);b.textContent=n||"00:00";const i=b.clientWidth;o<=i/2?w(b,"left",0):o>t.clientWidth-i/2?w(b,"left",t.clientWidth-i+"px"):w(b,"left",o-i/2+"px")}r.indicator?y(v,r.indicator):w(v,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,a,o){const i="played"===r&&o&&p;if("loaded"===r&&w(d,"width",100*a+"%"),"hover"===r&&(w(c,"width",100*a+"%"),C(o,m)?function(r){const{width:a}=ht(e,r),{text:o}=r.target.dataset;b.textContent=o;const n=b.clientWidth;a<=n/2?w(b,"left",0):a>t.clientWidth-n/2?w(b,"left",t.clientWidth-n+"px"):w(b,"left",a-n/2+"px")}(o):x(o),0===a?g(n,"art-progress-hover"):f(n,"art-progress-hover")),"played"===r&&(w(h,"width",100*a+"%"),w(v,"left",100*a+"%")),i){f(n,"art-progress-hover");x(o,{width:t.clientWidth*a,time:F(a*e.duration)}),clearTimeout(s),s=setTimeout(()=>{g(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){m.textContent="";for(let t=0;t`;y(m,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),p||(o(i,"click",t=>{t.target!==v&&ut(e,t)}),o(i,"mousemove",t=>{const{percentage:r}=ht(e,t);e.emit("setBar","hover",r,t)}),o(i,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),o(i,"mousedown",t=>{l=0===t.button}),e.on("document:mousemove",t=>{if(l){const{second:r,percentage:a}=ht(e,t);e.emit("setBar","played",a,t),e.seek=r}}),e.on("document:mouseup",()=>{l&&(l=!1)}))}}}}class ft extends dt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:a}=this.art.template;t.on("mousemove",()=>{p||(this.show=!0)}),t.on("click",()=>{p?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=C(t,a)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(g(r,"art-hide-cursor"),f(r,"art-hover"),this.timer=Date.now()):(f(r,"art-hide-cursor"),g(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(mt({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.play),i=y(t,a.pause);function s(){w(n,"display","flex"),w(i,"display","none")}function l(){w(n,"display","none"),w(i,"display","flex")}T(n,o.get("Play")),T(i,o.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a}=e,o=y(t,a.volume),n=y(t,a.volumeClose),i=y(t,'
'),s=y(i,'
'),l=y(s,'
'),c=y(s,'
'),d=y(c,'
'),h=y(d,'
'),u=y(c,'
');function m(t){const{top:e,height:r}=P(c);return 1-(t.clientY-e)/r}function f(){if(e.muted||0===e.volume)w(o,"display","none"),w(n,"display","flex"),w(u,"top","100%"),w(h,"top","100%"),l.textContent=0;else{const t=100*e.volume;w(o,"display","flex"),w(n,"display","none"),w(u,"top",100-t+"%"),w(h,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(f(),e.on("video:volumechange",f),r(o,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),p)w(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=m(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=m(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>({...t,style:p?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${F(e.currentTime)} / ${F(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let o=0;o{this.art.quality=t.quality}),t.screenshot&&!p&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{T(t,o.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e;y(t,a.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{T(t,o.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:a}=e;y(t,a.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenWebOn),i=y(t,a.fullscreenWebOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(T(t,o.get("Exit Web Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Web Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>({...t,tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:o}=e,n=y(t,a.fullscreenOn),i=y(t,a.fullscreenOff);w(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(T(t,o.get("Exit Fullscreen")),w(n,"display","none"),w(i,"display","inline-flex")):(T(t,o.get("Fullscreen")),w(n,"display","inline-flex"),w(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),H(e,"$control_item",{get:()=>r}),H(e,"$control_value",{get:()=>o})}const i=a(n,"click",async e=>{const r=R(e),a=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(a),t.onSelect&&(o.innerHTML=await t.onSelect.call(this.art,a,a.$control_item,e))});r.push(i)}}function gt(t,e,r,a){const o=e-a,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(o)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,o);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class vt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:a,$video:o}}=t;function n(e){C(e,a)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(o,"click",e=>{const a=Date.now();i.push(a);const{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>a-t<=n);switch(c.length){case 1:t.emit("click",e),p?!t.isLock&&o&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),p?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{f(r,"art-hover"),t.emit("hover",!0,e)},e=>{g(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:a}=t;t.on("resize",()=>{const{aspectRatio:e,notice:a}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,a.show=""});const o=J(()=>t.emit("resize"),a.RESIZE_TIME);t.on("window:orientationchange",()=>o()),t.on("window:resize",()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>o())}(t,this),function(t,e){if(p&&!t.option.isLive){const{$video:r,$progress:a}=t.template;let o=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){o===a&&ut(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:a,pageY:n}=e.touches[0],c=gt(i,s,a,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=D((a-i)/t.width,-1,1),d=D((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=o===r?t.constructor.TOUCH_MOVE_RATIO:1,u=D(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",D(u/t.duration,0,1),e),t.notice.show=`${F(u)} / ${F(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,o=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{o=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(a,"touchstart",t=>{o=a,c(t)}),e.proxy(a,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:a}}=t,o=Q(()=>{t.emit("view",E(a,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>o()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],a=["resize","scroll","orientationchange"],o=[];function n(n={}){for(let t=0;t{const a=n.document||i.ownerDocument||document,s=e.proxy(a,r,e=>{t.emit(`document:${r}`,e)});o.push(s)}),a.forEach(r=>{const a=n.window||i.ownerDocument?.defaultView||window,s=e.proxy(a,r,e=>{t.emit(`window:${r}`,e)});o.push(s)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,a={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,a));t.addEventListener(e,r,a);const o=()=>t.removeEventListener(e,r,a);return this.destroyEvents.add(o),o}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class yt{constructor(t){this.art=t,this.keys={},p||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n',...t.option.icons};for(const r in e)H(this,r,{get:()=>S(r,e[r])})}}class kt extends dt{constructor(t){super(t),this.name="info",p||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;t(a,"click",()=>{this.show=!1});let n=null;const i=m("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{w(o,"display","none"),w(n,"display",null)}),a.proxy(e.$state,"click",()=>t.play())}}class Ct{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:a}}=this.art;t?(a.textContent=t instanceof Error?t.message.trim():t,f(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{a.textContent="",g(r,"art-notice-show")},e.NOTICE_TIME)):g(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const zt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Lt=(()=>{if("undefined"===typeof document)return!1;const t=zt[0],e={};for(const r of zt){if(r[1]in document){for(const[a,o]of r.entries())e[t[a]]=o;return e}}return!1})(),St={change:Lt.fullscreenchange,error:Lt.fullscreenerror},Mt={request:(t=document.documentElement,e)=>new Promise((r,a)=>{const o=()=>{Mt.off("change",o),r()};Mt.on("change",o);const n=t[Lt.requestFullscreen](e);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((t,e)=>{if(!Mt.isFullscreen)return void t();const r=()=>{Mt.off("change",r),t()};Mt.on("change",r);const a=document[Lt.exitFullscreen]();a instanceof Promise&&a.then(r).catch(e)}),toggle:(t,e)=>Mt.isFullscreen?Mt.exit():Mt.request(t,e),onchange(t){Mt.on("change",t)},onerror(t){Mt.on("error",t)},on(t,e){const r=St[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=St[t];r&&document.removeEventListener(r,e,!1)},raw:Lt};function It(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;t.once("video:loadedmetadata",()=>{var n;Mt.isEnabled?(n=t,Mt.on("change",()=>{n.emit("fullscreen",Mt.isFullscreen),Mt.isFullscreen?(n.state="fullscreen",f(o,"art-fullscreen")):g(o,"art-fullscreen"),n.emit("resize")}),Mt.on("error",t=>{n.emit("fullscreenError",t)}),H(n,"fullscreen",{get:()=>Mt.isFullscreen,async set(t){t?await Mt.request(o):await Mt.exit()}})):a.webkitSupportsFullscreen?(t=>{t.on("document:webkitfullscreenchange",()=>{t.emit("fullscreen",t.fullscreen),t.emit("resize")}),H(t,"fullscreen",{get:()=>document.fullscreenElement===a,set(e){e?(t.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})})(t):H(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),H(t,"fullscreen",U(t,"fullscreen"))})}function Pt(t){const{icons:e,proxy:r,storage:a,template:{$player:o,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(g(o,"art-mini"),w(e,"display","none"),o.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(w(e,"display","none"),w(r,"display","flex")):(w(e,"display","flex"),w(r,"display","none"))}function p(){const{$mini:e}=t.template,r=P(e),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),w(e,"top",`${o}px`),w(e,"left",`${n}px`)}H(t,"mini",{get:()=>v(o,"art-mini"),set(h){if(h){t.state="mini",f(o,"art-mini");const h=function(){const{$mini:o}=t.template;if(o)return y(o,n),w(o,"display","flex");{const o=L("div");f(o,"art-mini-popup"),y(document.body,o),t.template.$mini=o,y(o,n);const p=y(o,'
');y(p,e.close),r(p,"click",c);const h=y(o,'
'),u=y(h,e.play),m=y(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(o,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){f(o,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;w(o,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,g(o,"art-mini-dragging");const t=P(o);a.set("left",t.left),a.set("top",t.top),w(o,"left",`${t.left}px`),w(o,"top",`${t.top}px`),w(o,"transform",null)}}),o}}(),u=a.get("top"),m=a.get("left");"number"===typeof u&&"number"===typeof m?(w(h,"top",`${u}px`),w(h,"left",`${m}px`),E(h)||p()):p(),t.emit("mini",!0)}else c()}})}function At(t){const{i18n:e,notice:r,template:{$video:a}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:a}=t;e.disablePictureInPicture=!1,H(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw a.show=t,t})):document.exitPictureInPicture().catch(t=>{throw a.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):a.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),H(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):H(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function Rt(t){const{option:e,template:{$progress:r,$video:a}}=t;let o=null,n=!1,i=null;t.on("setBar",async(o,s,l)=>{const c=t.controls?.thumbnails,{url:d,scale:h}=e.thumbnails;if(!c||!d)return;if("hover"===o||"played"===o&&l&&p){if(i||n||(n=!0,i=await A(d,h),n=!1),!i)return;const o=r.clientWidth*s;o>0&&or.clientWidth-h/2?w(n,"left",r.clientWidth-h+"px"):w(n,"left",o-h/2+"px")}(o)}}),H(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(o),o=null,n=!1,i=null)}})}Object.defineProperties(Mt,{isFullscreen:{get:()=>Boolean(document[Lt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Lt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Lt.fullscreenEnabled])}});class Ot{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;H(t,"url",{get:()=>r.src,async set(a){if(a){const o=t.url,n=e.type||V(a),i=e.customType[n];n&&i?(await Z(),t.loading.show=!0,i.call(t,r,a,t)):(URL.revokeObjectURL(o),r.src=a),o!==t.url&&(t.option.url=a,t.isReady&&o&&t.once("video:canplay",()=>{t.emit("restart",a)}))}else await Z(),t.loading.show=!0}})}(t),function(t){const{template:{$video:e}}=t;H(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=t;H(t,"play",{async value(){const i=await n.play();if(r.show=e.get("Play"),t.emit("play"),a.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;H(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${F(t.currentTime)} / ${F(t.duration)}`),t.emit("seek",t.currentTime,r)}}),H(t,"forward",{set(e){t.seek=t.currentTime+e}}),H(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:a,storage:o}=t;H(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=D(t,0,1),a.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&o.set("volume",e.volume)}}),H(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;H(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=D(r,0,t.duration))}})}(t),function(t){H(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((a,o)=>{if(e===t.url)return void a();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),o(e)},metadata:()=>{t.currentTime=r},canplay:async()=>{t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&await t.play(),t.notice.show="",a()}};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}H(t,"switchQuality",{value:r=>e(r,t.currentTime)}),H(t,"switchUrl",{value:t=>e(t,0)}),H(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:a}=t;H(t,"playbackRate",{get:()=>e.playbackRate,set(o){if(o){if(o===e.playbackRate)return;e.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:a,$player:o}}=t;H(t,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)w(a,"width",null),w(a,"height",null),w(a,"margin",null),delete o.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=o,i=e/r,s=t[0]/t[1];i>s?(w(a,"width",s*r+"px"),w(a,"height","100%"),w(a,"margin","0 auto")):(w(a,"width","100%"),w(a,"height",e/s+"px"),w(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,a=L("canvas");H(t,"getDataURL",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),t(a.toDataURL("image/png"))}catch(n){e.show=n,o(n)}})}),H(t,"getBlobUrl",{value:()=>new Promise((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,o(n)}})}),H(t,"screenshot",{value:async e=>{const a=await t.getDataURL();return Y(a,`${e||`artplayer_${F(r.currentTime)}`}.png`),t.emit("screenshot",a),a}})}(t),It(t),function(t){const{constructor:e,template:{$container:r,$player:a}}=t;let o="";H(t,"fullscreenWeb",{get:()=>v(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&y(document.body,a),t.state="fullscreenWeb",w(a,"width","100%"),w(a,"height","100%"),f(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&y(r,a),o&&(a.style.cssText=o,o=""),g(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),At(t),function(t){const{$video:e}=t.template;H(t,"loaded",{get:()=>t.loadedTime/e.duration}),H(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){H(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;H(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:a}=t.template;H(t,"autoSize",{value(){const{videoWidth:o,videoHeight:n}=a,{width:i,height:s}=P(e),l=o/n;if(i/s>l)w(r,"width",s*l/i*100+"%"),w(r,"height","100%");else{const t=i/l/s*100;w(r,"width","100%"),w(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){H(t,"rect",{get:()=>P(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[a]})}H(t,"x",{get:()=>t.left+window.pageXOffset}),H(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:a}=t;H(t,"flip",{get:()=>e.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete e.dataset.flip:e.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get(N(o))}`,t.emit("flip",o)}})}(t),Pt(t),function(t){const{template:{$poster:e}}=t;H(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch{return""}},set(t){w(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;H(t,"autoHeight",{value(){const{clientWidth:a}=e,{videoHeight:o,videoWidth:n}=r,i=o*(a/n);w(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;H(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){H(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){H(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];H(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let a=0;aa.$track?.offset||0,set(o){const{cues:n}=t.subtitle;if(!a.$track||0===n.length)return;const i=D(o,-10,10);a.$track.offset=i;for(let e=0;e{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,H(t,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){H(t,"quality",{set(e){const{controls:r,notice:a,i18n:o}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:n?.html||"",selector:e,onSelect:async e=>(await t.switchQuality(e.url),a.show=`${o.get("Switch Video")}: ${e.html}`,e.html)})}})}(t),Rt(t),function(t){const{i18n:e,notice:r,option:a,constructor:o,proxy:n,template:{$player:s,$video:l,$poster:c}}=t;let d=0;for(let p=0;p{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{d=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{a.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",async n=>{d{t.emit("resize"),p&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,w(c,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:a,$poster:o}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(a.volume=D(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(a.volume=D(n,0,1)),e.poster&&w(o,"backgroundImage",`url(${e.poster})`),e.autoplay&&(a.autoplay=e.autoplay),e.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function _t(t){const{notice:e,constructor:r,template:{$player:a,$video:o}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=o,r=document.documentElement.clientWidth,a=document.documentElement.clientHeight;return t>e&&ra}return t.on("fullscreenWeb",e=>{if(e){if(l()){const e=Number(r.AUTO_ORIENTATION_TIME??0);setTimeout(()=>{t.fullscreenWeb&&!v(a,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;w(a,"width",`${r}px`),w(a,"height",`${e}px`),w(a,"transform-origin","0 0"),w(a,"transform",`rotate(90deg) translate(0, -${e}px)`),f(a,n),t.isRotate=!0,t.emit("resize")}()},e)}}else v(a,n)&&(w(a,"width",""),w(a,"height",""),w(a,"transform-origin",""),w(a,"transform",""),g(a,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",async t=>{const r=!!screen?.orientation?.lock;if(t){if(r&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(t),s=!0,f(a,i)}catch(o){s=!1,e.show=o}}else if(v(a,i)&&g(a,i),r&&s){try{screen.orientation.unlock()}catch{}s=!1}}),{name:"autoOrientation",get state(){return v(a,n)}}}function Vt(t){const{i18n:e,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=u(".art-auto-playback-last",s),c=u(".art-auto-playback-jump",s),d=u(".art-auto-playback-close",s);y(d,r.close);let p=null;function h(){const r=(a.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),w(s,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&(w(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${F(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{w(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),w(i,"display","none"),w(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{w(s,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=a.get("times")||{},r=Object.keys(e);r.length>o.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,a.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(t){const e=a.get("times")||{};return delete e[t],a.set("times",e),e}}}function Yt(t){const{constructor:e,proxy:r,template:{$player:a,$video:o}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,g(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,f(a,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return v(a,"art-fast-forward")}}}function Dt(t){const{layers:e,icons:r,template:{$player:a}}=t;function o(){return v(a,"art-lock")}function n(){f(a,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){g(a,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const a=y(e,r.lock),o=y(e,r.unlock);w(a,"display","none"),t.on("lock",t=>{t?(w(a,"display","inline-flex"),w(o,"display","none")):(w(a,"display","none"),w(o,"display","inline-flex"))})},click(){o()?i():n()}}),{name:"lock",get state(){return o()},set state(t){t?n():i()}}}function Nt(t){return t.on("control",e=>{e?g(t.template.$player,"art-mini-progress-bar"):f(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Ft{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Nt),e.lock&&p&&this.add(Dt),e.autoPlayback&&!e.isLive&&this.add(Vt),e.autoOrientation&&p&&this.add(_t),e.fastForward&&p&&!e.isLive&&this.add(Yt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return _(!j(this,r),`Cannot add a plugin that already has the same name: ${r}`),H(this,r,{value:e}),this}}class Bt extends dt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:a}}=t;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=C(t,r.setting),a=C(t,this.$parent);!this.show||e||a||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:a,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:o.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:a,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:o.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=t;function n(t){return e.get(N(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:a,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:o.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:a}=t;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){for(let r=0;r{e.default=e===t,e.default&&e.$item&&$(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,a=[]){for(let o=0;oe}),H(n,"$parents",{get:()=>r}),H(n,"$option",{get:()=>t});const a=[];H(n,"$events",{get:()=>a}),H(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,a)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){const{controls:t,constructor:{SETTING_WIDTH:e,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(t.setting&&this.show){const n=this.active[0]?.$parent?.width||e,{left:i,width:s}=P(t.setting),{left:l,width:c}=P(a),d=i-l+s/2-n/2;if(w(o,"height",`${this.active===this.option?this.active.length*r:(this.active.length+1)*r}px`),w(o,"width",`${n}px`),this.art.isRotate||p)return;d+n>c?(w(o,"left",null),w(o,"right",null)):(w(o,"left",`${d}px`),w(o,"right","auto"))}}inactivate(t){for(let e=0;e'),s=L("div");f(s,"art-setting-item-left-icon"),y(s,a),y(i,s),y(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),y(e,n)}createItem(t,e=!1){if(!this.cache.has(t.$option))return;const r=this.cache.get(t.$option),a=t.$item;let o="selector";j(t,"switch")&&(o="switch"),j(t,"range")&&(o="range"),j(t,"onClick")&&(o="button");const{icons:n,proxy:i,constructor:s}=this.art,l=L("div");f(l,"art-setting-item"),w(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=t.name||"",l.dataset.value=t.value||"";const c=y(l,'
'),d=y(l,'
'),p=L("div");switch(f(p,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":y(p,t.icon||n.config);break;case"selector":t.selector?.length?y(p,t.icon||n.config):y(p,n.check)}y(c,p),H(t,"$icon",{configurable:!0,get:()=>p}),H(t,"icon",{configurable:!0,get:()=>p.innerHTML,set(t){p.innerHTML="",y(p,t)}});const h=L("div");f(h,"art-setting-item-left-text"),y(h,t.html||""),y(c,h),H(t,"$html",{configurable:!0,get:()=>h}),H(t,"html",{configurable:!0,get:()=>h.innerHTML,set(t){h.innerHTML="",y(h,t)}});const u=L("div");switch(f(u,"art-setting-item-right-tooltip"),y(u,t.tooltip||""),y(d,u),H(t,"$tooltip",{configurable:!0,get:()=>u}),H(t,"tooltip",{configurable:!0,get:()=>u.innerHTML,set(t){u.innerHTML="",y(u,t)}}),o){case"switch":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,n.switchOn),a=y(e,n.switchOff);w(t.switch?a:r,"display","none"),y(d,e),H(t,"$switch",{configurable:!0,get:()=>e});let o=t.switch;H(t,"switch",{configurable:!0,get:()=>o,set(t){o=t,t?(w(a,"display","none"),w(r,"display",null)):(w(a,"display",null),w(r,"display","none"))}});break}case"range":{const e=L("div");f(e,"art-setting-item-right-icon");const r=y(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],f(r,"art-setting-range"),y(d,e),H(t,"$range",{configurable:!0,get:()=>r});let a=[...t.range];H(t,"range",{configurable:!0,get:()=>a,set(t){a=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(t.selector?.length){const t=L("div");f(t,"art-setting-item-right-icon"),y(t,n.arrowRight),y(d,t)}}switch(o){case"switch":if(t.onSwitch){const e=i(l,"click",async e=>{t.switch=await t.onSwitch.call(this.art,t,l,e)});t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=i(t.$range,"change",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onRange.call(this.art,t,l,e)});t.$events.push(e)}if(t.onChange){const e=i(t.$range,"input",async e=>{t.range[0]=t.$range.valueAsNumber,t.tooltip=await t.onChange.call(this.art,t,l,e)});t.$events.push(e)}}break;case"selector":{const e=i(l,"click",async e=>{t.selector?.length?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=await t.$parent.onSelect.call(this.art,t,l,e)))});t.$events.push(e),t.default&&f(l,"art-current")}break;case"button":if(t.onClick){const e=i(l,"click",async e=>{t.tooltip=await t.onClick.call(this.art,t,l,e)});t.$events.push(e)}}H(t,"$item",{configurable:!0,get:()=>l}),e?z(l,a):y(r,l),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){if(this.active=t,this.cache.has(t)){$(this.cache.get(t),"art-current")}else{const e=L("div");this.cache.set(t,e),f(e,"art-setting-panel"),y(this.$parent,e),$(e,"art-current"),t[0]?.$parent&&this.createHeader(t[0]);for(let r=0;rnull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?x(r,t):w(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?B(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(t,e={}){const{i18n:r,notice:a,option:o}=this.art,n={...o.subtitle,...e,url:t},i=await this.init(n);return e.name&&(a.show=`${r.get("Switch Subtitle")}: ${e.name}`),i}createTrack(t,e){const{template:r,proxy:a,option:o}=this.art,{$video:n,$track:i}=r,s=L("track");s.default=!0,s.kind=t,s.src=e,s.label=o.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,b(i),y(n,s),r.$track=s,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(t){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(o(t,ct.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||V(t.url)){case"srt":{const e=X(r);return G(t.onVttLoad(e))}case"ass":{const e=K(r);return G(t.onVttLoad(e))}case"vtt":return G(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null}}class Ut{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=u(e.container),_(this.$container,`No container element found by ${e.container}`)),_(I(),"The current browser does not support flex layout");const a=this.$container.tagName.toLowerCase();_("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),_(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${n}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return u(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=Ut.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);_(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),z(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&f(this.$player,"art-backdrop"),p&&f(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":f(this.$player,"art-destroy")}}class qt{on(t,e,r){const a=this.e||(this.e={});return(a[t]||(a[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const a=this;function o(...n){a.off(t,o),e.apply(r,n)}return o._=e,this.on(t,o,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let a=0;ae.call(this,this)),Kt.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${Kt.version}`);for(let e=0;et(`Event@${e.type}`))}Gt.push(this)}static get instances(){return Gt}static get version(){return n}static get config(){return i}static get utils(){return tt}static get scheme(){return ct}static get Emitter(){return qt}static get validator(){return o}static get kindOf(){return o.kindOf}static get html(){return Ut.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:l?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){Kt.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),Gt.splice(Gt.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return Kt.STYLE=Wt,Kt.DEBUG=!1,Kt.CONTEXTMENU=!0,Kt.NOTICE_TIME=2e3,Kt.SETTING_WIDTH=250,Kt.SETTING_ITEM_WIDTH=200,Kt.SETTING_ITEM_HEIGHT=35,Kt.RESIZE_TIME=200,Kt.SCROLL_TIME=200,Kt.SCROLL_GAP=50,Kt.AUTO_PLAYBACK_MAX=10,Kt.AUTO_PLAYBACK_MIN=5,Kt.AUTO_PLAYBACK_TIMEOUT=3e3,Kt.RECONNECT_TIME_MAX=5,Kt.RECONNECT_SLEEP_TIME=1e3,Kt.CONTROL_HIDE_TIME=3e3,Kt.DBCLICK_TIME=300,Kt.DBCLICK_FULLSCREEN=!0,Kt.MOBILE_DBCLICK_PLAY=!0,Kt.MOBILE_CLICK_PLAY=!1,Kt.AUTO_ORIENTATION_TIME=200,Kt.INFO_LOOP_TIME=1e3,Kt.FAST_FORWARD_VALUE=3,Kt.FAST_FORWARD_TIME=1e3,Kt.TOUCH_MOVE_RATIO=.5,Kt.VOLUME_STEP=.1,Kt.SEEK_STEP=5,Kt.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],Kt.ASPECT_RATIO=["default","4:3","16:9"],Kt.FLIP=["normal","horizontal","vertical"],Kt.FULLSCREEN_WEB_IN_BODY=!0,Kt.LOG_VERSION=!0,Kt.USE_RAF=!1,Kt.REMOVE_SRC_WHEN_DESTROY=!0,h&&(M("artplayer-style",Wt),setTimeout(()=>{Kt.LOG_VERSION&&console.log(`%c ArtPlayer %c ${Kt.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),Kt}); diff --git a/packages/artplayer/dist/artplayer.legacy.js b/packages/artplayer/dist/artplayer.legacy.js index db6846ba5..fca0a796e 100644 --- a/packages/artplayer/dist/artplayer.legacy.js +++ b/packages/artplayer/dist/artplayer.legacy.js @@ -1,7 +1,7 @@ /*! - * artplayer.js v5.3.1 + * artplayer.js v5.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. */ -!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))n.call(e,r)&&s(t,r,e[r]);if(a)for(var r of a(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,a)=>{var n=t=>{try{s(r.next(t))}catch(e){a(e)}},i=t=>{try{s(r.throw(t))}catch(e){a(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(n,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h,u={exports:{}};var m=(h||(h=1,u.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(a=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2=1,k=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(y)||x,$="undefined"!==typeof window&&"undefined"!==typeof document;function T(t,e=document){return e.querySelector(t)}function E(t,e=document){return Array.from(e.querySelectorAll(t))}function C(t,e){return t.classList.add(e)}function z(t,e){return t.classList.remove(e)}function L(t,e){return t.classList.contains(e)}function S(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function M(t){return t.parentNode.removeChild(t)}function I(t,e,r){return t.style[e]=r,t}function P(t,e){for(const r in e)I(t,r,e[r]);return t}function A(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function O(t,e){A(t).forEach(t=>z(t,e)),C(t,e)}function R(t,e,r="top"){k||(t.setAttribute("aria-label",e),C(t,"hint--rounded"),C(t,`hint--${r}`))}function _(t,e=0){const r=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=o&&r.top+r.height+e>=0,i=r.left-e<=a+e&&r.left+r.width+e>=0;return n&&i}function V(t,e){return j(t).includes(e)}function Y(t,e){return e.parentNode.replaceChild(t,e),t}function D(t){return document.createElement(t)}function N(t="",e=""){const r=D("i");return C(r,"art-icon"),C(r,`art-icon-${t}`),S(r,e),r}function F(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function B(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function H(t){return t.getBoundingClientRect()}function W(t,e){return new Promise((r,o)=>{const a=new Image;a.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=a.width*e,n.height=a.height*e,i.drawImage(a,0,0,n.width,n.height),n.toBlob(e=>{const a=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(a),o(new Error(`Image load failed: ${t}`))},n.src=a})}else r(a)},a.onerror=function(){o(new Error(`Image load failed: ${t}`))},a.src=t})}function j(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class U extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function q(t,e){if(!t)throw new U(e);return t}function X(t){return t.includes("?")?X(t.split("?")[0]):t.includes("#")?X(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function G(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function K(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function Z(t){return t.charAt(0).toUpperCase()+t.slice(1)}function J(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),o=Math.floor(t-3600*e-60*r);return(e>0?[e,r,o]:[r,o]).map(t=>t<10?`0${t}`:String(t)).join(":")}function Q(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const tt=Object.defineProperty,{hasOwnProperty:et}=Object.prototype;function rt(t,e){return et.call(t,e)}function ot(t,e){return Object.getOwnPropertyDescriptor(t,e)}function at(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(o=>{const a=t[o],n=r[o];Array.isArray(a)&&Array.isArray(n)?t[o]=a.concat(...n):e(a)&&e(n)?t[o]=at(a,n):t[o]=n}),t),{})}function nt(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=`${r}00`),2===r.length&&(o=`${r}0`),`${e},${o}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function it(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function st(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const o=t.match(e);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function lt(t=0){return new Promise(e=>setTimeout(e,t))}function ct(t,e){let r;return function(...o){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,o)),e)}}function dt(t,e){let r=!1;return function(...o){r||(t.apply(this,o),r=!0,setTimeout(()=>{r=!1},e))}}const pt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:U,addClass:C,append:S,assToVtt:st,capitalize:Z,clamp:K,createElement:D,debounce:ct,def:tt,download:G,errorHandle:q,escape:Q,get:ot,getComposedPath:j,getExt:X,getIcon:N,getRect:H,getStyle:function(t,e,r=!0){const o=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(o):o},has:rt,hasClass:L,includeFromEvent:V,inverseClass:O,isBrowser:$,isIOS:w,isIOS13:x,isInViewport:_,isMobile:k,isSafari:b,loadImg:W,mergeDeep:at,query:T,queryAll:E,remove:M,removeClass:z,replaceElement:Y,secondToTime:J,setStyle:I,setStyleText:F,setStyles:P,siblings:A,sleep:lt,srtToVtt:nt,supportsFlex:B,throttle:dt,tooltip:R,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:y,vttToBlob:it},Symbol.toStringTag,{value:"Module"})),ht="array",ut="boolean",mt="string",ft="number",gt="object",vt="function";function yt(t,e,r){return q(e===mt||e===ft||t instanceof Element,`${r.join(".")} require '${mt}' or 'Element' type`)}const bt={html:yt,disable:`?${ut}`,name:`?${mt}`,index:`?${ft}`,style:`?${gt}`,click:`?${vt}`,mounted:`?${vt}`,tooltip:`?${mt}|${ft}`,width:`?${ft}`,selector:`?${ht}`,onSelect:`?${vt}`,switch:`?${ut}`,onSwitch:`?${vt}`,range:`?${ht}`,onRange:`?${vt}`,onChange:`?${vt}`},wt={id:mt,container:yt,url:mt,poster:mt,type:mt,theme:mt,lang:mt,volume:ft,isLive:ut,muted:ut,autoplay:ut,autoSize:ut,autoMini:ut,loop:ut,flip:ut,playbackRate:ut,aspectRatio:ut,screenshot:ut,setting:ut,hotkey:ut,pip:ut,mutex:ut,backdrop:ut,fullscreen:ut,fullscreenWeb:ut,subtitleOffset:ut,miniProgressBar:ut,useSSR:ut,playsInline:ut,lock:ut,gesture:ut,fastForward:ut,autoPlayback:ut,autoOrientation:ut,airplay:ut,proxy:`?${vt}`,plugins:[vt],layers:[bt],contextmenu:[bt],settings:[bt],controls:[c(l({},bt),{position:(t,e,r)=>{const o=["top","left","right"];return q(o.includes(t),`${r.join(".")} only accept ${o.toString()} as parameters`)}})],quality:[{default:`?${ut}`,html:mt,url:mt}],highlight:[{time:ft,text:mt}],thumbnails:{url:mt,number:ft,column:ft,width:ft,height:ft,scale:ft},subtitle:{url:mt,name:mt,type:mt,style:gt,escape:ut,encoding:mt,onVttLoad:vt},moreVideoAttr:gt,i18n:gt,icons:gt,cssVar:gt,customType:gt};class xt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return L(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?C(e,r):z(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",f(e,bt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;q(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const o=D("div");C(o,`art-${this.name}`),C(o,`art-${this.name}-${r}`);const a=Array.from(this.$parent.children);o.dataset.index=e.index||this.id;const n=a.find(t=>Number(t.dataset.index)>=Number(o.dataset.index));n?n.insertAdjacentElement("beforebegin",o):S(this.$parent,o),e.html&&S(o,e.html),e.style&&P(o,e.style),e.tooltip&&R(o,e.tooltip);const i=[];if(e.click){const t=this.art.events.proxy(o,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});i.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,o,i),this[r]=o,this.cache.set(r,{$ref:o,events:i,option:e}),e.mounted&&e.mounted.call(this.art,o),o}remove(t){q(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],M(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class kt extends xt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,k||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:o}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:o}}=e,a=o.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return c(l({},t),{html:`${r.get("Play Speed")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.playbackRate=Number(o),t.show=!1)},mounted:t=>{const r=T('[data-value="1"]',t);r&&O(r,"art-current"),e.on("video:ratechange",()=>{const r=E("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&O(r,"art-current")})}})}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:o}}=e,a=o.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return c(l({},t),{html:`${r.get("Aspect Ratio")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.aspectRatio=o,t.show=!1)},mounted:t=>{const r=T('[data-value="default"]',t);r&&O(r,"art-current"),e.on("aspectRatio",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:o}}=e,a=o.map(t=>`${r.get(Z(t))}`).join("");return c(l({},t),{html:`${r.get("Video Flip")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.flip=o.toLowerCase(),t.show=!1)},mounted:t=>{const r=T('[data-value="normal"]',t);r&&O(r,"art-current"),e.on("flip",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"flip",index:30})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=$?location.href:"";return c(l({},t),{html:`ArtPlayer ${g}`})}({name:"version",index:50})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let a=0;a{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,a=t.clientY,{height:n,width:i,left:s,top:l}=H(r),{height:c,width:d}=H(o);let p=e-s,h=a-l;e+d>s+i&&(p=i-d),a+c>l+n&&(h=n-c),P(o,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{V(t,o)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function $t(t,e){const{$progress:r}=t.template,{left:o}=H(r),a=K((k?e.touches[0].clientX:e.clientX)-o,0,r.clientWidth),n=a/r.clientWidth*t.duration;return{second:n,time:J(n),width:a,percentage:K(a/r.clientWidth,0,1)}}function Tt(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,o=r*t.duration;t.emit("setBar","played",r,e),t.seek=o}else{const{second:r,percentage:o}=$t(t,e);t.emit("setBar","played",o,e),t.seek=r}}function Et(t){return e=>{const{icons:r,option:o,proxy:a}=e,{$player:n}=e.template;return c(l({},t),{html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let i=null,s=!1;const l=T(".art-progress-hover",t),c=T(".art-progress-loaded",t),d=T(".art-progress-played",t),p=T(".art-progress-highlight",t),h=T(".art-progress-indicator",t),u=T(".art-progress-tip",t);function m(r,o){const{width:a,time:n}=o||$t(e,r);u.textContent=n||"00:00";const i=u.clientWidth;a<=i/2?I(u,"left",0):a>t.clientWidth-i/2?I(u,"left",t.clientWidth-i+"px"):I(u,"left",a-i/2+"px")}r.indicator?S(h,r.indicator):I(h,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,o,a){const s="played"===r&&a&&k;if("loaded"===r&&I(c,"width",100*o+"%"),"hover"===r&&(I(l,"width",100*o+"%"),V(a,p)?function(r){const{width:o}=$t(e,r),{text:a}=r.target.dataset;u.textContent=a;const n=u.clientWidth;o<=n/2?I(u,"left",0):o>t.clientWidth-n/2?I(u,"left",t.clientWidth-n+"px"):I(u,"left",o-n/2+"px")}(a):m(a),0===o?z(n,"art-progress-hover"):C(n,"art-progress-hover")),"played"===r&&(I(d,"width",100*o+"%"),I(h,"left",100*o+"%")),s){C(n,"art-progress-hover");m(a,{width:t.clientWidth*o,time:J(o*e.duration)}),clearTimeout(i),i=setTimeout(()=>{z(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){p.textContent="";for(let t=0;t`;S(p,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),k||(a(t,"click",t=>{t.target!==h&&Tt(e,t)}),a(t,"mousemove",t=>{const{percentage:r}=$t(e,t);e.emit("setBar","hover",r,t)}),a(t,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),a(t,"mousedown",t=>{s=0===t.button}),e.on("document:mousemove",t=>{if(s){const{second:r,percentage:o}=$t(e,t);e.emit("setBar","played",o,t),e.seek=r}}),e.on("document:mouseup",()=>{s&&(s=!1)}))}})}}class Ct extends xt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:o}=this.art.template;t.on("mousemove",()=>{k||(this.show=!0)}),t.on("click",()=>{k?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=V(t,o)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(z(r,"art-hide-cursor"),C(r,"art-hover"),this.timer=Date.now()):(C(r,"art-hide-cursor"),z(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(Et({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.play),i=S(t,o.pause);function s(){I(n,"display","flex"),I(i,"display","none")}function l(){I(n,"display","none"),I(i,"display","flex")}R(n,a.get("Play")),R(i,a.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o}=e,a=S(t,o.volume),n=S(t,o.volumeClose),i=S(t,'
'),s=S(i,'
'),l=S(s,'
'),c=S(s,'
'),d=S(c,'
'),p=S(d,'
'),h=S(c,'
');function u(t){const{top:e,height:r}=H(c);return 1-(t.clientY-e)/r}function m(){if(e.muted||0===e.volume)I(a,"display","none"),I(n,"display","flex"),I(h,"top","100%"),I(p,"top","100%"),l.textContent=0;else{const t=100*e.volume;I(a,"display","flex"),I(n,"display","none"),I(h,"top",100-t+"%"),I(p,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(m(),e.on("video:volumechange",m),r(a,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),k)I(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=u(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=u(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>c(l({},t),{style:k?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${J(e.currentTime)} / ${J(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const o=["video:loadedmetadata","video:timeupdate","video:progress"];for(let a=0;a{this.art.quality=t.quality}),t.screenshot&&!k&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{R(t,a.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{R(t,a.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenWebOn),i=S(t,o.fullscreenWebOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(R(t,a.get("Exit Web Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Web Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenOn),i=S(t,o.fullscreenOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(R(t,a.get("Exit Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),tt(e,"$control_item",{get:()=>r}),tt(e,"$control_value",{get:()=>a})}const i=o(n,"click",e=>d(this,null,function*(){const r=j(e),o=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(o),t.onSelect&&(a.innerHTML=yield t.onSelect.call(this.art,o,o.$control_item,e))}));r.push(i)}}function zt(t,e,r,o){const a=e-o,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(a)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,a);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class Lt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:o,$video:a}}=t;function n(e){V(e,o)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(a,"click",e=>{const o=Date.now();i.push(o);const{MOBILE_CLICK_PLAY:a,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>o-t<=n);switch(c.length){case 1:t.emit("click",e),k?!t.isLock&&a&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),k?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{C(r,"art-hover"),t.emit("hover",!0,e)},e=>{z(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:o}=t;t.on("resize",()=>{const{aspectRatio:e,notice:o}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,o.show=""});const a=ct(()=>t.emit("resize"),o.RESIZE_TIME);t.on("window:orientationchange",()=>a()),t.on("window:resize",()=>a()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>a())}(t,this),function(t,e){if(k&&!t.option.isLive){const{$video:r,$progress:o}=t.template;let a=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){a===o&&Tt(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:o,pageY:n}=e.touches[0],c=zt(i,s,o,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=K((o-i)/t.width,-1,1),d=K((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=a===r?t.constructor.TOUCH_MOVE_RATIO:1,u=K(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",K(u/t.duration,0,1),e),t.notice.show=`${J(u)} / ${J(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,a=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{a=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(o,"touchstart",t=>{a=o,c(t)}),e.proxy(o,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:o}}=t,a=dt(()=>{t.emit("view",_(o,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>a()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],o=["resize","scroll","orientationchange"],a=[];function n(n={}){for(let t=0;t{const o=n.document||i.ownerDocument||document,s=e.proxy(o,r,e=>{t.emit(`document:${r}`,e)});a.push(s)}),o.forEach(r=>{var o;const s=n.window||(null==(o=i.ownerDocument)?void 0:o.defaultView)||window,l=e.proxy(s,r,e=>{t.emit(`window:${r}`,e)});a.push(l)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,o={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,o));t.addEventListener(e,r,o);const a=()=>t.removeEventListener(e,r,o);return this.destroyEvents.add(a),a}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class St{constructor(t){this.art=t,this.keys={},k||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n'},t.option.icons);for(const r in e)tt(this,r,{get:()=>N(r,e[r])})}}class At extends xt{constructor(t){super(t),this.name="info",k||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:o,$video:a}}=this.art;t(o,"click",()=>{this.show=!1});let n=null;const i=E("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{I(a,"display","none"),I(n,"display",null)}),o.proxy(e.$state,"click",()=>t.play())}}class Vt{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:o}}=this.art;t?(o.textContent=t instanceof Error?t.message.trim():t,C(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{o.textContent="",z(r,"art-notice-show")},e.NOTICE_TIME)):z(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Dt=(()=>{if("undefined"===typeof document)return!1;const t=Yt[0],e={};for(const r of Yt){if(r[1]in document){for(const[o,a]of r.entries())e[t[o]]=a;return e}}return!1})(),Nt={change:Dt.fullscreenchange,error:Dt.fullscreenerror},Ft={request:(t=document.documentElement,e)=>new Promise((r,o)=>{const a=()=>{Ft.off("change",a),r()};Ft.on("change",a);const n=t[Dt.requestFullscreen](e);n instanceof Promise&&n.then(a).catch(o)}),exit:()=>new Promise((t,e)=>{if(!Ft.isFullscreen)return void t();const r=()=>{Ft.off("change",r),t()};Ft.on("change",r);const o=document[Dt.exitFullscreen]();o instanceof Promise&&o.then(r).catch(e)}),toggle:(t,e)=>Ft.isFullscreen?Ft.exit():Ft.request(t,e),onchange(t){Ft.on("change",t)},onerror(t){Ft.on("error",t)},on(t,e){const r=Nt[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=Nt[t];r&&document.removeEventListener(r,e,!1)},raw:Dt};function Bt(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t,n=t=>{Ft.on("change",()=>{t.emit("fullscreen",Ft.isFullscreen),Ft.isFullscreen?(t.state="fullscreen",C(a,"art-fullscreen")):z(a,"art-fullscreen"),t.emit("resize")}),Ft.on("error",e=>{t.emit("fullscreenError",e)}),tt(t,"fullscreen",{get:()=>Ft.isFullscreen,set(t){return d(this,null,function*(){t?yield Ft.request(a):yield Ft.exit()})}})};t.once("video:loadedmetadata",()=>{var a;Ft.isEnabled?n(t):o.webkitSupportsFullscreen?((a=t).on("document:webkitfullscreenchange",()=>{a.emit("fullscreen",a.fullscreen),a.emit("resize")}),tt(a,"fullscreen",{get:()=>document.fullscreenElement===o,set(t){t?(a.state="fullscreen",o.webkitEnterFullscreen()):o.webkitExitFullscreen()}})):tt(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),tt(t,"fullscreen",ot(t,"fullscreen"))})}function Ht(t){const{icons:e,proxy:r,storage:o,template:{$player:a,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(z(a,"art-mini"),I(e,"display","none"),a.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(I(e,"display","none"),I(r,"display","flex")):(I(e,"display","flex"),I(r,"display","none"))}function p(){const{$mini:e}=t.template,r=H(e),a=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;o.set("top",a),o.set("left",n),I(e,"top",`${a}px`),I(e,"left",`${n}px`)}tt(t,"mini",{get:()=>L(a,"art-mini"),set(h){if(h){t.state="mini",C(a,"art-mini");const h=function(){const{$mini:a}=t.template;if(a)return S(a,n),I(a,"display","flex");{const a=D("div");C(a,"art-mini-popup"),S(document.body,a),t.template.$mini=a,S(a,n);const p=S(a,'
');S(p,e.close),r(p,"click",c);const h=S(a,'
'),u=S(h,e.play),m=S(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(a,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){C(a,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;I(a,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,z(a,"art-mini-dragging");const t=H(a);o.set("left",t.left),o.set("top",t.top),I(a,"left",`${t.left}px`),I(a,"top",`${t.top}px`),I(a,"transform",null)}}),a}}(),u=o.get("top"),m=o.get("left");"number"===typeof u&&"number"===typeof m?(I(h,"top",`${u}px`),I(h,"left",`${m}px`),_(h)||p()):p(),t.emit("mini",!0)}else c()}})}function Wt(t){const{i18n:e,notice:r,template:{$video:o}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:o}=t;e.disablePictureInPicture=!1,tt(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw o.show=t,t})):document.exitPictureInPicture().catch(t=>{throw o.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):o.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),tt(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):tt(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function jt(t){const{option:e,template:{$progress:r,$video:o}}=t;let a=null,n=!1,i=null;t.on("setBar",(a,s,l)=>d(null,null,function*(){var c;const d=null==(c=t.controls)?void 0:c.thumbnails,{url:p,scale:h}=e.thumbnails;if(!d||!p)return;if("hover"===a||"played"===a&&l&&k){if(i||n||(n=!0,i=yield W(p,h),n=!1),!i)return;const a=r.clientWidth*s;a>0&&ar.clientWidth-u/2?I(s,"left",r.clientWidth-u+"px"):I(s,"left",a-u/2+"px")}(a)}})),tt(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(a),a=null,n=!1,i=null)}})}Object.defineProperties(Ft,{isFullscreen:{get:()=>Boolean(document[Dt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Dt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Dt.fullscreenEnabled])}});class Ut{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;tt(t,"url",{get:()=>r.src,set(o){return d(this,null,function*(){if(o){const a=t.url,n=e.type||X(o),i=e.customType[n];n&&i?(yield lt(),t.loading.show=!0,i.call(t,r,o,t)):(URL.revokeObjectURL(a),r.src=o),a!==t.url&&(t.option.url=o,t.isReady&&a&&t.once("video:canplay",()=>{t.emit("restart",o)}))}else yield lt(),t.loading.show=!0})}})}(t),function(t){const{template:{$video:e}}=t;tt(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:o,constructor:{instances:a},template:{$video:n}}=t;tt(t,"play",{value(){return d(this,null,function*(){const i=yield n.play();if(r.show=e.get("Play"),t.emit("play"),o.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;tt(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${J(t.currentTime)} / ${J(t.duration)}`),t.emit("seek",t.currentTime,r)}}),tt(t,"forward",{set(e){t.seek=t.currentTime+e}}),tt(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:o,storage:a}=t;tt(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=K(t,0,1),o.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&a.set("volume",e.volume)}}),tt(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;tt(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=K(r,0,t.duration))}})}(t),function(t){tt(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((o,a)=>{if(e===t.url)return void o();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),a(e)},metadata:()=>{t.currentTime=r},canplay:()=>d(null,null,function*(){t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&(yield t.play()),t.notice.show="",o()})};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}tt(t,"switchQuality",{value:r=>e(r,t.currentTime)}),tt(t,"switchUrl",{value:t=>e(t,0)}),tt(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:o}=t;tt(t,"playbackRate",{get:()=>e.playbackRate,set(a){if(a){if(a===e.playbackRate)return;e.playbackRate=a,o.show=`${r.get("Rate")}: ${1===a?r.get("Normal"):`${a}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t;tt(t,"aspectRatio",{get:()=>a.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)I(o,"width",null),I(o,"height",null),I(o,"margin",null),delete a.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=a,i=e/r,s=t[0]/t[1];i>s?(I(o,"width",s*r+"px"),I(o,"height","100%"),I(o,"margin","0 auto")):(I(o,"width","100%"),I(o,"height",e/s+"px"),I(o,"margin","auto 0")),a.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,o=D("canvas");tt(t,"getDataURL",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),t(o.toDataURL("image/png"))}catch(n){e.show=n,a(n)}})}),tt(t,"getBlobUrl",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),o.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,a(n)}})}),tt(t,"screenshot",{value:e=>d(null,null,function*(){const o=yield t.getDataURL();return G(o,`${e||`artplayer_${J(r.currentTime)}`}.png`),t.emit("screenshot",o),o})})}(t),Bt(t),function(t){const{constructor:e,template:{$container:r,$player:o}}=t;let a="";tt(t,"fullscreenWeb",{get:()=>L(o,"art-fullscreen-web"),set(n){n?(a=o.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&S(document.body,o),t.state="fullscreenWeb",I(o,"width","100%"),I(o,"height","100%"),C(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&S(r,o),a&&(o.style.cssText=a,a=""),z(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),Wt(t),function(t){const{$video:e}=t.template;tt(t,"loaded",{get:()=>t.loadedTime/e.duration}),tt(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){tt(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;tt(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:o}=t.template;tt(t,"autoSize",{value(){const{videoWidth:a,videoHeight:n}=o,{width:i,height:s}=H(e),l=a/n;if(i/s>l)I(r,"width",s*l/i*100+"%"),I(r,"height","100%");else{const t=i/l/s*100;I(r,"width","100%"),I(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){tt(t,"rect",{get:()=>H(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[o]})}tt(t,"x",{get:()=>t.left+window.pageXOffset}),tt(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:o}=t;tt(t,"flip",{get:()=>e.dataset.flip||"normal",set(a){a||(a="normal"),"normal"===a?delete e.dataset.flip:e.dataset.flip=a,o.show=`${r.get("Video Flip")}: ${r.get(Z(a))}`,t.emit("flip",a)}})}(t),Ht(t),function(t){const{template:{$poster:e}}=t;tt(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){I(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;tt(t,"autoHeight",{value(){const{clientWidth:o}=e,{videoHeight:a,videoWidth:n}=r,i=a*(o/n);I(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;tt(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){tt(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){tt(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];tt(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let o=0;o{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,tt(t,"airplay",{value(){n?(a.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){tt(t,"quality",{set(e){const{controls:r,notice:o,i18n:a}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:(null==n?void 0:n.html)||"",selector:e,onSelect(e){return d(this,null,function*(){return yield t.switchQuality(e.url),o.show=`${a.get("Switch Video")}: ${e.html}`,e.html})}})}})}(t),jt(t),function(t){const{i18n:e,notice:r,option:o,constructor:a,proxy:n,template:{$player:i,$video:s,$poster:l}}=t;let c=0;for(let d=0;d{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{c=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{o.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",n=>d(null,null,function*(){c{t.emit("resize"),k&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,I(l,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:o,$poster:a}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(o.volume=K(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(o.volume=K(n,0,1)),e.poster&&I(a,"backgroundImage",`url(${e.poster})`),e.autoplay&&(o.autoplay=e.autoplay),e.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function qt(t){const{notice:e,constructor:r,template:{$player:o,$video:a}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=a,r=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return t>e&&ro}return t.on("fullscreenWeb",e=>{var a;if(e){if(l()){const e=Number(null!=(a=r.AUTO_ORIENTATION_TIME)?a:0);setTimeout(()=>{t.fullscreenWeb&&!L(o,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;I(o,"width",`${r}px`),I(o,"height",`${e}px`),I(o,"transform-origin","0 0"),I(o,"transform",`rotate(90deg) translate(0, -${e}px)`),C(o,n),t.isRotate=!0,t.emit("resize")}()},e)}}else L(o,n)&&(I(o,"width",""),I(o,"height",""),I(o,"transform-origin",""),I(o,"transform",""),z(o,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",t=>d(null,null,function*(){var r;const a=!!(null==(r=null==screen?void 0:screen.orientation)?void 0:r.lock);if(t){if(a&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";yield screen.orientation.lock(t),s=!0,C(o,i)}catch(n){s=!1,e.show=n}}else if(L(o,i)&&z(o,i),a&&s){try{screen.orientation.unlock()}catch(c){}s=!1}})),{name:"autoOrientation",get state(){return L(o,n)}}}function Xt(t){const{i18n:e,icons:r,storage:o,constructor:a,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=T(".art-auto-playback-last",s),c=T(".art-auto-playback-jump",s),d=T(".art-auto-playback-close",s);S(d,r.close);let p=null;function h(){const r=(o.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),I(s,"display","none"),r&&r>=a.AUTO_PLAYBACK_MIN&&(I(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${J(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{I(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),I(i,"display","none"),I(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{I(s,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=o.get("times")||{},r=Object.keys(e);r.length>a.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,o.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return o.get("times")||{}},clear:()=>o.del("times"),delete(t){const e=o.get("times")||{};return delete e[t],o.set("times",e),e}}}function Gt(t){const{constructor:e,proxy:r,template:{$player:o,$video:a}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,z(o,"art-fast-forward"))};return r(a,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,C(o,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return L(o,"art-fast-forward")}}}function Kt(t){const{layers:e,icons:r,template:{$player:o}}=t;function a(){return L(o,"art-lock")}function n(){C(o,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){z(o,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const o=S(e,r.lock),a=S(e,r.unlock);I(o,"display","none"),t.on("lock",t=>{t?(I(o,"display","inline-flex"),I(a,"display","none")):(I(o,"display","none"),I(a,"display","inline-flex"))})},click(){a()?i():n()}}),{name:"lock",get state(){return a()},set state(t){t?n():i()}}}function Zt(t){return t.on("control",e=>{e?z(t.template.$player,"art-mini-progress-bar"):C(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Jt{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Zt),e.lock&&k&&this.add(Kt),e.autoPlayback&&!e.isLive&&this.add(Xt),e.autoOrientation&&k&&this.add(qt),e.fastForward&&k&&!e.isLive&&this.add(Gt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return q(!rt(this,r),`Cannot add a plugin that already has the same name: ${r}`),tt(this,r,{value:e}),this}}class Qt extends xt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:o}}=t;this.name="setting",this.$parent=o,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=V(t,r.setting),o=V(t,this.$parent);!this.show||e||o||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,PLAYBACK_RATE:a}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:o,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:a.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,ASPECT_RATIO:a}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:o,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:a.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,FLIP:a}}=t;function n(t){return e.get(Z(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:o,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:a.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:o}=t;return{width:o.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){var r;for(let o=0;o{e.default=e===t,e.default&&e.$item&&O(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,o=[]){for(let a=0;ae}),tt(n,"$parents",{get:()=>r}),tt(n,"$option",{get:()=>t});const o=[];tt(n,"$events",{get:()=>o}),tt(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,o)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){var t,e;const{controls:r,constructor:{SETTING_WIDTH:o,SETTING_ITEM_HEIGHT:a},template:{$player:n,$setting:i}}=this.art;if(r.setting&&this.show){const s=(null==(e=null==(t=this.active[0])?void 0:t.$parent)?void 0:e.width)||o,{left:l,width:c}=H(r.setting),{left:d,width:p}=H(n),h=l-d+c/2-s/2;if(I(i,"height",`${this.active===this.option?this.active.length*a:(this.active.length+1)*a}px`),I(i,"width",`${s}px`),this.art.isRotate||k)return;h+s>p?(I(i,"left",null),I(i,"right",null)):(I(i,"left",`${h}px`),I(i,"right","auto"))}}inactivate(t){for(let e=0;e'),s=D("div");C(s,"art-setting-item-left-icon"),S(s,o),S(i,s),S(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),S(e,n)}createItem(t,e=!1){var r,o;if(!this.cache.has(t.$option))return;const a=this.cache.get(t.$option),n=t.$item;let i="selector";rt(t,"switch")&&(i="switch"),rt(t,"range")&&(i="range"),rt(t,"onClick")&&(i="button");const{icons:s,proxy:l,constructor:c}=this.art,p=D("div");C(p,"art-setting-item"),I(p,"height",`${c.SETTING_ITEM_HEIGHT}px`),p.dataset.name=t.name||"",p.dataset.value=t.value||"";const h=S(p,'
'),u=S(p,'
'),m=D("div");switch(C(m,"art-setting-item-left-icon"),i){case"button":case"switch":case"range":S(m,t.icon||s.config);break;case"selector":(null==(r=t.selector)?void 0:r.length)?S(m,t.icon||s.config):S(m,s.check)}S(h,m),tt(t,"$icon",{configurable:!0,get:()=>m}),tt(t,"icon",{configurable:!0,get:()=>m.innerHTML,set(t){m.innerHTML="",S(m,t)}});const f=D("div");C(f,"art-setting-item-left-text"),S(f,t.html||""),S(h,f),tt(t,"$html",{configurable:!0,get:()=>f}),tt(t,"html",{configurable:!0,get:()=>f.innerHTML,set(t){f.innerHTML="",S(f,t)}});const g=D("div");switch(C(g,"art-setting-item-right-tooltip"),S(g,t.tooltip||""),S(u,g),tt(t,"$tooltip",{configurable:!0,get:()=>g}),tt(t,"tooltip",{configurable:!0,get:()=>g.innerHTML,set(t){g.innerHTML="",S(g,t)}}),i){case"switch":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,s.switchOn),o=S(e,s.switchOff);I(t.switch?o:r,"display","none"),S(u,e),tt(t,"$switch",{configurable:!0,get:()=>e});let a=t.switch;tt(t,"switch",{configurable:!0,get:()=>a,set(t){a=t,t?(I(o,"display","none"),I(r,"display",null)):(I(o,"display",null),I(r,"display","none"))}});break}case"range":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],C(r,"art-setting-range"),S(u,e),tt(t,"$range",{configurable:!0,get:()=>r});let o=[...t.range];tt(t,"range",{configurable:!0,get:()=>o,set(t){o=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(null==(o=t.selector)?void 0:o.length){const t=D("div");C(t,"art-setting-item-right-icon"),S(t,s.arrowRight),S(u,t)}}switch(i){case"switch":if(t.onSwitch){const e=l(p,"click",e=>d(this,null,function*(){t.switch=yield t.onSwitch.call(this.art,t,p,e)}));t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=l(t.$range,"change",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onRange.call(this.art,t,p,e)}));t.$events.push(e)}if(t.onChange){const e=l(t.$range,"input",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onChange.call(this.art,t,p,e)}));t.$events.push(e)}}break;case"selector":{const e=l(p,"click",e=>d(this,null,function*(){var r;(null==(r=t.selector)?void 0:r.length)?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=yield t.$parent.onSelect.call(this.art,t,p,e)))}));t.$events.push(e),t.default&&C(p,"art-current")}break;case"button":if(t.onClick){const e=l(p,"click",e=>d(this,null,function*(){t.tooltip=yield t.onClick.call(this.art,t,p,e)}));t.$events.push(e)}}tt(t,"$item",{configurable:!0,get:()=>p}),e?Y(p,n):S(a,p),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){var e;if(this.active=t,this.cache.has(t)){O(this.cache.get(t),"art-current")}else{const r=D("div");this.cache.set(t,r),C(r,"art-setting-panel"),S(this.$parent,r),O(r,"art-current"),(null==(e=t[0])?void 0:e.$parent)&&this.createHeader(t[0]);for(let e=0;enull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){var t,e;return null==(e=null==(t=this.art.template.$video)?void 0:t.textTracks)?void 0:e[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?P(r,t):I(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?Q(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}switch(t){return d(this,arguments,function*(t,e={}){const{i18n:r,notice:o,option:a}=this.art,n=c(l(l({},a.subtitle),e),{url:t}),i=yield this.init(n);return e.name&&(o.show=`${r.get("Switch Subtitle")}: ${e.name}`),i})}createTrack(t,e){const{template:r,proxy:o,option:a}=this.art,{$video:n,$track:i}=r,s=D("track");s.default=!0,s.kind=t,s.src=e,s.label=a.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,M(i),S(n,s),r.$track=s,this.destroyEvent=o(this.textTrack,"cuechange",()=>this.update())}init(t){return d(this,null,function*(){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(f(t,wt.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||X(t.url)){case"srt":{const e=nt(r);return it(t.onVttLoad(e))}case"ass":{const e=st(r);return it(t.onVttLoad(e))}case"vtt":return it(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null})}}class oe{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=T(e.container),q(this.$container,`No container element found by ${e.container}`)),q(B(),"The current browser does not support flex layout");const o=this.$container.tagName.toLowerCase();q("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),q(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${g}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return T(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=oe.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);q(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),Y(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&C(this.$player,"art-backdrop"),k&&C(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":C(this.$player,"art-destroy")}}class ae{on(t,e,r){const o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const o=this;function a(...n){o.off(t,a),e.apply(r,n)}return a._=e,this.on(t,a,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let o=0;oe.call(this,this)),se.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${se.version}`);for(let e=0;et(`Event@${e.type}`))}ie.push(this)}static get instances(){return ie}static get version(){return g}static get config(){return v}static get utils(){return pt}static get scheme(){return wt}static get Emitter(){return ae}static get validator(){return f}static get kindOf(){return f.kindOf}static get html(){return oe.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:b?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null==navigator?void 0:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){se.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),ie.splice(ie.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return se.STYLE=ee,se.DEBUG=!1,se.CONTEXTMENU=!0,se.NOTICE_TIME=2e3,se.SETTING_WIDTH=250,se.SETTING_ITEM_WIDTH=200,se.SETTING_ITEM_HEIGHT=35,se.RESIZE_TIME=200,se.SCROLL_TIME=200,se.SCROLL_GAP=50,se.AUTO_PLAYBACK_MAX=10,se.AUTO_PLAYBACK_MIN=5,se.AUTO_PLAYBACK_TIMEOUT=3e3,se.RECONNECT_TIME_MAX=5,se.RECONNECT_SLEEP_TIME=1e3,se.CONTROL_HIDE_TIME=3e3,se.DBCLICK_TIME=300,se.DBCLICK_FULLSCREEN=!0,se.MOBILE_DBCLICK_PLAY=!0,se.MOBILE_CLICK_PLAY=!1,se.AUTO_ORIENTATION_TIME=200,se.INFO_LOOP_TIME=1e3,se.FAST_FORWARD_VALUE=3,se.FAST_FORWARD_TIME=1e3,se.TOUCH_MOVE_RATIO=.5,se.VOLUME_STEP=.1,se.SEEK_STEP=5,se.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],se.ASPECT_RATIO=["default","4:3","16:9"],se.FLIP=["normal","horizontal","vertical"],se.FULLSCREEN_WEB_IN_BODY=!0,se.LOG_VERSION=!0,se.USE_RAF=!1,se.REMOVE_SRC_WHEN_DESTROY=!0,$&&(F("artplayer-style",ee),setTimeout(()=>{se.LOG_VERSION&&console.log(`%c ArtPlayer %c ${se.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),se}); +!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))n.call(e,r)&&s(t,r,e[r]);if(a)for(var r of a(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,a)=>{var n=t=>{try{s(r.next(t))}catch(e){a(e)}},i=t=>{try{s(r.throw(t))}catch(e){a(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(n,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h,u={exports:{}};var m=(h||(h=1,u.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(a=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2=1,k=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(y)||x,$="undefined"!==typeof window&&"undefined"!==typeof document;function T(t,e=document){return e.querySelector(t)}function E(t,e=document){return Array.from(e.querySelectorAll(t))}function C(t,e){return t.classList.add(e)}function z(t,e){return t.classList.remove(e)}function L(t,e){return t.classList.contains(e)}function S(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function M(t){return t.parentNode.removeChild(t)}function I(t,e,r){return t.style[e]=r,t}function P(t,e){for(const r in e)I(t,r,e[r]);return t}function A(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function O(t,e){A(t).forEach(t=>z(t,e)),C(t,e)}function R(t,e,r="top"){k||(t.setAttribute("aria-label",e),C(t,"hint--rounded"),C(t,`hint--${r}`))}function _(t,e=0){const r=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth,n=r.top-e<=o&&r.top+r.height+e>=0,i=r.left-e<=a+e&&r.left+r.width+e>=0;return n&&i}function V(t,e){return j(t).includes(e)}function Y(t,e){return e.parentNode.replaceChild(t,e),t}function D(t){return document.createElement(t)}function N(t="",e=""){const r=D("i");return C(r,"art-icon"),C(r,`art-icon-${t}`),S(r,e),r}function F(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}function B(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function H(t){return t.getBoundingClientRect()}function W(t,e){return new Promise((r,o)=>{const a=new Image;a.onload=function(){if(e&&1!==e){const n=document.createElement("canvas"),i=n.getContext("2d");n.width=a.width*e,n.height=a.height*e,i.drawImage(a,0,0,n.width,n.height),n.toBlob(e=>{const a=URL.createObjectURL(e),n=new Image;n.onload=function(){r(n)},n.onerror=function(){URL.revokeObjectURL(a),o(new Error(`Image load failed: ${t}`))},n.src=a})}else r(a)},a.onerror=function(){o(new Error(`Image load failed: ${t}`))},a.src=t})}function j(t){if(t.composedPath)return t.composedPath();const e=[];let r=t.target;for(;r;)e.push(r),r=r.parentNode;return e.includes(window)||void 0===window||e.push(window),e}class U extends Error{constructor(t,e){super(t),"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function q(t,e){if(!t)throw new U(e);return t}function X(t){return t.includes("?")?X(t.split("?")[0]):t.includes("#")?X(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function G(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function K(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function Z(t){return t.charAt(0).toUpperCase()+t.slice(1)}function J(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),o=Math.floor(t-3600*e-60*r);return(e>0?[e,r,o]:[r,o]).map(t=>t<10?`0${t}`:String(t)).join(":")}function Q(t){return t.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t))}const tt=Object.defineProperty,{hasOwnProperty:et}=Object.prototype;function rt(t,e){return et.call(t,e)}function ot(t,e){return Object.getOwnPropertyDescriptor(t,e)}function at(...t){const e=t=>t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(o=>{const a=t[o],n=r[o];Array.isArray(a)&&Array.isArray(n)?t[o]=a.concat(...n):e(a)&&e(n)?t[o]=at(a,n):t[o]=n}),t),{})}function nt(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=`${r}00`),2===r.length&&(o=`${r}0`),`${e},${o}`})).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function it(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function st(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const o=t.match(e);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}:null}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}function lt(t=0){return new Promise(e=>setTimeout(e,t))}function ct(t,e){let r;return function(...o){clearTimeout(r),r=setTimeout(()=>(r=null,t.apply(this,o)),e)}}function dt(t,e){let r=!1;return function(...o){r||(t.apply(this,o),r=!0,setTimeout(()=>{r=!1},e))}}const pt=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:U,addClass:C,append:S,assToVtt:st,capitalize:Z,clamp:K,createElement:D,debounce:ct,def:tt,download:G,errorHandle:q,escape:Q,get:ot,getComposedPath:j,getExt:X,getIcon:N,getRect:H,getStyle:function(t,e,r=!0){const o=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(o):o},has:rt,hasClass:L,includeFromEvent:V,inverseClass:O,isBrowser:$,isIOS:w,isIOS13:x,isInViewport:_,isMobile:k,isSafari:b,loadImg:W,mergeDeep:at,query:T,queryAll:E,remove:M,removeClass:z,replaceElement:Y,secondToTime:J,setStyle:I,setStyleText:F,setStyles:P,siblings:A,sleep:lt,srtToVtt:nt,supportsFlex:B,throttle:dt,tooltip:R,unescape:function(t){const e={"&":"&","<":"<",">":">","'":"'",""":'"'},r=new RegExp(`(${Object.keys(e).join("|")})`,"g");return t.replace(r,t=>e[t]||t)},userAgent:y,vttToBlob:it},Symbol.toStringTag,{value:"Module"})),ht="array",ut="boolean",mt="string",ft="number",gt="object",vt="function";function yt(t,e,r){return q(e===mt||e===ft||t instanceof Element,`${r.join(".")} require '${mt}' or 'Element' type`)}const bt={html:yt,disable:`?${ut}`,name:`?${mt}`,index:`?${ft}`,style:`?${gt}`,click:`?${vt}`,mounted:`?${vt}`,tooltip:`?${mt}|${ft}`,width:`?${ft}`,selector:`?${ht}`,onSelect:`?${vt}`,switch:`?${ut}`,onSwitch:`?${vt}`,range:`?${ht}`,onRange:`?${vt}`,onChange:`?${vt}`},wt={id:mt,container:yt,url:mt,poster:mt,type:mt,theme:mt,lang:mt,volume:ft,isLive:ut,muted:ut,autoplay:ut,autoSize:ut,autoMini:ut,loop:ut,flip:ut,playbackRate:ut,aspectRatio:ut,screenshot:ut,setting:ut,hotkey:ut,pip:ut,mutex:ut,backdrop:ut,fullscreen:ut,fullscreenWeb:ut,subtitleOffset:ut,miniProgressBar:ut,useSSR:ut,playsInline:ut,lock:ut,gesture:ut,fastForward:ut,autoPlayback:ut,autoOrientation:ut,airplay:ut,proxy:`?${vt}`,plugins:[vt],layers:[bt],contextmenu:[bt],settings:[bt],controls:[c(l({},bt),{position:(t,e,r)=>{const o=["top","left","right"];return q(o.includes(t),`${r.join(".")} only accept ${o.toString()} as parameters`)}})],quality:[{default:`?${ut}`,html:mt,url:mt}],highlight:[{time:ft,text:mt}],thumbnails:{url:mt,number:ft,column:ft,width:ft,height:ft,scale:ft},subtitle:{url:mt,name:mt,type:mt,style:gt,escape:ut,encoding:mt,onVttLoad:vt},moreVideoAttr:gt,i18n:gt,icons:gt,cssVar:gt,customType:gt};class xt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return L(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?C(e,r):z(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){const e="function"===typeof t?t(this.art):t;if(e.html=e.html||"",f(e,bt),!this.$parent||!this.name||e.disable)return;const r=e.name||`${this.name}${this.id}`;q(!this.cache.has(r),`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;const o=D("div");C(o,`art-${this.name}`),C(o,`art-${this.name}-${r}`);const a=Array.from(this.$parent.children);o.dataset.index=e.index||this.id;const n=a.find(t=>Number(t.dataset.index)>=Number(o.dataset.index));n?n.insertAdjacentElement("beforebegin",o):S(this.$parent,o),e.html&&S(o,e.html),e.style&&P(o,e.style),e.tooltip&&R(o,e.tooltip);const i=[];if(e.click){const t=this.art.events.proxy(o,"click",t=>{t.preventDefault(),e.click.call(this.art,this,t)});i.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.selector(e,o,i),this[r]=o,this.cache.set(r,{$ref:o,events:i,option:e}),e.mounted&&e.mounted.call(this.art,o),o}remove(t){q(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(const r of e.events)this.art.events.remove(r);this.cache.delete(t),delete this[t],M(e.$ref)}update(t){if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}}class kt extends xt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,k||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:o}}=this.art;t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:o}}=e,a=o.map(t=>`${1===t?r.get("Normal"):t.toFixed(1)}`).join("");return c(l({},t),{html:`${r.get("Play Speed")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.playbackRate=Number(o),t.show=!1)},mounted:t=>{const r=T('[data-value="1"]',t);r&&O(r,"art-current"),e.on("video:ratechange",()=>{const r=E("span",t).find(t=>Number(t.dataset.value)===e.playbackRate);r&&O(r,"art-current")})}})}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:o}}=e,a=o.map(t=>`${"default"===t?r.get("Default"):t}`).join("");return c(l({},t),{html:`${r.get("Aspect Ratio")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.aspectRatio=o,t.show=!1)},mounted:t=>{const r=T('[data-value="default"]',t);r&&O(r,"art-current"),e.on("aspectRatio",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:o}}=e,a=o.map(t=>`${r.get(Z(t))}`).join("");return c(l({},t),{html:`${r.get("Video Flip")}: ${a}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.flip=o.toLowerCase(),t.show=!1)},mounted:t=>{const r=T('[data-value="normal"]',t);r&&O(r,"art-current"),e.on("flip",e=>{const r=E("span",t).find(t=>t.dataset.value===e);r&&O(r,"art-current")})}})}}({name:"flip",index:30})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){const e=$?location.href:"";return c(l({},t),{html:`ArtPlayer ${g}`})}({name:"version",index:50})),this.add(function(t){return e=>c(l({},t),{html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let a=0;a{if(!this.art.constructor.CONTEXTMENU)return;t.preventDefault(),this.show=!0;const e=t.clientX,a=t.clientY,{height:n,width:i,left:s,top:l}=H(r),{height:c,width:d}=H(o);let p=e-s,h=a-l;e+d>s+i&&(p=i-d),a+c>l+n&&(h=n-c),P(o,{top:`${h}px`,left:`${p}px`})}),e(r,"click",t=>{V(t,o)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}function $t(t,e){const{$progress:r}=t.template,{left:o}=H(r),a=K((k?e.touches[0].clientX:e.clientX)-o,0,r.clientWidth),n=a/r.clientWidth*t.duration;return{second:n,time:J(n),width:a,percentage:K(a/r.clientWidth,0,1)}}function Tt(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,o=r*t.duration;t.emit("setBar","played",r,e),t.seek=o}else{const{second:r,percentage:o}=$t(t,e);t.emit("setBar","played",o,e),t.seek=r}}function Et(t){return e=>{const{icons:r,option:o,proxy:a}=e,{$player:n,$progress:i}=e.template;return c(l({},t),{html:'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n ',mounted:t=>{let s=null,l=!1;const c=T(".art-progress-hover",t),d=T(".art-progress-loaded",t),p=T(".art-progress-played",t),h=T(".art-progress-highlight",t),u=T(".art-progress-indicator",t),m=T(".art-progress-tip",t);function f(r,o){const{width:a,time:n}=o||$t(e,r);m.textContent=n||"00:00";const i=m.clientWidth;a<=i/2?I(m,"left",0):a>t.clientWidth-i/2?I(m,"left",t.clientWidth-i+"px"):I(m,"left",a-i/2+"px")}r.indicator?S(u,r.indicator):I(u,"backgroundColor","var(--art-theme)"),e.on("setBar",function(r,o,a){const i="played"===r&&a&&k;if("loaded"===r&&I(d,"width",100*o+"%"),"hover"===r&&(I(c,"width",100*o+"%"),V(a,h)?function(r){const{width:o}=$t(e,r),{text:a}=r.target.dataset;m.textContent=a;const n=m.clientWidth;o<=n/2?I(m,"left",0):o>t.clientWidth-n/2?I(m,"left",t.clientWidth-n+"px"):I(m,"left",o-n/2+"px")}(a):f(a),0===o?z(n,"art-progress-hover"):C(n,"art-progress-hover")),"played"===r&&(I(p,"width",100*o+"%"),I(u,"left",100*o+"%")),i){C(n,"art-progress-hover");f(a,{width:t.clientWidth*o,time:J(o*e.duration)}),clearTimeout(s),s=setTimeout(()=>{z(n,"art-progress-hover")},500)}}),e.on("video:loadedmetadata",function(){h.textContent="";for(let t=0;t`;S(h,n)}}),e.constructor.USE_RAF?e.on("raf",()=>{e.emit("setBar","played",e.played),e.emit("setBar","loaded",e.loaded)}):(e.on("video:timeupdate",()=>{e.emit("setBar","played",e.played)}),e.on("video:progress",()=>{e.emit("setBar","loaded",e.loaded)}),e.on("video:ended",()=>{e.emit("setBar","played",1)})),e.emit("setBar","loaded",e.loaded||0),k||(a(i,"click",t=>{t.target!==u&&Tt(e,t)}),a(i,"mousemove",t=>{const{percentage:r}=$t(e,t);e.emit("setBar","hover",r,t)}),a(i,"mouseleave",t=>{e.emit("setBar","hover",0,t)}),a(i,"mousedown",t=>{l=0===t.button}),e.on("document:mousemove",t=>{if(l){const{second:r,percentage:o}=$t(e,t);e.emit("setBar","played",o,t),e.seek=r}}),e.on("document:mouseup",()=>{l&&(l=!1)}))}})}}class Ct extends xt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:o}=this.art.template;t.on("mousemove",()=>{k||(this.show=!0)}),t.on("click",()=>{k?this.toggle():this.show=!0}),t.on("document:mousemove",t=>{this.isHover=V(t,o)}),t.on("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),t.on("control",t=>{t?(z(r,"art-hide-cursor"),C(r,"art-hover"),this.timer=Date.now()):(C(r,"art-hide-cursor"),z(r,"art-hover"))}),this.init()}init(){const{option:t}=this.art;t.isLive||this.add(Et({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.play),i=S(t,o.pause);function s(){I(n,"display","flex"),I(i,"display","none")}function l(){I(n,"display","none"),I(i,"display","flex")}R(n,a.get("Play")),R(i,a.get("Pause")),r(n,"click",()=>{e.play()}),r(i,"click",()=>{e.pause()}),e.playing?l():s(),e.on("video:playing",()=>{l()}),e.on("video:pause",()=>{s()})}})}({name:"playAndPause",position:"left",index:10})),this.add(function(t){return e=>c(l({},t),{mounted:t=>{const{proxy:r,icons:o}=e,a=S(t,o.volume),n=S(t,o.volumeClose),i=S(t,'
'),s=S(i,'
'),l=S(s,'
'),c=S(s,'
'),d=S(c,'
'),p=S(d,'
'),h=S(c,'
');function u(t){const{top:e,height:r}=H(c);return 1-(t.clientY-e)/r}function m(){if(e.muted||0===e.volume)I(a,"display","none"),I(n,"display","flex"),I(h,"top","100%"),I(p,"top","100%"),l.textContent=0;else{const t=100*e.volume;I(a,"display","flex"),I(n,"display","none"),I(h,"top",100-t+"%"),I(p,"top",100-t+"%"),l.textContent=Math.floor(t)}}if(m(),e.on("video:volumechange",m),r(a,"click",()=>{e.muted=!0}),r(n,"click",()=>{e.muted=!1}),k)I(i,"display","none");else{let t=!1;r(c,"mousedown",r=>{t=0===r.button,e.volume=u(r)}),e.on("document:mousemove",r=>{t&&(e.muted=!1,e.volume=u(r))}),e.on("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),t.isLive||this.add(function(t){return e=>c(l({},t),{style:k?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${J(e.currentTime)} / ${J(e.duration)}`;r!==t.textContent&&(t.textContent=r)}r();const o=["video:loadedmetadata","video:timeupdate","video:progress"];for(let a=0;a{this.art.quality=t.quality}),t.screenshot&&!k&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.screenshot),r(t,"click",()=>{e.screenshot()})}})}({name:"screenshot",position:"right",index:20})),t.setting&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.setting),r(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),e.on("setting",e=>{R(t,a.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),t.pip&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e;S(t,o.pip),r(t,"click",()=>{e.pip=!e.pip}),e.on("pip",e=>{R(t,a.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:o}=e;S(t,o.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenWebOn),i=S(t,o.fullscreenWebOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),e.on("fullscreenWeb",e=>{e?(R(t,a.get("Exit Web Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Web Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add(function(t){return e=>c(l({},t),{tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:o,i18n:a}=e,n=S(t,o.fullscreenOn),i=S(t,o.fullscreenOff);I(i,"display","none"),r(t,"click",()=>{e.fullscreen=!e.fullscreen}),e.on("fullscreen",e=>{e?(R(t,a.get("Exit Fullscreen")),I(n,"display","none"),I(i,"display","inline-flex")):(R(t,a.get("Fullscreen")),I(n,"display","inline-flex"),I(i,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let e=0;et.selector}),tt(e,"$control_item",{get:()=>r}),tt(e,"$control_value",{get:()=>a})}const i=o(n,"click",e=>d(this,null,function*(){const r=j(e),o=t.selector.find(t=>t.$control_item===r.find(e=>t.$control_item===e));this.check(o),t.onSelect&&(a.innerHTML=yield t.onSelect.call(this.art,o,o.$control_item,e))}));r.push(i)}}function zt(t,e,r,o){const a=e-o,n=r-t;let i=0;if(Math.abs(n)<2&&Math.abs(a)<2)return i;const s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,a);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}class Lt{constructor(t){this.destroyEvents=new Set,this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),function(t,e){const{constructor:r,template:{$player:o,$video:a}}=t;function n(e){V(e,o)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}t.on("document:click",n),t.on("document:contextmenu",n);let i=[];e.proxy(a,"click",e=>{const o=Date.now();i.push(o);const{MOBILE_CLICK_PLAY:a,DBCLICK_TIME:n,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=i.filter(t=>o-t<=n);switch(c.length){case 1:t.emit("click",e),k?!t.isLock&&a&&t.toggle():t.toggle(),i=c;break;case 2:t.emit("dblclick",e),k?!t.isLock&&s&&t.toggle():l&&(t.fullscreen=!t.fullscreen),i=[];break;default:i=[]}})}(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{C(r,"art-hover"),t.emit("hover",!0,e)},e=>{z(r,"art-hover"),t.emit("hover",!1,e)})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{t.emit("mousemove",e)})}(t,this),function(t,e){const{option:r,constructor:o}=t;t.on("resize",()=>{const{aspectRatio:e,notice:o}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,o.show=""});const a=ct(()=>t.emit("resize"),o.RESIZE_TIME);t.on("window:orientationchange",()=>a()),t.on("window:resize",()=>a()),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",()=>a())}(t,this),function(t,e){if(k&&!t.option.isLive){const{$video:r,$progress:o}=t.template;let a=null,n=!1,i=0,s=0,l=0;const c=e=>{if(1===e.touches.length&&!t.isLock){a===o&&Tt(t,e),n=!0;const{pageX:r,pageY:c}=e.touches[0];i=r,s=c,l=t.currentTime}},d=e=>{if(1===e.touches.length&&n&&t.duration){const{pageX:o,pageY:n}=e.touches[0],c=zt(i,s,o,n),d=[3,4].includes(c),p=[1,2].includes(c);if(d&&!t.isRotate||p&&t.isRotate){const c=K((o-i)/t.width,-1,1),d=K((n-s)/t.height,-1,1),p=t.isRotate?d:c,h=a===r?t.constructor.TOUCH_MOVE_RATIO:1,u=K(l+t.duration*p*h,0,t.duration);t.seek=u,t.emit("setBar","played",K(u/t.duration,0,1),e),t.notice.show=`${J(u)} / ${J(t.duration)}`}}},p=()=>{n&&(i=0,s=0,l=0,n=!1,a=null)};t.option.gesture&&(e.proxy(r,"touchstart",t=>{a=r,c(t)}),e.proxy(r,"touchmove",d)),e.proxy(o,"touchstart",t=>{a=o,c(t)}),e.proxy(o,"touchmove",d),t.on("document:touchend",p)}}(t,this),function(t){const{option:e,constructor:r,template:{$container:o}}=t,a=dt(()=>{t.emit("view",_(o,r.SCROLL_GAP))},r.SCROLL_TIME);t.on("window:scroll",()=>a()),t.on("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){const r=["click","mouseup","keydown","touchend","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],o=["resize","scroll","orientationchange"],a=[];function n(n={}){for(let t=0;t{const o=n.document||i.ownerDocument||document,s=e.proxy(o,r,e=>{t.emit(`document:${r}`,e)});a.push(s)}),o.forEach(r=>{var o;const s=n.window||(null==(o=i.ownerDocument)?void 0:o.defaultView)||window,l=e.proxy(s,r,e=>{t.emit(`window:${r}`,e)});a.push(l)})}n(),e.bindGlobalEvents=n}(t,this),function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",()=>{cancelAnimationFrame(e)})}}(t)}proxy(t,e,r,o={}){if(Array.isArray(e))return e.map(e=>this.proxy(t,e,r,o));t.addEventListener(e,r,o);const a=()=>t.removeEventListener(e,r,o);return this.destroyEvents.add(a),a}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){if(this.destroyEvents.has(t))try{t()}catch(e){console.warn("Failed to remove event listener:",e)}finally{this.destroyEvents.delete(t)}}destroy(){for(const e of this.destroyEvents)try{e()}catch(t){console.warn("Failed to destroy event listener:",t)}this.destroyEvents.clear()}}class St{constructor(t){this.art=t,this.keys={},k||this.init()}init(){const{constructor:t}=this.art;this.art.option.hotkey&&(this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP})),this.art.on("document:keydown",t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){const e=this.keys[t.code];if(e){t.preventDefault();for(let r=0;r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',state:'\n\n\n',play:'\n \n',pause:'\n \n',check:'\n\n',volume:'\n \n \n',volumeClose:'\n \n \n',screenshot:'\n\t\n\n',setting:'\n \n \n',pip:'\n\n',arrowLeft:'\n \n',arrowRight:'\n \n',playbackRate:'',aspectRatio:'',config:'',lock:'\n\n\n\n\n',flip:'\n\n\n\n\n\n',unlock:'\n\n\n',fullscreenOff:'\n\n\n\n\n',fullscreenOn:'\n\n\n\n\n',fullscreenWebOff:'\n\n\n\n\n',fullscreenWebOn:'\n\n\n\n\n',switchOn:'\n\n\n \n',switchOff:'\n\n\n \n\n',error:'\n\n\n\n\n',close:'\n\n\n\n\n',airplay:'\n \n \n \n \n\n'},t.option.icons);for(const r in e)tt(this,r,{get:()=>N(r,e[r])})}}class At extends xt{constructor(t){super(t),this.name="info",k||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:o,$video:a}}=this.art;t(o,"click",()=>{this.show=!1});let n=null;const i=E("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function t(){for(let e=0;e{I(a,"display","none"),I(n,"display",null)}),o.proxy(e.$state,"click",()=>t.play())}}class Vt{constructor(t){this.art=t,this.timer=null,t.on("destroy",()=>this.destroy())}destroy(){this.timer&&(clearTimeout(this.timer),this.timer=null)}set show(t){const{constructor:e,template:{$player:r,$noticeInner:o}}=this.art;t?(o.textContent=t instanceof Error?t.message.trim():t,C(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{o.textContent="",z(r,"art-notice-show")},e.NOTICE_TIME)):z(r,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}const Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Dt=(()=>{if("undefined"===typeof document)return!1;const t=Yt[0],e={};for(const r of Yt){if(r[1]in document){for(const[o,a]of r.entries())e[t[o]]=a;return e}}return!1})(),Nt={change:Dt.fullscreenchange,error:Dt.fullscreenerror},Ft={request:(t=document.documentElement,e)=>new Promise((r,o)=>{const a=()=>{Ft.off("change",a),r()};Ft.on("change",a);const n=t[Dt.requestFullscreen](e);n instanceof Promise&&n.then(a).catch(o)}),exit:()=>new Promise((t,e)=>{if(!Ft.isFullscreen)return void t();const r=()=>{Ft.off("change",r),t()};Ft.on("change",r);const o=document[Dt.exitFullscreen]();o instanceof Promise&&o.then(r).catch(e)}),toggle:(t,e)=>Ft.isFullscreen?Ft.exit():Ft.request(t,e),onchange(t){Ft.on("change",t)},onerror(t){Ft.on("error",t)},on(t,e){const r=Nt[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=Nt[t];r&&document.removeEventListener(r,e,!1)},raw:Dt};function Bt(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t,n=t=>{Ft.on("change",()=>{t.emit("fullscreen",Ft.isFullscreen),Ft.isFullscreen?(t.state="fullscreen",C(a,"art-fullscreen")):z(a,"art-fullscreen"),t.emit("resize")}),Ft.on("error",e=>{t.emit("fullscreenError",e)}),tt(t,"fullscreen",{get:()=>Ft.isFullscreen,set(t){return d(this,null,function*(){t?yield Ft.request(a):yield Ft.exit()})}})};t.once("video:loadedmetadata",()=>{var a;Ft.isEnabled?n(t):o.webkitSupportsFullscreen?((a=t).on("document:webkitfullscreenchange",()=>{a.emit("fullscreen",a.fullscreen),a.emit("resize")}),tt(a,"fullscreen",{get:()=>document.fullscreenElement===o,set(t){t?(a.state="fullscreen",o.webkitEnterFullscreen()):o.webkitExitFullscreen()}})):tt(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),tt(t,"fullscreen",ot(t,"fullscreen"))})}function Ht(t){const{icons:e,proxy:r,storage:o,template:{$player:a,$video:n}}=t;let i=!1,s=0,l=0;function c(){const{$mini:e}=t.template;e&&(z(a,"art-mini"),I(e,"display","none"),a.prepend(n),t.emit("mini",!1))}function d(e,r){t.playing?(I(e,"display","none"),I(r,"display","flex")):(I(e,"display","flex"),I(r,"display","none"))}function p(){const{$mini:e}=t.template,r=H(e),a=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;o.set("top",a),o.set("left",n),I(e,"top",`${a}px`),I(e,"left",`${n}px`)}tt(t,"mini",{get:()=>L(a,"art-mini"),set(h){if(h){t.state="mini",C(a,"art-mini");const h=function(){const{$mini:a}=t.template;if(a)return S(a,n),I(a,"display","flex");{const a=D("div");C(a,"art-mini-popup"),S(document.body,a),t.template.$mini=a,S(a,n);const p=S(a,'
');S(p,e.close),r(p,"click",c);const h=S(a,'
'),u=S(h,e.play),m=S(h,e.pause);return r(u,"click",()=>t.play()),r(m,"click",()=>t.pause()),d(u,m),t.on("video:playing",()=>d(u,m)),t.on("video:pause",()=>d(u,m)),t.on("video:timeupdate",()=>d(u,m)),r(a,"mousedown",t=>{i=0===t.button,s=t.pageX,l=t.pageY}),t.on("document:mousemove",t=>{if(i){C(a,"art-mini-dragging");const e=t.pageX-s,r=t.pageY-l;I(a,"transform",`translate(${e}px, ${r}px)`)}}),t.on("document:mouseup",()=>{if(i){i=!1,z(a,"art-mini-dragging");const t=H(a);o.set("left",t.left),o.set("top",t.top),I(a,"left",`${t.left}px`),I(a,"top",`${t.top}px`),I(a,"transform",null)}}),a}}(),u=o.get("top"),m=o.get("left");"number"===typeof u&&"number"===typeof m?(I(h,"top",`${u}px`),I(h,"left",`${m}px`),_(h)||p()):p(),t.emit("mini",!0)}else c()}})}function Wt(t){const{i18n:e,notice:r,template:{$video:o}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:o}=t;e.disablePictureInPicture=!1,tt(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch(t=>{throw o.show=t,t})):document.exitPictureInPicture().catch(t=>{throw o.show=t,t})}}),r(e,"enterpictureinpicture",()=>{t.emit("pip",!0)}),r(e,"leavepictureinpicture",()=>{t.emit("pip",!1)})}(t):o.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),tt(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):tt(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}function jt(t){const{option:e,template:{$progress:r,$video:o}}=t;let a=null,n=!1,i=null;t.on("setBar",(a,s,l)=>d(null,null,function*(){var c;const d=null==(c=t.controls)?void 0:c.thumbnails,{url:p,scale:h}=e.thumbnails;if(!d||!p)return;if("hover"===a||"played"===a&&l&&k){if(i||n||(n=!0,i=yield W(p,h),n=!1),!i)return;const a=r.clientWidth*s;a>0&&ar.clientWidth-u/2?I(s,"left",r.clientWidth-u+"px"):I(s,"left",a-u/2+"px")}(a)}})),tt(t,"thumbnails",{get:()=>t.option.thumbnails,set(e){e.url&&!t.option.isLive&&(t.option.thumbnails=e,clearTimeout(a),a=null,n=!1,i=null)}})}Object.defineProperties(Ft,{isFullscreen:{get:()=>Boolean(document[Dt.fullscreenElement])},element:{enumerable:!0,get:()=>document[Dt.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[Dt.fullscreenEnabled])}});class Ut{constructor(t){!function(t){const{option:e,template:{$video:r}}=t;tt(t,"url",{get:()=>r.src,set(o){return d(this,null,function*(){if(o){const a=t.url,n=e.type||X(o),i=e.customType[n];n&&i?(yield lt(),t.loading.show=!0,i.call(t,r,o,t)):(URL.revokeObjectURL(a),r.src=o),a!==t.url&&(t.option.url=o,t.isReady&&a&&t.once("video:canplay",()=>{t.emit("restart",o)}))}else yield lt(),t.loading.show=!0})}})}(t),function(t){const{template:{$video:e}}=t;tt(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}(t),function(t){const{i18n:e,notice:r,option:o,constructor:{instances:a},template:{$video:n}}=t;tt(t,"play",{value(){return d(this,null,function*(){const i=yield n.play();if(r.show=e.get("Play"),t.emit("play"),o.mutex)for(let e=0;et.playing?t.pause():t.play()})}(t),function(t){const{notice:e}=t;tt(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${J(t.currentTime)} / ${J(t.duration)}`),t.emit("seek",t.currentTime,r)}}),tt(t,"forward",{set(e){t.seek=t.currentTime+e}}),tt(t,"backward",{set(e){t.seek=t.currentTime-e}})}(t),function(t){const{template:{$video:e},i18n:r,notice:o,storage:a}=t;tt(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=K(t,0,1),o.show=`${r.get("Volume")}: ${Number.parseInt(100*e.volume,10)}`,0!==e.volume&&a.set("volume",e.volume)}}),tt(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}(t),function(t){const{$video:e}=t.template;tt(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{r=Number.parseFloat(r),Number.isNaN(r)||(e.currentTime=K(r,0,t.duration))}})}(t),function(t){tt(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})}(t),function(t){function e(e,r){return new Promise((o,a)=>{if(e===t.url)return void o();const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="";const l={error:e=>{t.off("video:canplay",l.canplay),t.off("video:loadedmetadata",l.metadata),a(e)},metadata:()=>{t.currentTime=r},canplay:()=>d(null,null,function*(){t.off("video:error",l.error),t.playbackRate=s,t.aspectRatio=i,n&&(yield t.play()),t.notice.show="",o()})};t.once("video:error",l.error),t.once("video:loadedmetadata",l.metadata),t.once("video:canplay",l.canplay)})}tt(t,"switchQuality",{value:r=>e(r,t.currentTime)}),tt(t,"switchUrl",{value:t=>e(t,0)}),tt(t,"switch",{set:t.switchUrl})}(t),function(t){const{template:{$video:e},i18n:r,notice:o}=t;tt(t,"playbackRate",{get:()=>e.playbackRate,set(a){if(a){if(a===e.playbackRate)return;e.playbackRate=a,o.show=`${r.get("Rate")}: ${1===a?r.get("Normal"):`${a}x`}`}else t.playbackRate=1}})}(t),function(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t;tt(t,"aspectRatio",{get:()=>a.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)I(o,"width",null),I(o,"height",null),I(o,"margin",null),delete a.dataset.aspectRatio;else{const t=n.split(":").map(Number),{clientWidth:e,clientHeight:r}=a,i=e/r,s=t[0]/t[1];i>s?(I(o,"width",s*r+"px"),I(o,"height","100%"),I(o,"margin","0 auto")):(I(o,"width","100%"),I(o,"height",e/s+"px"),I(o,"margin","auto 0")),a.dataset.aspectRatio=n}r.show=`${e.get("Aspect Ratio")}: ${"default"===n?e.get("Default"):n}`,t.emit("aspectRatio",n)}})}(t),function(t){const{notice:e,template:{$video:r}}=t,o=D("canvas");tt(t,"getDataURL",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),t(o.toDataURL("image/png"))}catch(n){e.show=n,a(n)}})}),tt(t,"getBlobUrl",{value:()=>new Promise((t,a)=>{try{o.width=r.videoWidth,o.height=r.videoHeight,o.getContext("2d").drawImage(r,0,0),o.toBlob(e=>{t(URL.createObjectURL(e))})}catch(n){e.show=n,a(n)}})}),tt(t,"screenshot",{value:e=>d(null,null,function*(){const o=yield t.getDataURL();return G(o,`${e||`artplayer_${J(r.currentTime)}`}.png`),t.emit("screenshot",o),o})})}(t),Bt(t),function(t){const{constructor:e,template:{$container:r,$player:o}}=t;let a="";tt(t,"fullscreenWeb",{get:()=>L(o,"art-fullscreen-web"),set(n){n?(a=o.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&S(document.body,o),t.state="fullscreenWeb",I(o,"width","100%"),I(o,"height","100%"),C(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&S(r,o),a&&(o.style.cssText=a,a=""),z(o,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}(t),Wt(t),function(t){const{$video:e}=t.template;tt(t,"loaded",{get:()=>t.loadedTime/e.duration}),tt(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}(t),function(t){tt(t,"played",{get:()=>t.currentTime/t.duration})}(t),function(t){const{$video:e}=t.template;tt(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}(t),function(t){const{$container:e,$player:r,$video:o}=t.template;tt(t,"autoSize",{value(){const{videoWidth:a,videoHeight:n}=o,{width:i,height:s}=H(e),l=a/n;if(i/s>l)I(r,"width",s*l/i*100+"%"),I(r,"height","100%");else{const t=i/l/s*100;I(r,"width","100%"),I(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}(t),function(t){tt(t,"rect",{get:()=>H(t.template.$player)});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[o]})}tt(t,"x",{get:()=>t.left+window.pageXOffset}),tt(t,"y",{get:()=>t.top+window.pageYOffset})}(t),function(t){const{template:{$player:e},i18n:r,notice:o}=t;tt(t,"flip",{get:()=>e.dataset.flip||"normal",set(a){a||(a="normal"),"normal"===a?delete e.dataset.flip:e.dataset.flip=a,o.show=`${r.get("Video Flip")}: ${r.get(Z(a))}`,t.emit("flip",a)}})}(t),Ht(t),function(t){const{template:{$poster:e}}=t;tt(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){I(e,"backgroundImage",`url(${t})`)}})}(t),function(t){const{template:{$container:e,$video:r}}=t;tt(t,"autoHeight",{value(){const{clientWidth:o}=e,{videoHeight:a,videoWidth:n}=r,i=a*(o/n);I(e,"height",`${i}px`),t.emit("autoHeight",i)}})}(t),function(t){const{$player:e}=t.template;tt(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}(t),function(t){tt(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}(t),function(t){tt(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}(t),function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];tt(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let o=0;o{switch(t.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,tt(t,"airplay",{value(){n?(a.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}(t),function(t){tt(t,"quality",{set(e){const{controls:r,notice:o,i18n:a}=t,n=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:(null==n?void 0:n.html)||"",selector:e,onSelect(e){return d(this,null,function*(){return yield t.switchQuality(e.url),o.show=`${a.get("Switch Video")}: ${e.html}`,e.html})}})}})}(t),jt(t),function(t){const{i18n:e,notice:r,option:o,constructor:a,proxy:n,template:{$player:i,$video:s,$poster:l}}=t;let c=0;for(let d=0;d{t.emit(`video:${e.type}`,e)});t.on("video:canplay",()=>{c=0,t.loading.show=!1}),t.once("video:canplay",()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")}),t.on("video:ended",()=>{o.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)}),t.on("video:error",n=>d(null,null,function*(){c{t.emit("resize"),k&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)}),t.on("video:loadstart",()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0}),t.on("video:pause",()=>{t.controls.show=!0,t.mask.show=!0}),t.on("video:play",()=>{t.mask.show=!1,I(l,"display","none")}),t.on("video:playing",()=>{t.mask.show=!1}),t.on("video:progress",()=>{t.playing&&(t.loading.show=!1)}),t.on("video:seeked",()=>{t.loading.show=!1,t.mask.show=!0}),t.on("video:seeking",()=>{t.loading.show=!0,t.mask.show=!1}),t.on("video:timeupdate",()=>{t.mask.show=!1}),t.on("video:waiting",()=>{t.loading.show=!0,t.mask.show=!1})}(t),function(t){const{option:e,storage:r,template:{$video:o,$poster:a}}=t;for(const i in e.moreVideoAttr)t.attr(i,e.moreVideoAttr[i]);e.muted&&(t.muted=e.muted),e.volume&&(o.volume=K(e.volume,0,1));const n=r.get("volume");"number"===typeof n&&(o.volume=K(n,0,1)),e.poster&&I(a,"backgroundImage",`url(${e.poster})`),e.autoplay&&(o.autoplay=e.autoplay),e.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const i in e.cssVar)t.cssVar(i,e.cssVar[i]);t.url=e.url}(t)}}function qt(t){const{notice:e,constructor:r,template:{$player:o,$video:a}}=t,n="art-auto-orientation",i="art-auto-orientation-fullscreen";let s=!1;function l(){const{videoWidth:t,videoHeight:e}=a,r=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return t>e&&ro}return t.on("fullscreenWeb",e=>{var a;if(e){if(l()){const e=Number(null!=(a=r.AUTO_ORIENTATION_TIME)?a:0);setTimeout(()=>{t.fullscreenWeb&&!L(o,n)&&function(){const e=document.documentElement.clientWidth,r=document.documentElement.clientHeight;I(o,"width",`${r}px`),I(o,"height",`${e}px`),I(o,"transform-origin","0 0"),I(o,"transform",`rotate(90deg) translate(0, -${e}px)`),C(o,n),t.isRotate=!0,t.emit("resize")}()},e)}}else L(o,n)&&(I(o,"width",""),I(o,"height",""),I(o,"transform-origin",""),I(o,"transform",""),z(o,n),t.isRotate=!1,t.emit("resize"))}),t.on("fullscreen",t=>d(null,null,function*(){var r;const a=!!(null==(r=null==screen?void 0:screen.orientation)?void 0:r.lock);if(t){if(a&&l())try{const t=screen.orientation.type.startsWith("portrait")?"landscape":"portrait";yield screen.orientation.lock(t),s=!0,C(o,i)}catch(n){s=!1,e.show=n}}else if(L(o,i)&&z(o,i),a&&s){try{screen.orientation.unlock()}catch(c){}s=!1}})),{name:"autoOrientation",get state(){return L(o,n)}}}function Xt(t){const{i18n:e,icons:r,storage:o,constructor:a,proxy:n,template:{$poster:i}}=t,s=t.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),l=T(".art-auto-playback-last",s),c=T(".art-auto-playback-jump",s),d=T(".art-auto-playback-close",s);S(d,r.close);let p=null;function h(){const r=(o.get("times")||{})[t.option.id||t.option.url];clearTimeout(p),I(s,"display","none"),r&&r>=a.AUTO_PLAYBACK_MIN&&(I(s,"display","flex"),l.textContent=`${e.get("Last Seen")} ${J(r)}`,c.textContent=e.get("Jump Play"),n(d,"click",()=>{I(s,"display","none")}),n(c,"click",()=>{t.seek=r,t.play(),I(i,"display","none"),I(s,"display","none")}),t.once("video:timeupdate",()=>{p=setTimeout(()=>{I(s,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}return t.on("video:timeupdate",()=>{if(t.playing){const e=o.get("times")||{},r=Object.keys(e);r.length>a.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id||t.option.url]=t.currentTime,o.set("times",e)}}),t.on("ready",h),t.on("restart",h),{name:"auto-playback",get times(){return o.get("times")||{}},clear:()=>o.del("times"),delete(t){const e=o.get("times")||{};return delete e[t],o.set("times",e),e}}}function Gt(t){const{constructor:e,proxy:r,template:{$player:o,$video:a}}=t;let n=null,i=!1,s=1;const l=()=>{clearTimeout(n),i&&(i=!1,t.playbackRate=s,z(o,"art-fast-forward"))};return r(a,"touchstart",r=>{1===r.touches.length&&t.playing&&!t.isLock&&(n=setTimeout(()=>{i=!0,s=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,C(o,"art-fast-forward")},e.FAST_FORWARD_TIME))}),t.on("document:touchmove",l),t.on("document:touchend",l),{name:"fastForward",get state(){return L(o,"art-fast-forward")}}}function Kt(t){const{layers:e,icons:r,template:{$player:o}}=t;function a(){return L(o,"art-lock")}function n(){C(o,"art-lock"),t.isLock=!0,t.emit("lock",!0)}function i(){z(o,"art-lock"),t.isLock=!1,t.emit("lock",!1)}return e.add({name:"lock",mounted(e){const o=S(e,r.lock),a=S(e,r.unlock);I(o,"display","none"),t.on("lock",t=>{t?(I(o,"display","inline-flex"),I(a,"display","none")):(I(o,"display","none"),I(a,"display","inline-flex"))})},click(){a()?i():n()}}),{name:"lock",get state(){return a()},set state(t){t?n():i()}}}function Zt(t){return t.on("control",e=>{e?z(t.template.$player,"art-mini-progress-bar"):C(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class Jt{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(Zt),e.lock&&k&&this.add(Kt),e.autoPlayback&&!e.isLive&&this.add(Xt),e.autoOrientation&&k&&this.add(qt),e.fastForward&&k&&!e.isLive&&this.add(Gt);for(let r=0;rthis.next(t,e)):this.next(t,e)}next(t,e){const r=e&&e.name||t.name||`plugin${this.id}`;return q(!rt(this,r),`Cannot add a plugin that already has the same name: ${r}`),tt(this,r,{value:e}),this}}class Qt extends xt{constructor(t){super(t);const{option:e,controls:r,template:{$setting:o}}=t;this.name="setting",this.$parent=o,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings],e.setting&&(this.format(),this.render(),t.on("blur",()=>{this.show&&(this.show=!1,this.render())}),t.on("focus",t=>{const e=V(t,r.setting),o=V(t,this.$parent);!this.show||e||o||(this.show=!1,this.render())}),t.on("resize",()=>this.resize()))}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,PLAYBACK_RATE:a}}=t;function n(t){return 1===t?e.get("Normal"):t.toFixed(1)}function i(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:o,name:"playback-rate",html:e.get("Play Speed"),tooltip:n(t.playbackRate),icon:r.playbackRate,selector:a.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:n(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:()=>{i(),t.on("video:ratechange",()=>i())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,ASPECT_RATIO:a}}=t;function n(t){return"default"===t?e.get("Default"):t}function i(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:o,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(t.aspectRatio),selector:a.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:n(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:()=>{i(),t.on("aspectRatio",()=>i())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:o,FLIP:a}}=t;function n(t){return e.get(Z(t))}function i(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:o,name:"flip",html:e.get("Video Flip"),tooltip:n(t.flip),icon:r.flip,selector:a.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:n(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:()=>{i(),t.on("flip",()=>i())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:o}=t;return{width:o.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{t.on("subtitleOffset",t=>{r.$range.value=t,r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){var r;for(let o=0;o{e.default=e===t,e.default&&e.$item&&O(e.$item,"art-current")},t.$option),this.render(t.$parents))}format(t=this.option,e,r,o=[]){for(let a=0;ae}),tt(n,"$parents",{get:()=>r}),tt(n,"$option",{get:()=>t});const o=[];tt(n,"$events",{get:()=>o}),tt(n,"$formatted",{get:()=>!0})}this.format(n.selector||[],n,t,o)}this.option=t}find(t=""){let e=null;return this.traverse(r=>{r.name===t&&(e=r)}),e}resize(){var t,e;const{controls:r,constructor:{SETTING_WIDTH:o,SETTING_ITEM_HEIGHT:a},template:{$player:n,$setting:i}}=this.art;if(r.setting&&this.show){const s=(null==(e=null==(t=this.active[0])?void 0:t.$parent)?void 0:e.width)||o,{left:l,width:c}=H(r.setting),{left:d,width:p}=H(n),h=l-d+c/2-s/2;if(I(i,"height",`${this.active===this.option?this.active.length*a:(this.active.length+1)*a}px`),I(i,"width",`${s}px`),this.art.isRotate||k)return;h+s>p?(I(i,"left",null),I(i,"right",null)):(I(i,"left",`${h}px`),I(i,"right","auto"))}}inactivate(t){for(let e=0;e'),s=D("div");C(s,"art-setting-item-left-icon"),S(s,o),S(i,s),S(i,t.$parent.html);const l=r(n,"click",()=>this.render(t.$parents));t.$parent.$events.push(l),S(e,n)}createItem(t,e=!1){var r,o;if(!this.cache.has(t.$option))return;const a=this.cache.get(t.$option),n=t.$item;let i="selector";rt(t,"switch")&&(i="switch"),rt(t,"range")&&(i="range"),rt(t,"onClick")&&(i="button");const{icons:s,proxy:l,constructor:c}=this.art,p=D("div");C(p,"art-setting-item"),I(p,"height",`${c.SETTING_ITEM_HEIGHT}px`),p.dataset.name=t.name||"",p.dataset.value=t.value||"";const h=S(p,'
'),u=S(p,'
'),m=D("div");switch(C(m,"art-setting-item-left-icon"),i){case"button":case"switch":case"range":S(m,t.icon||s.config);break;case"selector":(null==(r=t.selector)?void 0:r.length)?S(m,t.icon||s.config):S(m,s.check)}S(h,m),tt(t,"$icon",{configurable:!0,get:()=>m}),tt(t,"icon",{configurable:!0,get:()=>m.innerHTML,set(t){m.innerHTML="",S(m,t)}});const f=D("div");C(f,"art-setting-item-left-text"),S(f,t.html||""),S(h,f),tt(t,"$html",{configurable:!0,get:()=>f}),tt(t,"html",{configurable:!0,get:()=>f.innerHTML,set(t){f.innerHTML="",S(f,t)}});const g=D("div");switch(C(g,"art-setting-item-right-tooltip"),S(g,t.tooltip||""),S(u,g),tt(t,"$tooltip",{configurable:!0,get:()=>g}),tt(t,"tooltip",{configurable:!0,get:()=>g.innerHTML,set(t){g.innerHTML="",S(g,t)}}),i){case"switch":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,s.switchOn),o=S(e,s.switchOff);I(t.switch?o:r,"display","none"),S(u,e),tt(t,"$switch",{configurable:!0,get:()=>e});let a=t.switch;tt(t,"switch",{configurable:!0,get:()=>a,set(t){a=t,t?(I(o,"display","none"),I(r,"display",null)):(I(o,"display",null),I(r,"display","none"))}});break}case"range":{const e=D("div");C(e,"art-setting-item-right-icon");const r=S(e,'');r.value=t.range[0],r.min=t.range[1],r.max=t.range[2],r.step=t.range[3],C(r,"art-setting-range"),S(u,e),tt(t,"$range",{configurable:!0,get:()=>r});let o=[...t.range];tt(t,"range",{configurable:!0,get:()=>o,set(t){o=[...t],r.value=t[0],r.min=t[1],r.max=t[2],r.step=t[3]}})}break;case"selector":if(null==(o=t.selector)?void 0:o.length){const t=D("div");C(t,"art-setting-item-right-icon"),S(t,s.arrowRight),S(u,t)}}switch(i){case"switch":if(t.onSwitch){const e=l(p,"click",e=>d(this,null,function*(){t.switch=yield t.onSwitch.call(this.art,t,p,e)}));t.$events.push(e)}break;case"range":if(t.$range){if(t.onRange){const e=l(t.$range,"change",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onRange.call(this.art,t,p,e)}));t.$events.push(e)}if(t.onChange){const e=l(t.$range,"input",e=>d(this,null,function*(){t.range[0]=t.$range.valueAsNumber,t.tooltip=yield t.onChange.call(this.art,t,p,e)}));t.$events.push(e)}}break;case"selector":{const e=l(p,"click",e=>d(this,null,function*(){var r;(null==(r=t.selector)?void 0:r.length)?this.render(t.selector):(this.check(t),t.$parent.onSelect&&(t.$parent.tooltip=yield t.$parent.onSelect.call(this.art,t,p,e)))}));t.$events.push(e),t.default&&C(p,"art-current")}break;case"button":if(t.onClick){const e=l(p,"click",e=>d(this,null,function*(){t.tooltip=yield t.onClick.call(this.art,t,p,e)}));t.$events.push(e)}}tt(t,"$item",{configurable:!0,get:()=>p}),e?Y(p,n):S(a,p),t.mounted&&setTimeout(()=>t.mounted.call(this.art,t.$item,t),0)}render(t=this.option){var e;if(this.active=t,this.cache.has(t)){O(this.cache.get(t),"art-current")}else{const r=D("div");this.cache.set(t,r),C(r,"art-setting-panel"),S(this.$parent,r),O(r,"art-current"),(null==(e=t[0])?void 0:e.$parent)&&this.createHeader(t[0]);for(let e=0;enull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"===typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){var t,e;return null==(e=null==(t=this.art.template.$video)?void 0:t.textTracks)?void 0:e[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?P(r,t):I(r,t,e)}update(){const{option:{subtitle:t},template:{$subtitle:e}}=this.art;e.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),e.innerHTML=this.activeCues.map((e,r)=>e.text.split(/\r?\n/).filter(t=>t.trim()).map(e=>`
\n ${t.escape?Q(e):e}\n
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}switch(t){return d(this,arguments,function*(t,e={}){const{i18n:r,notice:o,option:a}=this.art,n=c(l(l({},a.subtitle),e),{url:t}),i=yield this.init(n);return e.name&&(o.show=`${r.get("Switch Subtitle")}: ${e.name}`),i})}createTrack(t,e){const{template:r,proxy:o,option:a}=this.art,{$video:n,$track:i}=r,s=D("track");s.default=!0,s.kind=t,s.src=e,s.label=a.subtitle.name||"Artplayer",s.track.mode="hidden",s.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),i.onload=null,M(i),S(n,s),r.$track=s,this.destroyEvent=o(this.textTrack,"cuechange",()=>this.update())}init(t){return d(this,null,function*(){const{notice:e,template:{$subtitle:r}}=this.art;return this.textTrack?(f(t,wt.subtitle),t.url?(this.option=t,this.style(t.style),fetch(t.url).then(t=>t.arrayBuffer()).then(e=>{const r=new TextDecoder(t.encoding).decode(e);switch(t.type||X(t.url)){case"srt":{const e=nt(r);return it(t.onVttLoad(e))}case"ass":{const e=st(r);return it(t.onVttLoad(e))}case"vtt":return it(t.onVttLoad(r));default:return t.url}}).then(t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t)),t)).catch(t=>{throw r.innerHTML="",e.show=t,t})):void 0):null})}}class oe{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=T(e.container),q(this.$container,`No container element found by ${e.container}`)),q(B(),"The current browser does not support flex layout");const o=this.$container.tagName.toLowerCase();q("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),q(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.init()}static get html(){return`\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
${g}
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\n x \n
\n
\n
\n
[x]
\n
\n
\n
\n `}query(t){return T(t,this.$container)}init(){const{option:t}=this.art;if(t.useSSR||(this.$container.innerHTML=oe.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);q(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),Y(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&C(this.$player,"art-backdrop"),k&&C(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":C(this.$player,"art-destroy")}}class ae{on(t,e,r){const o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:r}),this}once(t,e,r){const o=this;function a(...n){o.off(t,a),e.apply(r,n)}return a._=e,this.on(t,a,r)}emit(t,...e){const r=((this.e||(this.e={}))[t]||[]).slice();for(let o=0;oe.call(this,this)),se.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${se.version}`);for(let e=0;et(`Event@${e.type}`))}ie.push(this)}static get instances(){return ie}static get version(){return g}static get config(){return v}static get utils(){return pt}static get scheme(){return wt}static get Emitter(){return ae}static get validator(){return f}static get kindOf(){return f.kindOf}static get html(){return oe.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:b?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null==navigator?void 0:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){se.REMOVE_SRC_WHEN_DESTROY&&this.reset(),this.events.destroy(),this.template.destroy(t),ie.splice(ie.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}return se.STYLE=ee,se.DEBUG=!1,se.CONTEXTMENU=!0,se.NOTICE_TIME=2e3,se.SETTING_WIDTH=250,se.SETTING_ITEM_WIDTH=200,se.SETTING_ITEM_HEIGHT=35,se.RESIZE_TIME=200,se.SCROLL_TIME=200,se.SCROLL_GAP=50,se.AUTO_PLAYBACK_MAX=10,se.AUTO_PLAYBACK_MIN=5,se.AUTO_PLAYBACK_TIMEOUT=3e3,se.RECONNECT_TIME_MAX=5,se.RECONNECT_SLEEP_TIME=1e3,se.CONTROL_HIDE_TIME=3e3,se.DBCLICK_TIME=300,se.DBCLICK_FULLSCREEN=!0,se.MOBILE_DBCLICK_PLAY=!0,se.MOBILE_CLICK_PLAY=!1,se.AUTO_ORIENTATION_TIME=200,se.INFO_LOOP_TIME=1e3,se.FAST_FORWARD_VALUE=3,se.FAST_FORWARD_TIME=1e3,se.TOUCH_MOVE_RATIO=.5,se.VOLUME_STEP=.1,se.SEEK_STEP=5,se.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],se.ASPECT_RATIO=["default","4:3","16:9"],se.FLIP=["normal","horizontal","vertical"],se.FULLSCREEN_WEB_IN_BODY=!0,se.LOG_VERSION=!0,se.USE_RAF=!1,se.REMOVE_SRC_WHEN_DESTROY=!0,$&&(F("artplayer-style",ee),setTimeout(()=>{se.LOG_VERSION&&console.log(`%c ArtPlayer %c ${se.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),se}); diff --git a/packages/artplayer/dist/artplayer.mjs b/packages/artplayer/dist/artplayer.mjs index 40c306e9d..24305d13a 100644 --- a/packages/artplayer/dist/artplayer.mjs +++ b/packages/artplayer/dist/artplayer.mjs @@ -1,5 +1,5 @@ /*! - * artplayer.js v5.3.1 + * artplayer.js v5.4.0 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2026 Harvey Zhao * Released under the MIT License. @@ -157,7 +157,7 @@ function requireOptionValidator() { } var optionValidatorExports = requireOptionValidator(); const validator = /* @__PURE__ */ getDefaultExportFromCjs(optionValidatorExports); -const version$1 = "5.3.1"; +const version$1 = "5.4.0"; const config$1 = { properties: [ "audioTracks", @@ -1203,7 +1203,7 @@ function setCurrentTime(art, event) { function progress(options) { return (art) => { const { icons, option, proxy } = art; - const { $player } = art.template; + const { $player, $progress } = art.template; return { ...options, html: ` @@ -1317,19 +1317,19 @@ function progress(options) { } art.emit("setBar", "loaded", art.loaded || 0); if (!isMobile) { - proxy($control, "click", (event) => { + proxy($progress, "click", (event) => { if (event.target !== $indicator) { setCurrentTime(art, event); } }); - proxy($control, "mousemove", (event) => { + proxy($progress, "mousemove", (event) => { const { percentage } = getPosFromEvent(art, event); art.emit("setBar", "hover", percentage, event); }); - proxy($control, "mouseleave", (event) => { + proxy($progress, "mouseleave", (event) => { art.emit("setBar", "hover", 0, event); }); - proxy($control, "mousedown", (event) => { + proxy($progress, "mousedown", (event) => { isDragging = event.button === 0; }); art.on("document:mousemove", (event) => { @@ -4472,7 +4472,7 @@ class Storage { } } } -const style = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 8px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px, var(--art-subtitle-border) -1px -1px 1px, var(--art-subtitle-border) 1px -1px 1px, var(--art-subtitle-border) -1px 1px 1px;\n}\n.art-video-player.art-subtitle-show .art-subtitle {\n display: flex;\n}\n.art-video-player.art-control-show .art-subtitle {\n bottom: calc(var(--art-control-height) + var(--art-subtitle-bottom));\n}\n.art-danmuku {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n}\n.art-video-player .art-layers {\n position: absolute;\n inset: 0;\n z-index: 40;\n width: 100%;\n height: 100%;\n display: none;\n pointer-events: none;\n}\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n.art-video-player.art-layer-show .art-layers {\n display: flex;\n}\n.art-video-player .art-mask {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player .art-mask .art-state {\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transform: scale(2);\n width: var(--art-state-size);\n height: var(--art-state-size);\n transition: all var(--art-transition-duration) ease;\n}\n.art-video-player.art-mask-show .art-state {\n cursor: pointer;\n pointer-events: auto;\n opacity: var(--art-state-opacity);\n transform: scale(1);\n}\n.art-video-player.art-loading-show .art-state {\n display: none;\n}\n.art-video-player .art-loading {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n.art-video-player.art-loading-show .art-mask {\n display: none;\n}\n.art-video-player .art-bottom {\n position: absolute;\n inset: 0;\n z-index: 60;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n padding: 0 var(--art-padding);\n transition: all var(--art-transition-duration) ease;\n background-size: 100% var(--art-bottom-height);\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-video-player .art-bottom .art-controls,\n.art-video-player .art-bottom .art-progress {\n transform: translateY(var(--art-bottom-offset));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player.art-control-show .art-bottom,\n.art-video-player.art-hover .art-bottom {\n opacity: 1;\n}\n.art-video-player.art-control-show .art-bottom .art-controls,\n.art-video-player.art-hover .art-bottom .art-controls,\n.art-video-player.art-control-show .art-bottom .art-progress,\n.art-video-player.art-hover .art-bottom .art-progress {\n transform: translateY(0);\n}\n.art-bottom .art-progress {\n position: relative;\n z-index: 0;\n pointer-events: auto;\n padding-top: var(--art-progress-top-gap);\n padding-bottom: var(--art-bottom-gap);\n}\n.art-bottom .art-progress .art-control-progress {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n height: var(--art-progress-height);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n display: flex;\n align-items: center;\n position: relative;\n height: 50%;\n width: 100%;\n transition: height var(--art-transition-duration) ease;\n background-color: var(--art-progress-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-hover-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-loaded-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played {\n position: absolute;\n inset: 0;\n z-index: 20;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-theme);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n right: auto;\n pointer-events: auto;\n width: var(--art-highlight-width) !important;\n transform: translateX(calc(var(--art-highlight-width) / -2));\n background-color: var(--art-highlight-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 40;\n left: 0;\n border-radius: 50%;\n width: var(--art-indicator-size);\n height: var(--art-indicator-size);\n transform: scale(var(--art-indicator-scale));\n margin-left: calc(var(--art-indicator-size) / -2);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon {\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover {\n transform: scale(1.2) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active {\n transform: scale(1) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n z-index: 50;\n top: -25px;\n left: 0;\n padding: 3px 5px;\n line-height: 1;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n white-space: nowrap;\n background-color: var(--art-tip-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner {\n height: 100%;\n}\n.art-bottom .art-progress .art-control-thumbnails {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n bottom: calc(var(--art-bottom-gap) + 10px);\n left: 0;\n border-radius: var(--art-border-radius);\n pointer-events: none;\n background-color: var(--art-widget-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px -1px rgba(0, 0, 0, 0.2);\n}\n.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n transform: scale(1);\n}\n.art-progress-hover .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip,\n.art-progress-hover .art-bottom .art-progress .art-control-thumbnails {\n transform: scale(1);\n opacity: 1;\n}\n.art-video-player .art-controls {\n position: relative;\n z-index: 10;\n pointer-events: auto;\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: var(--art-control-height);\n}\n.art-video-player .art-controls .art-controls-left,\n.art-video-player .art-controls .art-controls-right {\n display: flex;\n height: 100%;\n}\n.art-video-player .art-controls .art-controls-center {\n display: none;\n justify-content: center;\n align-items: center;\n flex: 1;\n height: 100%;\n padding: 0 10px;\n}\n.art-video-player .art-controls .art-controls-right {\n justify-content: flex-end;\n}\n.art-video-player .art-controls .art-control {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n white-space: nowrap;\n opacity: var(--art-control-opacity);\n min-height: var(--art-control-height);\n min-width: var(--art-control-height);\n transition: opacity var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon {\n height: var(--art-control-icon-size);\n width: var(--art-control-icon-size);\n transform: scale(var(--art-control-icon-scale));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon:active {\n transform: scale(calc(var(--art-control-icon-scale) * 0.8));\n}\n.art-video-player .art-controls .art-control:hover {\n opacity: 1;\n}\n.art-control-volume {\n position: relative;\n}\n.art-control-volume .art-volume-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n left: 0;\n right: 0;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n cursor: default;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n width: var(--art-control-height);\n height: var(--art-volume-height);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n height: 100%;\n width: 100%;\n padding: 10px 0 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider {\n flex: 1;\n width: 100%;\n display: flex;\n cursor: pointer;\n position: relative;\n justify-content: center;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle {\n position: relative;\n display: flex;\n justify-content: center;\n width: 2px;\n border-radius: var(--art-border-radius);\n overflow: hidden;\n background-color: rgba(255, 255, 255, 0.25);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n background-color: var(--art-theme);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator {\n position: absolute;\n width: var(--art-volume-handle-size);\n height: var(--art-volume-handle-size);\n margin-top: calc(var(--art-volume-handle-size) / -2);\n flex-shrink: 0;\n transform: scale(1);\n border-radius: 100%;\n background-color: var(--art-theme);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator {\n transform: scale(0.9);\n}\n.art-control-volume:hover .art-volume-panel {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player .art-notice {\n display: none;\n position: absolute;\n inset: 0;\n z-index: 80;\n width: 100%;\n height: 100%;\n height: auto;\n bottom: auto;\n padding: var(--art-padding);\n pointer-events: none;\n}\n.art-video-player .art-notice .art-notice-inner {\n display: inline-flex;\n padding: 5px;\n line-height: 1;\n border-radius: var(--art-border-radius);\n background-color: var(--art-tip-background);\n}\n.art-video-player.art-notice-show .art-notice {\n display: flex;\n}\n.art-video-player .art-contextmenus {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 120;\n padding: 5px 0;\n border-radius: var(--art-border-radius);\n font-size: 12px;\n background-color: var(--art-widget-background);\n min-width: var(--art-contextmenus-min-width);\n}\n.art-video-player .art-contextmenus .art-contextmenu {\n cursor: pointer;\n display: flex;\n padding: 10px 15px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu span {\n padding: 0 8px;\n}\n.art-video-player .art-contextmenus .art-contextmenu span:hover,\n.art-video-player .art-contextmenus .art-contextmenu span.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-contextmenus .art-contextmenu:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu:last-child {\n border-bottom: none;\n}\n.art-video-player.art-contextmenu-show .art-contextmenus {\n display: flex;\n}\n.art-video-player .art-settings {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 90;\n left: auto;\n overflow-y: auto;\n overflow-x: hidden;\n border-radius: var(--art-border-radius);\n max-height: var(--art-settings-max-height);\n right: var(--art-padding);\n bottom: var(--art-control-height);\n transition: all var(--art-transition-duration) ease;\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-settings .art-setting-panel {\n display: none;\n flex-direction: column;\n}\n.art-video-player .art-settings .art-setting-panel.art-current {\n display: flex;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 5px;\n cursor: pointer;\n overflow: hidden;\n transition: background-color var(--art-transition-duration) ease;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check {\n visibility: hidden;\n height: 15px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check {\n visibility: visible;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n gap: 5px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--art-settings-icon-size);\n width: var(--art-settings-icon-size);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip {\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.5);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 32px;\n height: 24px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range {\n height: 3px;\n width: 80px;\n outline: none;\n appearance: none;\n background-color: rgba(255, 255, 255, 0.2);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item-back {\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player.art-setting-show .art-settings {\n display: flex;\n}\n.art-video-player .art-info {\n display: none;\n position: absolute;\n left: var(--art-padding);\n top: var(--art-padding);\n z-index: 100;\n padding: 10px;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-info .art-info-panel {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-title {\n width: 100px;\n text-align: right;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-content {\n width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: all;\n}\n.art-video-player .art-info .art-info-close {\n position: absolute;\n top: 5px;\n right: 5px;\n cursor: pointer;\n}\n.art-video-player.art-info-show .art-info {\n display: flex;\n}\n.art-hide-cursor * {\n cursor: none !important;\n}\n.art-video-player[data-aspect-ratio] {\n overflow: hidden;\n}\n.art-video-player[data-aspect-ratio] .art-video {\n object-fit: fill;\n box-sizing: content-box;\n}\n.art-fullscreen {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n}\n.art-fullscreen-web {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n position: fixed;\n inset: 0;\n z-index: var(--art-fullscreen-web-index);\n width: 100%;\n height: 100%;\n}\n.art-mini-popup {\n position: fixed;\n z-index: 9999;\n width: 320px;\n height: 180px;\n background: #000;\n border-radius: var(--art-border-radius);\n cursor: move;\n user-select: none;\n overflow: hidden;\n transition: opacity 0.2s ease;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n}\n.art-mini-popup svg {\n fill: #fff;\n}\n.art-mini-popup .art-video {\n pointer-events: none;\n}\n.art-mini-popup .art-mini-close {\n position: absolute;\n z-index: 20;\n right: 10px;\n top: 10px;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n.art-mini-popup .art-mini-state {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease;\n background-color: rgba(0, 0, 0, 0.25);\n}\n.art-mini-popup .art-mini-state .art-icon {\n opacity: 0.75;\n cursor: pointer;\n transform: scale(3);\n pointer-events: auto;\n transition: transform 0.2s ease;\n}\n.art-mini-popup .art-mini-state .art-icon:active {\n transform: scale(2.5);\n}\n.art-mini-popup.art-mini-dragging {\n opacity: 0.9;\n}\n.art-mini-popup:hover .art-mini-close,\n.art-mini-popup:hover .art-mini-state {\n opacity: 1;\n}\n.art-video-player[data-flip='horizontal'] .art-video {\n transform: scaleX(-1);\n}\n.art-video-player[data-flip='vertical'] .art-video {\n transform: scaleY(-1);\n}\n.art-video-player .art-layer-lock {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n border-radius: 50%;\n transform: translateY(-50%);\n height: var(--art-lock-size);\n width: var(--art-lock-size);\n left: var(--art-padding);\n background-color: var(--art-tip-background);\n}\n.art-video-player .art-layer-auto-playback {\n display: none;\n gap: 10px;\n align-items: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n padding: 10px;\n line-height: 1;\n left: var(--art-padding);\n bottom: calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close svg {\n width: 15px;\n height: 15px;\n fill: var(--art-theme);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-jump {\n color: var(--art-theme);\n cursor: pointer;\n}\n.art-video-player.art-lock .art-subtitle {\n bottom: var(--art-subtitle-bottom) !important;\n}\n.art-video-player.art-mini-progress-bar .art-bottom,\n.art-video-player.art-lock .art-bottom {\n opacity: 1;\n padding: 0;\n background-image: none;\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-controls,\n.art-video-player.art-lock .art-bottom .art-controls,\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress,\n.art-video-player.art-lock .art-bottom .art-progress {\n transform: translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height) / 4));\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,\n.art-video-player.art-lock .art-bottom .art-progress-indicator {\n display: none !important;\n}\n.art-video-player.art-control-show .art-layer-lock {\n display: flex;\n}\n.art-control-selector {\n position: relative;\n display: flex;\n justify-content: center;\n}\n.art-control-selector .art-selector-list {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n overflow-y: auto;\n overflow-x: hidden;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n max-height: var(--art-selector-max-height);\n background-color: var(--art-widget-background);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-selector .art-selector-list .art-selector-item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n padding: 10px 15px;\n flex-shrink: 0;\n line-height: 1;\n}\n.art-control-selector .art-selector-list .art-selector-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-control-selector .art-selector-list .art-selector-item:hover,\n.art-control-selector .art-selector-list .art-selector-item.art-current {\n color: var(--art-theme);\n}\n.art-control-selector:hover .art-selector-list {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player {\n /*! Hint.css - v2.7.0 - 2021-10-01\n * https://kushagra.dev/lab/hint/\n * Copyright (c) 2021 Kushagra Gour */\n /*-------------------------------------*\\\n HINT.css - A CSS tooltip library\n \\*-------------------------------------*/\n /**\n * HINT.css is a tooltip library made in pure CSS.\n *\n * Source: https://github.com/chinchang/hint.css\n * Demo: http://kushagragour.in/lab/hint/\n *\n */\n /**\n * source: hint-core.scss\n *\n * Defines the basic styling for the tooltip.\n * Each tooltip is made of 2 parts:\n * 1) body (:after)\n * 2) arrow (:before)\n *\n * Classes added:\n * 1) hint\n */\n /**\n * source: hint-position.scss\n *\n * Defines the positoning logic for the tooltips.\n *\n * Classes added:\n * 1) hint--top\n * 2) hint--bottom\n * 3) hint--left\n * 4) hint--right\n */\n /**\n * set default color for tooltip arrows\n */\n /**\n * top tooltip\n */\n /**\n * bottom tooltip\n */\n /**\n * right tooltip\n */\n /**\n * left tooltip\n */\n /**\n * top-left tooltip\n */\n /**\n * top-right tooltip\n */\n /**\n * bottom-left tooltip\n */\n /**\n * bottom-right tooltip\n */\n /**\n * source: hint-sizes.scss\n *\n * Defines width restricted tooltips that can span\n * across multiple lines.\n *\n * Classes added:\n * 1) hint--small\n * 2) hint--medium\n * 3) hint--large\n *\n */\n /**\n * source: hint-theme.scss\n *\n * Defines basic theme for tooltips.\n *\n */\n /**\n * source: hint-color-types.scss\n *\n * Contains tooltips of various types based on color differences.\n *\n * Classes added:\n * 1) hint--error\n * 2) hint--warning\n * 3) hint--info\n * 4) hint--success\n *\n */\n /**\n * Error\n */\n /**\n * Warning\n */\n /**\n * Info\n */\n /**\n * Success\n */\n /**\n * source: hint-always.scss\n *\n * Defines a persisted tooltip which shows always.\n *\n * Classes added:\n * 1) hint--always\n *\n */\n /**\n * source: hint-rounded.scss\n *\n * Defines rounded corner tooltips.\n *\n * Classes added:\n * 1) hint--rounded\n *\n */\n /**\n * source: hint-effects.scss\n *\n * Defines various transition effects for the tooltips.\n *\n * Classes added:\n * 1) hint--no-animate\n * 2) hint--bounce\n *\n */\n}\n.art-video-player [class*='hint--'] {\n position: relative;\n display: inline-block;\n font-style: normal;\n /**\n * tooltip arrow\n */\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:before,\n.art-video-player [class*='hint--']:after {\n position: absolute;\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n visibility: hidden;\n opacity: 0;\n z-index: 1000000;\n pointer-events: none;\n -webkit-transition: 0.3s ease;\n -moz-transition: 0.3s ease;\n transition: 0.3s ease;\n -webkit-transition-delay: 0ms;\n -moz-transition-delay: 0ms;\n transition-delay: 0ms;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n visibility: visible;\n opacity: 1;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n -webkit-transition-delay: 100ms;\n -moz-transition-delay: 100ms;\n transition-delay: 100ms;\n}\n.art-video-player [class*='hint--']:before {\n content: '';\n position: absolute;\n background: transparent;\n border: 6px solid transparent;\n z-index: 1000001;\n}\n.art-video-player [class*='hint--']:after {\n background: #000000;\n color: white;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n line-height: 12px;\n white-space: nowrap;\n}\n.art-video-player [class*='hint--'][aria-label]:after {\n content: attr(aria-label);\n}\n.art-video-player [class*='hint--'][data-hint]:after {\n content: attr(data-hint);\n}\n.art-video-player [aria-label='']:before,\n.art-video-player [aria-label='']:after,\n.art-video-player [data-hint='']:before,\n.art-video-player [data-hint='']:after {\n display: none !important;\n}\n.art-video-player .hint--top-left:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top-right:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--bottom-left:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom-right:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--left:before {\n border-left-color: #000000;\n}\n.art-video-player .hint--right:before {\n border-right-color: #000000;\n}\n.art-video-player .hint--top:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top:before,\n.art-video-player .hint--top:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--top:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top:hover:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--bottom:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom:before,\n.art-video-player .hint--bottom:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--bottom:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom:hover:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--right:before {\n margin-left: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--right:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--right:before,\n.art-video-player .hint--right:after {\n left: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--right:hover:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--right:hover:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--left:before {\n margin-right: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--left:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--left:before,\n.art-video-player .hint--left:after {\n right: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--left:hover:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--left:hover:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--top-left:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-left:before,\n.art-video-player .hint--top-left:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--top-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--top-left:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--top-right:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-right:before,\n.art-video-player .hint--top-right:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--top-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--top-right:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-right:hover:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--bottom-left:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-left:before,\n.art-video-player .hint--bottom-left:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--bottom-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--bottom-left:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--bottom-right:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-right:before,\n.art-video-player .hint--bottom-right:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--bottom-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--bottom-right:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-right:hover:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--small:after,\n.art-video-player .hint--medium:after,\n.art-video-player .hint--large:after {\n white-space: normal;\n line-height: 1.4em;\n word-wrap: break-word;\n}\n.art-video-player .hint--small:after {\n width: 80px;\n}\n.art-video-player .hint--medium:after {\n width: 150px;\n}\n.art-video-player .hint--large:after {\n width: 300px;\n}\n.art-video-player [class*='hint--'] {\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:after {\n text-shadow: 0 -1px 0px black;\n box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);\n}\n.art-video-player .hint--error:after {\n background-color: #b34e4d;\n text-shadow: 0 -1px 0px #592726;\n}\n.art-video-player .hint--error.hint--top-left:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top-right:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-left:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-right:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--left:before {\n border-left-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--right:before {\n border-right-color: #b34e4d;\n}\n.art-video-player .hint--warning:after {\n background-color: #c09854;\n text-shadow: 0 -1px 0px #6c5328;\n}\n.art-video-player .hint--warning.hint--top-left:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top-right:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-left:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-right:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--left:before {\n border-left-color: #c09854;\n}\n.art-video-player .hint--warning.hint--right:before {\n border-right-color: #c09854;\n}\n.art-video-player .hint--info:after {\n background-color: #3986ac;\n text-shadow: 0 -1px 0px #1a3c4d;\n}\n.art-video-player .hint--info.hint--top-left:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top-right:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-left:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-right:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--left:before {\n border-left-color: #3986ac;\n}\n.art-video-player .hint--info.hint--right:before {\n border-right-color: #3986ac;\n}\n.art-video-player .hint--success:after {\n background-color: #458746;\n text-shadow: 0 -1px 0px #1a321a;\n}\n.art-video-player .hint--success.hint--top-left:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top-right:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-left:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-right:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--left:before {\n border-left-color: #458746;\n}\n.art-video-player .hint--success.hint--right:before {\n border-right-color: #458746;\n}\n.art-video-player .hint--always:after,\n.art-video-player .hint--always:before {\n opacity: 1;\n visibility: visible;\n}\n.art-video-player .hint--always.hint--top:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--bottom:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--left:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--left:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--right:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--always.hint--right:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--rounded:after {\n border-radius: 4px;\n}\n.art-video-player .hint--no-animate:before,\n.art-video-player .hint--no-animate:after {\n -webkit-transition-duration: 0ms;\n -moz-transition-duration: 0ms;\n transition-duration: 0ms;\n}\n.art-video-player .hint--bounce:before,\n.art-video-player .hint--bounce:after {\n -webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n -moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n}\n.art-video-player .hint--no-shadow:before,\n.art-video-player .hint--no-shadow:after {\n text-shadow: initial;\n box-shadow: initial;\n}\n.art-video-player .hint--no-arrow:before {\n display: none;\n}\n.art-video-player.art-mobile {\n --art-bottom-gap: 10px;\n --art-control-height: 38px;\n --art-control-icon-scale: 1;\n --art-state-size: 60px;\n --art-settings-max-height: 180px;\n --art-selector-max-height: 180px;\n --art-indicator-scale: 1;\n --art-control-opacity: 1;\n}\n.art-video-player.art-mobile .art-controls-left {\n margin-left: calc(var(--art-padding) / -1);\n}\n.art-video-player.art-mobile .art-controls-right {\n margin-right: calc(var(--art-padding) / -1);\n}\n"; +const style = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 10px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px, var(--art-subtitle-border) -1px -1px 1px, var(--art-subtitle-border) 1px -1px 1px, var(--art-subtitle-border) -1px 1px 1px;\n}\n.art-video-player.art-subtitle-show .art-subtitle {\n display: flex;\n}\n.art-video-player.art-control-show .art-subtitle {\n bottom: calc(var(--art-control-height) + var(--art-subtitle-bottom));\n}\n.art-danmuku {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n}\n.art-video-player .art-layers {\n position: absolute;\n inset: 0;\n z-index: 40;\n width: 100%;\n height: 100%;\n display: none;\n pointer-events: none;\n}\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n.art-video-player.art-layer-show .art-layers {\n display: flex;\n}\n.art-video-player .art-mask {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player .art-mask .art-state {\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transform: scale(2);\n width: var(--art-state-size);\n height: var(--art-state-size);\n transition: all var(--art-transition-duration) ease;\n}\n.art-video-player.art-mask-show .art-state {\n pointer-events: auto;\n opacity: var(--art-state-opacity);\n transform: scale(1);\n}\n.art-video-player.art-loading-show .art-state {\n display: none;\n}\n.art-video-player .art-loading {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n inset: 0;\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n.art-video-player.art-loading-show .art-mask {\n display: none;\n}\n.art-video-player .art-bottom {\n position: absolute;\n inset: 0;\n z-index: 60;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n padding: 0 var(--art-padding);\n transition: all var(--art-transition-duration) ease;\n background-size: 100% var(--art-bottom-height);\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-video-player .art-bottom .art-controls,\n.art-video-player .art-bottom .art-progress {\n transform: translateY(var(--art-bottom-offset));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player.art-control-show .art-bottom,\n.art-video-player.art-hover .art-bottom {\n opacity: 1;\n}\n.art-video-player.art-control-show .art-bottom .art-controls,\n.art-video-player.art-hover .art-bottom .art-controls,\n.art-video-player.art-control-show .art-bottom .art-progress,\n.art-video-player.art-hover .art-bottom .art-progress {\n transform: translateY(0);\n}\n.art-bottom .art-progress {\n position: relative;\n z-index: 0;\n cursor: pointer;\n pointer-events: auto;\n padding-top: var(--art-progress-top-gap);\n padding-bottom: var(--art-bottom-gap);\n}\n.art-bottom .art-progress .art-control-progress {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--art-progress-height);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n display: flex;\n align-items: center;\n position: relative;\n height: 50%;\n width: 100%;\n transition: height var(--art-transition-duration) ease;\n background-color: var(--art-progress-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-hover-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-loaded-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played {\n position: absolute;\n inset: 0;\n z-index: 20;\n width: 100%;\n height: 100%;\n width: 0%;\n background-color: var(--art-theme);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n right: auto;\n pointer-events: auto;\n width: var(--art-highlight-width) !important;\n transform: translateX(calc(var(--art-highlight-width) / -2));\n background-color: var(--art-highlight-color);\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 40;\n left: 0;\n border-radius: 50%;\n width: var(--art-indicator-size);\n height: var(--art-indicator-size);\n transform: scale(var(--art-indicator-scale));\n margin-left: calc(var(--art-indicator-size) / -2);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon {\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover {\n transform: scale(1.2) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active {\n transform: scale(1) !important;\n}\n.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n z-index: 50;\n top: -25px;\n left: 0;\n padding: 3px 5px;\n line-height: 1;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n white-space: nowrap;\n background-color: var(--art-tip-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n}\n.art-bottom .art-progress .art-control-thumbnails {\n transform-origin: bottom center;\n transform: scale(0.5);\n opacity: 0;\n position: absolute;\n bottom: calc(var(--art-bottom-gap) + 10px);\n left: 0;\n border-radius: var(--art-border-radius);\n pointer-events: none;\n background-color: var(--art-widget-background);\n transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px -1px rgba(0, 0, 0, 0.2);\n}\n.art-bottom .art-progress:hover .art-control-progress .art-control-progress-inner {\n height: 100%;\n}\n.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {\n transform: scale(1);\n}\n.art-progress-hover .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip,\n.art-progress-hover .art-bottom .art-progress .art-control-thumbnails {\n transform: scale(1);\n opacity: 1;\n}\n.art-video-player .art-controls {\n position: relative;\n z-index: 10;\n pointer-events: auto;\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: var(--art-control-height);\n}\n.art-video-player .art-controls .art-controls-left,\n.art-video-player .art-controls .art-controls-right {\n display: flex;\n height: 100%;\n}\n.art-video-player .art-controls .art-controls-center {\n display: none;\n justify-content: center;\n align-items: center;\n flex: 1;\n height: 100%;\n padding: 0 10px;\n}\n.art-video-player .art-controls .art-controls-right {\n justify-content: flex-end;\n}\n.art-video-player .art-controls .art-control {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n white-space: nowrap;\n opacity: var(--art-control-opacity);\n min-height: var(--art-control-height);\n min-width: var(--art-control-height);\n transition: opacity var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon {\n height: var(--art-control-icon-size);\n width: var(--art-control-icon-size);\n transform: scale(var(--art-control-icon-scale));\n transition: transform var(--art-transition-duration) ease;\n}\n.art-video-player .art-controls .art-control .art-icon:active {\n transform: scale(calc(var(--art-control-icon-scale) * 0.8));\n}\n.art-video-player .art-controls .art-control:hover {\n opacity: 1;\n}\n.art-control-volume {\n position: relative;\n}\n.art-control-volume .art-volume-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n left: 0;\n right: 0;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n cursor: default;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n width: var(--art-control-height);\n height: var(--art-volume-height);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n height: 100%;\n width: 100%;\n padding: 10px 0 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider {\n flex: 1;\n width: 100%;\n display: flex;\n cursor: pointer;\n position: relative;\n justify-content: center;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle {\n position: relative;\n display: flex;\n justify-content: center;\n width: 2px;\n border-radius: var(--art-border-radius);\n overflow: hidden;\n background-color: rgba(255, 255, 255, 0.25);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded {\n position: absolute;\n inset: 0;\n z-index: 0;\n width: 100%;\n height: 100%;\n background-color: var(--art-theme);\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator {\n position: absolute;\n width: var(--art-volume-handle-size);\n height: var(--art-volume-handle-size);\n margin-top: calc(var(--art-volume-handle-size) / -2);\n flex-shrink: 0;\n transform: scale(1);\n border-radius: 100%;\n background-color: var(--art-theme);\n transition: transform var(--art-transition-duration) ease;\n}\n.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator {\n transform: scale(0.9);\n}\n.art-control-volume:hover .art-volume-panel {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player .art-notice {\n display: none;\n position: absolute;\n inset: 0;\n z-index: 80;\n width: 100%;\n height: 100%;\n height: auto;\n bottom: auto;\n padding: var(--art-padding);\n pointer-events: none;\n}\n.art-video-player .art-notice .art-notice-inner {\n display: inline-flex;\n padding: 5px;\n line-height: 1;\n border-radius: var(--art-border-radius);\n background-color: var(--art-tip-background);\n}\n.art-video-player.art-notice-show .art-notice {\n display: flex;\n}\n.art-video-player .art-contextmenus {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 120;\n padding: 5px 0;\n border-radius: var(--art-border-radius);\n font-size: 12px;\n background-color: var(--art-widget-background);\n min-width: var(--art-contextmenus-min-width);\n}\n.art-video-player .art-contextmenus .art-contextmenu {\n cursor: pointer;\n display: flex;\n padding: 10px 15px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu span {\n padding: 0 8px;\n}\n.art-video-player .art-contextmenus .art-contextmenu span:hover,\n.art-video-player .art-contextmenus .art-contextmenu span.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-contextmenus .art-contextmenu:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-contextmenus .art-contextmenu:last-child {\n border-bottom: none;\n}\n.art-video-player.art-contextmenu-show .art-contextmenus {\n display: flex;\n}\n.art-video-player .art-settings {\n display: none;\n flex-direction: column;\n position: absolute;\n z-index: 90;\n left: auto;\n overflow-y: auto;\n overflow-x: hidden;\n border-radius: var(--art-border-radius);\n max-height: var(--art-settings-max-height);\n right: var(--art-padding);\n bottom: var(--art-control-height);\n transition: all var(--art-transition-duration) ease;\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-settings .art-setting-panel {\n display: none;\n flex-direction: column;\n}\n.art-video-player .art-settings .art-setting-panel.art-current {\n display: flex;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 5px;\n cursor: pointer;\n overflow: hidden;\n transition: background-color var(--art-transition-duration) ease;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current {\n color: var(--art-theme);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check {\n visibility: hidden;\n height: 15px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check {\n visibility: visible;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n gap: 5px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--art-settings-icon-size);\n width: var(--art-settings-icon-size);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip {\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.5);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 32px;\n height: 24px;\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range {\n height: 3px;\n width: 80px;\n outline: none;\n appearance: none;\n background-color: rgba(255, 255, 255, 0.2);\n}\n.art-video-player .art-settings .art-setting-panel .art-setting-item-back {\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.art-video-player.art-setting-show .art-settings {\n display: flex;\n}\n.art-video-player .art-info {\n display: none;\n position: absolute;\n left: var(--art-padding);\n top: var(--art-padding);\n z-index: 100;\n padding: 10px;\n font-size: 12px;\n border-radius: var(--art-border-radius);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-info .art-info-panel {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-title {\n width: 100px;\n text-align: right;\n}\n.art-video-player .art-info .art-info-panel .art-info-item .art-info-content {\n width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: all;\n}\n.art-video-player .art-info .art-info-close {\n position: absolute;\n top: 5px;\n right: 5px;\n cursor: pointer;\n}\n.art-video-player.art-info-show .art-info {\n display: flex;\n}\n.art-hide-cursor * {\n cursor: none !important;\n}\n.art-video-player[data-aspect-ratio] {\n overflow: hidden;\n}\n.art-video-player[data-aspect-ratio] .art-video {\n object-fit: fill;\n box-sizing: content-box;\n}\n.art-fullscreen {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n}\n.art-fullscreen-web {\n --art-progress-height: 8px;\n --art-indicator-size: 20px;\n --art-control-height: 60px;\n --art-control-icon-scale: 1.3;\n position: fixed;\n inset: 0;\n z-index: var(--art-fullscreen-web-index);\n width: 100%;\n height: 100%;\n}\n.art-mini-popup {\n position: fixed;\n z-index: 9999;\n width: 320px;\n height: 180px;\n background: #000;\n border-radius: var(--art-border-radius);\n cursor: move;\n user-select: none;\n overflow: hidden;\n transition: opacity 0.2s ease;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n}\n.art-mini-popup svg {\n fill: #fff;\n}\n.art-mini-popup .art-video {\n pointer-events: none;\n}\n.art-mini-popup .art-mini-close {\n position: absolute;\n z-index: 20;\n right: 10px;\n top: 10px;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n.art-mini-popup .art-mini-state {\n position: absolute;\n inset: 0;\n z-index: 30;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease;\n background-color: rgba(0, 0, 0, 0.25);\n}\n.art-mini-popup .art-mini-state .art-icon {\n opacity: 0.75;\n cursor: pointer;\n transform: scale(3);\n pointer-events: auto;\n transition: transform 0.2s ease;\n}\n.art-mini-popup .art-mini-state .art-icon:active {\n transform: scale(2.5);\n}\n.art-mini-popup.art-mini-dragging {\n opacity: 0.9;\n}\n.art-mini-popup:hover .art-mini-close,\n.art-mini-popup:hover .art-mini-state {\n opacity: 1;\n}\n.art-video-player[data-flip='horizontal'] .art-video {\n transform: scaleX(-1);\n}\n.art-video-player[data-flip='vertical'] .art-video {\n transform: scaleY(-1);\n}\n.art-video-player .art-layer-lock {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n border-radius: 50%;\n transform: translateY(-50%);\n height: var(--art-lock-size);\n width: var(--art-lock-size);\n left: var(--art-padding);\n background-color: var(--art-tip-background);\n}\n.art-video-player .art-layer-auto-playback {\n display: none;\n gap: 10px;\n align-items: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n padding: 10px;\n line-height: 1;\n left: var(--art-padding);\n bottom: calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);\n background-color: var(--art-widget-background);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-close svg {\n width: 15px;\n height: 15px;\n fill: var(--art-theme);\n}\n.art-video-player .art-layer-auto-playback .art-auto-playback-jump {\n color: var(--art-theme);\n cursor: pointer;\n}\n.art-video-player.art-lock .art-subtitle {\n bottom: var(--art-subtitle-bottom) !important;\n}\n.art-video-player.art-mini-progress-bar .art-bottom,\n.art-video-player.art-lock .art-bottom {\n opacity: 1;\n padding: 0;\n background-image: none;\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-controls,\n.art-video-player.art-lock .art-bottom .art-controls,\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress,\n.art-video-player.art-lock .art-bottom .art-progress {\n transform: translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height) / 4));\n}\n.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,\n.art-video-player.art-lock .art-bottom .art-progress-indicator {\n display: none !important;\n}\n.art-video-player.art-control-show .art-layer-lock {\n display: flex;\n}\n.art-control-selector {\n position: relative;\n display: flex;\n justify-content: center;\n}\n.art-control-selector .art-selector-list {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n position: absolute;\n border-radius: var(--art-border-radius);\n overflow-y: auto;\n overflow-x: hidden;\n opacity: 0;\n transform: translateY(10px);\n pointer-events: none;\n bottom: var(--art-control-height);\n max-height: var(--art-selector-max-height);\n background-color: var(--art-widget-background);\n transition: all var(--art-transition-duration) ease;\n}\n.art-control-selector .art-selector-list .art-selector-item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n padding: 10px 15px;\n flex-shrink: 0;\n line-height: 1;\n}\n.art-control-selector .art-selector-list .art-selector-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.art-control-selector .art-selector-list .art-selector-item:hover,\n.art-control-selector .art-selector-list .art-selector-item.art-current {\n color: var(--art-theme);\n}\n.art-control-selector:hover .art-selector-list {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n}\n.art-video-player {\n /*! Hint.css - v2.7.0 - 2021-10-01\n * https://kushagra.dev/lab/hint/\n * Copyright (c) 2021 Kushagra Gour */\n /*-------------------------------------*\\\n HINT.css - A CSS tooltip library\n \\*-------------------------------------*/\n /**\n * HINT.css is a tooltip library made in pure CSS.\n *\n * Source: https://github.com/chinchang/hint.css\n * Demo: http://kushagragour.in/lab/hint/\n *\n */\n /**\n * source: hint-core.scss\n *\n * Defines the basic styling for the tooltip.\n * Each tooltip is made of 2 parts:\n * 1) body (:after)\n * 2) arrow (:before)\n *\n * Classes added:\n * 1) hint\n */\n /**\n * source: hint-position.scss\n *\n * Defines the positoning logic for the tooltips.\n *\n * Classes added:\n * 1) hint--top\n * 2) hint--bottom\n * 3) hint--left\n * 4) hint--right\n */\n /**\n * set default color for tooltip arrows\n */\n /**\n * top tooltip\n */\n /**\n * bottom tooltip\n */\n /**\n * right tooltip\n */\n /**\n * left tooltip\n */\n /**\n * top-left tooltip\n */\n /**\n * top-right tooltip\n */\n /**\n * bottom-left tooltip\n */\n /**\n * bottom-right tooltip\n */\n /**\n * source: hint-sizes.scss\n *\n * Defines width restricted tooltips that can span\n * across multiple lines.\n *\n * Classes added:\n * 1) hint--small\n * 2) hint--medium\n * 3) hint--large\n *\n */\n /**\n * source: hint-theme.scss\n *\n * Defines basic theme for tooltips.\n *\n */\n /**\n * source: hint-color-types.scss\n *\n * Contains tooltips of various types based on color differences.\n *\n * Classes added:\n * 1) hint--error\n * 2) hint--warning\n * 3) hint--info\n * 4) hint--success\n *\n */\n /**\n * Error\n */\n /**\n * Warning\n */\n /**\n * Info\n */\n /**\n * Success\n */\n /**\n * source: hint-always.scss\n *\n * Defines a persisted tooltip which shows always.\n *\n * Classes added:\n * 1) hint--always\n *\n */\n /**\n * source: hint-rounded.scss\n *\n * Defines rounded corner tooltips.\n *\n * Classes added:\n * 1) hint--rounded\n *\n */\n /**\n * source: hint-effects.scss\n *\n * Defines various transition effects for the tooltips.\n *\n * Classes added:\n * 1) hint--no-animate\n * 2) hint--bounce\n *\n */\n}\n.art-video-player [class*='hint--'] {\n position: relative;\n display: inline-block;\n font-style: normal;\n /**\n * tooltip arrow\n */\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:before,\n.art-video-player [class*='hint--']:after {\n position: absolute;\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n visibility: hidden;\n opacity: 0;\n z-index: 1000000;\n pointer-events: none;\n -webkit-transition: 0.3s ease;\n -moz-transition: 0.3s ease;\n transition: 0.3s ease;\n -webkit-transition-delay: 0ms;\n -moz-transition-delay: 0ms;\n transition-delay: 0ms;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n visibility: visible;\n opacity: 1;\n}\n.art-video-player [class*='hint--']:hover:before,\n.art-video-player [class*='hint--']:hover:after {\n -webkit-transition-delay: 100ms;\n -moz-transition-delay: 100ms;\n transition-delay: 100ms;\n}\n.art-video-player [class*='hint--']:before {\n content: '';\n position: absolute;\n background: transparent;\n border: 6px solid transparent;\n z-index: 1000001;\n}\n.art-video-player [class*='hint--']:after {\n background: #000000;\n color: white;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n line-height: 12px;\n white-space: nowrap;\n}\n.art-video-player [class*='hint--'][aria-label]:after {\n content: attr(aria-label);\n}\n.art-video-player [class*='hint--'][data-hint]:after {\n content: attr(data-hint);\n}\n.art-video-player [aria-label='']:before,\n.art-video-player [aria-label='']:after,\n.art-video-player [data-hint='']:before,\n.art-video-player [data-hint='']:after {\n display: none !important;\n}\n.art-video-player .hint--top-left:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top-right:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--top:before {\n border-top-color: #000000;\n}\n.art-video-player .hint--bottom-left:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom-right:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--bottom:before {\n border-bottom-color: #000000;\n}\n.art-video-player .hint--left:before {\n border-left-color: #000000;\n}\n.art-video-player .hint--right:before {\n border-right-color: #000000;\n}\n.art-video-player .hint--top:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top:before,\n.art-video-player .hint--top:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--top:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top:hover:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--bottom:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom:before,\n.art-video-player .hint--bottom:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom:after {\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.art-video-player .hint--bottom:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom:hover:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--right:before {\n margin-left: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--right:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--right:before,\n.art-video-player .hint--right:after {\n left: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--right:hover:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--right:hover:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--left:before {\n margin-right: -11px;\n margin-bottom: -6px;\n}\n.art-video-player .hint--left:after {\n margin-bottom: -14px;\n}\n.art-video-player .hint--left:before,\n.art-video-player .hint--left:after {\n right: 100%;\n bottom: 50%;\n}\n.art-video-player .hint--left:hover:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--left:hover:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--top-left:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-left:before,\n.art-video-player .hint--top-left:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--top-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--top-left:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--top-right:before {\n margin-bottom: -11px;\n}\n.art-video-player .hint--top-right:before,\n.art-video-player .hint--top-right:after {\n bottom: 100%;\n left: 50%;\n}\n.art-video-player .hint--top-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--top-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--top-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--top-right:hover:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--top-right:hover:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--bottom-left:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-left:before,\n.art-video-player .hint--bottom-left:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-left:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-left:after {\n -webkit-transform: translateX(-100%);\n -moz-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.art-video-player .hint--bottom-left:after {\n margin-left: 12px;\n}\n.art-video-player .hint--bottom-left:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-left:hover:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--bottom-right:before {\n margin-top: -11px;\n}\n.art-video-player .hint--bottom-right:before,\n.art-video-player .hint--bottom-right:after {\n top: 100%;\n left: 50%;\n}\n.art-video-player .hint--bottom-right:before {\n left: calc(50% - 6px);\n}\n.art-video-player .hint--bottom-right:after {\n -webkit-transform: translateX(0);\n -moz-transform: translateX(0);\n transform: translateX(0);\n}\n.art-video-player .hint--bottom-right:after {\n margin-left: -12px;\n}\n.art-video-player .hint--bottom-right:hover:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--bottom-right:hover:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--small:after,\n.art-video-player .hint--medium:after,\n.art-video-player .hint--large:after {\n white-space: normal;\n line-height: 1.4em;\n word-wrap: break-word;\n}\n.art-video-player .hint--small:after {\n width: 80px;\n}\n.art-video-player .hint--medium:after {\n width: 150px;\n}\n.art-video-player .hint--large:after {\n width: 300px;\n}\n.art-video-player [class*='hint--'] {\n /**\n * tooltip body\n */\n}\n.art-video-player [class*='hint--']:after {\n text-shadow: 0 -1px 0px black;\n box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);\n}\n.art-video-player .hint--error:after {\n background-color: #b34e4d;\n text-shadow: 0 -1px 0px #592726;\n}\n.art-video-player .hint--error.hint--top-left:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top-right:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--top:before {\n border-top-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-left:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom-right:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--bottom:before {\n border-bottom-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--left:before {\n border-left-color: #b34e4d;\n}\n.art-video-player .hint--error.hint--right:before {\n border-right-color: #b34e4d;\n}\n.art-video-player .hint--warning:after {\n background-color: #c09854;\n text-shadow: 0 -1px 0px #6c5328;\n}\n.art-video-player .hint--warning.hint--top-left:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top-right:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--top:before {\n border-top-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-left:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom-right:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--bottom:before {\n border-bottom-color: #c09854;\n}\n.art-video-player .hint--warning.hint--left:before {\n border-left-color: #c09854;\n}\n.art-video-player .hint--warning.hint--right:before {\n border-right-color: #c09854;\n}\n.art-video-player .hint--info:after {\n background-color: #3986ac;\n text-shadow: 0 -1px 0px #1a3c4d;\n}\n.art-video-player .hint--info.hint--top-left:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top-right:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--top:before {\n border-top-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-left:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom-right:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--bottom:before {\n border-bottom-color: #3986ac;\n}\n.art-video-player .hint--info.hint--left:before {\n border-left-color: #3986ac;\n}\n.art-video-player .hint--info.hint--right:before {\n border-right-color: #3986ac;\n}\n.art-video-player .hint--success:after {\n background-color: #458746;\n text-shadow: 0 -1px 0px #1a321a;\n}\n.art-video-player .hint--success.hint--top-left:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top-right:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--top:before {\n border-top-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-left:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom-right:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--bottom:before {\n border-bottom-color: #458746;\n}\n.art-video-player .hint--success.hint--left:before {\n border-left-color: #458746;\n}\n.art-video-player .hint--success.hint--right:before {\n border-right-color: #458746;\n}\n.art-video-player .hint--always:after,\n.art-video-player .hint--always:before {\n opacity: 1;\n visibility: visible;\n}\n.art-video-player .hint--always.hint--top:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top:after {\n -webkit-transform: translateX(-50%) translateY(-8px);\n -moz-transform: translateX(-50%) translateY(-8px);\n transform: translateX(-50%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-left:after {\n -webkit-transform: translateX(-100%) translateY(-8px);\n -moz-transform: translateX(-100%) translateY(-8px);\n transform: translateX(-100%) translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:before {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--top-right:after {\n -webkit-transform: translateY(-8px);\n -moz-transform: translateY(-8px);\n transform: translateY(-8px);\n}\n.art-video-player .hint--always.hint--bottom:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom:after {\n -webkit-transform: translateX(-50%) translateY(8px);\n -moz-transform: translateX(-50%) translateY(8px);\n transform: translateX(-50%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-left:after {\n -webkit-transform: translateX(-100%) translateY(8px);\n -moz-transform: translateX(-100%) translateY(8px);\n transform: translateX(-100%) translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:before {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--bottom-right:after {\n -webkit-transform: translateY(8px);\n -moz-transform: translateY(8px);\n transform: translateY(8px);\n}\n.art-video-player .hint--always.hint--left:before {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--left:after {\n -webkit-transform: translateX(-8px);\n -moz-transform: translateX(-8px);\n transform: translateX(-8px);\n}\n.art-video-player .hint--always.hint--right:before {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--always.hint--right:after {\n -webkit-transform: translateX(8px);\n -moz-transform: translateX(8px);\n transform: translateX(8px);\n}\n.art-video-player .hint--rounded:after {\n border-radius: 4px;\n}\n.art-video-player .hint--no-animate:before,\n.art-video-player .hint--no-animate:after {\n -webkit-transition-duration: 0ms;\n -moz-transition-duration: 0ms;\n transition-duration: 0ms;\n}\n.art-video-player .hint--bounce:before,\n.art-video-player .hint--bounce:after {\n -webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n -moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);\n}\n.art-video-player .hint--no-shadow:before,\n.art-video-player .hint--no-shadow:after {\n text-shadow: initial;\n box-shadow: initial;\n}\n.art-video-player .hint--no-arrow:before {\n display: none;\n}\n.art-video-player.art-mobile {\n --art-bottom-gap: 10px;\n --art-control-height: 38px;\n --art-control-icon-scale: 1;\n --art-state-size: 60px;\n --art-settings-max-height: 180px;\n --art-selector-max-height: 180px;\n --art-indicator-scale: 1;\n --art-control-opacity: 1;\n}\n.art-video-player.art-mobile .art-controls-left {\n margin-left: calc(var(--art-padding) / -1);\n}\n.art-video-player.art-mobile .art-controls-right {\n margin-right: calc(var(--art-padding) / -1);\n}\n"; class Subtitle extends Component { constructor(art) { super(art); diff --git a/packages/artplayer/package.json b/packages/artplayer/package.json index 329583e98..1fab13449 100644 --- a/packages/artplayer/package.json +++ b/packages/artplayer/package.json @@ -1,6 +1,6 @@ { "name": "artplayer", - "version": "5.3.1", + "version": "5.4.0", "description": "ArtPlayer.js is a modern and full featured HTML5 video player", "author": "Harvey Zhao ", "license": "MIT",