mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 11:56:15 -08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
102037dd42 | ||
|
|
dce698a648 | ||
|
|
7cbf28e134 | ||
|
|
1a638c490a | ||
|
|
47c2fab768 | ||
|
|
064841f555 | ||
|
|
530448c3b4 | ||
|
|
19061122b2 | ||
|
|
edfc95e4c3 | ||
|
|
8cedc12387 | ||
|
|
e2558dafc0 | ||
|
|
d644d322c3 | ||
|
|
3d4f8ce3aa | ||
|
|
a10a9f9507 | ||
|
|
b6254f41bc | ||
|
|
86d7b380d5 | ||
|
|
d6b36b49fa | ||
|
|
49f4ac5ca9 | ||
|
|
b43522263e | ||
|
|
d716c31af5 | ||
|
|
ea2c3dc289 | ||
|
|
3d47813f12 | ||
|
|
c8a4958883 | ||
|
|
dee47af58f | ||
|
|
2c625d72fa | ||
|
|
ede78ea7cf | ||
|
|
f1c180ddeb | ||
|
|
5255061db3 | ||
|
|
8aba96a9bd | ||
|
|
6d638b3983 | ||
|
|
85c6eddcf0 | ||
|
|
d554e4b6f7 | ||
|
|
596a3d24f3 | ||
|
|
361c0b5eba | ||
|
|
8a5910b530 | ||
|
|
d3fbe7c288 | ||
|
|
823c7b0b6f | ||
|
|
b0c6005a2e | ||
|
|
f682321d25 | ||
|
|
70fd29429e | ||
|
|
e528465a6e | ||
|
|
a0175e845f | ||
|
|
2f9e0d49ee | ||
|
|
5dbac4897b | ||
|
|
f160d8eb61 | ||
|
|
e225966202 |
No files matched your search
@@ -28,7 +28,6 @@ jobs:
|
||||
- name: npm install, lint, build, and test
|
||||
run: |
|
||||
npm install
|
||||
lerna bootstrap --hoist
|
||||
npm run lint
|
||||
npm run build:all
|
||||
cd packages/artplayer-document && ls
|
||||
|
||||
@@ -5,6 +5,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
## [4.4.7] - 2022-6-13
|
||||
|
||||
### Added
|
||||
- 兼容弹幕库 d.ts
|
||||
- 更新依赖库
|
||||
|
||||
## [4.4.6] - 2022-6-11
|
||||
|
||||
### Added
|
||||
- 添加弹幕库 d.ts
|
||||
- 调整字幕字体大小参数
|
||||
- 优化正则解析xml弹幕
|
||||
|
||||
## [4.4.5] - 2022-6-2
|
||||
|
||||
### Added
|
||||
- 修复迷你模式时,主题色缺失的bug
|
||||
|
||||
## [4.4.3] - 2022-05-26
|
||||
|
||||
### Added
|
||||
- 修复弹幕库销毁时,自定义挂载输入框的残留
|
||||
- 修复迷你模式的尺寸计算错误
|
||||
|
||||
## [4.4.2] - 2022-05-20
|
||||
|
||||
### Added
|
||||
- 移除播放器 UI 初始化的 video:loadedmetadata 事件
|
||||
- 弹幕库暴露 load 方法,用于切换弹幕源
|
||||
- 添加 error 图标,出现于视频加载错误达到上限后
|
||||
- 修复 setting 多次初始化时产生的 bug
|
||||
|
||||
## [4.4.1] - 2022-05-17
|
||||
|
||||
### Added
|
||||
|
||||
+19
-3
@@ -2,8 +2,14 @@ This project uses `parcel` as a development and packaging tool, so there are few
|
||||
|
||||
## 1. Install dependencies
|
||||
|
||||
```base
|
||||
npm install && npm run bootstrap
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
yarn
|
||||
```
|
||||
|
||||
## 2. Develop the project and open the demo page
|
||||
@@ -12,8 +18,18 @@ npm install && npm run bootstrap
|
||||
npm run dev
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
## 3. Package the project
|
||||
|
||||
```base
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
```bash
|
||||
yarn build
|
||||
```
|
||||
@@ -24,7 +24,7 @@ var art = new Artplayer({
|
||||
lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60]
|
||||
maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500]
|
||||
minWidth: 200, // 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
|
||||
maxWidth: 400, // 输入框最大宽度,范围在[minWidth ~ Infinity],填 0 则为 100% 宽度
|
||||
maxWidth: 400, // 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
|
||||
theme: 'dark', // 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
|
||||
beforeEmit: (danmu) => !!danmu.text.trim(), // 发送弹幕前的自定义校验,返回 true 则可以发送
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>580770634</chatid><mission>0</mission><maxlimit>1500</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source><d p="481.89400,1,25,16777215,1653692078,0,70e36298,1062005140992593408,11">可以去太湖捞捞试试(狗头保命</d><d p="265.37800,1,25,16777215,1653616680,0,88afabc0,1061372654017566976,11">好了,今天就到这,我感觉生物钟启动了,我要睡了</d><d p="777.55400,1,25,16777215,1653575476,0,9bcc00a2,1061027009955725568,11">当然是sha256(sha256(pw)+salt)</d><d p="13.88600,1,25,16777215,1653570775,0,966e6348,1060987581535333376,11">Swift~~~</d><d p="454.63400,1,25,16777215,1652717912,0,6d2da793,1053833248746068480,11">搞个共享数据库,像挖矿一样每个人算好的都可以上传</d><d p="177.13900,1,25,16777215,1652453333,0,fb4f660b,1051613793517396736,11">有点懵,但感到很震撼</d><d p="22.57900,1,25,16777215,1652430212,0,bdb52a9e,1051419843691098880,11">哈希值</d><d p="58.06700,1,25,16777215,1652368788,0,e91e8413,1050904578150762496,11">有了粉碎机,家里就只剩下粉碎机了</d><d p="275.65900,5,25,16777215,1652354865,0,397b3aab,1050787785968982016,11">《我知道了》</d><d p="774.77900,1,25,16777215,1652256952,0,542886c4,1049966433997495040,11">奥卡姆剃刀</d><d p="352.26200,1,25,16777215,1652247365,0,139fd1a2,1049886011934382080,11">加盐只是通过不确定的盐来隐藏确定的原值,增加彩虹表的制作难度</d><d p="395.65900,1,25,16777215,1652169656,0,e2308d98,1049234139607279872,11">哈希冲突</d><d p="346.72900,1,25,16777215,1652112430,0,54ba448a,1048754095986328064,11">《彩虹表》</d><d p="653.60600,1,25,16777215,1652101305,0,5ec1b46c,1048660766959520768,11">哈哈,这个可以使git库瞬间挂掉</d><d p="461.75200,1,25,16777215,1652101091,0,5ec1b46c,1048658979179723264,11">做个超级字典,把最常用的组合记录下来就行了</d><d p="94.11200,1,25,16777215,1652100683,0,5ec1b46c,1048655552173002240,11">哈希根本不是加密,只是摘要算法</d><d p="386.19500,1,25,16777215,1652097650,0,c4cc4296,1048630114516051968,11">组合数学开始了</d><d p="414.69100,1,25,16777215,1652084321,0,fafcfbb0,1048518297794048256,11">设计者自己找不到(doge</d><d p="59.62300,5,25,16707842,1652052664,0,971041b8,1048252744781197824,11">我会!</d><d p="445.99300,1,25,16777215,1651998604,0,53d75164,1047799249896694016,11">哎嘿 很勇哦</d><d p="641.24300,1,25,16777215,1651991247,0,ed4717ed,1047737536325133312,11">但是加盐还是有用</d><d p="408.97200,1,25,16777215,1651977907,0,4bd9a2d7,1047625636933279232,11">可以存在一个笼子里一只鸽子也没有</d><d p="511.84900,1,25,16777215,1651972503,0,f0826639,1047580298436422144,11">哈希冲突</d><d p="520.96700,5,25,16777215,1651967260,0,27acb016,1047536317854342656,11">列巴的列(补充</d><d p="558.75200,1,25,16777215,1651940306,0,860de6bd,1047310216540149504,11">《模仿游戏》来了</d><d p="505.15000,1,25,16777215,1651940233,0,860de6bd,1047309599239544064,11">电影《模仿游戏》</d><d p="488.98600,1,25,16777215,1651927542,0,44f3ad45,1047203142191739648,11">俺姆昂鸽瑞!</d><d p="586.48600,1,25,16777215,1651849723,0,29026d4b,1046550345196703488,11">烫烫烫哈哈哈哈哈哈!</d><d p="102.05200,1,25,16777215,1651839216,0,1336ac64,1046462209011973120,11">王小云,指数级缩短了MD5的碰撞时间</d><d p="55.82000,1,25,16777215,1651825875,0,38443e73,1046350293337386752,11">一半我做的登录都会生成一个密码盐,存在本地</d><d p="681.33200,1,25,16777215,1651819803,0,fc3f2a25,1046299363606827264,11">加盐也对付不了碰撞 只能对付彩虹表</d><d p="18.26500,1,25,16777215,1651816441,0,cf2bea01,1046271154899279872,11">A(欸)P(劈)P(劈)</d><d p="567.29500,1,25,16777215,1651812016,0,5309839c,1046234041289880832,11">你错了,图灵对这个并不熟</d><d p="504.07300,1,25,16777215,1651806653,0,58c10bda,1046189050064611584,11">加盐</d><d p="350.22000,1,25,16777215,1651798844,0,d3cbe582,1046123548323639040,11">所以要加盐</d><d p="59.55900,1,25,16777215,1651793262,0,dc9b4d74,1046076722316952576,11">哈希有很小很小的概率把两个不一样的东西映射成一个</d><d p="468.25000,1,25,16777215,1651762009,0,1e90bb3e,1045814547245588736,11">量子计算:这个我熟</d><d p="565.29300,1,25,16777215,1651722446,0,1b70a4,1045482667682264064,11">图灵说:这个我熟</d><d p="652.84300,1,25,16777215,1651713497,0,9e19237c,1045407604815323904,11">图片隐写</d><d p="391.57200,1,25,16777215,1651622858,0,d78de8a,1044647266629422336,11">吾生而有崖</d><d p="273.57700,1,25,16777215,1651509100,0,c8ed82e9,1043692993388749056,11">《也可以100行以内》</d><d p="494.74000,1,25,16777215,1651405107,0,8262fe93,1042820639116808192,11">数据库!</d><d p="753.23500,1,25,16777215,1651385801,0,ea9eeeda,1042658687317412864,11">火速换RSA!</d><d p="747.76900,1,25,16777215Line truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer-plugin-danmuku.js v4.4.1
|
||||
* artplayer-plugin-danmuku.js v4.4.8
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf,s=o.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,n){if(!s[e]){if(!t[e]){var i="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(u&&"string"==typeof e)return u(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}m.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},m.cache={};var d=s[e]=new l.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return s[e].exports;function m(t){var e=m.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=s,l.parent=o,l.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(l,"root",{get:function(){return a.parcelRequire93cf}}),a.parcelRequire93cf=l;for(var d=0;d<e.length;d++)l(e[d]);var m=l(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}({E13ST:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function u(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new a.default(e,t);return s.default(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=u,u.env="production",u.version="4.4.1",u.build="1652773789670","undefined"!=typeof window&&(window.artplayerPluginDanmuku=u)},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"9v6Cv","./setting":"jAkJm"}],"8Gtnh":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("27c3930ee158179a"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1Line truncated
|
||||
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf,s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var i="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}m.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},m.cache={};var d=s[e]=new u.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return s[e].exports;function m(t){var e=m.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a.parcelRequire93cf}}),a.parcelRequire93cf=u;for(var d=0;d<e.length;d++)u(e[d]);var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}({E13ST:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.8",l.build="1655097987373","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"8Gtnh","./setting":"jAkJm","@parcel/transformer-js/src/esmodule-helpers.js":"9v6Cv"}],"8Gtnh":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("27c3930ee158179a"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadLine truncated
|
||||
@@ -4,4 +4,4 @@
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r.parcelRequire4dc0&&r.parcelRequire4dc0,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof r.parcelRequire4dc0&&r.parcelRequire4dc0;if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},u.cache={};var d=l[t]=new h.Module(t);e[t][0].call(d.exports,u,d,d.exports,this)}return l[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r.parcelRequire4dc0}}),r.parcelRequire4dc0=h;for(var d=0;d<t.length;d++)h(t[d]);var u=h(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({"8nq87":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("tiny-emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=s.clamp(i,10,1e3),this.option.width=s.clamp(n,10,1e3),this.option.column=s.clamp(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return s.sleep(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=s.clamp(i,0,this.video.duration),this.option.end=s.clamp(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,s.runPromisesInSeries(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.maLine truncated
|
||||
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c;if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=l[t]=new h.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return l[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r.parcelRequire7b4c}}),r.parcelRequire7b4c=h;for(var u=0;u<t.length;u++)h(t[u]);var d=h(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd&&define((function(){return d}))}({E13ST:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("tiny-emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=s.clamp(i,10,1e3),this.option.width=s.clamp(n,10,1e3),this.option.column=s.clamp(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return s.sleep(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=s.clamp(i,0,this.video.duration),this.option.end=s.clamp(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,s.runPromisesInSeries(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(Line truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer.js v4.4.1
|
||||
* artplayer.js v4.4.7
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,o,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}d.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},d.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=c;for(var p=0;p<t.length;p++)c(t[p]);var d=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd&&define((function(){return d}))}({"6SN6P":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=e("bundle-text:./style/index.less"),i=o.interopDefault(n),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),d=e("./scheme"),u=o.interopDefault(d),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),v=e("./template"),y=o.interopDefault(v),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),R=e("./info"),O=o.interopDefault(R),M=e("./subtitle"),T=o.interopDefault(M),E=e("./events"),F=o.interopDefault(E),C=e("./hotkey"),P=o.interopDefault(C),z=e("./layer"),D=o.interopDefault(z),A=e("./loading"),H=o.interopDefault(A),L=e("./notice"),U=o.interopDefault(L),Z=e("./mask"),N=o.interopDefault(Z),V=e("./icons"),q=o.interopDefault(V),_=e("./setting"),W=o.interopDefault(_),B=e("./storage"),Y=o.interopDefault(B),G=e("./plugins"),X=o.interopDefault(G),Q=e("./ads"),J=o.interopDefault(Q),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=s.default(r,u.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new y.default(this),this.events=new F.default(this),this.whitelist.state?(this.storage=new Y.default(this),this.icons=new q.default(this),this.i18n=new x.default(this),this.notice=new U.default(this),this.player=new j.default(this),this.layers=new D.default(this),this.controls=new S.default(this),this.contextmenu=new $.default(this),this.subtitle=new T.default(this),this.ads=new J.default(this),this.info=new O.default(this),this.loading=new H.default(this),this.hotkey=new P.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.4.1"}static get env(){return"production"}static get build(){return"1652773785803"}static get config(){return h.default}static get utils(){return p}static get scheme(){return u.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return y.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLLine truncated
|
||||
!function(e,t,r,o,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({"6SN6P":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=e("bundle-text:./style/index.less"),i=o.interopDefault(n),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),v=e("./template"),y=o.interopDefault(v),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),R=e("./info"),O=o.interopDefault(R),M=e("./subtitle"),T=o.interopDefault(M),E=e("./events"),F=o.interopDefault(E),C=e("./hotkey"),P=o.interopDefault(C),z=e("./layer"),D=o.interopDefault(z),A=e("./loading"),H=o.interopDefault(A),L=e("./notice"),Z=o.interopDefault(L),U=e("./mask"),N=o.interopDefault(U),V=e("./icons"),q=o.interopDefault(V),_=e("./setting"),W=o.interopDefault(_),B=e("./storage"),Y=o.interopDefault(B),G=e("./plugins"),X=o.interopDefault(G),Q=e("./ads"),K=o.interopDefault(Q),J=e("./mobile"),ee=o.interopDefault(J);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,y.default)(this),this.events=new(0,F.default)(this),this.whitelist.state?(this.storage=new(0,Y.default)(this),this.icons=new(0,q.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,Z.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,D.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,$.default)(this),this.subtitle=new(0,T.default)(this),this.ads=new(0,K.default)(this),this.info=new(0,O.default)(this),this.loading=new(0,H.default)(this),this.hotkey=new(0,P.default)(this),this.mask=new(0,N.default)(this),this.setting=new(0,W.default)(this),this.plugins=new(0,X.default)(this)):this.mobile=new(0,ee.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.4.7"}static get env(){return"production"}static get build(){return"1655091084085"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return y.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICALine truncated
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Page Not Found | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/404.html"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | Artplayer.js"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/404.html"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/404.html" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 Artplayer.js, Inc. Built with Docusaurus.</div></div></div></Line truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Advanced propertys | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/advance"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Advanced propertys | Artplayer.js"><meta data-rh="true" name="description" content="This page is some additional supplements to the commonly used properties, you need to read in depth to develop custom functions."><meta data-rh="true" property="og:description" content="This page is some additional supplements to the commonly used properties, you need to read in depth to develop custom functions."><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/advance"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/advance" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/advance" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[78],{3905:function(n,e,t){t.d(e,{Zo:function(){return s},kt:function(){return c}});var a=t(7294);function r(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function l(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,a)}return t}function i(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){r(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function u(n,e){if(null==n)return{};var t,a,r=function(n,e){if(null==n)return{};var t,a,r={},l=Object.keys(n);for(a=0;a<l.length;a++)t=l[a],e.indexOf(t)>=0||(r[t]=n[t]);return r}(n,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(a=0;a<l.length;a++)t=l[a],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(r[t]=n[t])}return r}var o=a.createContext({}),p=function(n){var e=a.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):i(i({},e),n)),t},s=function(n){var e=p(n.components);return a.createElement(o.Provider,{value:e},n.children)},m={inlineCode:"code",wrapper:function(n){var e=n.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(n,e){var t=n.components,r=n.mdxType,l=n.originalType,o=n.parentName,s=u(n,["components","mdxType","originalType","parentName"]),d=p(t),c=r,k=d["".concat(o,".").concat(c)]||d[c]||m[c]||l;return t?a.createElement(k,i(i({ref:e},s),{},{components:t})):a.createElement(k,i({ref:e},s))}));function c(n,e){var t=arguments,r=e&&e.mdxType;if("string"==typeof n||r){var l=t.length,i=new Array(l);i[0]=d;var u={};for(var o in e)hasOwnProperty.call(e,o)&&(u[o]=e[o]);u.originalType=n,u.mdxType="string"==typeof n?n:r,i[1]=u;for(var p=2;p<l;p++)i[p]=t[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}d.displayName="MDXCreateElement"},9489:function(n,e,t){t.r(e),t.d(e,{assets:function(){return s},contentTitle:function(){return o},default:function(){return c},frontMatter:function(){return u},metadata:function(){return p},toc:function(){return m}});var a=t(7462),r=t(3366),l=(t(7294),t(3905)),i=["components"],u={title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",sidebar_position:1},o=void 0,p={unversionedId:"zh-cn/Plugins/danmuku",id:"zh-cn/Plugins/danmuku",title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",description:"\u6f14\u793a",source:"@site/docs/zh-cn/Plugins/danmuku.mdx",sourceDirName:"zh-cn/Plugins",slug:"/zh-cn/Plugins/danmuku",permalink:"/document/zh-cn/Plugins/danmuku",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",sidebar_position:1},sidebar:"zh-cn",previous:{title:"\u7b2c\u4e09\u65b9\u5e93",permalink:"/document/zh-cn/libraries"},next:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls"}},s={},m=[{value:"\u6f14\u793a",id:"\u6f14\u793a",level:2},{value:"\u5b89\u88c5",id:"\u5b89\u88c5",level:2},{value:"\u901a\u8fc7 <code>npm</code> \u5b89\u88c5\uff1a",id:"\u901a\u8fc7-npm-\u5b89\u88c5",level:3},{value:"\u901a\u8fc7 <code>yarn</code> \u5b89\u88c5\uff1a",id:"\u901a\u8fc7-yarn-\u5b89\u88c5",level:3},{value:"\u901a\u8fc7 <code>script</code> \u5b89\u88c5\uff1a",id:"\u901a\u8fc7-script-\u5b89\u88c5",level:3},{value:"\u4f7f\u7528",id:"\u4f7f\u7528",level:2},{value:"\u4f7f\u7528\u5f39\u5e55\u6570\u7ec4",id:"\u4f7f\u7528\u5f39\u5e55\u6570\u7ec4",level:3},{value:"\u4f7f\u7528\u5f39\u5e55 XML",id:"\u4f7f\u7528\u5f39\u5e55-xml",level:3},{value:"\u4f7f\u7528\u5f02\u6b65\u8c03\u7528",id:"\u4f7f\u7528\u5f02\u6b65\u8c03\u7528",level:3},{value:"\u63a5\u53e3",id:"\u63a5\u53e3",level:2},{value:"hide/show",id:"hideshow",level:3},{value:"isHide",id:"ishide",level:3},{value:"emit",id:"emit",level:3},{value:"config",id:"config",level:3}],d={toc:m};function c(n){var e=n.components,t=(0,r.Z)(n,i);return(0,l.kt)("wrapper",(0,a.Z)({},d,t,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"\u6f14\u793a"},"\u6f14\u793a"),(0,l.kt)("p",null,"\ud83d\udc49 ",(0,l.kt)("a",{parentName:"p",href:"https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku"},"\u67e5\u770b\u5b8c\u6574\u6f14\u793a")),(0,l.kt)("h2",{id:"\u5b89\u88c5"},"\u5b89\u88c5"),(0,l.kt)("h3",{id:"\u901a\u8fc7-npm-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"h3"},"npm")," \u5b89\u88c5\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"$ npm install artplayer-plugin-danmuku\n")),(0,l.kt)("h3",{id:"\u901a\u8fc7-yarn-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"h3"},"yarn"Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[78],{3905:function(n,e,t){t.d(e,{Zo:function(){return s},kt:function(){return c}});var a=t(7294);function r(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function l(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,a)}return t}function u(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){r(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function i(n,e){if(null==n)return{};var t,a,r=function(n,e){if(null==n)return{};var t,a,r={},l=Object.keys(n);for(a=0;a<l.length;a++)t=l[a],e.indexOf(t)>=0||(r[t]=n[t]);return r}(n,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(a=0;a<l.length;a++)t=l[a],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(r[t]=n[t])}return r}var o=a.createContext({}),p=function(n){var e=a.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):u(u({},e),n)),t},s=function(n){var e=p(n.components);return a.createElement(o.Provider,{value:e},n.children)},m={inlineCode:"code",wrapper:function(n){var e=n.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(n,e){var t=n.components,r=n.mdxType,l=n.originalType,o=n.parentName,s=i(n,["components","mdxType","originalType","parentName"]),d=p(t),c=r,k=d["".concat(o,".").concat(c)]||d[c]||m[c]||l;return t?a.createElement(k,u(u({ref:e},s),{},{components:t})):a.createElement(k,u({ref:e},s))}));function c(n,e){var t=arguments,r=e&&e.mdxType;if("string"==typeof n||r){var l=t.length,u=new Array(l);u[0]=d;var i={};for(var o in e)hasOwnProperty.call(e,o)&&(i[o]=e[o]);i.originalType=n,i.mdxType="string"==typeof n?n:r,u[1]=i;for(var p=2;p<l;p++)u[p]=t[p];return a.createElement.apply(null,u)}return a.createElement.apply(null,t)}d.displayName="MDXCreateElement"},9489:function(n,e,t){t.r(e),t.d(e,{assets:function(){return s},contentTitle:function(){return o},default:function(){return c},frontMatter:function(){return i},metadata:function(){return p},toc:function(){return m}});var a=t(7462),r=t(3366),l=(t(7294),t(3905)),u=["components"],i={title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",sidebar_position:1},o=void 0,p={unversionedId:"zh-cn/Plugins/danmuku",id:"zh-cn/Plugins/danmuku",title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",description:"\u6f14\u793a",source:"@site/docs/zh-cn/Plugins/danmuku.mdx",sourceDirName:"zh-cn/Plugins",slug:"/zh-cn/Plugins/danmuku",permalink:"/document/zh-cn/Plugins/danmuku",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",sidebar_position:1},sidebar:"zh-cn",previous:{title:"\u7b2c\u4e09\u65b9\u5e93",permalink:"/document/zh-cn/libraries"},next:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls"}},s={},m=[{value:"\u6f14\u793a",id:"\u6f14\u793a",level:2},{value:"\u5b89\u88c5",id:"\u5b89\u88c5",level:2},{value:"\u901a\u8fc7 <code>npm</code> \u5b89\u88c5\uff1a",id:"\u901a\u8fc7-npm-\u5b89\u88c5",level:3},{value:"\u901a\u8fc7 <code>yarn</code> \u5b89\u88c5\uff1a",id:"\u901a\u8fc7-yarn-\u5b89\u88c5",level:3},{value:"\u901a\u8fc7 <code>script</code> \u5b89\u88c5\uff1a",id:"\u901a\u8fc7-script-\u5b89\u88c5",level:3},{value:"\u4f7f\u7528",id:"\u4f7f\u7528",level:2},{value:"\u4f7f\u7528\u5f39\u5e55\u6570\u7ec4",id:"\u4f7f\u7528\u5f39\u5e55\u6570\u7ec4",level:3},{value:"\u4f7f\u7528\u5f39\u5e55 XML",id:"\u4f7f\u7528\u5f39\u5e55-xml",level:3},{value:"\u4f7f\u7528\u5f02\u6b65\u8c03\u7528",id:"\u4f7f\u7528\u5f02\u6b65\u8c03\u7528",level:3},{value:"\u63a5\u53e3",id:"\u63a5\u53e3",level:2},{value:"hide/show",id:"hideshow",level:3},{value:"isHide",id:"ishide",level:3},{value:"emit",id:"emit",level:3},{value:"config",id:"config",level:3},{value:"load",id:"load",level:3},{value:"\u4e8b\u4ef6",id:"\u4e8b\u4ef6",level:2}],d={toc:m};function c(n){var e=n.components,t=(0,r.Z)(n,u);return(0,l.kt)("wrapper",(0,a.Z)({},d,t,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"\u6f14\u793a"},"\u6f14\u793a"),(0,l.kt)("p",null,"\ud83d\udc49 ",(0,l.kt)("a",{parentName:"p",href:"https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku"},"\u67e5\u770b\u5b8c\u6574\u6f14\u793a")),(0,l.kt)("h2",{id:"\u5b89\u88c5"},"\u5b89\u88c5"),(0,l.kt)("h3",{id:"\u901a\u8fc7-npm-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"h3"},"npm")," \u5b89\u88c5\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"$ npm install artplayer-plugin-danmuku\n")),(0,l.kt)("h3",{id:"\u901a\u8fc7-Line truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[558],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return k}});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,a,l=function(e,t){if(null==e)return{};var n,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=a.createContext({}),u=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=u(e.components);return a.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),d=u(n),k=l,c=d["".concat(o,".").concat(k)]||d[k]||s[k]||r;return n?a.createElement(c,i(i({ref:t},m),{},{components:n})):a.createElement(c,i({ref:t},m))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=d;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var u=2;u<r;u++)i[u]=n[u];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},3397:function(e,t,n){n.r(t),n.d(t,{assets:function(){return m},contentTitle:function(){return o},default:function(){return k},frontMatter:function(){return p},metadata:function(){return u},toc:function(){return s}});var a=n(7462),l=n(3366),r=(n(7294),n(3905)),i=["components"],p={title:"Basic options",sidebar_position:2,slug:"/options"},o=void 0,u={unversionedId:"en/Options",id:"en/Options",title:"Basic options",description:"container",source:"@site/docs/en/Options.mdx",sourceDirName:"en",slug:"/options",permalink:"/document/options",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"Basic options",sidebar_position:2,slug:"/options"},sidebar:"en",previous:{title:"Quick start",permalink:"/document/"},next:{title:"Common properties",permalink:"/document/propertie"}},m={},s=[{value:"container",id:"container",level:2},{value:"url",id:"url",level:2},{value:"Ready Callback",id:"ready-callback",level:2},{value:"poster",id:"poster",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"volume",id:"volume",level:2},{value:"isLive",id:"islive",level:2},{value:"muted",id:"muted",level:2},{value:"autoplay",id:"autoplay",level:2},{value:"autoSize",id:"autosize",level:2},{value:"autoMini",id:"automini",level:2},{value:"loop",id:"loop",level:2},{value:"flip",id:"flip",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"setting",id:"setting",level:2},{value:"hotkey",id:"hotkey",level:2},{value:"pip",id:"pip",level:2},{value:"mutex",id:"mutex",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"subtitleOffset",id:"subtitleoffset",level:2},{value:"miniProgressBar",id:"miniprogressbar",level:2},{value:"useSSR",id:"usessr",level:2},{value:"playsInline",id:"playsinline",level:2},{value:"layers",id:"layers",level:2},{value:"settings",id:"settings",level:2},{value:"contextmenu",id:"contextmenu",level:2},{value:"controls",id:"controls",level:2},{value:"quality",id:"quality",level:2},{value:"highlight",id:"highlight",level:2},{value:"plugins",id:"plugins",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"thumbnails",id:"thumbnails",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"moreVideoAttr",id:"morevideoattr",level:2},{value:"icons",id:"icons",level:2},{value:"type",id:"type",level:2},{value:"customType",id:"customtype",level:2},{value:"lang",id:"lang",level:2},{value:"lock",id:"lock",level:2},{value:"fastForward",id:"fastforward",level:2},{value:"autoPlayback",id:"autoplayback",level:2},{value:"autoOrientation",id:"autoorientation",level:2}],d={toc:s};function k(e){var t=e.componentLine truncated
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[558],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return k}});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,a,l=function(e,t){if(null==e)return{};var n,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=a.createContext({}),u=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=u(e.components);return a.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),d=u(n),k=l,c=d["".concat(o,".").concat(k)]||d[k]||s[k]||r;return n?a.createElement(c,i(i({ref:t},m),{},{components:n})):a.createElement(c,i({ref:t},m))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=d;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var u=2;u<r;u++)i[u]=n[u];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},3397:function(e,t,n){n.r(t),n.d(t,{assets:function(){return m},contentTitle:function(){return o},default:function(){return k},frontMatter:function(){return p},metadata:function(){return u},toc:function(){return s}});var a=n(7462),l=n(3366),r=(n(7294),n(3905)),i=["components"],p={title:"Basic options",sidebar_position:2,slug:"/options"},o=void 0,u={unversionedId:"en/Options",id:"en/Options",title:"Basic options",description:"container",source:"@site/docs/en/Options.mdx",sourceDirName:"en",slug:"/options",permalink:"/document/options",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"Basic options",sidebar_position:2,slug:"/options"},sidebar:"en",previous:{title:"Quick start",permalink:"/document/"},next:{title:"Common properties",permalink:"/document/propertie"}},m={},s=[{value:"container",id:"container",level:2},{value:"url",id:"url",level:2},{value:"Ready Callback",id:"ready-callback",level:2},{value:"poster",id:"poster",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"volume",id:"volume",level:2},{value:"isLive",id:"islive",level:2},{value:"muted",id:"muted",level:2},{value:"autoplay",id:"autoplay",level:2},{value:"autoSize",id:"autosize",level:2},{value:"autoMini",id:"automini",level:2},{value:"loop",id:"loop",level:2},{value:"flip",id:"flip",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"setting",id:"setting",level:2},{value:"hotkey",id:"hotkey",level:2},{value:"pip",id:"pip",level:2},{value:"mutex",id:"mutex",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"subtitleOffset",id:"subtitleoffset",level:2},{value:"miniProgressBar",id:"miniprogressbar",level:2},{value:"useSSR",id:"usessr",level:2},{value:"playsInline",id:"playsinline",level:2},{value:"layers",id:"layers",level:2},{value:"settings",id:"settings",level:2},{value:"contextmenu",id:"contextmenu",level:2},{value:"controls",id:"controls",level:2},{value:"quality",id:"quality",level:2},{value:"highlight",id:"highlight",level:2},{value:"plugins",id:"plugins",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"thumbnails",id:"thumbnails",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"moreVideoAttr",id:"morevideoattr",level:2},{value:"icons",id:"icons",level:2},{value:"type",id:"type",level:2},{value:"customType",id:"customtype",level:2},{value:"lang",id:"lang",level:2},{value:"lock",id:"lock",level:2},{value:"fastForward",id:"fastforward",level:2},{value:"autoPlayback",id:"autoplayback",level:2},{value:"autoOrientation",id:"autoorientation",level:2}],d={toc:s};function k(e){var t=e.componentLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[667],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return c}});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)t=l[a],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)t=l[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var o=a.createContext({}),s=function(e){var n=a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=s(e.components);return a.createElement(o.Provider,{value:n},e.children)},m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),d=s(t),c=r,k=d["".concat(o,".").concat(c)]||d[c]||m[c]||l;return t?a.createElement(k,i(i({ref:n},p),{},{components:t})):a.createElement(k,i({ref:n},p))}));function c(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,i=new Array(l);i[0]=d;var u={};for(var o in n)hasOwnProperty.call(n,o)&&(u[o]=n[o]);u.originalType=e,u.mdxType="string"==typeof e?e:r,i[1]=u;for(var s=2;s<l;s++)i[s]=t[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}d.displayName="MDXCreateElement"},1856:function(e,n,t){t.r(n),t.d(n,{assets:function(){return p},contentTitle:function(){return o},default:function(){return c},frontMatter:function(){return u},metadata:function(){return s},toc:function(){return m}});var a=t(7462),r=t(3366),l=(t(7294),t(3905)),i=["components"],u={title:"Danmuku plugin",sidebar_position:1},o=void 0,s={unversionedId:"en/Plugins/danmuku",id:"en/Plugins/danmuku",title:"Danmuku plugin",description:"Demo",source:"@site/docs/en/Plugins/danmuku.mdx",sourceDirName:"en/Plugins",slug:"/en/Plugins/danmuku",permalink:"/document/en/Plugins/danmuku",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Danmuku plugin",sidebar_position:1},sidebar:"en",previous:{title:"Third party librarys",permalink:"/document/libraries"},next:{title:"Add select in the controls",permalink:"/document/en/Questions/Create_selector_in_the_controls"}},p={},m=[{value:"Demo",id:"demo",level:2},{value:"Install",id:"install",level:2},{value:"Install by <code>npm</code>:",id:"install-by-npm",level:3},{value:"Install by <code>yarn</code>:",id:"install-by-yarn",level:3},{value:"Install by <code>script</code>:",id:"install-by-script",level:3},{value:"Use",id:"use",level:2},{value:"Use the damuku array",id:"use-the-damuku-array",level:3},{value:"Use the XML",id:"use-the-xml",level:3},{value:"Use asynchronous calls",id:"use-asynchronous-calls",level:3},{value:"Interface",id:"interface",level:2},{value:"hide/show",id:"hideshow",level:3},{value:"isHide",id:"ishide",level:3},{value:"emit",id:"emit",level:3},{value:"config",id:"config",level:3}],d={toc:m};function c(e){var n=e.components,t=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"demo"},"Demo"),(0,l.kt)("p",null,"\ud83d\udc49 ",(0,l.kt)("a",{parentName:"p",href:"https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku"},"View full demo")),(0,l.kt)("h2",{id:"install"},"Install"),(0,l.kt)("h3",{id:"install-by-npm"},"Install by ",(0,l.kt)("inlineCode",{parentName:"h3"},"npm"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"$ npm install artplayer-plugin-danmuku\n")),(0,l.kt)("h3",{id:"install-by-yarn"},"Install by ",(0,l.kt)("inlineCode",{parentName:"h3"},"yarn"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"$ yarn add artplayer-plugin-danmuku\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"import artplayerPluginDanmuku from 'artplayer-plugin-danmuku';\n")),(0,l.kt)("h3",{id:"install-by-script"},"Install by ",(0,l.kt)("inlineCode",{parentName:"h3"},"script"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[667],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return d}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),m=l(t),d=a,f=m["".concat(c,".").concat(d)]||m[d]||s[d]||o;return t?r.createElement(f,i(i({ref:n},p),{},{components:t})):r.createElement(f,i({ref:n},p))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=m;var u={};for(var c in n)hasOwnProperty.call(n,c)&&(u[c]=n[c]);u.originalType=e,u.mdxType="string"==typeof e?e:a,i[1]=u;for(var l=2;l<o;l++)i[l]=t[l];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}m.displayName="MDXCreateElement"},1856:function(e,n,t){t.r(n),t.d(n,{assets:function(){return p},contentTitle:function(){return c},default:function(){return d},frontMatter:function(){return u},metadata:function(){return l},toc:function(){return s}});var r=t(7462),a=t(3366),o=(t(7294),t(3905)),i=["components"],u={title:"Danmuku plugin",sidebar_position:1},c=void 0,l={unversionedId:"en/Plugins/danmuku",id:"en/Plugins/danmuku",title:"Danmuku plugin",description:"The documentation of the current danmaku library plug-in, only the Chinese version",source:"@site/docs/en/Plugins/danmuku.mdx",sourceDirName:"en/Plugins",slug:"/en/Plugins/danmuku",permalink:"/document/en/Plugins/danmuku",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Danmuku plugin",sidebar_position:1},sidebar:"en",previous:{title:"Third party librarys",permalink:"/document/libraries"},next:{title:"Add select in the controls",permalink:"/document/en/Questions/Create_selector_in_the_controls"}},p={},s=[],m={toc:s};function d(e){var n=e.components,t=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("div",{className:"admonition admonition-danger alert alert--danger"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))),"Tip")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"The documentation of the current danmaku library plug-in, only the Chinese version"))),(0,o.kt)("p",null,"\ud83d\udc49 ",(0,o.kt)("a",{parentName:"p",href:"https://artplayer.org/document/zh-cn/Plugins/danmuku/"},"https://artplayer.org/document/zh-cn/Plugins/danmuku/")))}d.isMDXComponent=!0}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"en":[{"type":"link","label":"Quick start","href":"/document/","docId":"en/Overview"},{"type":"link","label":"Basic options","href":"/document/options","docId":"en/Options"},{"type":"link","label":"Common properties","href":"/document/propertie","docId":"en/Properties"},{"type":"link","label":"Advanced propertys","href":"/document/advance","docId":"en/Advance"},{"type":"link","label":"Static propertys","href":"/document/class","docId":"en/Class"},{"type":"link","label":"Common events","href":"/document/events","docId":"en/Events"},{"type":"link","label":"Third party librarys","href":"/document/libraries","docId":"en/Libraries"},{"type":"category","label":"Official plugins","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Danmuku plugin","href":"/document/en/Plugins/danmuku","docId":"en/Plugins/danmuku"}]},{"type":"category","label":"Common problems","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Add select in the controls","href":"/document/en/Questions/Create_selector_in_the_controls","docId":"en/Questions/Create_selector_in_the_controls"},{"type":"link","label":"Add button to the controls","href":"/document/en/Questions/Create_button_in_the_controls","docId":"en/Questions/Create_button_in_the_controls"},{"type":"link","label":"Handle a single component","href":"/document/en/Questions/Handle_single_component","docId":"en/Questions/Handle_single_component"},{"type":"link","label":"How to import types","href":"/document/en/Questions/How_to_import_types","docId":"en/Questions/How_to_import_types"},{"type":"link","label":"How to add video ads","href":"/document/en/Questions/How_to_add_video_ads","docId":"en/Questions/How_to_add_video_ads"},{"type":"link","label":"How to add setting panel","href":"/document/en/Questions/How_to_add_setting_panel","docId":"en/Questions/How_to_add_setting_panel"},{"type":"link","label":"Use with React Portal","href":"/document/en/Questions/Use_with_react_portal","docId":"en/Questions/Use_with_react_portal"}]}],"zh-cn":[{"type":"link","label":"\u5feb\u901f\u4e0a\u624b","href":"/document/zh-cn","docId":"zh-cn/Overview"},{"type":"link","label":"\u57fa\u7840\u53c2\u6570","href":"/document/zh-cn/options","docId":"zh-cn/Options"},{"type":"link","label":"\u5e38\u7528\u5c5e\u6027","href":"/document/zh-cn/propertie","docId":"zh-cn/Properties"},{"type":"link","label":"\u9ad8\u7ea7\u5c5e\u6027","href":"/document/zh-cn/advance","docId":"zh-cn/Advance"},{"type":"link","label":"\u9759\u6001\u5c5e\u6027","href":"/document/zh-cn/class","docId":"zh-cn/Class"},{"type":"link","label":"\u5b9e\u4f8b\u4e8b\u4ef6","href":"/document/zh-cn/events","docId":"zh-cn/Events"},{"type":"link","label":"\u7b2c\u4e09\u65b9\u5e93","href":"/document/zh-cn/libraries","docId":"zh-cn/Libraries"},{"type":"category","label":"\u5b98\u65b9\u63d2\u4ef6","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\u5f39\u5e55\u5e93\u63d2\u4ef6","href":"/document/zh-cn/Plugins/danmuku","docId":"zh-cn/Plugins/danmuku"}]},{"type":"category","label":"\u5e38\u89c1\u95ee\u9898","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868","href":"/document/zh-cn/Questions/Create_selector_in_the_controls","docId":"zh-cn/Questions/Create_selector_in_the_controls"},{"type":"link","label":"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae","href":"/document/zh-cn/Questions/Create_button_in_the_controls","docId":"zh-cn/Questions/Create_button_in_the_controls"},{"type":"link","label":"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6","href":"/document/zh-cn/Questions/Handle_single_component","docId":"zh-cn/Questions/Handle_single_component"},{"type":"link","label":"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b","href":"/document/zh-cn/Questions/How_to_import_types","docId":"zh-cn/Questions/How_to_import_types"},{"type":"link","label":"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a","href":"/document/zh-cn/Questions/How_to_add_video_ads","docId":"zh-cn/Questions/How_to_add_video_ads"},{"type":"link","label":"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f","href":"/document/zh-cn/Questions/How_to_add_setting_panel","docId":"zh-cn/Questions/How_to_add_setting_panel"},{"type":"link","label":"\u4e0e React Portal \u4f7f\u7528","href":"/document/zh-cn/Questions/Use_with_react_portal","docId":"zh-cn/Questions/Use_with_react_portal"}]}]},"docs":{"en/Advance":{"id":"en/Advance","title":"Advanced propertys","description":"This page is some additional supplements to the commonly used properties, you need to read in depth to develop custom functions.","sidebar":"en"},"en/Class":{"id":"en/Class","title":"Static propertys","description":"Static attributes exist in the construcLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"en":[{"type":"link","label":"Quick start","href":"/document/","docId":"en/Overview"},{"type":"link","label":"Basic options","href":"/document/options","docId":"en/Options"},{"type":"link","label":"Common properties","href":"/document/propertie","docId":"en/Properties"},{"type":"link","label":"Advanced propertys","href":"/document/advance","docId":"en/Advance"},{"type":"link","label":"Static propertys","href":"/document/class","docId":"en/Class"},{"type":"link","label":"Common events","href":"/document/events","docId":"en/Events"},{"type":"link","label":"Third party librarys","href":"/document/libraries","docId":"en/Libraries"},{"type":"category","label":"Official plugins","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Danmuku plugin","href":"/document/en/Plugins/danmuku","docId":"en/Plugins/danmuku"}]},{"type":"category","label":"Common problems","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Add select in the controls","href":"/document/en/Questions/Create_selector_in_the_controls","docId":"en/Questions/Create_selector_in_the_controls"},{"type":"link","label":"Add button to the controls","href":"/document/en/Questions/Create_button_in_the_controls","docId":"en/Questions/Create_button_in_the_controls"},{"type":"link","label":"Handle a single component","href":"/document/en/Questions/Handle_single_component","docId":"en/Questions/Handle_single_component"},{"type":"link","label":"How to import types","href":"/document/en/Questions/How_to_import_types","docId":"en/Questions/How_to_import_types"},{"type":"link","label":"How to add video ads","href":"/document/en/Questions/How_to_add_video_ads","docId":"en/Questions/How_to_add_video_ads"},{"type":"link","label":"How to add setting panel","href":"/document/en/Questions/How_to_add_setting_panel","docId":"en/Questions/How_to_add_setting_panel"},{"type":"link","label":"Use with React Portal","href":"/document/en/Questions/Use_with_react_portal","docId":"en/Questions/Use_with_react_portal"}]}],"zh-cn":[{"type":"link","label":"\u5feb\u901f\u4e0a\u624b","href":"/document/zh-cn","docId":"zh-cn/Overview"},{"type":"link","label":"\u57fa\u7840\u53c2\u6570","href":"/document/zh-cn/options","docId":"zh-cn/Options"},{"type":"link","label":"\u5e38\u7528\u5c5e\u6027","href":"/document/zh-cn/propertie","docId":"zh-cn/Properties"},{"type":"link","label":"\u9ad8\u7ea7\u5c5e\u6027","href":"/document/zh-cn/advance","docId":"zh-cn/Advance"},{"type":"link","label":"\u9759\u6001\u5c5e\u6027","href":"/document/zh-cn/class","docId":"zh-cn/Class"},{"type":"link","label":"\u5b9e\u4f8b\u4e8b\u4ef6","href":"/document/zh-cn/events","docId":"zh-cn/Events"},{"type":"link","label":"\u7b2c\u4e09\u65b9\u5e93","href":"/document/zh-cn/libraries","docId":"zh-cn/Libraries"},{"type":"category","label":"\u5b98\u65b9\u63d2\u4ef6","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\u5f39\u5e55\u5e93\u63d2\u4ef6","href":"/document/zh-cn/Plugins/danmuku","docId":"zh-cn/Plugins/danmuku"}]},{"type":"category","label":"\u5e38\u89c1\u95ee\u9898","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868","href":"/document/zh-cn/Questions/Create_selector_in_the_controls","docId":"zh-cn/Questions/Create_selector_in_the_controls"},{"type":"link","label":"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae","href":"/document/zh-cn/Questions/Create_button_in_the_controls","docId":"zh-cn/Questions/Create_button_in_the_controls"},{"type":"link","label":"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6","href":"/document/zh-cn/Questions/Handle_single_component","docId":"zh-cn/Questions/Handle_single_component"},{"type":"link","label":"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b","href":"/document/zh-cn/Questions/How_to_import_types","docId":"zh-cn/Questions/How_to_import_types"},{"type":"link","label":"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a","href":"/document/zh-cn/Questions/How_to_add_video_ads","docId":"zh-cn/Questions/How_to_add_video_ads"},{"type":"link","label":"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f","href":"/document/zh-cn/Questions/How_to_add_setting_panel","docId":"zh-cn/Questions/How_to_add_setting_panel"},{"type":"link","label":"\u4e0e React Portal \u4f7f\u7528","href":"/document/zh-cn/Questions/Use_with_react_portal","docId":"zh-cn/Questions/Use_with_react_portal"}]}]},"docs":{"en/Advance":{"id":"en/Advance","title":"Advanced propertys","description":"This page is some additional supplements to the commonly used properties, you need to read in depth to develop custom functions.","sidebar":"en"},"en/Class":{"id":"en/Class","title":"Static propertys","description":"Static attributes exist in the construcLine truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[228],{3905:function(e,t,n){n.d(t,{Zo:function(){return d},kt:function(){return s}});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,a,l=function(e,t){if(null==e)return{};var n,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=a.createContext({}),m=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=m(e.components);return a.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),k=m(n),s=l,N=k["".concat(o,".").concat(s)]||k[s]||u[s]||r;return n?a.createElement(N,i(i({ref:t},d),{},{components:n})):a.createElement(N,i({ref:t},d))}));function s(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var m=2;m<r;m++)i[m]=n[m];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},2623:function(e,t,n){n.r(t),n.d(t,{assets:function(){return d},contentTitle:function(){return o},default:function(){return s},frontMatter:function(){return p},metadata:function(){return m},toc:function(){return u}});var a=n(7462),l=n(3366),r=(n(7294),n(3905)),i=["components"],p={title:"\u57fa\u7840\u53c2\u6570",sidebar_position:2,slug:"/zh-cn/options"},o=void 0,m={unversionedId:"zh-cn/Options",id:"zh-cn/Options",title:"\u57fa\u7840\u53c2\u6570",description:"container",source:"@site/docs/zh-cn/Options.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/options",permalink:"/document/zh-cn/options",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"\u57fa\u7840\u53c2\u6570",sidebar_position:2,slug:"/zh-cn/options"},sidebar:"zh-cn",previous:{title:"\u5feb\u901f\u4e0a\u624b",permalink:"/document/zh-cn"},next:{title:"\u5e38\u7528\u5c5e\u6027",permalink:"/document/zh-cn/propertie"}},d={},u=[{value:"container",id:"container",level:2},{value:"url",id:"url",level:2},{value:"Ready Callback",id:"ready-callback",level:2},{value:"poster",id:"poster",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"volume",id:"volume",level:2},{value:"isLive",id:"islive",level:2},{value:"muted",id:"muted",level:2},{value:"autoplay",id:"autoplay",level:2},{value:"autoSize",id:"autosize",level:2},{value:"autoMini",id:"automini",level:2},{value:"loop",id:"loop",level:2},{value:"flip",id:"flip",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"setting",id:"setting",level:2},{value:"hotkey",id:"hotkey",level:2},{value:"pip",id:"pip",level:2},{value:"mutex",id:"mutex",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"subtitleOffset",id:"subtitleoffset",level:2},{value:"miniProgressBar",id:"miniprogressbar",level:2},{value:"useSSR",id:"usessr",level:2},{value:"playsInline",id:"playsinline",level:2},{value:"layers",id:"layers",level:2},{value:"settings",id:"settings",level:2},{value:"contextmenu",id:"contextmenu",level:2},{value:"controls",id:"controls",level:2},{value:"quality",id:"quality",level:2},{value:"highlight",id:"highlight",level:2},{value:"plugins",id:"plugins",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"thumbnails",id:"thumbnails",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"moreVideoAttr",id:"morevideoattr",level:2},{value:"icons",id:"icons",level:2},{value:"type",id:"type",level:2},{value:"customType",id:"customtype",level:2},{value:"lang",id:"lang",level:2},{value:"lock",id:"lock",level:2},{value:"fastForward",id:"fastforward",level:2},{value:"autoPlayback",id:"autoplayback",levLine truncated
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[228],{3905:function(e,t,n){n.d(t,{Zo:function(){return d},kt:function(){return s}});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,a,l=function(e,t){if(null==e)return{};var n,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=a.createContext({}),m=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=m(e.components);return a.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),k=m(n),s=l,N=k["".concat(o,".").concat(s)]||k[s]||u[s]||r;return n?a.createElement(N,i(i({ref:t},d),{},{components:n})):a.createElement(N,i({ref:t},d))}));function s(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var m=2;m<r;m++)i[m]=n[m];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},2623:function(e,t,n){n.r(t),n.d(t,{assets:function(){return d},contentTitle:function(){return o},default:function(){return s},frontMatter:function(){return p},metadata:function(){return m},toc:function(){return u}});var a=n(7462),l=n(3366),r=(n(7294),n(3905)),i=["components"],p={title:"\u57fa\u7840\u53c2\u6570",sidebar_position:2,slug:"/zh-cn/options"},o=void 0,m={unversionedId:"zh-cn/Options",id:"zh-cn/Options",title:"\u57fa\u7840\u53c2\u6570",description:"container",source:"@site/docs/zh-cn/Options.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/options",permalink:"/document/zh-cn/options",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"\u57fa\u7840\u53c2\u6570",sidebar_position:2,slug:"/zh-cn/options"},sidebar:"zh-cn",previous:{title:"\u5feb\u901f\u4e0a\u624b",permalink:"/document/zh-cn"},next:{title:"\u5e38\u7528\u5c5e\u6027",permalink:"/document/zh-cn/propertie"}},d={},u=[{value:"container",id:"container",level:2},{value:"url",id:"url",level:2},{value:"Ready Callback",id:"ready-callback",level:2},{value:"poster",id:"poster",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"volume",id:"volume",level:2},{value:"isLive",id:"islive",level:2},{value:"muted",id:"muted",level:2},{value:"autoplay",id:"autoplay",level:2},{value:"autoSize",id:"autosize",level:2},{value:"autoMini",id:"automini",level:2},{value:"loop",id:"loop",level:2},{value:"flip",id:"flip",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"setting",id:"setting",level:2},{value:"hotkey",id:"hotkey",level:2},{value:"pip",id:"pip",level:2},{value:"mutex",id:"mutex",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"subtitleOffset",id:"subtitleoffset",level:2},{value:"miniProgressBar",id:"miniprogressbar",level:2},{value:"useSSR",id:"usessr",level:2},{value:"playsInline",id:"playsinline",level:2},{value:"layers",id:"layers",level:2},{value:"settings",id:"settings",level:2},{value:"contextmenu",id:"contextmenu",level:2},{value:"controls",id:"controls",level:2},{value:"quality",id:"quality",level:2},{value:"highlight",id:"highlight",level:2},{value:"plugins",id:"plugins",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"thumbnails",id:"thumbnails",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"moreVideoAttr",id:"morevideoattr",level:2},{value:"icons",id:"icons",level:2},{value:"type",id:"type",level:2},{value:"customType",id:"customtype",level:2},{value:"lang",id:"lang",level:2},{value:"lock",id:"lock",level:2},{value:"fastForward",id:"fastforward",level:2},{value:"autoPlayback",id:"autoplayback",levLine truncated
|
||||
@@ -1,2 +1,2 @@
|
||||
/*! For license information please see main.a5b2f92c.js.LICENSE.txt */
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[179],{9782:function(e,t){"use strict";t.Z={title:"Artplayer.js",tagline:"Public Product Api Document",url:"https://artplayer.org",baseUrl:"/document/",onBrokenLinks:"ignore",onBrokenMarkdownLinks:"ignore",organizationName:"zhw2590582",projectName:"Artplayer",favicon:"img/favicon.ico",clientModules:["/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/src/script/main.js"],themeConfig:{docs:{sidebar:{hideable:!0,autoCollapseCategories:!1},versionPersistence:"localStorage"},navbar:{title:"Artplayer.js",logo:{alt:"Artplayer.js",src:"img/logo.png",href:"https://artplayer.org/document",target:"_self",width:28,height:28},items:[{href:"https://artplayer.org",position:"left",label:"Online Editor"},{href:"https://github.com/zhw2590582/ArtPlayer",position:"left",label:"Github"},{href:"#",label:"QQ\u7fa4: 320881312",position:"right"},{label:"English",position:"right",items:[{label:"English",href:"/"},{label:"\u4e2d\u6587",href:"/zh-cn/"}]}],hideOnScroll:!1},footer:{style:"dark",copyright:"Copyright \xa9 2022 Artplayer.js, Inc. Built with Docusaurus.",links:[]},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},plugins:["/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/node_modules/docusaurus-lunr-search/src/index.js"],presets:[["@docusaurus/preset-classic",{docs:{path:"./docs",routeBasePath:"/",sidebarPath:"/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/sidebars.js"},blog:!1,theme:{customCss:"/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/src/css/custom.css"}}]],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",locales:["en"],localeConfigs:{}},onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},themes:[],scripts:[],stylesheets:[],titleDelimiter:"|",noIndex:!1}},723:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7294),a=n(7462),o=n(8356),i=n.n(o);function l(e){var t=e.error,n=e.retry,a=e.pastDelay;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOLine truncated
|
||||
/*! For license information please see main.9ce4b94b.js.LICENSE.txt */
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[179],{9782:function(e,t){"use strict";t.Z={title:"Artplayer.js",tagline:"Public Product Api Document",url:"https://artplayer.org",baseUrl:"/document/",onBrokenLinks:"ignore",onBrokenMarkdownLinks:"ignore",organizationName:"zhw2590582",projectName:"Artplayer",favicon:"img/favicon.ico",clientModules:["/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/src/script/main.js"],themeConfig:{docs:{sidebar:{hideable:!0,autoCollapseCategories:!1},versionPersistence:"localStorage"},navbar:{title:"Artplayer.js",logo:{alt:"Artplayer.js",src:"img/logo.png",href:"https://artplayer.org/document",target:"_self",width:28,height:28},items:[{href:"https://artplayer.org",position:"left",label:"Online Editor"},{href:"https://github.com/zhw2590582/ArtPlayer",position:"left",label:"Github"},{href:"#",label:"QQ\u7fa4: 320881312",position:"right"},{label:"English",position:"right",items:[{label:"English",href:"/"},{label:"\u4e2d\u6587",href:"/zh-cn/"}]}],hideOnScroll:!1},footer:{style:"dark",copyright:"Copyright \xa9 2022 Artplayer.js, Inc. Built with Docusaurus.",links:[]},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},plugins:["/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/node_modules/docusaurus-lunr-search/src/index.js"],presets:[["@docusaurus/preset-classic",{docs:{path:"./docs",routeBasePath:"/",sidebarPath:"/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/sidebars.js"},blog:!1,theme:{customCss:"/Users/harvey/Desktop/github/ArtPlayer/packages/artplayer-document/src/css/custom.css"}}]],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",locales:["en"],localeConfigs:{}},onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},themes:[],scripts:[],stylesheets:[],titleDelimiter:"|",noIndex:!1}},723:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7294),a=n(7462),o=n(8356),i=n.n(o);function l(e){var t=e.error,n=e.retry,a=e.pastDelay;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOLine truncated
|
||||
File renamed without changes.
+1
-1
@@ -1 +1 @@
|
||||
!function(){"use strict";var e,t,n,r,a,f={},c={};function o(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}o.m=f,o.c=c,e=[],o.O=function(t,n,r,a){if(!n){var f=1/0;for(i=0;i<e.length;i++){n=e[i][0],r=e[i][1],a=e[i][2];for(var c=!0,u=0;u<n.length;u++)(!1&a||f>=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(c=!1,a<f&&(f=a));if(c){e.splice(i--,1);var d=r();void 0!==d&&(t=d)}}return t}a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[n,r,a]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var a=Object.create(null);o.r(a);var f={};t=t||[null,n({}),n([]),n(n)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=n(c))Object.getOwnPropertyNames(c).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},o.d(a,f),a},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))},o.u=function(e){return"assets/js/"+({14:"faf6497a",28:"58e1c627",48:"60b6f9d9",53:"935f2afb",78:"3bed75f7",87:"a5cb9b40",122:"bd0361f4",146:"9bc5160c",167:"8707c5fa",201:"289862a0",220:"5d64abea",228:"a94f89e4",235:"a87a33e0",250:"3295c742",280:"3242b9a0",283:"8aff36b5",359:"6d693eaf",376:"c1870555",514:"1be78505",558:"41890f3a",591:"f4b604e6",601:"6edbf6fb",610:"3c6a0f85",615:"1fd37a74",619:"55c4a126",645:"571421b9",667:"701cf4af",696:"ba9533a1",740:"f1478c6c",784:"1cbc9196",881:"e434372a",894:"bbdb8589",898:"0d27fd9a",918:"17896441"}[e]||e)+"."+{14:"f311cd28",28:"71c47112",48:"7382891b",53:"c5b9b73a",78:"b3e21b67",87:"b42e72b3",122:"2c38bfb6",146:"7239afe4",167:"6e21eb8c",201:"a7079592",220:"4742c5c1",228:"0bd2855e",235:"b7afa659",245:"dd7e9f1f",250:"c0eb89ee",280:"408d806c",283:"ec084d59",343:"e9b08a58",359:"1c24bfc1",376:"dfe03f8f",514:"b9120311",558:"03cff5ae",591:"1489f678",601:"523bcc96",608:"1d321a91",610:"53e0bc80",615:"d6a451a2",619:"943e022d",645:"bd81ea31",667:"48f6c345",696:"7e3769fb",740:"862a408c",784:"2dd1fd8d",878:"0f9d5667",881:"c02b87d1",894:"b738498d",898:"dc1b5780",918:"8d80cfd5"}[e]+".js"},o.miniCssF=function(e){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},a="artplayer-document:",o.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var d=document.getElementsByTagName("script"),i=0;i<d.length;i++){var b=d[i];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")==a+n){c=b;break}}c||(u=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,o.nc&&c.setAttribute("nonce",o.nc),c.setAttribute("data-webpack",a+n),c.src=e),r[e]=[t];var l=function(t,n){c.onerror=c.onload=null,clearTimeout(s);var a=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),a&&a.forEach((function(e){return e(n)})),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),u&&document.head.appendChild(c)}},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/document/",o.gca=function(e){return e={17896441:"918",faf6497a:"14","58e1c627":"28","60b6f9d9":"48","935f2afb":"53","3bed75f7":"78",a5cb9b40:"87",bd0361f4:"122","9bc5160c":"146","8707c5fa":"167","289862a0":"201","5d64abea":"220",a94f89e4:"228",a87a33e0:"235","3295c742":"250","3242b9a0":"280","8aff36b5":"283","6d693eaf":"359",c1870555:"376","1be78505":"514","41890f3a":"558",f4b604e6:"591","6edbf6fb":"601","3c6a0f85":"610","1fd37a74":"615","55c4a126":"619","571421b9":"645","701cf4af":"667",ba9533a1:"696",f1478c6c:"740","1cbc9196":"784",e434372a:"881",bbdb8589:"894","0d27fd9a":"898"}[e]||e,o.p+o.u(e)},function(){var e={303:0,532:0};o.f.j=function(t,n){var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var a=new Promise((function(n,a){r=e[t]=[n,a]}));n.push(r[2]=a);var f=o.p+o.u(t),c=new Error;o.l(f,(function(n){if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),f=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+a+": "+f+")",c.name="ChunkLoadError",c.type=a,c.request=f,r[1](c)}}),"chunk-"+t,t)}},o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,f=n[0],c=n[1],u=n[2],d=0;if(f.some((function(t){return 0Line truncated
|
||||
!function(){"use strict";var e,t,n,r,f,a={},c={};function o(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}o.m=a,o.c=c,e=[],o.O=function(t,n,r,f){if(!n){var a=1/0;for(d=0;d<e.length;d++){n=e[d][0],r=e[d][1],f=e[d][2];for(var c=!0,u=0;u<n.length;u++)(!1&f||a>=f)&&Object.keys(o.O).every((function(e){return o.O[e](n[u])}))?n.splice(u--,1):(c=!1,f<a&&(a=f));if(c){e.splice(d--,1);var i=r();void 0!==i&&(t=i)}}return t}f=f||0;for(var d=e.length;d>0&&e[d-1][2]>f;d--)e[d]=e[d-1];e[d]=[n,r,f]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var f=Object.create(null);o.r(f);var a={};t=t||[null,n({}),n([]),n(n)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=n(c))Object.getOwnPropertyNames(c).forEach((function(t){a[t]=function(){return e[t]}}));return a.default=function(){return e},o.d(f,a),f},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](e,t),t}),[]))},o.u=function(e){return"assets/js/"+({14:"faf6497a",28:"58e1c627",48:"60b6f9d9",53:"935f2afb",78:"3bed75f7",87:"a5cb9b40",122:"bd0361f4",146:"9bc5160c",167:"8707c5fa",201:"289862a0",220:"5d64abea",228:"a94f89e4",235:"a87a33e0",250:"3295c742",280:"3242b9a0",283:"8aff36b5",359:"6d693eaf",376:"c1870555",514:"1be78505",558:"41890f3a",591:"f4b604e6",601:"6edbf6fb",610:"3c6a0f85",615:"1fd37a74",619:"55c4a126",645:"571421b9",667:"701cf4af",696:"ba9533a1",740:"f1478c6c",784:"1cbc9196",881:"e434372a",894:"bbdb8589",898:"0d27fd9a",918:"17896441"}[e]||e)+"."+{14:"f311cd28",28:"71c47112",48:"7382891b",53:"1ed2caf4",78:"b90cf704",87:"b42e72b3",122:"2c38bfb6",146:"7239afe4",167:"6e21eb8c",201:"a7079592",220:"4742c5c1",228:"b6bd92b4",235:"b7afa659",245:"dd7e9f1f",250:"c0eb89ee",280:"408d806c",283:"ec084d59",343:"e9b08a58",359:"1c24bfc1",376:"dfe03f8f",514:"b9120311",558:"aaf59c53",591:"1489f678",601:"523bcc96",608:"1d321a91",610:"53e0bc80",615:"d6a451a2",619:"943e022d",645:"bd81ea31",667:"f8f2a448",696:"7e3769fb",740:"862a408c",784:"2dd1fd8d",878:"0f9d5667",881:"c02b87d1",894:"b738498d",898:"dc1b5780",918:"8d80cfd5"}[e]+".js"},o.miniCssF=function(e){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},f="artplayer-document:",o.l=function(e,t,n,a){if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d<i.length;d++){var b=i[d];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")==f+n){c=b;break}}c||(u=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,o.nc&&c.setAttribute("nonce",o.nc),c.setAttribute("data-webpack",f+n),c.src=e),r[e]=[t];var l=function(t,n){c.onerror=c.onload=null,clearTimeout(s);var f=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),f&&f.forEach((function(e){return e(n)})),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),u&&document.head.appendChild(c)}},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/document/",o.gca=function(e){return e={17896441:"918",faf6497a:"14","58e1c627":"28","60b6f9d9":"48","935f2afb":"53","3bed75f7":"78",a5cb9b40:"87",bd0361f4:"122","9bc5160c":"146","8707c5fa":"167","289862a0":"201","5d64abea":"220",a94f89e4:"228",a87a33e0:"235","3295c742":"250","3242b9a0":"280","8aff36b5":"283","6d693eaf":"359",c1870555:"376","1be78505":"514","41890f3a":"558",f4b604e6:"591","6edbf6fb":"601","3c6a0f85":"610","1fd37a74":"615","55c4a126":"619","571421b9":"645","701cf4af":"667",ba9533a1:"696",f1478c6c:"740","1cbc9196":"784",e434372a:"881",bbdb8589:"894","0d27fd9a":"898"}[e]||e,o.p+o.u(e)},function(){var e={303:0,532:0};o.f.j=function(t,n){var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var f=new Promise((function(n,f){r=e[t]=[n,f]}));n.push(r[2]=f);var a=o.p+o.u(t),c=new Error;o.l(a,(function(n){if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var f=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+f+": "+a+")",c.name="ChunkLoadError",c.type=f,c.request=a,r[1](c)}}),"chunk-"+t,t)}},o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,f,a=n[0],c=n[1],u=n[2],i=0;if(a.some((function(t){return 0Line truncated
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Static propertys | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/class"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Static propertys | Artplayer.js"><meta data-rh="true" name="description" content="Static attributes exist in the constructor artplayer, and the player instance is not directly associated"><meta data-rh="true" property="og:description" content="Static attributes exist in the constructor artplayer, and the player instance is not directly associated"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/class"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/class" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/class" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,14 +4,14 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Danmuku plugin | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Plugins/danmuku"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Danmuku plugin | Artplayer.js"><meta data-rh="true" name="description" content="Demo"><meta data-rh="true" property="og:description" content="Demo"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Plugins/danmuku"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Plugins/danmuku" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Plugins/danmuku" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<title data-rh="true">Danmuku plugin | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Plugins/danmuku"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Danmuku plugin | Artplayer.js"><meta data-rh="true" name="description" content="The documentation of the current danmaku library plug-in, only the Chinese version"><meta data-rh="true" property="og:description" content="The documentation of the current danmaku library plug-in, only the Chinese version"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Plugins/danmuku"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Plugins/danmuku" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Plugins/danmuku" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Add button to the controls | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/Create_button_in_the_controls"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Add button to the controls | Artplayer.js"><meta data-rh="true" name="description" content="▶ Run Code"><meta data-rh="true" property="og:description" content="▶ Run Code"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/Create_button_in_the_controls"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Create_button_in_the_controls" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Create_button_in_the_controls" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Add select in the controls | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/Create_selector_in_the_controls"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Add select in the controls | Artplayer.js"><meta data-rh="true" name="description" content="Sometimes you need to add a list in the controls, then you can use the selector and onSelect attribute when adding controls"><meta data-rh="true" property="og:description" content="Sometimes you need to add a list in the controls, then you can use the selector and onSelect attribute when adding controls"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/Create_selector_in_the_controls"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Create_selector_in_the_controls" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Create_selector_in_the_controls" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Handle a single component | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/Handle_single_component"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Handle a single component | Artplayer.js"><meta data-rh="true" name="description" content="When we add custom components in layers, contextmenu, controls, It is best to add a name property that is used to position the DOM element of the component."><meta data-rh="true" property="og:description" content="When we add custom components in layers, contextmenu, controls, It is best to add a name property that is used to position the DOM element of the component."><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/Handle_single_component"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Handle_single_component" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Handle_single_component" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">How to add setting panel | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/How_to_add_setting_panel"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="How to add setting panel | Artplayer.js"><meta data-rh="true" name="description" content="Add selector list"><meta data-rh="true" property="og:description" content="Add selector list"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/How_to_add_setting_panel"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/How_to_add_setting_panel" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/How_to_add_setting_panel" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">How to add video ads | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/How_to_add_video_ads"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="How to add video ads | Artplayer.js"><meta data-rh="true" name="description" content="Video ads play before main video playback, support multiple video ads"><meta data-rh="true" property="og:description" content="Video ads play before main video playback, support multiple video ads"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/How_to_add_video_ads"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/How_to_add_video_ads" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/How_to_add_video_ads" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">How to import types | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/How_to_import_types"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="How to import types | Artplayer.js"><meta data-rh="true" name="description" content="Sometimes you lose TypeScript syntax prompt, then you can import types manually"><meta data-rh="true" property="og:description" content="Sometimes you lose TypeScript syntax prompt, then you can import types manually"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/How_to_import_types"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/How_to_import_types" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/How_to_import_types" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Use with React Portal | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/en/Questions/Use_with_react_portal"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Use with React Portal | Artplayer.js"><meta data-rh="true" name="description" content="It is also very easy to use React Components in layers, contextmenu, controls. Handle more complex logic through ReactDOM.createPortal."><meta data-rh="true" property="og:description" content="It is also very easy to use React Components in layers, contextmenu, controls. Handle more complex logic through ReactDOM.createPortal."><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/en/Questions/Use_with_react_portal"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Use_with_react_portal" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Questions/Use_with_react_portal" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Common events | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/events"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Common events | Artplayer.js"><meta data-rh="true" name="description" content="The event of the player is divided into two, a native event of a video, and another is a custom event. The native event comes from Video Elements, is the original event of the Video Element, in order to distinguish it and custom events, the native event adds a prefix video:"><meta data-rh="true" property="og:description" content="The event of the player is divided into two, a native event of a video, and another is a custom event. The native event comes from Video Elements, is the original event of the Video Element, in order to distinguish it and custom events, the native event adds a prefix video:"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/events"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/events" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/events" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Quick start | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Quick start | Artplayer.js"><meta data-rh="true" name="description" content="Install"><meta data-rh="true" property="og:description" content="Install"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/" hreflang="x-default"><script data-rh="true">function maybeInsertBanner(){window.__DOCUSAURUS_INSERT_BASEURL_BANNER&&insertBanner()}function insertBanner(){var n=document.getElementById("docusaurus-base-url-issue-banner-container");if(n){n.innerHTML='\n<div id="docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">/document/</span> </p>\n <p>We suggest trying baseUrl = <span id="docusaurus-base-url-issue-banner-suggestion-container" style="font-weight: bold; color: green;"></span></p>\n</div>\n';var e=document.getElementById("docusaurus-base-url-issue-banner-suggestion-container"),s=window.location.pathname,r="/"===s.substr(-1)?s:s+"/";e.innerHTML=r}}window.__DOCUSAURUS_INSERT_BASEURL_BANNER=!0,document.addEventListener("DOMContentLoaded",maybeInsertBanner)</script><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div id="docusaurus-base-url-issue-banner-container"></div><div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="Line truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Third party librarys | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/libraries"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Third party librarys | Artplayer.js"><meta data-rh="true" name="description" content="flv.js"><meta data-rh="true" property="og:description" content="flv.js"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/libraries"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/libraries" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/libraries" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"version":"2.3.9","fields":["title","content","keywords"],"fieldVectors":[["title/0",[0,283.923,1,413.064,2,254.742]],["content/0",[0,4.042,1,5.88,2,5.218,3,0.164,4,0.471,5,0.471,6,0.808,7,7.85,8,6.542,9,0.537,10,0.543,11,0.712,12,0.525,13,0.543,14,0.495,15,0.664,16,4.294,17,4.466,18,3.292,19,8.641,20,8.641,21,8.641,22,6.102,23,2.205,24,7.633,25,6.427,26,5.748,27,7.289,28,2.987,29,5.117,30,7.633]],["keywords/0",[]],["title/1",[31,772.93,32,389.08]],["content/1",[]],["keywords/1",[]],["title/2",[33,652.722]],["content/2",[3,0.151,4,0.556,5,0.556,6,0.662,7,5.49,9,0.633,10,0.64,11,0.8,12,0.619,13,0.64,14,0.584,15,0.782,32,5.128,33,8.566,34,1.86,35,8.266,36,11.22,37,4.908,38,5.931,39,12.329,40,8.592,41,11.22,42,9.506,43,2.251,44,1.744,45,10.187]],["keywords/2",[]],["title/3",[46,992.579]],["content/3",[3,0.117,4,0.783,5,0.783,34,2.622,37,5.05,46,13.402,47,5.372,48,9.349,49,6.717,50,14.361]],["keywords/3",[]],["title/4",[51,1063.631]],["content/4",[3,0.117,4,0.783,5,0.783,34,2.622,37,5.05,47,5.372,48,9.349,52,15.818,53,15.818,54,14.361]],["keywords/4",[]],["title/5",[55,992.579]],["content/5",[3,0.119,4,0.796,5,0.796,28,5.044,34,2.664,37,5.131,55,13.616,56,13.616,57,14.591]],["keywords/5",[]],["title/6",[58,805.212]],["content/6",[3,0.115,4,0.771,5,0.771,28,4.887,32,7.117,34,2.581,59,15.572,60,13.194,61,8.373,62,4.887,63,14.138]],["keywords/6",[]],["title/7",[64,992.579]],["content/7",[3,0.117,4,0.783,5,0.783,28,4.964,34,2.622,37,5.05,64,13.402,65,14.361,66,8.981,67,14.361]],["keywords/7",[]],["title/8",[68,992.579]],["content/8",[23,3.977,34,2.846,37,5.482,66,9.749,68,14.548]],["keywords/8",[]],["title/9",[66,665.147]],["content/9",[3,0.119,4,0.796,5,0.796,28,5.044,34,2.664,37,5.131,66,9.125,69,7.752,70,14.591]],["keywords/9",[]],["title/10",[18,405.227]],["content/10",[3,0.112,4,0.748,5,0.748,18,5.224,34,2.503,37,4.822,47,6.338,69,7.286,71,15.104,72,7.087,73,12.113,74,13.713]],["keywords/10",[]],["title/11",[75,1063.631]],["content/11",[3,0.112,4,0.748,5,0.748,23,4.323,34,3.093,76,13.713,77,15.104,78,13.713,79,13.713,80,16.943]],["keywords/11",[]],["title/12",[81,566.475,82,607.025,83,446.138]],["content/12",[0,3.603,2,4.131,3,0.159,4,0.254,5,0.254,6,0.938,9,0.29,10,0.293,11,0.441,12,0.283,13,0.293,14,0.267,15,0.358,16,3.829,17,2.41,18,3.751,32,2.347,33,2.861,40,3.932,42,4.351,43,1.03,44,0.798,61,5.83,72,5.088,81,4.351,82,4.662,83,11.087,84,3.172,85,5.83,86,6.699,87,5.135,88,7.559,89,5.909,90,7.15,91,5.135,92,4.662,93,5.135,94,6.446,95,5.832,96,8.485,97,5.135,98,5.135,99,1.683,100,0.98,101,4.118,102,11.433,103,4.662,104,4.118,105,11.433,106,4.662,107,4.118,108,11.433,109,4.662,110,8.696,111,4.662,112,4.662,113,4.662,114,5.135,115,5.135,116,5.135]],["keywords/12",[]],["title/13",[0,283.923,2,254.742,117,566.475]],["content/13",[]],["keywords/13",[]],["title/14",[118,514.149,119,442.738]],["content/14",[2,3.341,3,0.165,4,0.434,5,0.434,6,0.518,9,0.495,10,0.501,11,0.671,12,0.484,13,0.501,14,0.796,15,0.611,16,3.957,17,4.115,18,5.295,22,3.907,23,2.031,69,4.23,89,6.055,100,1.674,119,4.56,120,5.693,121,5.296,122,10.348,123,7.43,124,7.033,125,7.033,126,7.43,127,7.033,128,7.033,129,5.418,130,5.078,131,6.451,132,6.451,133,6.451,134,4.291,135,5.693]],["keywords/14",[]],["title/15",[118,514.149,136,626.305]],["content/15",[2,0.984,3,0.166,4,0.128,5,0.128,6,0.276,9,0.264,10,0.147,11,0.243,12,0.143,13,0.147,14,0.134,15,0.18,16,1.166,17,1.212,18,0.894,23,0.598,62,0.811,121,1.56,129,1.596,130,1.496,134,1.264,135,1.677,136,1.901,137,4.242,138,18.376,139,2.346,140,18.376,141,18.376,142,2.346,143,2.346,144,2.346,145,2.346,146,2.346,147,2.346,148,2.346,149,2.346,150,2.346,151,2.346,152,2.346,153,2.346,154,2.346,155,2.346,156,2.346,157,2.346,158,2.346,159,2.346,160,2.346,161,2.346,162,2.346,163,2.346,164,2.346,165,2.346,166,2.346,167,2.346,168,2.346,169,2.346,170,2.346,171,2.346,172,2.346,173,2.346,174,2.346,175,2.346,176,2.346,177,2.346,178,2.346,179,2.346,180,2.346,181,2.346,182,2.346,183,2.346,184,2.346,185,2.346,186,2.346,187,2.346,188,2.346,189,2.346,190,2.346,191,2.346,192,2.346,193,2.346,194,2.346,195,2.346,196,2.346,197,2.346,198,2.346,199,2.346,200,2.346,201,2.346,202,2.346,203,2.346,204,2.346,205,2.346,206,2.346,207,2.346,208,2.346,209,2.346,210,2.346,211,2.346,212,2.346,213,2.346,214,2.346,215,2.346,216,2.346,217,2.346,218,2.346,219,2.346,220,2.346,221,2.346,222,2.346,223,2.346,224,2.346,225,2.346,226,2.346,227,2.346,228,2.346]],["keywords/15",[]],["title/16",[229,457.721,230,394.196]],["content/16",[]],["keywords/16",[]],["title/17",[231,897.136]],["content/17",[3,0.129,231,13.378,232,15.861,233,12.402]],["keywords/17",[]],["title/18",[234,831.642]],["content/18",[]],["keywords/18",[]],["title/19",[234,604.346,235,651.94]],["content/19",[3,0.125,11,0.878,229,9.077,230,7.817,234,11.984,235,12.928]],["keywords/19",[]],["title/20",[234,604.346,236,682.733]],["content/20",[0,6.613,3,0.115,11,0.989,229,10.223,230,8.804,236,12.488,237,10.703,238,8.842]],["keywords/20",[]],["title/21",[234,604.346,239,772.93]],["content/21",Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"version":"2.3.9","fields":["title","content","keywords"],"fieldVectors":[["title/0",[0,839.679,1,381.143]],["content/0",[]],["keywords/0",[]],["title/1",[2,642.466]],["content/1",[1,5.066,2,8.48,3,1.85,4,8.48,5,11.16,6,4.822,7,5.87,8,12.245,9,8.937,10,11.16,11,9.446,12,5.773,13,0.095,14,0.534,15,0.534,16,0.635,17,0.606,18,0.613,19,0.78,20,0.591,21,0.613,22,0.555,23,0.758,24,2.188,25,1.694,26,10.127]],["keywords/1",[]],["title/2",[27,927.67]],["content/2",[3,2.607,6,4.96,13,0.074,14,0.752,15,0.752,27,12.597,28,5.283,29,9.26,30,6.707,31,14.273]],["keywords/2",[]],["title/3",[32,1051.105]],["content/3",[3,2.607,6,4.96,13,0.074,14,0.752,15,0.752,28,5.283,29,9.26,33,15.73,34,15.73,35,14.273]],["keywords/3",[]],["title/4",[36,980.446]],["content/4",[3,2.649,6,5.04,13,0.075,14,0.764,15,0.764,36,13.527,37,4.953,38,13.527,39,14.501]],["keywords/4",[]],["title/5",[40,850.448]],["content/5",[1,7.029,3,2.567,13,0.072,14,0.741,15,0.741,37,4.799,41,15.486,42,13.107,43,8.754,44,4.841,45,14.052]],["keywords/5",[]],["title/6",[46,980.446]],["content/6",[3,2.607,6,4.96,13,0.074,14,0.752,15,0.752,37,4.875,46,13.314,47,15.73,48,8.724,49,14.273]],["keywords/6",[]],["title/7",[50,980.446]],["content/7",[3,2.83,6,5.384,48,9.47,50,14.452,51,4.059]],["keywords/7",[]],["title/8",[48,642.466]],["content/8",[3,2.649,6,5.04,13,0.075,14,0.764,15,0.764,37,4.953,48,8.864,52,7.773,53,14.501]],["keywords/8",[]],["title/9",[54,407.796]],["content/9",[3,2.49,6,4.737,13,0.07,14,0.718,15,0.718,28,6.232,52,7.305,54,5.288,55,15.02,56,7.646,57,12.029,58,13.629]],["keywords/9",[]],["title/10",[59,1051.105]],["content/10",[3,3.076,13,0.07,14,0.718,15,0.718,51,4.412,60,13.629,61,15.02,62,13.629,63,13.629,64,16.838]],["keywords/10",[]],["title/11",[65,505.211,66,427.451]],["content/11",[13,0.07,27,12.029,29,8.843,65,9.037,66,7.646,67,8.843,68,15.02,69,15.02,70,12.029,71,15.02,72,15.02,73,15.02,74,15.02]],["keywords/11",[]],["title/12",[75,280.784,76,405.392,77,256.523]],["content/12",[12,8.254,13,0.103,14,0.453,15,0.453,16,0.775,17,0.514,18,0.52,19,0.695,20,0.501,21,0.52,22,0.471,23,0.643,37,2.934,51,2.251,54,3.333,75,4.037,76,5.828,77,5.306,78,6.705,79,4.475,80,4.605,81,8.591,82,8.591,83,8.591,84,6.183,85,8.013,86,6.439,87,5.828,88,7.238,89,5.251,90,8.013]],["keywords/12",[]],["title/13",[91,557.357,92,597.525,93,438.154]],["content/13",[1,2.319,2,2.834,9,4.092,11,4.324,13,0.1,14,0.244,15,0.244,16,0.899,17,0.277,18,0.281,19,0.431,20,0.271,21,0.281,22,0.254,23,0.347,24,1.002,25,0.775,43,6.097,54,3.797,56,5.491,75,3.599,77,4.202,79,3.99,80,2.485,91,4.324,92,4.636,93,10.995,94,3.222,95,5.771,96,6.64,97,5.109,98,7.47,99,5.84,100,7.081,101,5.109,102,4.636,103,5.109,104,6.588,105,5.787,106,8.441,107,5.109,108,5.109,109,1.67,110,0.959,111,4.092,112,11.366,113,4.636,114,4.092,115,11.366,116,4.636,117,4.092,118,11.366,119,4.636,120,8.638,121,4.636,122,4.636,123,4.636,124,5.109,125,5.109,126,5.109]],["keywords/13",[]],["title/14",[44,205.854,75,280.784,127,557.357]],["content/14",[8,3.874,13,0.104,14,0.231,15,0.231,16,0.275,17,0.263,18,0.266,19,0.412,20,0.256,21,0.266,22,0.516,24,0.948,25,1.224,29,4.749,37,3.215,44,4.544,51,2.467,54,2.84,75,2.062,77,1.884,79,3.813,80,3.923,84,3.661,95,2.588,110,1.947,127,13.675,128,5.645,129,3.698,130,4.837,131,3.218,132,2.848,133,4.094,134,2.424,135,2.848,136,2.634,137,4.389,138,4.389,139,12.108,140,7.319,141,2.225,142,3.316,143,3.316,144,5.53,145,5.221,146,4.837,147,16.157,148,4.389,149,2.789,150,8.066,151,3.551,152,8.782,153,4.389,154,2.91,155,4.389,156,3.524,157,4.389,158,4.389,159,4.837,160,4.389,161,4.389,162,4.389,163,4.389]],["keywords/14",[]],["title/15",[3,139.175,164,616.469]],["content/15",[2,8.108,3,2.793,13,0.105,19,0.98,51,2.487,164,10.732,165,9.49,166,8.852,167,9.49,168,10.459,169,6.769,170,9.49,171,9.49,172,9.49,173,6.157,174,9.49,175,9.49,176,9.49,177,9.49]],["keywords/15",[]],["title/16",[75,280.784,77,256.523,178,557.357]],["content/16",[]],["keywords/16",[]],["title/17",[179,505.211,180,434.372]],["content/17",[13,0.103,14,0.417,15,0.417,16,0.496,17,0.473,18,0.479,19,0.655,20,0.462,21,0.479,22,0.757,23,0.592,51,2.074,52,4.243,54,5.36,77,3.398,79,4.123,80,4.243,84,3.96,99,5.983,110,1.637,149,5.03,151,6.404,180,4.513,181,5.646,182,5.249,183,10.278,184,7.383,185,6.986,186,6.986,187,7.383,188,6.986,189,6.986,190,5.37,191,6.404,192,6.404,193,4.372,194,5.646]],["keywords/17",[]],["title/18",[179,505.211,195,672.445]],["content/18",[13,0.104,14,0.123,15,0.123,16,0.265,17,0.252,18,0.141,19,0.237,20,0.136,21,0.141,22,0.128,23,0.175,44,0.804,51,0.611,54,0.905,77,1.002,79,1.215,80,1.25,149,1.482,182,1.547,190,1.583,193,1.289,194,1.664,195,2.059,196,4.219,197,18.263,198,2.333,199,18.263,200,18.263,201,2.333,202,2.333,203,2.333,204,2.333,205,2.333,206,2.333,207,2.333,208,2.333,209,2.333,210,2.333,211,2.333,212,2.333,213,2.333,214,2.333,215,2.333,216,2.333,217,2.333,218,2.333,219,2.333,220,2.333,221,2.333,222,2.333,223,2.333,224,2.333,225,2.333,226,2.333,227,2.333,228,2.333,229,2.333,230,2.333,231,2.333,232,2.333,233Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"version":"2.3.9","fields":["title","content","keywords"],"fieldVectors":[["title/0",[0,283.923,1,413.064,2,254.742]],["content/0",[0,4.042,1,5.88,2,5.218,3,0.164,4,0.471,5,0.471,6,0.808,7,7.85,8,6.542,9,0.537,10,0.543,11,0.712,12,0.525,13,0.543,14,0.495,15,0.664,16,4.294,17,4.466,18,3.292,19,8.641,20,8.641,21,8.641,22,6.102,23,2.205,24,7.633,25,6.427,26,5.748,27,7.289,28,2.987,29,5.117,30,7.633]],["keywords/0",[]],["title/1",[31,772.93,32,389.08]],["content/1",[]],["keywords/1",[]],["title/2",[33,652.722]],["content/2",[3,0.151,4,0.556,5,0.556,6,0.662,7,5.49,9,0.633,10,0.64,11,0.8,12,0.619,13,0.64,14,0.584,15,0.782,32,5.128,33,8.566,34,1.86,35,8.266,36,11.22,37,4.908,38,5.931,39,12.329,40,8.592,41,11.22,42,9.506,43,2.251,44,1.744,45,10.187]],["keywords/2",[]],["title/3",[46,992.579]],["content/3",[3,0.117,4,0.783,5,0.783,34,2.622,37,5.05,46,13.402,47,5.372,48,9.349,49,6.717,50,14.361]],["keywords/3",[]],["title/4",[51,1063.631]],["content/4",[3,0.117,4,0.783,5,0.783,34,2.622,37,5.05,47,5.372,48,9.349,52,15.818,53,15.818,54,14.361]],["keywords/4",[]],["title/5",[55,992.579]],["content/5",[3,0.119,4,0.796,5,0.796,28,5.044,34,2.664,37,5.131,55,13.616,56,13.616,57,14.591]],["keywords/5",[]],["title/6",[58,805.212]],["content/6",[3,0.115,4,0.771,5,0.771,28,4.887,32,7.117,34,2.581,59,15.572,60,13.194,61,8.373,62,4.887,63,14.138]],["keywords/6",[]],["title/7",[64,992.579]],["content/7",[3,0.117,4,0.783,5,0.783,28,4.964,34,2.622,37,5.05,64,13.402,65,14.361,66,8.981,67,14.361]],["keywords/7",[]],["title/8",[68,992.579]],["content/8",[23,3.977,34,2.846,37,5.482,66,9.749,68,14.548]],["keywords/8",[]],["title/9",[66,665.147]],["content/9",[3,0.119,4,0.796,5,0.796,28,5.044,34,2.664,37,5.131,66,9.125,69,7.752,70,14.591]],["keywords/9",[]],["title/10",[18,405.227]],["content/10",[3,0.112,4,0.748,5,0.748,18,5.224,34,2.503,37,4.822,47,6.338,69,7.286,71,15.104,72,7.087,73,12.113,74,13.713]],["keywords/10",[]],["title/11",[75,1063.631]],["content/11",[3,0.112,4,0.748,5,0.748,23,4.323,34,3.093,76,13.713,77,15.104,78,13.713,79,13.713,80,16.943]],["keywords/11",[]],["title/12",[81,566.475,82,607.025,83,446.138]],["content/12",[0,3.603,2,4.131,3,0.159,4,0.254,5,0.254,6,0.938,9,0.29,10,0.293,11,0.441,12,0.283,13,0.293,14,0.267,15,0.358,16,3.829,17,2.41,18,3.751,32,2.347,33,2.861,40,3.932,42,4.351,43,1.03,44,0.798,61,5.83,72,5.088,81,4.351,82,4.662,83,11.087,84,3.172,85,5.83,86,6.699,87,5.135,88,7.559,89,5.909,90,7.15,91,5.135,92,4.662,93,5.135,94,6.446,95,5.832,96,8.485,97,5.135,98,5.135,99,1.683,100,0.98,101,4.118,102,11.433,103,4.662,104,4.118,105,11.433,106,4.662,107,4.118,108,11.433,109,4.662,110,8.696,111,4.662,112,4.662,113,4.662,114,5.135,115,5.135,116,5.135]],["keywords/12",[]],["title/13",[0,283.923,2,254.742,117,566.475]],["content/13",[]],["keywords/13",[]],["title/14",[118,514.149,119,442.738]],["content/14",[2,3.341,3,0.165,4,0.434,5,0.434,6,0.518,9,0.495,10,0.501,11,0.671,12,0.484,13,0.501,14,0.796,15,0.611,16,3.957,17,4.115,18,5.295,22,3.907,23,2.031,69,4.23,89,6.055,100,1.674,119,4.56,120,5.693,121,5.296,122,10.348,123,7.43,124,7.033,125,7.033,126,7.43,127,7.033,128,7.033,129,5.418,130,5.078,131,6.451,132,6.451,133,6.451,134,4.291,135,5.693]],["keywords/14",[]],["title/15",[118,514.149,136,626.305]],["content/15",[2,0.984,3,0.166,4,0.128,5,0.128,6,0.276,9,0.264,10,0.147,11,0.243,12,0.143,13,0.147,14,0.134,15,0.18,16,1.166,17,1.212,18,0.894,23,0.598,62,0.811,121,1.56,129,1.596,130,1.496,134,1.264,135,1.677,136,1.901,137,4.242,138,18.376,139,2.346,140,18.376,141,18.376,142,2.346,143,2.346,144,2.346,145,2.346,146,2.346,147,2.346,148,2.346,149,2.346,150,2.346,151,2.346,152,2.346,153,2.346,154,2.346,155,2.346,156,2.346,157,2.346,158,2.346,159,2.346,160,2.346,161,2.346,162,2.346,163,2.346,164,2.346,165,2.346,166,2.346,167,2.346,168,2.346,169,2.346,170,2.346,171,2.346,172,2.346,173,2.346,174,2.346,175,2.346,176,2.346,177,2.346,178,2.346,179,2.346,180,2.346,181,2.346,182,2.346,183,2.346,184,2.346,185,2.346,186,2.346,187,2.346,188,2.346,189,2.346,190,2.346,191,2.346,192,2.346,193,2.346,194,2.346,195,2.346,196,2.346,197,2.346,198,2.346,199,2.346,200,2.346,201,2.346,202,2.346,203,2.346,204,2.346,205,2.346,206,2.346,207,2.346,208,2.346,209,2.346,210,2.346,211,2.346,212,2.346,213,2.346,214,2.346,215,2.346,216,2.346,217,2.346,218,2.346,219,2.346,220,2.346,221,2.346,222,2.346,223,2.346,224,2.346,225,2.346,226,2.346,227,2.346,228,2.346]],["keywords/15",[]],["title/16",[229,457.721,230,394.196]],["content/16",[]],["keywords/16",[]],["title/17",[231,897.136]],["content/17",[3,0.129,231,13.378,232,15.861,233,12.402]],["keywords/17",[]],["title/18",[234,831.642]],["content/18",[]],["keywords/18",[]],["title/19",[234,604.346,235,651.94]],["content/19",[3,0.125,11,0.878,229,9.077,230,7.817,234,11.984,235,12.928]],["keywords/19",[]],["title/20",[234,604.346,236,682.733]],["content/20",[0,6.613,3,0.115,11,0.989,229,10.223,230,8.804,236,12.488,237,10.703,238,8.842]],["keywords/20",[]],["title/21",[234,604.346,239,772.93]],["content/21",Line truncated
|
||||
{"version":"2.3.9","fields":["title","content","keywords"],"fieldVectors":[["title/0",[0,839.679,1,381.143]],["content/0",[]],["keywords/0",[]],["title/1",[2,642.466]],["content/1",[1,5.066,2,8.48,3,1.85,4,8.48,5,11.16,6,4.822,7,5.87,8,12.245,9,8.937,10,11.16,11,9.446,12,5.773,13,0.095,14,0.534,15,0.534,16,0.635,17,0.606,18,0.613,19,0.78,20,0.591,21,0.613,22,0.555,23,0.758,24,2.188,25,1.694,26,10.127]],["keywords/1",[]],["title/2",[27,927.67]],["content/2",[3,2.607,6,4.96,13,0.074,14,0.752,15,0.752,27,12.597,28,5.283,29,9.26,30,6.707,31,14.273]],["keywords/2",[]],["title/3",[32,1051.105]],["content/3",[3,2.607,6,4.96,13,0.074,14,0.752,15,0.752,28,5.283,29,9.26,33,15.73,34,15.73,35,14.273]],["keywords/3",[]],["title/4",[36,980.446]],["content/4",[3,2.649,6,5.04,13,0.075,14,0.764,15,0.764,36,13.527,37,4.953,38,13.527,39,14.501]],["keywords/4",[]],["title/5",[40,850.448]],["content/5",[1,7.029,3,2.567,13,0.072,14,0.741,15,0.741,37,4.799,41,15.486,42,13.107,43,8.754,44,4.841,45,14.052]],["keywords/5",[]],["title/6",[46,980.446]],["content/6",[3,2.607,6,4.96,13,0.074,14,0.752,15,0.752,37,4.875,46,13.314,47,15.73,48,8.724,49,14.273]],["keywords/6",[]],["title/7",[50,980.446]],["content/7",[3,2.83,6,5.384,48,9.47,50,14.452,51,4.059]],["keywords/7",[]],["title/8",[48,642.466]],["content/8",[3,2.649,6,5.04,13,0.075,14,0.764,15,0.764,37,4.953,48,8.864,52,7.773,53,14.501]],["keywords/8",[]],["title/9",[54,407.796]],["content/9",[3,2.49,6,4.737,13,0.07,14,0.718,15,0.718,28,6.232,52,7.305,54,5.288,55,15.02,56,7.646,57,12.029,58,13.629]],["keywords/9",[]],["title/10",[59,1051.105]],["content/10",[3,3.076,13,0.07,14,0.718,15,0.718,51,4.412,60,13.629,61,15.02,62,13.629,63,13.629,64,16.838]],["keywords/10",[]],["title/11",[65,505.211,66,427.451]],["content/11",[13,0.07,27,12.029,29,8.843,65,9.037,66,7.646,67,8.843,68,15.02,69,15.02,70,12.029,71,15.02,72,15.02,73,15.02,74,15.02]],["keywords/11",[]],["title/12",[75,280.784,76,405.392,77,256.523]],["content/12",[12,8.254,13,0.103,14,0.453,15,0.453,16,0.775,17,0.514,18,0.52,19,0.695,20,0.501,21,0.52,22,0.471,23,0.643,37,2.934,51,2.251,54,3.333,75,4.037,76,5.828,77,5.306,78,6.705,79,4.475,80,4.605,81,8.591,82,8.591,83,8.591,84,6.183,85,8.013,86,6.439,87,5.828,88,7.238,89,5.251,90,8.013]],["keywords/12",[]],["title/13",[91,557.357,92,597.525,93,438.154]],["content/13",[1,2.319,2,2.834,9,4.092,11,4.324,13,0.1,14,0.244,15,0.244,16,0.899,17,0.277,18,0.281,19,0.431,20,0.271,21,0.281,22,0.254,23,0.347,24,1.002,25,0.775,43,6.097,54,3.797,56,5.491,75,3.599,77,4.202,79,3.99,80,2.485,91,4.324,92,4.636,93,10.995,94,3.222,95,5.771,96,6.64,97,5.109,98,7.47,99,5.84,100,7.081,101,5.109,102,4.636,103,5.109,104,6.588,105,5.787,106,8.441,107,5.109,108,5.109,109,1.67,110,0.959,111,4.092,112,11.366,113,4.636,114,4.092,115,11.366,116,4.636,117,4.092,118,11.366,119,4.636,120,8.638,121,4.636,122,4.636,123,4.636,124,5.109,125,5.109,126,5.109]],["keywords/13",[]],["title/14",[44,205.854,75,280.784,127,557.357]],["content/14",[8,3.874,13,0.104,14,0.231,15,0.231,16,0.275,17,0.263,18,0.266,19,0.412,20,0.256,21,0.266,22,0.516,24,0.948,25,1.224,29,4.749,37,3.215,44,4.544,51,2.467,54,2.84,75,2.062,77,1.884,79,3.813,80,3.923,84,3.661,95,2.588,110,1.947,127,13.675,128,5.645,129,3.698,130,4.837,131,3.218,132,2.848,133,4.094,134,2.424,135,2.848,136,2.634,137,4.389,138,4.389,139,12.108,140,7.319,141,2.225,142,3.316,143,3.316,144,5.53,145,5.221,146,4.837,147,16.157,148,4.389,149,2.789,150,8.066,151,3.551,152,8.782,153,4.389,154,2.91,155,4.389,156,3.524,157,4.389,158,4.389,159,4.837,160,4.389,161,4.389,162,4.389,163,4.389]],["keywords/14",[]],["title/15",[3,139.175,164,616.469]],["content/15",[2,8.108,3,2.793,13,0.105,19,0.98,51,2.487,164,10.732,165,9.49,166,8.852,167,9.49,168,10.459,169,6.769,170,9.49,171,9.49,172,9.49,173,6.157,174,9.49,175,9.49,176,9.49,177,9.49]],["keywords/15",[]],["title/16",[75,280.784,77,256.523,178,557.357]],["content/16",[]],["keywords/16",[]],["title/17",[179,505.211,180,434.372]],["content/17",[13,0.103,14,0.417,15,0.417,16,0.496,17,0.473,18,0.479,19,0.655,20,0.462,21,0.479,22,0.757,23,0.592,51,2.074,52,4.243,54,5.36,77,3.398,79,4.123,80,4.243,84,3.96,99,5.983,110,1.637,149,5.03,151,6.404,180,4.513,181,5.646,182,5.249,183,10.278,184,7.383,185,6.986,186,6.986,187,7.383,188,6.986,189,6.986,190,5.37,191,6.404,192,6.404,193,4.372,194,5.646]],["keywords/17",[]],["title/18",[179,505.211,195,672.445]],["content/18",[13,0.104,14,0.123,15,0.123,16,0.265,17,0.252,18,0.141,19,0.237,20,0.136,21,0.141,22,0.128,23,0.175,44,0.804,51,0.611,54,0.905,77,1.002,79,1.215,80,1.25,149,1.482,182,1.547,190,1.583,193,1.289,194,1.664,195,2.059,196,4.219,197,18.263,198,2.333,199,18.263,200,18.263,201,2.333,202,2.333,203,2.333,204,2.333,205,2.333,206,2.333,207,2.333,208,2.333,209,2.333,210,2.333,211,2.333,212,2.333,213,2.333,214,2.333,215,2.333,216,2.333,217,2.333,218,2.333,219,2.333,220,2.333,221,2.333,222,2.333,223,2.333,224,2.333,225,2.333,226,2.333,227,2.333,228,2.333,229,2.333,230,2.333,231,2.333,232,2.333,233Line truncated
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Basic options | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/options"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Basic options | Artplayer.js"><meta data-rh="true" name="description" content="container"><meta data-rh="true" property="og:description" content="container"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/options"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/options" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/options" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">Common properties | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/propertie"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Common properties | Artplayer.js"><meta data-rh="true" name="description" content="play"><meta data-rh="true" property="og:description" content="play"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/propertie"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/propertie" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/propertie" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/">Quick start</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
[{"title":"Add button to the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_button_in_the_controls","content":"Add button to the controls ▶ Run Code var time = 0; var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: '<button type="button">Click Me!</button>', click: function (_, event) { // The second parameter is an event object time += 1; event.target.innerText = 'You Click ' + time; }, }, ], }); ","keywords":""},{"title":"Static propertys","type":0,"sectionRef":"#","url":"class","content":"","keywords":""},{"title":"instances","type":1,"pageTitle":"Static propertys","url":"class#instances","content":"Type: Array A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', }); art.on('ready', () => { console.info(Artplayer.instances); }); "},{"title":"version","type":1,"pageTitle":"Static propertys","url":"class#version","content":"Type: String Current player version number ▶ Run Code console.info(Artplayer.version); "},{"title":"env","type":1,"pageTitle":"Static propertys","url":"class#env","content":"Type: String Current player environment variable ▶ Run Code console.info(Artplayer.env); "},{"title":"utils","type":1,"pageTitle":"Static propertys","url":"class#utils","content":"Type: Object Common utils for player ▶ Run Code console.info(Artplayer.utils); "},{"title":"config","type":1,"pageTitle":"Static propertys","url":"class#config","content":"Type: Object Store native properties and methods of video ▶ Run Code console.info(Artplayer.config); "},{"title":"scheme","type":1,"pageTitle":"Static propertys","url":"class#scheme","content":"Type: Object Verification scheme for player option ▶ Run Code console.info(Artplayer.scheme); "},{"title":"validator","type":1,"pageTitle":"Static propertys","url":"class#validator","content":"Type: Function Validator for player option "},{"title":"option","type":1,"pageTitle":"Static propertys","url":"class#option","content":"Type: Object Player default option ▶ Run Code console.info(Artplayer.option); "},{"title":"html","type":1,"pageTitle":"Static propertys","url":"class#html","content":"Type: String Player defaults HTML String, usually used for SSR ▶ Run Code console.info(Artplayer.html); "},{"title":"kindOf","type":1,"pageTitle":"Static propertys","url":"class#kindof","content":"Type: Function JS type identification function ▶ Run Code console.info(Artplayer.kindOf('0')); console.info(Artplayer.kindOf(0)); console.info(Artplayer.kindOf({})); console.info(Artplayer.kindOf([])); "},{"title":"Handle a single component","type":0,"sectionRef":"#","url":"en/Questions/Handle_single_component","content":"Handle a single component When we add custom components in layers, contextmenu, controls, It is best to add a name property that is used to position the DOM element of the component. Here are three ways to get the DOM element of the component: component method mounted, instance method query, recommended through name direct acquisition. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', setting: true, }); art.on('ready', () => { art.layers.add({ name: 'layer1', html: 'your-layer', mounted: function($layer1) { // } }); art.contextmenu.add({ name: 'contextmenu1', html: 'your-contextmenu', mounted: function($contextmenu1) { // } }); art.controls.add({ name: 'control1', html: 'your-control', position: 'right', mounted: function($control1) { // } }); // Use the query method to get the DOM element of the component var $layer1 = art.query('.art-layer-layer1'); var $contextmenu1 = art.query('.art-contextmenu-contextmenu1'); var $control1 = art.query('.art-control-control1'); // Recommended use the name to get the DOM element of the component var $layer1 = art.layers['layer1']; var $contextmenu1 = art.contextmenu['contextmenu1']; var $control1 = art.controls['control1']; }); 提示 Note that you can't create components with the same name","keywords":""},{"title":"Add select in the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_selector_in_the_controls","content":"","keywords":""},{"title":"Switch Subtitle","type":1,"pageTitle":"Add select in the controls","url":"en/Questions/Create_selector_in_the_controls#switch-subtitle","content":"▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: 'Subtitle 01', selector: [ { default: true, html: '<span style="color:red">Subtitle 01</span>', url: '/assets/sample/subtitle.srt?id=1', }, { html: '<span style="color:yellow">Subtitle 02</span>', url: '/assets/sample/subtitle.srt?id=2', }, ], onSelect: fLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
[{"title":"Static propertys","type":0,"sectionRef":"#","url":"class","content":"","keywords":""},{"title":"instances","type":1,"pageTitle":"Static propertys","url":"class#instances","content":"Type: Array A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', }); art.on('ready', () => { console.info(Artplayer.instances); }); "},{"title":"version","type":1,"pageTitle":"Static propertys","url":"class#version","content":"Type: String Current player version number ▶ Run Code console.info(Artplayer.version); "},{"title":"env","type":1,"pageTitle":"Static propertys","url":"class#env","content":"Type: String Current player environment variable ▶ Run Code console.info(Artplayer.env); "},{"title":"utils","type":1,"pageTitle":"Static propertys","url":"class#utils","content":"Type: Object Common utils for player ▶ Run Code console.info(Artplayer.utils); "},{"title":"config","type":1,"pageTitle":"Static propertys","url":"class#config","content":"Type: Object Store native properties and methods of video ▶ Run Code console.info(Artplayer.config); "},{"title":"scheme","type":1,"pageTitle":"Static propertys","url":"class#scheme","content":"Type: Object Verification scheme for player option ▶ Run Code console.info(Artplayer.scheme); "},{"title":"validator","type":1,"pageTitle":"Static propertys","url":"class#validator","content":"Type: Function Validator for player option "},{"title":"option","type":1,"pageTitle":"Static propertys","url":"class#option","content":"Type: Object Player default option ▶ Run Code console.info(Artplayer.option); "},{"title":"html","type":1,"pageTitle":"Static propertys","url":"class#html","content":"Type: String Player defaults HTML String, usually used for SSR ▶ Run Code console.info(Artplayer.html); "},{"title":"kindOf","type":1,"pageTitle":"Static propertys","url":"class#kindof","content":"Type: Function JS type identification function ▶ Run Code console.info(Artplayer.kindOf('0')); console.info(Artplayer.kindOf(0)); console.info(Artplayer.kindOf({})); console.info(Artplayer.kindOf([])); "},{"title":"Danmuku plugin","type":0,"sectionRef":"#","url":"en/Plugins/danmuku","content":"Danmuku plugin Tip The documentation of the current danmaku library plug-in, only the Chinese version 👉 https://artplayer.org/document/zh-cn/Plugins/danmuku/","keywords":""},{"title":"Add button to the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_button_in_the_controls","content":"Add button to the controls ▶ Run Code var time = 0; var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: '<button type="button">Click Me!</button>', click: function (_, event) { // The second parameter is an event object time += 1; event.target.innerText = 'You Click ' + time; }, }, ], }); ","keywords":""},{"title":"Handle a single component","type":0,"sectionRef":"#","url":"en/Questions/Handle_single_component","content":"Handle a single component When we add custom components in layers, contextmenu, controls, It is best to add a name property that is used to position the DOM element of the component. Here are three ways to get the DOM element of the component: component method mounted, instance method query, recommended through name direct acquisition. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', setting: true, }); art.on('ready', () => { art.layers.add({ name: 'layer1', html: 'your-layer', mounted: function($layer1) { // } }); art.contextmenu.add({ name: 'contextmenu1', html: 'your-contextmenu', mounted: function($contextmenu1) { // } }); art.controls.add({ name: 'control1', html: 'your-control', position: 'right', mounted: function($control1) { // } }); // Use the query method to get the DOM element of the component var $layer1 = art.query('.art-layer-layer1'); var $contextmenu1 = art.query('.art-contextmenu-contextmenu1'); var $control1 = art.query('.art-control-control1'); // Recommended use the name to get the DOM element of the component var $layer1 = art.layers['layer1']; var $contextmenu1 = art.contextmenu['contextmenu1']; var $control1 = art.controls['control1']; }); 提示 Note that you can't create components with the same name","keywords":""},{"title":"How to add video ads","type":0,"sectionRef":"#","url":"en/Questions/How_to_add_video_ads","content":"How to add video ads Video ads play before main video playback, support multiple video ads ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: 'https://artplayer.org/assets/sample/video.mp4', muted: true, autoSize: true, autoplay: true, ads: [ { url: '/assets/sample/test1.mp4' }, { url: '/assets/sample/test2.webm' }, ], controls: [ { position:Line truncated
|
||||
@@ -1 +1 @@
|
||||
[{"title":"Add button to the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_button_in_the_controls","content":"Add button to the controls ▶ Run Code var time = 0; var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: '<button type="button">Click Me!</button>', click: function (_, event) { // The second parameter is an event object time += 1; event.target.innerText = 'You Click ' + time; }, }, ], }); ","keywords":""},{"title":"Static propertys","type":0,"sectionRef":"#","url":"class","content":"","keywords":""},{"title":"instances","type":1,"pageTitle":"Static propertys","url":"class#instances","content":"Type: Array A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', }); art.on('ready', () => { console.info(Artplayer.instances); }); "},{"title":"version","type":1,"pageTitle":"Static propertys","url":"class#version","content":"Type: String Current player version number ▶ Run Code console.info(Artplayer.version); "},{"title":"env","type":1,"pageTitle":"Static propertys","url":"class#env","content":"Type: String Current player environment variable ▶ Run Code console.info(Artplayer.env); "},{"title":"utils","type":1,"pageTitle":"Static propertys","url":"class#utils","content":"Type: Object Common utils for player ▶ Run Code console.info(Artplayer.utils); "},{"title":"config","type":1,"pageTitle":"Static propertys","url":"class#config","content":"Type: Object Store native properties and methods of video ▶ Run Code console.info(Artplayer.config); "},{"title":"scheme","type":1,"pageTitle":"Static propertys","url":"class#scheme","content":"Type: Object Verification scheme for player option ▶ Run Code console.info(Artplayer.scheme); "},{"title":"validator","type":1,"pageTitle":"Static propertys","url":"class#validator","content":"Type: Function Validator for player option "},{"title":"option","type":1,"pageTitle":"Static propertys","url":"class#option","content":"Type: Object Player default option ▶ Run Code console.info(Artplayer.option); "},{"title":"html","type":1,"pageTitle":"Static propertys","url":"class#html","content":"Type: String Player defaults HTML String, usually used for SSR ▶ Run Code console.info(Artplayer.html); "},{"title":"kindOf","type":1,"pageTitle":"Static propertys","url":"class#kindof","content":"Type: Function JS type identification function ▶ Run Code console.info(Artplayer.kindOf('0')); console.info(Artplayer.kindOf(0)); console.info(Artplayer.kindOf({})); console.info(Artplayer.kindOf([])); "},{"title":"Handle a single component","type":0,"sectionRef":"#","url":"en/Questions/Handle_single_component","content":"Handle a single component When we add custom components in layers, contextmenu, controls, It is best to add a name property that is used to position the DOM element of the component. Here are three ways to get the DOM element of the component: component method mounted, instance method query, recommended through name direct acquisition. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', setting: true, }); art.on('ready', () => { art.layers.add({ name: 'layer1', html: 'your-layer', mounted: function($layer1) { // } }); art.contextmenu.add({ name: 'contextmenu1', html: 'your-contextmenu', mounted: function($contextmenu1) { // } }); art.controls.add({ name: 'control1', html: 'your-control', position: 'right', mounted: function($control1) { // } }); // Use the query method to get the DOM element of the component var $layer1 = art.query('.art-layer-layer1'); var $contextmenu1 = art.query('.art-contextmenu-contextmenu1'); var $control1 = art.query('.art-control-control1'); // Recommended use the name to get the DOM element of the component var $layer1 = art.layers['layer1']; var $contextmenu1 = art.contextmenu['contextmenu1']; var $control1 = art.controls['control1']; }); 提示 Note that you can't create components with the same name","keywords":""},{"title":"Add select in the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_selector_in_the_controls","content":"","keywords":""},{"title":"Switch Subtitle","type":1,"pageTitle":"Add select in the controls","url":"en/Questions/Create_selector_in_the_controls#switch-subtitle","content":"▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: 'Subtitle 01', selector: [ { default: true, html: '<span style="color:red">Subtitle 01</span>', url: '/assets/sample/subtitle.srt?id=1', }, { html: '<span style="color:yellow">Subtitle 02</span>', url: '/assets/sample/subtitle.srt?id=2', }, ], onSelect: fLine truncated
|
||||
[{"title":"Static propertys","type":0,"sectionRef":"#","url":"class","content":"","keywords":""},{"title":"instances","type":1,"pageTitle":"Static propertys","url":"class#instances","content":"Type: Array A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', }); art.on('ready', () => { console.info(Artplayer.instances); }); "},{"title":"version","type":1,"pageTitle":"Static propertys","url":"class#version","content":"Type: String Current player version number ▶ Run Code console.info(Artplayer.version); "},{"title":"env","type":1,"pageTitle":"Static propertys","url":"class#env","content":"Type: String Current player environment variable ▶ Run Code console.info(Artplayer.env); "},{"title":"utils","type":1,"pageTitle":"Static propertys","url":"class#utils","content":"Type: Object Common utils for player ▶ Run Code console.info(Artplayer.utils); "},{"title":"config","type":1,"pageTitle":"Static propertys","url":"class#config","content":"Type: Object Store native properties and methods of video ▶ Run Code console.info(Artplayer.config); "},{"title":"scheme","type":1,"pageTitle":"Static propertys","url":"class#scheme","content":"Type: Object Verification scheme for player option ▶ Run Code console.info(Artplayer.scheme); "},{"title":"validator","type":1,"pageTitle":"Static propertys","url":"class#validator","content":"Type: Function Validator for player option "},{"title":"option","type":1,"pageTitle":"Static propertys","url":"class#option","content":"Type: Object Player default option ▶ Run Code console.info(Artplayer.option); "},{"title":"html","type":1,"pageTitle":"Static propertys","url":"class#html","content":"Type: String Player defaults HTML String, usually used for SSR ▶ Run Code console.info(Artplayer.html); "},{"title":"kindOf","type":1,"pageTitle":"Static propertys","url":"class#kindof","content":"Type: Function JS type identification function ▶ Run Code console.info(Artplayer.kindOf('0')); console.info(Artplayer.kindOf(0)); console.info(Artplayer.kindOf({})); console.info(Artplayer.kindOf([])); "},{"title":"Danmuku plugin","type":0,"sectionRef":"#","url":"en/Plugins/danmuku","content":"Danmuku plugin Tip The documentation of the current danmaku library plug-in, only the Chinese version 👉 https://artplayer.org/document/zh-cn/Plugins/danmuku/","keywords":""},{"title":"Add button to the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_button_in_the_controls","content":"Add button to the controls ▶ Run Code var time = 0; var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: '<button type="button">Click Me!</button>', click: function (_, event) { // The second parameter is an event object time += 1; event.target.innerText = 'You Click ' + time; }, }, ], }); ","keywords":""},{"title":"Handle a single component","type":0,"sectionRef":"#","url":"en/Questions/Handle_single_component","content":"Handle a single component When we add custom components in layers, contextmenu, controls, It is best to add a name property that is used to position the DOM element of the component. Here are three ways to get the DOM element of the component: component method mounted, instance method query, recommended through name direct acquisition. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', setting: true, }); art.on('ready', () => { art.layers.add({ name: 'layer1', html: 'your-layer', mounted: function($layer1) { // } }); art.contextmenu.add({ name: 'contextmenu1', html: 'your-contextmenu', mounted: function($contextmenu1) { // } }); art.controls.add({ name: 'control1', html: 'your-control', position: 'right', mounted: function($control1) { // } }); // Use the query method to get the DOM element of the component var $layer1 = art.query('.art-layer-layer1'); var $contextmenu1 = art.query('.art-contextmenu-contextmenu1'); var $control1 = art.query('.art-control-control1'); // Recommended use the name to get the DOM element of the component var $layer1 = art.layers['layer1']; var $contextmenu1 = art.contextmenu['contextmenu1']; var $control1 = art.controls['control1']; }); 提示 Note that you can't create components with the same name","keywords":""},{"title":"How to add video ads","type":0,"sectionRef":"#","url":"en/Questions/How_to_add_video_ads","content":"How to add video ads Video ads play before main video playback, support multiple video ads ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: 'https://artplayer.org/assets/sample/video.mp4', muted: true, autoSize: true, autoplay: true, ads: [ { url: '/assets/sample/test1.mp4' }, { url: '/assets/sample/test2.webm' }, ], controls: [ { position:Line truncated
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">弹幕库插件 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Plugins/danmuku"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="弹幕库插件 | Artplayer.js"><meta data-rh="true" name="description" content="演示"><meta data-rh="true" property="og:description" content="演示"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Plugins/danmuku"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Plugins/danmuku" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Plugins/danmuku" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">在控制栏添加按钮 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/Create_button_in_the_controls"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="在控制栏添加按钮 | Artplayer.js"><meta data-rh="true" name="description" content="有时你需要在控制栏添加按钮,如开关按钮或者单选按钮等等,你甚至可以使用第三方的样式库如 bootstrap"><meta data-rh="true" property="og:description" content="有时你需要在控制栏添加按钮,如开关按钮或者单选按钮等等,你甚至可以使用第三方的样式库如 bootstrap"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/Create_button_in_the_controls"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Create_button_in_the_controls" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Create_button_in_the_controls" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">在控制栏添加列表 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/Create_selector_in_the_controls"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="在控制栏添加列表 | Artplayer.js"><meta data-rh="true" name="description" content="有时你需要在控制栏添加列表,那么你可以在添加控件的时候使用 selector 和 onSelect 属性"><meta data-rh="true" property="og:description" content="有时你需要在控制栏添加列表,那么你可以在添加控件的时候使用 selector 和 onSelect 属性"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/Create_selector_in_the_controls"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Create_selector_in_the_controls" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Create_selector_in_the_controls" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">处理单个组件 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/Handle_single_component"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="处理单个组件 | Artplayer.js"><meta data-rh="true" name="description" content="当我们在layers、contextmenu、controls里添加自定义组件时,最好带上一个唯一的 name 属性,该属性不但会作为类名添加到 dom 元素里,还可以用于快速定位到组件。"><meta data-rh="true" property="og:description" content="当我们在layers、contextmenu、controls里添加自定义组件时,最好带上一个唯一的 name 属性,该属性不但会作为类名添加到 dom 元素里,还可以用于快速定位到组件。"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/Handle_single_component"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Handle_single_component" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Handle_single_component" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">怎么添加设置面板 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/How_to_add_setting_panel"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="怎么添加设置面板 | Artplayer.js"><meta data-rh="true" name="description" content="添加选择列表"><meta data-rh="true" property="og:description" content="添加选择列表"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/How_to_add_setting_panel"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/How_to_add_setting_panel" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/How_to_add_setting_panel" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">如何添加视频广告 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/How_to_add_video_ads"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="如何添加视频广告 | Artplayer.js"><meta data-rh="true" name="description" content="视频广告存在于正式视频播放之前,支持多个视频广告"><meta data-rh="true" property="og:description" content="视频广告存在于正式视频播放之前,支持多个视频广告"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/How_to_add_video_ads"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/How_to_add_video_ads" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/How_to_add_video_ads" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">如何导入类型 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/How_to_import_types"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="如何导入类型 | Artplayer.js"><meta data-rh="true" name="description" content="有时你会丢失 TypeScript 的语法提示,这时候你可以手动导入类型"><meta data-rh="true" property="og:description" content="有时你会丢失 TypeScript 的语法提示,这时候你可以手动导入类型"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/How_to_import_types"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/How_to_import_types" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/How_to_import_types" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">与 React Portal 使用 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/Questions/Use_with_react_portal"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="与 React Portal 使用 | Artplayer.js"><meta data-rh="true" name="description" content="在 layers、contextmenu、controls 里使用 react 组件也是非常容易的事,通过 createPortal 处理更复杂的业务逻辑"><meta data-rh="true" property="og:description" content="在 layers、contextmenu、controls 里使用 react 组件也是非常容易的事,通过 createPortal 处理更复杂的业务逻辑"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/Questions/Use_with_react_portal"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Use_with_react_portal" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/Questions/Use_with_react_portal" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">高级属性 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/advance"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="高级属性 | Artplayer.js"><meta data-rh="true" name="description" content="这页面是对常用属性的一些额外补充,需要深入开发自定义功能时才需要阅读"><meta data-rh="true" property="og:description" content="这页面是对常用属性的一些额外补充,需要深入开发自定义功能时才需要阅读"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/advance"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/advance" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/advance" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">静态属性 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/class"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="静态属性 | Artplayer.js"><meta data-rh="true" name="description" content="静态属性存在于构造函数 Artplayer 上,和播放器实例没有直接关联"><meta data-rh="true" property="og:description" content="静态属性存在于构造函数 Artplayer 上,和播放器实例没有直接关联"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/class"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/class" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/class" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">实例事件 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/events"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="实例事件 | Artplayer.js"><meta data-rh="true" name="description" content="播放器的事件分为两种,一种视频的原生事件,另外一种是自定义的事件。原生事件来自 video 元素,是直接监听video元素的原始事件,为了让它和自定义事件区分,原生事件添加了前缀 video:"><meta data-rh="true" property="og:description" content="播放器的事件分为两种,一种视频的原生事件,另外一种是自定义的事件。原生事件来自 video 元素,是直接监听video元素的原始事件,为了让它和自定义事件区分,原生事件添加了前缀 video:"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/events"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/events" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/events" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">快速上手 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="快速上手 | Artplayer.js"><meta data-rh="true" name="description" content="安装"><meta data-rh="true" property="og:description" content="安装"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/document/zh-cn">快速上手</a></li><li classLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">第三方库 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/libraries"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="第三方库 | Artplayer.js"><meta data-rh="true" name="description" content="flv.js"><meta data-rh="true" property="og:description" content="flv.js"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/libraries"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/libraries" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/libraries" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">基础参数 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/options"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="基础参数 | Artplayer.js"><meta data-rh="true" name="description" content="container"><meta data-rh="true" property="og:description" content="container"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/options"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/options" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/options" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||||
<title data-rh="true">常用属性 | Artplayer.js</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://artplayer.org/document/zh-cn/propertie"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="常用属性 | Artplayer.js"><meta data-rh="true" name="description" content="play"><meta data-rh="true" property="og:description" content="play"><link data-rh="true" rel="icon" href="/document/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://artplayer.org/document/zh-cn/propertie"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/propertie" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/zh-cn/propertie" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.64d8ea30.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a5b2f92c.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.222c91cd.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.9ce4b94b.js" as="script">
|
||||
</head>
|
||||
<body class="navigation-with-keyboard">
|
||||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||||
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://artplayer.org/document" target="_self" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--light_TfLj" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_W2Cr themedImage--dark_oUvU" height="28" width="28"></div><b class="navbar__title text--truncate">Artplayer.js</b></a><a href="https://artplayer.org" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Online Editor<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://github.com/zhw2590582/ArtPlayer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Github<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a href="#" class="navbar__item navbar__link">QQ群: 320881312</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">English</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/document/">English</a></li><li><a class="dropdown__link" href="/document/zh-cn/">中文</a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_dLyj"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/document/zh-cn">快速上手</a></li><li class="theme-doc-sidebar-item-link theme-docLine truncated
|
||||
<script src="/document/assets/js/runtime~main.64d8ea30.js"></script>
|
||||
<script src="/document/assets/js/main.a5b2f92c.js"></script>
|
||||
<script src="/document/assets/js/runtime~main.222c91cd.js"></script>
|
||||
<script src="/document/assets/js/main.9ce4b94b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+1
-16
@@ -28,10 +28,6 @@
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.tip {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -70,6 +66,7 @@
|
||||
'x5-video-player-type': 'h5',
|
||||
'x5-video-player-fullscreen': false,
|
||||
'x5-video-orientation': 'portraint',
|
||||
preload: "metadata"
|
||||
},
|
||||
subtitle: {
|
||||
url: '/assets/sample/subtitle.srt',
|
||||
@@ -165,18 +162,6 @@
|
||||
console.log('video: ' + event.type);
|
||||
});
|
||||
});
|
||||
|
||||
if (Artplayer.utils.isWechat) {
|
||||
document.querySelector('.tip').textContent = '微信环境需手动触发播放';
|
||||
let isClick = false;
|
||||
document.body.addEventListener('click', () => {
|
||||
if (!isClick) {
|
||||
isClick = true;
|
||||
art.play();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
if(!self.define){let s,a={};const e=(e,i)=>(e=new URL(e+".js",i).href,a[e]||new Promise((a=>{if("document"in self){const s=document.createElement("script");s.src=e,s.onload=a,document.head.appendChild(s)}else s=e,importScripts(e),a()})).then((()=>{let s=a[e];if(!s)throw new Error(`Module ${e} didn’t register its module`);return s})));self.define=(i,b)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(a[l])return;let c={};const r=s=>e(s,l),n={module:{uri:l},exports:c,require:r};a[l]=Promise.all(i.map((s=>n[s]||r(s)))).then((s=>(b(...s),c)))}}define(["./workbox-7d6a3f4d"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/css/normalize.css",revision:"be7f3425b44480dcf3aab3408f632f37"},{url:"assets/css/style.css",revision:"20e47e262edc736a2328052a6452a9bc"},{url:"assets/example/danmuku.js",revision:"9bda91a528acd642408f36b537093d76"},{url:"assets/example/index.js",revision:"a201932ec85dcd9d1aebca393b26f9b5"},{url:"assets/example/thumbnail.js",revision:"ed1119d0517accdea6b88aa08cd4fc27"},{url:"assets/img/danmu-off.svg",revision:"a1483de76b68dd12a2fdf2c3734537ea"},{url:"assets/img/danmu-on.svg",revision:"1b846589a581e9d2ed720973d00a8a38"},{url:"assets/img/indicator.svg",revision:"696037ccd6fb7db7c68d82d2c69e7e6c"},{url:"assets/img/logo.png",revision:"113f758a35e9c71b8d9c41240da8233b"},{url:"assets/img/state.svg",revision:"2e9bac37536c46c09a38e74a480b56c6"},{url:"assets/img/subtitle.svg",revision:"9a231c6167f7a8b168b5f19cc892b170"},{url:"assets/js/common.js",revision:"4875691f7a403d391c1b9fcdb874aa06"},{url:"assets/js/console.js",revision:"4e9a2c80679b6bbf78a4809a4a90f64a"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus-worker.js",revision:"cef7e5f6ef27a8e01d7c1bcb78cbbe4d"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus.js",revision:"a02d9bcf0639259b92b1c8ddfc45b994"},{url:"assets/js/polyfill/core.js",revision:"1d2194332562ff4194b431f2bad8ad68"},{url:"assets/js/polyfill/encoding-indexes.js",revision:"50f27403be5972eae4831f5b69db1f80"},{url:"assets/js/polyfill/encoding.js",revision:"022884ab2a5bd42b6f4fff580fa0dd34"},{url:"assets/js/polyfill/fetch.polyfill.js",revision:"f625f62b3249b03ef6d9aef1aa375342"},{url:"assets/js/vconsole.min.js",revision:"bac6b63f324b1279662529339227cba2"},{url:"assets/js/vs/base/worker/workerMain.js",revision:"ff1e00116d48f10b29a7f4f0deac2cd3"},{url:"assets/js/vs/basic-languages/abap/abap.js",revision:"0d31790a1a820013ebfceaaea520086e"},{url:"assets/js/vs/basic-languages/apex/apex.js",revision:"7ed571a41e7a0f49e3813733ee9668ab"},{url:"assets/js/vs/basic-languages/azcli/azcli.js",revision:"2c95f109efa42b39efd112e1ca3f6156"},{url:"assets/js/vs/basic-languages/bat/bat.js",revision:"3a19616507d8d1f534c6155dd45075b7"},{url:"assets/js/vs/basic-languages/bicep/bicep.js",revision:"a454b074c4897916902a31bc7488c7c6"},{url:"assets/js/vs/basic-languages/cameligo/cameligo.js",revision:"714bc3d62760814c66d2722403956093"},{url:"assets/js/vs/basic-languages/clojure/clojure.js",revision:"bc3dfd6ec24e73dd26c7acb5fdf0026e"},{url:"assets/js/vs/basic-languages/coffee/coffee.js",revision:"72268e931cec85bc41f6677416e86cbd"},{url:"assets/js/vs/basic-languages/cpp/cpp.js",revision:"400136ec6edf93a21103ab54fe244b44"},{url:"assets/js/vs/basic-languages/csharp/csharp.js",revision:"60763afe31e9a27b3e11f31ca07222d0"},{url:"assets/js/vs/basic-languages/csp/csp.js",revision:"7c7a0ecfa43e63dea1c5c3b90e3669ee"},{url:"assets/js/vs/basic-languages/css/css.js",revision:"6ee9d8b753ab02e86d2fef1cd6839bae"},{url:"assets/js/vs/basic-languages/dart/dart.js",revision:"994c907e6e2fca9831c70fb220a8dfe7"},{url:"assets/js/vs/basic-languages/dockerfile/dockerfile.js",revision:"886100cd736f23bfcdf61029439ebb91"},{url:"assets/js/vs/basic-languages/ecl/ecl.js",revision:"59c4e667668ebbb528ba64fd2b76411c"},{url:"assets/js/vs/basic-languages/elixir/elixir.js",revision:"9adf3da05ba73c8728db04aa24479830"},{url:"assets/js/vs/basic-languages/flow9/flow9.js",revision:"07f962e581808968eaf81b4757ba427d"},{url:"assets/js/vs/basic-languages/fsharp/fsharp.js",revision:"4a059944d9de46a22b1e7f3b636beb98"},{url:"assets/js/vs/basic-languages/go/go.js",revision:"1e78e6e22eca1bf5ad47108dead26490"},{url:"assets/js/vs/basic-languages/graphql/graphql.js",revision:"33366aac3f03b0c919818dff9e228bad"},{url:"assets/js/vs/basic-languages/handlebars/handlebars.js",revision:"9a05aa526495f0a1e241f3ac142e91a9"},{url:"assets/js/vs/basic-languages/hcl/hcl.js",revision:"710a5636d53b53e1290873211ddb6a9e"},{url:"assets/js/vs/basic-languages/html/html.js",revision:"2b130bc85c8c8646e5bea546d14a0b41"},{url:"assets/js/vs/basic-languages/ini/ini.js",revision:"2c52fccc7378467c65c40d246cbd05a4"},{url:"assets/js/vs/basic-languages/java/java.js",revision:"b6bd764730176bec564b8ed428790b5b"},{url:"assets/js/vs/basic-languages/javascript/javascript.js",revision:"a2e9534e6798dec260a05c3af6995ab6"},{url:"assets/js/vs/basicLine truncated
|
||||
if(!self.define){let s,a={};const e=(e,i)=>(e=new URL(e+".js",i).href,a[e]||new Promise((a=>{if("document"in self){const s=document.createElement("script");s.src=e,s.onload=a,document.head.appendChild(s)}else s=e,importScripts(e),a()})).then((()=>{let s=a[e];if(!s)throw new Error(`Module ${e} didn’t register its module`);return s})));self.define=(i,b)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(a[l])return;let c={};const r=s=>e(s,l),n={module:{uri:l},exports:c,require:r};a[l]=Promise.all(i.map((s=>n[s]||r(s)))).then((s=>(b(...s),c)))}}define(["./workbox-7d6a3f4d"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/css/normalize.css",revision:"be7f3425b44480dcf3aab3408f632f37"},{url:"assets/css/style.css",revision:"20e47e262edc736a2328052a6452a9bc"},{url:"assets/example/danmuku.js",revision:"d16edf04e1ef87914559a0ff0ea2c661"},{url:"assets/example/index.js",revision:"a201932ec85dcd9d1aebca393b26f9b5"},{url:"assets/example/thumbnail.js",revision:"ed1119d0517accdea6b88aa08cd4fc27"},{url:"assets/img/danmu-off.svg",revision:"a1483de76b68dd12a2fdf2c3734537ea"},{url:"assets/img/danmu-on.svg",revision:"1b846589a581e9d2ed720973d00a8a38"},{url:"assets/img/indicator.svg",revision:"696037ccd6fb7db7c68d82d2c69e7e6c"},{url:"assets/img/logo.png",revision:"113f758a35e9c71b8d9c41240da8233b"},{url:"assets/img/state.svg",revision:"2e9bac37536c46c09a38e74a480b56c6"},{url:"assets/img/subtitle.svg",revision:"9a231c6167f7a8b168b5f19cc892b170"},{url:"assets/js/common.js",revision:"4875691f7a403d391c1b9fcdb874aa06"},{url:"assets/js/console.js",revision:"4e9a2c80679b6bbf78a4809a4a90f64a"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus-worker.js",revision:"cef7e5f6ef27a8e01d7c1bcb78cbbe4d"},{url:"assets/js/JavascriptSubtitlesOctopus/subtitles-octopus.js",revision:"a02d9bcf0639259b92b1c8ddfc45b994"},{url:"assets/js/polyfill/core.js",revision:"1d2194332562ff4194b431f2bad8ad68"},{url:"assets/js/polyfill/encoding-indexes.js",revision:"50f27403be5972eae4831f5b69db1f80"},{url:"assets/js/polyfill/encoding.js",revision:"022884ab2a5bd42b6f4fff580fa0dd34"},{url:"assets/js/polyfill/fetch.polyfill.js",revision:"f625f62b3249b03ef6d9aef1aa375342"},{url:"assets/js/vconsole.min.js",revision:"bac6b63f324b1279662529339227cba2"},{url:"assets/js/vs/base/worker/workerMain.js",revision:"ff1e00116d48f10b29a7f4f0deac2cd3"},{url:"assets/js/vs/basic-languages/abap/abap.js",revision:"0d31790a1a820013ebfceaaea520086e"},{url:"assets/js/vs/basic-languages/apex/apex.js",revision:"7ed571a41e7a0f49e3813733ee9668ab"},{url:"assets/js/vs/basic-languages/azcli/azcli.js",revision:"2c95f109efa42b39efd112e1ca3f6156"},{url:"assets/js/vs/basic-languages/bat/bat.js",revision:"3a19616507d8d1f534c6155dd45075b7"},{url:"assets/js/vs/basic-languages/bicep/bicep.js",revision:"a454b074c4897916902a31bc7488c7c6"},{url:"assets/js/vs/basic-languages/cameligo/cameligo.js",revision:"714bc3d62760814c66d2722403956093"},{url:"assets/js/vs/basic-languages/clojure/clojure.js",revision:"bc3dfd6ec24e73dd26c7acb5fdf0026e"},{url:"assets/js/vs/basic-languages/coffee/coffee.js",revision:"72268e931cec85bc41f6677416e86cbd"},{url:"assets/js/vs/basic-languages/cpp/cpp.js",revision:"400136ec6edf93a21103ab54fe244b44"},{url:"assets/js/vs/basic-languages/csharp/csharp.js",revision:"60763afe31e9a27b3e11f31ca07222d0"},{url:"assets/js/vs/basic-languages/csp/csp.js",revision:"7c7a0ecfa43e63dea1c5c3b90e3669ee"},{url:"assets/js/vs/basic-languages/css/css.js",revision:"6ee9d8b753ab02e86d2fef1cd6839bae"},{url:"assets/js/vs/basic-languages/dart/dart.js",revision:"994c907e6e2fca9831c70fb220a8dfe7"},{url:"assets/js/vs/basic-languages/dockerfile/dockerfile.js",revision:"886100cd736f23bfcdf61029439ebb91"},{url:"assets/js/vs/basic-languages/ecl/ecl.js",revision:"59c4e667668ebbb528ba64fd2b76411c"},{url:"assets/js/vs/basic-languages/elixir/elixir.js",revision:"9adf3da05ba73c8728db04aa24479830"},{url:"assets/js/vs/basic-languages/flow9/flow9.js",revision:"07f962e581808968eaf81b4757ba427d"},{url:"assets/js/vs/basic-languages/fsharp/fsharp.js",revision:"4a059944d9de46a22b1e7f3b636beb98"},{url:"assets/js/vs/basic-languages/go/go.js",revision:"1e78e6e22eca1bf5ad47108dead26490"},{url:"assets/js/vs/basic-languages/graphql/graphql.js",revision:"33366aac3f03b0c919818dff9e228bad"},{url:"assets/js/vs/basic-languages/handlebars/handlebars.js",revision:"9a05aa526495f0a1e241f3ac142e91a9"},{url:"assets/js/vs/basic-languages/hcl/hcl.js",revision:"710a5636d53b53e1290873211ddb6a9e"},{url:"assets/js/vs/basic-languages/html/html.js",revision:"2b130bc85c8c8646e5bea546d14a0b41"},{url:"assets/js/vs/basic-languages/ini/ini.js",revision:"2c52fccc7378467c65c40d246cbd05a4"},{url:"assets/js/vs/basic-languages/java/java.js",revision:"b6bd764730176bec564b8ed428790b5b"},{url:"assets/js/vs/basic-languages/javascript/javascript.js",revision:"a2e9534e6798dec260a05c3af6995ab6"},{url:"assets/js/vs/basicLine truncated
|
||||
@@ -151,7 +151,7 @@ var _setting = require("./setting");
|
||||
var _settingDefault = parcelHelpers.interopDefault(_setting);
|
||||
function checkVersion(art) {
|
||||
const { version , utils: { errorHandle } , } = art.constructor;
|
||||
const arr = version.split('.').map(Number);
|
||||
const arr = version.split(".").map(Number);
|
||||
const major = arr[0];
|
||||
const minor = arr[1] / 100;
|
||||
errorHandle(major + minor >= 4.04, `Artplayer.js@${version} 不兼容该弹幕库,请更新到 4.4.x 版本以上`);
|
||||
@@ -159,11 +159,12 @@ function checkVersion(art) {
|
||||
function artplayerPluginDanmuku(option) {
|
||||
return (art)=>{
|
||||
checkVersion(art);
|
||||
const danmuku = new _danmukuDefault.default(art, option);
|
||||
_settingDefault.default(art, danmuku);
|
||||
const danmuku = new (0, _danmukuDefault.default)(art, option);
|
||||
(0, _settingDefault.default)(art, danmuku);
|
||||
return {
|
||||
name: 'artplayerPluginDanmuku',
|
||||
name: "artplayerPluginDanmuku",
|
||||
emit: danmuku.emit.bind(danmuku),
|
||||
load: danmuku.load.bind(danmuku),
|
||||
config: danmuku.config.bind(danmuku),
|
||||
hide: danmuku.hide.bind(danmuku),
|
||||
show: danmuku.show.bind(danmuku),
|
||||
@@ -178,9 +179,9 @@ function artplayerPluginDanmuku(option) {
|
||||
}
|
||||
exports.default = artplayerPluginDanmuku;
|
||||
artplayerPluginDanmuku.env = "development";
|
||||
artplayerPluginDanmuku.version = "4.4.1";
|
||||
artplayerPluginDanmuku.build = "1652764315441";
|
||||
if (typeof window !== 'undefined') window['artplayerPluginDanmuku'] = artplayerPluginDanmuku;
|
||||
artplayerPluginDanmuku.version = "4.4.8";
|
||||
artplayerPluginDanmuku.build = "1655097997753";
|
||||
if (typeof window !== "undefined") window["artplayerPluginDanmuku"] = artplayerPluginDanmuku;
|
||||
|
||||
},{"./danmuku":"igPca","./setting":"8npWO","@parcel/transformer-js/src/esmodule-helpers.js":"8MjWm"}],"igPca":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
@@ -212,13 +213,13 @@ class Danmuku {
|
||||
this.stop = this.stop.bind(this);
|
||||
this.reset = this.reset.bind(this);
|
||||
this.destroy = this.destroy.bind(this);
|
||||
art.on('video:play', this.start);
|
||||
art.on('video:playing', this.start);
|
||||
art.on('video:pause', this.stop);
|
||||
art.on('video:waiting', this.stop);
|
||||
art.on('fullscreen', this.reset);
|
||||
art.on('fullscreenWeb', this.reset);
|
||||
art.on('destroy', this.destroy);
|
||||
art.on("video:play", this.start);
|
||||
art.on("video:playing", this.start);
|
||||
art.on("video:pause", this.stop);
|
||||
art.on("video:waiting", this.stop);
|
||||
art.on("fullscreen", this.reset);
|
||||
art.on("fullscreenWeb", this.reset);
|
||||
art.on("destroy", this.destroy);
|
||||
this.load();
|
||||
}
|
||||
static get option() {
|
||||
@@ -226,15 +227,14 @@ class Danmuku {
|
||||
danmuku: [],
|
||||
speed: 5,
|
||||
margin: [
|
||||
'2%',
|
||||
'25%'
|
||||
"2%",
|
||||
"25%"
|
||||
],
|
||||
opacity: 1,
|
||||
color: '#FFFFFF',
|
||||
color: "#FFFFFF",
|
||||
mode: 0,
|
||||
fontSize: 25,
|
||||
filter: ()=>true
|
||||
,
|
||||
filter: ()=>true,
|
||||
antiOverlap: true,
|
||||
useWorker: true,
|
||||
synchronousPlayback: false,
|
||||
@@ -243,30 +243,30 @@ class Danmuku {
|
||||
minWidth: 200,
|
||||
maxWidth: 400,
|
||||
mount: undefined,
|
||||
theme: 'dark',
|
||||
theme: "dark",
|
||||
beforeEmit: ()=>true
|
||||
};
|
||||
}
|
||||
static get scheme() {
|
||||
return {
|
||||
danmuku: 'array|function|string',
|
||||
speed: 'number',
|
||||
margin: 'array',
|
||||
opacity: 'number',
|
||||
color: 'string',
|
||||
mode: 'number',
|
||||
fontSize: 'number|string',
|
||||
filter: 'function',
|
||||
antiOverlap: 'boolean',
|
||||
useWorker: 'boolean',
|
||||
synchronousPlayback: 'boolean',
|
||||
lockTime: 'number',
|
||||
maxLength: 'number',
|
||||
minWidth: 'number',
|
||||
maxWidth: 'number',
|
||||
mount: 'undefined|htmldivelement',
|
||||
theme: 'string',
|
||||
beforeEmit: 'function'
|
||||
danmuku: "array|function|string",
|
||||
speed: "number",
|
||||
margin: "array",
|
||||
opacity: "number",
|
||||
color: "string",
|
||||
mode: "number",
|
||||
fontSize: "number|string",
|
||||
filter: "function",
|
||||
antiOverlap: "boolean",
|
||||
useWorker: "boolean",
|
||||
synchronousPlayback: "boolean",
|
||||
lockTime: "number",
|
||||
maxLength: "number",
|
||||
minWidth: "number",
|
||||
maxWidth: "number",
|
||||
mount: "undefined|htmldivelement",
|
||||
theme: "string",
|
||||
beforeEmit: "function"
|
||||
};
|
||||
}
|
||||
get isRotate() {
|
||||
@@ -276,8 +276,8 @@ class Danmuku {
|
||||
const { clamp } = this.utils;
|
||||
const value = this.option.margin[0];
|
||||
const { clientHeight } = this.$player;
|
||||
if (typeof value === 'number') return clamp(value, 0, clientHeight);
|
||||
if (typeof value === 'string' && value.endsWith('%')) {
|
||||
if (typeof value === "number") return clamp(value, 0, clientHeight);
|
||||
if (typeof value === "string" && value.endsWith("%")) {
|
||||
const ratio = parseFloat(value) / 100;
|
||||
return clamp(clientHeight * ratio, 0, clientHeight);
|
||||
}
|
||||
@@ -287,16 +287,15 @@ class Danmuku {
|
||||
const { clamp } = this.utils;
|
||||
const value = this.option.margin[1];
|
||||
const { clientHeight } = this.$player;
|
||||
if (typeof value === 'number') return clamp(value, 0, clientHeight);
|
||||
if (typeof value === 'string' && value.endsWith('%')) {
|
||||
if (typeof value === "number") return clamp(value, 0, clientHeight);
|
||||
if (typeof value === "string" && value.endsWith("%")) {
|
||||
const ratio = parseFloat(value) / 100;
|
||||
return clamp(clientHeight * ratio, 0, clientHeight);
|
||||
}
|
||||
return Danmuku.option.margin[1];
|
||||
}
|
||||
filter(state, callback) {
|
||||
return this.queue.filter((danmu)=>danmu.$state === state
|
||||
).map(callback);
|
||||
return this.queue.filter((danmu)=>danmu.$state === state).map(callback);
|
||||
}
|
||||
getLeft($ref) {
|
||||
const rect = $ref.getBoundingClientRect();
|
||||
@@ -305,7 +304,7 @@ class Danmuku {
|
||||
getRef() {
|
||||
const $refCache = this.$refs.pop();
|
||||
if ($refCache) return $refCache;
|
||||
const $ref = document.createElement('div');
|
||||
const $ref = document.createElement("div");
|
||||
$ref.style.cssText = `
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
@@ -325,14 +324,14 @@ class Danmuku {
|
||||
getReady() {
|
||||
const { currentTime } = this.art;
|
||||
return this.queue.filter((danmu)=>{
|
||||
return danmu.$state === 'ready' || danmu.$state === 'wait' && currentTime + 0.1 >= danmu.time && danmu.time >= currentTime - 0.1;
|
||||
return danmu.$state === "ready" || danmu.$state === "wait" && currentTime + 0.1 >= danmu.time && danmu.time >= currentTime - 0.1;
|
||||
});
|
||||
}
|
||||
getEmits() {
|
||||
const result = [];
|
||||
const { clientWidth } = this.$player;
|
||||
const clientLeft = this.getLeft(this.$player);
|
||||
this.filter('emit', (danmu)=>{
|
||||
this.filter("emit", (danmu)=>{
|
||||
const top = danmu.$ref.offsetTop;
|
||||
const left = this.getLeft(danmu.$ref) - clientLeft;
|
||||
const height = danmu.$ref.clientHeight;
|
||||
@@ -357,8 +356,8 @@ class Danmuku {
|
||||
getFontSize(fontSize) {
|
||||
const { clamp } = this.utils;
|
||||
const { clientHeight } = this.$player;
|
||||
if (typeof fontSize === 'number') return clamp(fontSize, 12, clientHeight);
|
||||
if (typeof fontSize === 'string' && fontSize.endsWith('%')) {
|
||||
if (typeof fontSize === "number") return clamp(fontSize, 12, clientHeight);
|
||||
if (typeof fontSize === "string" && fontSize.endsWith("%")) {
|
||||
const ratio = parseFloat(fontSize) / 100;
|
||||
return clamp(clientHeight * ratio, 12, clientHeight);
|
||||
}
|
||||
@@ -374,7 +373,7 @@ class Danmuku {
|
||||
if (data.id === message.id) resolve(data);
|
||||
};
|
||||
} else {
|
||||
const top = _getDanmuTopDefault.default(message);
|
||||
const top = (0, _getDanmuTopDefault.default)(message);
|
||||
resolve({
|
||||
top
|
||||
});
|
||||
@@ -384,18 +383,17 @@ class Danmuku {
|
||||
async load() {
|
||||
try {
|
||||
let danmus = [];
|
||||
if (typeof this.option.danmuku === 'function') danmus = await this.option.danmuku();
|
||||
else if (typeof this.option.danmuku.then === 'function') danmus = await this.option.danmuku;
|
||||
else if (typeof this.option.danmuku === 'string') danmus = await _bilibili.bilibiliDanmuParseFromUrl(this.option.danmuku);
|
||||
if (typeof this.option.danmuku === "function") danmus = await this.option.danmuku();
|
||||
else if (typeof this.option.danmuku.then === "function") danmus = await this.option.danmuku;
|
||||
else if (typeof this.option.danmuku === "string") danmus = await (0, _bilibili.bilibiliDanmuParseFromUrl)(this.option.danmuku);
|
||||
else danmus = this.option.danmuku;
|
||||
this.utils.errorHandle(Array.isArray(danmus), 'Danmuku need return an array as result');
|
||||
this.art.emit('artplayerPluginDanmuku:loaded', danmus);
|
||||
this.utils.errorHandle(Array.isArray(danmus), "Danmuku need return an array as result");
|
||||
this.art.emit("artplayerPluginDanmuku:loaded", danmus);
|
||||
this.queue = [];
|
||||
this.$danmuku.innerText = '';
|
||||
danmus.forEach((danmu)=>this.emit(danmu)
|
||||
);
|
||||
this.$danmuku.innerText = "";
|
||||
danmus.forEach((danmu)=>this.emit(danmu));
|
||||
} catch (error) {
|
||||
this.art.emit('artplayerPluginDanmuku:error', error);
|
||||
this.art.emit("artplayerPluginDanmuku:error", error);
|
||||
throw error;
|
||||
}
|
||||
return this;
|
||||
@@ -414,24 +412,24 @@ class Danmuku {
|
||||
this.option.fontSize = this.getFontSize(this.option.fontSize);
|
||||
this.reset();
|
||||
}
|
||||
this.art.emit('artplayerPluginDanmuku:config', this.option);
|
||||
this.art.emit("artplayerPluginDanmuku:config", this.option);
|
||||
return this;
|
||||
}
|
||||
makeWait(danmu) {
|
||||
danmu.$state = 'wait';
|
||||
danmu.$state = "wait";
|
||||
if (danmu.$ref) {
|
||||
danmu.$ref.style.visibility = 'hidden';
|
||||
danmu.$ref.style.marginLeft = '0px';
|
||||
danmu.$ref.style.transform = 'translateX(0px)';
|
||||
danmu.$ref.style.transition = 'transform 0s linear 0s';
|
||||
danmu.$ref.style.visibility = "hidden";
|
||||
danmu.$ref.style.marginLeft = "0px";
|
||||
danmu.$ref.style.transform = "translateX(0px)";
|
||||
danmu.$ref.style.transition = "transform 0s linear 0s";
|
||||
this.$refs.push(danmu.$ref);
|
||||
danmu.$ref = null;
|
||||
}
|
||||
}
|
||||
continue() {
|
||||
const { clientWidth } = this.$player;
|
||||
this.filter('stop', (danmu)=>{
|
||||
danmu.$state = 'emit';
|
||||
this.filter("stop", (danmu)=>{
|
||||
danmu.$state = "emit";
|
||||
danmu.$lastStartTime = Date.now();
|
||||
switch(danmu.mode){
|
||||
case 0:
|
||||
@@ -449,14 +447,14 @@ class Danmuku {
|
||||
}
|
||||
suspend() {
|
||||
const { clientWidth } = this.$player;
|
||||
this.filter('emit', (danmu)=>{
|
||||
danmu.$state = 'stop';
|
||||
this.filter("emit", (danmu)=>{
|
||||
danmu.$state = "stop";
|
||||
switch(danmu.mode){
|
||||
case 0:
|
||||
{
|
||||
const translateX = clientWidth - (this.getLeft(danmu.$ref) - this.getLeft(this.$player));
|
||||
danmu.$ref.style.transform = `translateX(${-translateX}px)`;
|
||||
danmu.$ref.style.transition = 'transform 0s linear 0s';
|
||||
danmu.$ref.style.transition = "transform 0s linear 0s";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -466,14 +464,13 @@ class Danmuku {
|
||||
return this;
|
||||
}
|
||||
reset() {
|
||||
this.queue.forEach((danmu)=>this.makeWait(danmu)
|
||||
);
|
||||
this.queue.forEach((danmu)=>this.makeWait(danmu));
|
||||
return this;
|
||||
}
|
||||
update() {
|
||||
this.timer = window.requestAnimationFrame(async ()=>{
|
||||
if (this.art.playing && !this.isHide) {
|
||||
this.filter('emit', (danmu)=>{
|
||||
this.filter("emit", (danmu)=>{
|
||||
const emitTime = (Date.now() - danmu.$lastStartTime) / 1000;
|
||||
danmu.$restTime -= emitTime;
|
||||
danmu.$lastStartTime = Date.now();
|
||||
@@ -491,8 +488,8 @@ class Danmuku {
|
||||
danmu.$ref.style.fontSize = `${this.option.fontSize}px`;
|
||||
danmu.$ref.style.color = danmu.color;
|
||||
danmu.$ref.style.border = danmu.border ? `1px solid ${danmu.color}` : null;
|
||||
danmu.$ref.style.backgroundColor = danmu.border ? 'rgb(0 0 0 / 50%)' : null;
|
||||
danmu.$ref.style.marginLeft = '0px';
|
||||
danmu.$ref.style.backgroundColor = danmu.border ? "rgb(0 0 0 / 50%)" : null;
|
||||
danmu.$ref.style.marginLeft = "0px";
|
||||
danmu.$lastStartTime = Date.now();
|
||||
danmu.$restTime = this.option.synchronousPlayback && this.art.playbackRate ? this.option.speed / Number(this.art.playbackRate) : this.option.speed;
|
||||
const target = {
|
||||
@@ -511,8 +508,8 @@ class Danmuku {
|
||||
});
|
||||
if (danmu.$ref) {
|
||||
if (!this.isStop && top !== undefined) {
|
||||
danmu.$state = 'emit';
|
||||
danmu.$ref.style.visibility = 'visible';
|
||||
danmu.$state = "emit";
|
||||
danmu.$ref.style.visibility = "visible";
|
||||
switch(danmu.mode){
|
||||
case 0:
|
||||
{
|
||||
@@ -523,7 +520,7 @@ class Danmuku {
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
danmu.$ref.style.left = '50%';
|
||||
danmu.$ref.style.left = "50%";
|
||||
danmu.$ref.style.top = `${top}px`;
|
||||
danmu.$ref.style.marginLeft = `-${danmu.$ref.clientWidth / 2}px`;
|
||||
break;
|
||||
@@ -531,7 +528,7 @@ class Danmuku {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
danmu.$state = 'ready';
|
||||
danmu.$state = "ready";
|
||||
this.$refs.push(danmu.$ref);
|
||||
danmu.$ref = null;
|
||||
}
|
||||
@@ -546,39 +543,38 @@ class Danmuku {
|
||||
this.isStop = true;
|
||||
this.suspend();
|
||||
window.cancelAnimationFrame(this.timer);
|
||||
this.art.emit('artplayerPluginDanmuku:stop');
|
||||
this.art.emit("artplayerPluginDanmuku:stop");
|
||||
return this;
|
||||
}
|
||||
start() {
|
||||
this.isStop = false;
|
||||
this.continue();
|
||||
this.update();
|
||||
this.art.emit('artplayerPluginDanmuku:start');
|
||||
this.art.emit("artplayerPluginDanmuku:start");
|
||||
return this;
|
||||
}
|
||||
show() {
|
||||
this.isHide = false;
|
||||
this.start();
|
||||
this.$danmuku.style.display = 'block';
|
||||
this.art.emit('artplayerPluginDanmuku:show');
|
||||
this.$danmuku.style.display = "block";
|
||||
this.art.emit("artplayerPluginDanmuku:show");
|
||||
return this;
|
||||
}
|
||||
hide() {
|
||||
this.isHide = true;
|
||||
this.stop();
|
||||
this.queue.forEach((item)=>this.makeWait(item)
|
||||
);
|
||||
this.$danmuku.style.display = 'none';
|
||||
this.art.emit('artplayerPluginDanmuku:hide');
|
||||
this.queue.forEach((item)=>this.makeWait(item));
|
||||
this.$danmuku.style.display = "none";
|
||||
this.art.emit("artplayerPluginDanmuku:hide");
|
||||
return this;
|
||||
}
|
||||
emit(danmu) {
|
||||
this.validator(danmu, {
|
||||
text: 'string',
|
||||
mode: 'number|undefined',
|
||||
color: 'string|undefined',
|
||||
time: 'number|undefined',
|
||||
border: 'boolean|undefined'
|
||||
text: "string",
|
||||
mode: "number|undefined",
|
||||
color: "string|undefined",
|
||||
time: "number|undefined",
|
||||
border: "boolean|undefined"
|
||||
});
|
||||
if (!danmu.text.trim()) return this;
|
||||
if (!this.option.filter(danmu)) return this;
|
||||
@@ -588,7 +584,7 @@ class Danmuku {
|
||||
if (danmu.color === undefined) danmu.color = this.option.color;
|
||||
this.queue.push({
|
||||
...danmu,
|
||||
$state: 'wait',
|
||||
$state: "wait",
|
||||
$ref: null,
|
||||
$restTime: 0,
|
||||
$lastStartTime: 0
|
||||
@@ -598,14 +594,14 @@ class Danmuku {
|
||||
destroy() {
|
||||
this.stop();
|
||||
if (this.worker && this.worker.terminate) 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('fullscreen', this.reset);
|
||||
this.art.off('fullscreenWeb', this.reset);
|
||||
this.art.off('destroy', this.destroy);
|
||||
this.art.emit('artplayerPluginDanmuku:destroy');
|
||||
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("fullscreen", this.reset);
|
||||
this.art.off("fullscreenWeb", this.reset);
|
||||
this.art.off("destroy", this.destroy);
|
||||
this.art.emit("artplayerPluginDanmuku:destroy");
|
||||
}
|
||||
}
|
||||
exports.default = Danmuku;
|
||||
@@ -613,12 +609,9 @@ exports.default = Danmuku;
|
||||
},{"./bilibili":"6a8GK","./getDanmuTop":"eLxSm","27c3930ee158179a":"7RMxU","@parcel/transformer-js/src/esmodule-helpers.js":"8MjWm"}],"6a8GK":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "getMode", ()=>getMode
|
||||
);
|
||||
parcelHelpers.export(exports, "bilibiliDanmuParseFromXml", ()=>bilibiliDanmuParseFromXml
|
||||
);
|
||||
parcelHelpers.export(exports, "bilibiliDanmuParseFromUrl", ()=>bilibiliDanmuParseFromUrl
|
||||
);
|
||||
parcelHelpers.export(exports, "getMode", ()=>getMode);
|
||||
parcelHelpers.export(exports, "bilibiliDanmuParseFromXml", ()=>bilibiliDanmuParseFromXml);
|
||||
parcelHelpers.export(exports, "bilibiliDanmuParseFromUrl", ()=>bilibiliDanmuParseFromUrl);
|
||||
function getMode(key) {
|
||||
switch(key){
|
||||
case 1:
|
||||
@@ -633,28 +626,28 @@ function getMode(key) {
|
||||
}
|
||||
}
|
||||
function bilibiliDanmuParseFromXml(xmlString) {
|
||||
if (typeof xmlString !== 'string') return [];
|
||||
const srtList = xmlString.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);
|
||||
return srtList && srtList.length ? srtList.map((item)=>{
|
||||
const [, attrStr, text] = item.match(/<d p="(.+)">(.+)<\/d>/);
|
||||
const attr = attrStr.split(',');
|
||||
return attr.length === 8 && text.trim() ? {
|
||||
text,
|
||||
time: Number(attr[0]),
|
||||
mode: getMode(Number(attr[1])),
|
||||
fontSize: Number(attr[2]),
|
||||
color: `#${Number(attr[3]).toString(16)}`,
|
||||
timestamp: Number(attr[4]),
|
||||
pool: Number(attr[5]),
|
||||
userID: attr[6],
|
||||
rowID: Number(attr[7])
|
||||
} : null;
|
||||
}) : [];
|
||||
if (typeof xmlString !== "string") return [];
|
||||
const matches = xmlString.matchAll(/<d (?:.*? )??p="(?<p>.+?)"(?: .*?)?>(?<text>.+?)<\/d>/gs);
|
||||
return Array.from(matches).map((match)=>{
|
||||
const attr = match.groups.p.split(",");
|
||||
if (attr.length >= 8) {
|
||||
const text = match.groups.text.trim().replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
||||
return {
|
||||
text,
|
||||
time: Number(attr[0]),
|
||||
mode: getMode(Number(attr[1])),
|
||||
fontSize: Number(attr[2]),
|
||||
color: `#${Number(attr[3]).toString(16)}`,
|
||||
timestamp: Number(attr[4]),
|
||||
pool: Number(attr[5]),
|
||||
userID: attr[6],
|
||||
rowID: Number(attr[7])
|
||||
};
|
||||
} else return null;
|
||||
}).filter(Boolean);
|
||||
}
|
||||
function bilibiliDanmuParseFromUrl(url) {
|
||||
return fetch(url).then((res)=>res.text()
|
||||
).then((xmlString)=>bilibiliDanmuParseFromXml(xmlString)
|
||||
);
|
||||
return fetch(url).then((res)=>res.text()).then((xmlString)=>bilibiliDanmuParseFromXml(xmlString));
|
||||
}
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"8MjWm"}],"8MjWm":[function(require,module,exports) {
|
||||
@@ -664,13 +657,13 @@ exports.interopDefault = function(a) {
|
||||
};
|
||||
};
|
||||
exports.defineInteropFlag = function(a) {
|
||||
Object.defineProperty(a, '__esModule', {
|
||||
Object.defineProperty(a, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
};
|
||||
exports.exportAll = function(source, dest) {
|
||||
Object.keys(source).forEach(function(key) {
|
||||
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) return;
|
||||
if (key === "default" || key === "__esModule" || dest.hasOwnProperty(key)) return;
|
||||
Object.defineProperty(dest, key, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
@@ -691,9 +684,7 @@ exports.export = function(dest, destName, get) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
function getDanmuTop({ target , emits , clientWidth , clientHeight , marginBottom , marginTop , antiOverlap , }) {
|
||||
const danmus = emits.filter((item)=>item.mode === target.mode && item.top <= clientHeight - marginBottom
|
||||
).sort((prev, next)=>prev.top - next.top
|
||||
);
|
||||
const danmus = emits.filter((item)=>item.mode === target.mode && item.top <= clientHeight - marginBottom).sort((prev, next)=>prev.top - next.top);
|
||||
if (danmus.length === 0) return marginTop;
|
||||
danmus.unshift({
|
||||
top: 0,
|
||||
@@ -756,19 +747,15 @@ function getDanmuTop({ target , emits , clientWidth , clientHeight , marginBotto
|
||||
switch(target.mode){
|
||||
case 0:
|
||||
topMap.sort((prev, next)=>{
|
||||
const nextMinRight = Math.min(...next.map((item)=>item.right
|
||||
));
|
||||
const prevMinRight = Math.min(...prev.map((item)=>item.right
|
||||
));
|
||||
const nextMinRight = Math.min(...next.map((item)=>item.right));
|
||||
const prevMinRight = Math.min(...prev.map((item)=>item.right));
|
||||
return nextMinRight * next.length - prevMinRight * prev.length;
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
topMap.sort((prev, next)=>{
|
||||
const nextMaxWidth = Math.max(...next.map((item)=>item.width
|
||||
));
|
||||
const prevMaxWidth = Math.max(...prev.map((item)=>item.width
|
||||
));
|
||||
const nextMaxWidth = Math.max(...next.map((item)=>item.width));
|
||||
const prevMaxWidth = Math.max(...prev.map((item)=>item.width));
|
||||
return prevMaxWidth * prev.length - nextMaxWidth * next.length;
|
||||
});
|
||||
break;
|
||||
@@ -781,7 +768,7 @@ function getDanmuTop({ target , emits , clientWidth , clientHeight , marginBotto
|
||||
exports.default = getDanmuTop;
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"8MjWm"}],"7RMxU":[function(require,module,exports) {
|
||||
module.exports = "data:application/javascript,function%20getDanmuTop%28%7B%20target%20%2C%20emits%20%2C%20clientWidth%20%2C%20clientHeight%20%2C%20marginBottom%20%2C%20marginTop%20%2C%20antiOverlap%20%20%7D%29%20%7B%0A%20%20%20%20const%20danmus%20%3D%20emits.filter%28%28item%29%3D%3Eitem.mode%20%3D%3D%3D%20target.mode%20%26%26%20item.top%20%3C%3D%20clientHeight%20-%20marginBottom%0A%20%20%20%20%29.sort%28%28prev%2C%20next%29%3D%3Eprev.top%20-%20next.top%0A%20%20%20%20%29%3B%0A%20%20%20%20if%20%28danmus.length%20%3D%3D%3D%200%29%20return%20marginTop%3B%0A%20%20%20%20danmus.unshift%28%7B%0A%20%20%20%20%20%20%20%20top%3A%200%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginTop%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20danmus.push%28%7B%0A%20%20%20%20%20%20%20%20top%3A%20clientHeight%20-%20marginBottom%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginBottom%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20for%28let%20index%20%3D%201%3B%20index%20%3C%20danmus.length%3B%20index%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20const%20prev%20%3D%20danmus%5Bindex%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20const%20prevBottom%20%3D%20prev.top%20%2B%20prev.height%3B%0A%20%20%20%20%20%20%20%20const%20diff%20%3D%20item.top%20-%20prevBottom%3B%0A%20%20%20%20%20%20%20%20if%20%28diff%20%3E%3D%20target.height%29%20return%20prevBottom%3B%0A%20%20%20%20%7D%0A%20%20%20%20const%20topMap%20%3D%20%5B%5D%3B%0A%20%20%20%20for%28let%20index1%20%3D%201%3B%20index1%20%3C%20danmus.length%20-%201%3B%20index1%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex1%5D%3B%0A%20%20%20%20%20%20%20%20if%20%28topMap.length%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20last%20%3D%20topMap%5BtopMap.length%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28last%5B0%5D.top%20%3D%3D%3D%20item.top%29%20last.push%28item%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28antiOverlap%29%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20result%20%3D%20topMap.find%28%28list%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20list.every%28%28danmu%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28clientWidth%20%3C%20danmu.distance%29%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28target.speed%20%3C%20danmu.speed%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20overlapTime%20%3D%20danmu.right%20%2F%20%28target.speed%20-%20danmu.speed%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28overlapTime%20%3E%20danmu.time%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20result%20%26%26%20result%5B0%5D%20%3F%20result%5B0%5D.top%20%3A%20undefined%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20case%201%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20undefined%3B%0A%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20topMap.sort%28%28prev%2C%20next%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20nextMinRight%20%3D%20Math.min%28...next.map%28%28item%29%3D%3Eitem.right%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20prevMinRight%20%3D%20Math.min%28...prev.map%28%28item%29%3D%3Eitem.right%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20nextMinRight%20%2a%20next.length%20-%20prevMinRight%20%2Line truncated
|
||||
module.exports = "data:application/javascript,function%20getDanmuTop%28%7B%20target%20%2C%20emits%20%2C%20clientWidth%20%2C%20clientHeight%20%2C%20marginBottom%20%2C%20marginTop%20%2C%20antiOverlap%20%20%7D%29%20%7B%0A%20%20%20%20const%20danmus%20%3D%20emits.filter%28%28item%29%3D%3Eitem.mode%20%3D%3D%3D%20target.mode%20%26%26%20item.top%20%3C%3D%20clientHeight%20-%20marginBottom%29.sort%28%28prev%2C%20next%29%3D%3Eprev.top%20-%20next.top%29%3B%0A%20%20%20%20if%20%28danmus.length%20%3D%3D%3D%200%29%20return%20marginTop%3B%0A%20%20%20%20danmus.unshift%28%7B%0A%20%20%20%20%20%20%20%20top%3A%200%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginTop%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20danmus.push%28%7B%0A%20%20%20%20%20%20%20%20top%3A%20clientHeight%20-%20marginBottom%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginBottom%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20for%28let%20index%20%3D%201%3B%20index%20%3C%20danmus.length%3B%20index%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20const%20prev%20%3D%20danmus%5Bindex%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20const%20prevBottom%20%3D%20prev.top%20%2B%20prev.height%3B%0A%20%20%20%20%20%20%20%20const%20diff%20%3D%20item.top%20-%20prevBottom%3B%0A%20%20%20%20%20%20%20%20if%20%28diff%20%3E%3D%20target.height%29%20return%20prevBottom%3B%0A%20%20%20%20%7D%0A%20%20%20%20const%20topMap%20%3D%20%5B%5D%3B%0A%20%20%20%20for%28let%20index1%20%3D%201%3B%20index1%20%3C%20danmus.length%20-%201%3B%20index1%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex1%5D%3B%0A%20%20%20%20%20%20%20%20if%20%28topMap.length%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20last%20%3D%20topMap%5BtopMap.length%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28last%5B0%5D.top%20%3D%3D%3D%20item.top%29%20last.push%28item%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28antiOverlap%29%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20result%20%3D%20topMap.find%28%28list%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20list.every%28%28danmu%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28clientWidth%20%3C%20danmu.distance%29%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28target.speed%20%3C%20danmu.speed%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20overlapTime%20%3D%20danmu.right%20%2F%20%28target.speed%20-%20danmu.speed%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28overlapTime%20%3E%20danmu.time%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20result%20%26%26%20result%5B0%5D%20%3F%20result%5B0%5D.top%20%3A%20undefined%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20case%201%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20undefined%3B%0A%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20topMap.sort%28%28prev%2C%20next%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20nextMinRight%20%3D%20Math.min%28...next.map%28%28item%29%3D%3Eitem.right%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20prevMinRight%20%3D%20Math.min%28...prev.map%28%28item%29%3D%3Eitem.right%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20nextMinRight%20%2a%20next.length%20-%20prevMinRight%20%2a%20prev.length%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%Line truncated
|
||||
|
||||
},{}],"8npWO":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
@@ -800,38 +787,38 @@ function setting(art, danmuku) {
|
||||
const { option } = danmuku;
|
||||
const { template: { $controlsCenter , $player } , constructor: { utils: { removeClass , addClass , append , setStyle , tooltip , query , inverseClass } , } , } = art;
|
||||
function getIcon(svg, key) {
|
||||
const icon = document.createElement('i');
|
||||
const icon = document.createElement("i");
|
||||
append(icon, svg);
|
||||
addClass(icon, 'art-icon');
|
||||
addClass(icon, "art-icon");
|
||||
addClass(icon, `art-icon-${key}`);
|
||||
return icon;
|
||||
}
|
||||
const $danmuOn = getIcon(_danmuOnSvgDefault.default, 'danmu-on');
|
||||
const $danmuOff = getIcon(_danmuOffSvgDefault.default, 'danmu-off');
|
||||
const $danmuConfig = getIcon(_danmuConfigSvgDefault.default, 'danmu-config');
|
||||
const $danmuStyle = getIcon(_danmuStyleSvgDefault.default, 'danmu-style');
|
||||
const $danmuOn = getIcon((0, _danmuOnSvgDefault.default), "danmu-on");
|
||||
const $danmuOff = getIcon((0, _danmuOffSvgDefault.default), "danmu-off");
|
||||
const $danmuConfig = getIcon((0, _danmuConfigSvgDefault.default), "danmu-config");
|
||||
const $danmuStyle = getIcon((0, _danmuStyleSvgDefault.default), "danmu-style");
|
||||
function addEmitter() {
|
||||
const colors = [
|
||||
'#FE0302',
|
||||
'#FF7204',
|
||||
'#FFAA02',
|
||||
'#FFD302',
|
||||
'#FFFF00',
|
||||
'#A0EE00',
|
||||
'#00CD00',
|
||||
'#019899',
|
||||
'#4266BE',
|
||||
'#89D5FF',
|
||||
'#CC0273',
|
||||
'#222222',
|
||||
'#9B9B9B',
|
||||
'#FFFFFF',
|
||||
"#FE0302",
|
||||
"#FF7204",
|
||||
"#FFAA02",
|
||||
"#FFD302",
|
||||
"#FFFF00",
|
||||
"#A0EE00",
|
||||
"#00CD00",
|
||||
"#019899",
|
||||
"#4266BE",
|
||||
"#89D5FF",
|
||||
"#CC0273",
|
||||
"#222222",
|
||||
"#9B9B9B",
|
||||
"#FFFFFF",
|
||||
].map((item)=>{
|
||||
const isCurrent = option.color === item ? ' art-current' : '';
|
||||
const isCurrent = option.color === item ? " art-current" : "";
|
||||
return `<div class="art-danmuku-style-panel-color${isCurrent}" data-color="${item}" style="background-color:${item}"></div>`;
|
||||
});
|
||||
const $emitter = append($controlsCenter, `
|
||||
<div class="art-danmuku-emitter" style="max-width: ${option.maxWidth ? `${option.maxWidth}px` : '100%'}">
|
||||
<div class="art-danmuku-emitter" style="max-width: ${option.maxWidth ? `${option.maxWidth}px` : "100%"}">
|
||||
<div class="art-danmuku-left">
|
||||
<div class="art-danmuku-style">
|
||||
<div class="art-danmuku-style-panel">
|
||||
@@ -843,7 +830,7 @@ function setting(art, danmuku) {
|
||||
</div>
|
||||
<div class="art-danmuku-style-panel-title">颜色</div>
|
||||
<div class="art-danmuku-style-panel-colors">
|
||||
${colors.join('')}
|
||||
${colors.join("")}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -853,14 +840,14 @@ function setting(art, danmuku) {
|
||||
<div class="art-danmuku-send">发送</div>
|
||||
</div>
|
||||
`);
|
||||
const $style = query('.art-danmuku-style', $emitter);
|
||||
const $input = query('.art-danmuku-input', $emitter);
|
||||
const $send = query('.art-danmuku-send', $emitter);
|
||||
const $panel = query('.art-danmuku-style-panel-inner', $emitter);
|
||||
const $modes = query('.art-danmuku-style-panel-modes', $emitter);
|
||||
const $colors = query('.art-danmuku-style-panel-colors', $emitter);
|
||||
const $style = query(".art-danmuku-style", $emitter);
|
||||
const $input = query(".art-danmuku-input", $emitter);
|
||||
const $send = query(".art-danmuku-send", $emitter);
|
||||
const $panel = query(".art-danmuku-style-panel-inner", $emitter);
|
||||
const $modes = query(".art-danmuku-style-panel-modes", $emitter);
|
||||
const $colors = query(".art-danmuku-style-panel-colors", $emitter);
|
||||
const $layer = option.mount || append($player, '<div class="art-layer-danmuku-emitter"></div>');
|
||||
if (art.option.backdrop) addClass($panel, 'art-backdrop-filter');
|
||||
if (art.option.backdrop) addClass($panel, "art-backdrop-filter");
|
||||
if (option.theme) addClass($emitter, `art-danmuku-theme-${option.theme}`);
|
||||
let timer = null;
|
||||
let mode = option.mode;
|
||||
@@ -869,12 +856,11 @@ function setting(art, danmuku) {
|
||||
function countdown(time) {
|
||||
if (time <= 0) {
|
||||
timer = null;
|
||||
$send.innerText = '发送';
|
||||
removeClass($send, 'art-disabled');
|
||||
$send.innerText = "\u53D1\u9001";
|
||||
removeClass($send, "art-disabled");
|
||||
} else {
|
||||
$send.innerText = time;
|
||||
timer = setTimeout(()=>countdown(time - 1)
|
||||
, 1000);
|
||||
timer = setTimeout(()=>countdown(time - 1), 1000);
|
||||
}
|
||||
}
|
||||
function onSend() {
|
||||
@@ -885,107 +871,110 @@ function setting(art, danmuku) {
|
||||
text: $input.value.trim()
|
||||
};
|
||||
if (timer === null && option.beforeEmit(danmu)) {
|
||||
$input.value = '';
|
||||
$input.value = "";
|
||||
danmuku.emit(danmu);
|
||||
addClass($send, 'art-disabled');
|
||||
addClass($send, "art-disabled");
|
||||
countdown(option.lockTime);
|
||||
art.emit('artplayerPluginDanmuku:emit', danmu);
|
||||
art.emit("artplayerPluginDanmuku:emit", danmu);
|
||||
}
|
||||
}
|
||||
function onResize() {
|
||||
if ($controlsCenter.clientWidth < option.minWidth) {
|
||||
append($layer, $emitter);
|
||||
setStyle($layer, 'display', 'flex');
|
||||
addClass($emitter, 'art-danmuku-mount');
|
||||
if (!option.mount) setStyle($player, 'marginBottom', '40px');
|
||||
setStyle($layer, "display", "flex");
|
||||
addClass($emitter, "art-danmuku-mount");
|
||||
if (!option.mount) setStyle($player, "marginBottom", "40px");
|
||||
} else {
|
||||
append($controlsCenter, $emitter);
|
||||
setStyle($layer, 'display', 'none');
|
||||
removeClass($emitter, 'art-danmuku-mount');
|
||||
if (!option.mount) setStyle($player, 'marginBottom', null);
|
||||
setStyle($layer, "display", "none");
|
||||
removeClass($emitter, "art-danmuku-mount");
|
||||
if (!option.mount) setStyle($player, "marginBottom", null);
|
||||
}
|
||||
}
|
||||
art.proxy($send, 'click', onSend);
|
||||
art.proxy($input, 'keypress', (event)=>{
|
||||
if (event.key === 'Enter') {
|
||||
art.proxy($send, "click", onSend);
|
||||
art.proxy($input, "keypress", (event)=>{
|
||||
if (event.key === "Enter") {
|
||||
event.preventDefault();
|
||||
onSend();
|
||||
}
|
||||
});
|
||||
art.proxy($modes, 'click', (event)=>{
|
||||
art.proxy($modes, "click", (event)=>{
|
||||
const { dataset } = event.target;
|
||||
if (dataset.mode) {
|
||||
mode = Number(dataset.mode);
|
||||
inverseClass(event.target, 'art-current');
|
||||
inverseClass(event.target, "art-current");
|
||||
}
|
||||
});
|
||||
art.proxy($colors, 'click', (event)=>{
|
||||
art.proxy($colors, "click", (event)=>{
|
||||
const { dataset } = event.target;
|
||||
if (dataset.color) {
|
||||
color = dataset.color;
|
||||
inverseClass(event.target, 'art-current');
|
||||
inverseClass(event.target, "art-current");
|
||||
}
|
||||
});
|
||||
onResize();
|
||||
art.on('resize', onResize);
|
||||
art.on("resize", onResize);
|
||||
art.on("destroy", ()=>{
|
||||
if (option.mount && $emitter.parentElement === option.mount) option.mount.removeChild($emitter);
|
||||
});
|
||||
}
|
||||
function addControl() {
|
||||
art.controls.add({
|
||||
position: 'right',
|
||||
name: 'danmuku',
|
||||
position: "right",
|
||||
name: "danmuku",
|
||||
click: function() {
|
||||
if (danmuku.isHide) {
|
||||
danmuku.show();
|
||||
art.notice.show = '弹幕显示';
|
||||
setStyle($danmuOn, 'display', null);
|
||||
setStyle($danmuOff, 'display', 'none');
|
||||
art.notice.show = "\u5F39\u5E55\u663E\u793A";
|
||||
setStyle($danmuOn, "display", null);
|
||||
setStyle($danmuOff, "display", "none");
|
||||
} else {
|
||||
danmuku.hide();
|
||||
art.notice.show = '弹幕隐藏';
|
||||
setStyle($danmuOn, 'display', 'none');
|
||||
setStyle($danmuOff, 'display', null);
|
||||
art.notice.show = "\u5F39\u5E55\u9690\u85CF";
|
||||
setStyle($danmuOn, "display", "none");
|
||||
setStyle($danmuOff, "display", null);
|
||||
}
|
||||
},
|
||||
mounted ($ref) {
|
||||
append($ref, $danmuOn);
|
||||
append($ref, $danmuOff);
|
||||
tooltip($ref, '弹幕开关');
|
||||
setStyle($danmuOff, 'display', 'none');
|
||||
tooltip($ref, "\u5F39\u5E55\u5F00\u5173");
|
||||
setStyle($danmuOff, "display", "none");
|
||||
}
|
||||
});
|
||||
}
|
||||
function addSetting() {
|
||||
art.setting.add({
|
||||
name: 'danmuku',
|
||||
html: '弹幕设置',
|
||||
tooltip: '更多',
|
||||
name: "danmuku",
|
||||
html: "\u5F39\u5E55\u8BBE\u7F6E",
|
||||
tooltip: "\u66F4\u591A",
|
||||
icon: $danmuConfig,
|
||||
selector: [
|
||||
{
|
||||
width: 200,
|
||||
html: '播放速度',
|
||||
icon: '',
|
||||
tooltip: '适中',
|
||||
html: "\u64AD\u653E\u901F\u5EA6",
|
||||
icon: "",
|
||||
tooltip: "\u9002\u4E2D",
|
||||
selector: [
|
||||
{
|
||||
html: '极慢',
|
||||
html: "\u6781\u6162",
|
||||
time: 10
|
||||
},
|
||||
{
|
||||
html: '较慢',
|
||||
html: "\u8F83\u6162",
|
||||
time: 7.5
|
||||
},
|
||||
{
|
||||
default: true,
|
||||
html: '适中',
|
||||
html: "\u9002\u4E2D",
|
||||
time: 5
|
||||
},
|
||||
{
|
||||
html: '较快',
|
||||
html: "\u8F83\u5FEB",
|
||||
time: 2.5
|
||||
},
|
||||
{
|
||||
html: '极快',
|
||||
html: "\u6781\u5FEB",
|
||||
time: 1
|
||||
},
|
||||
],
|
||||
@@ -998,30 +987,30 @@ function setting(art, danmuku) {
|
||||
},
|
||||
{
|
||||
width: 200,
|
||||
html: '字体大小',
|
||||
icon: '',
|
||||
tooltip: '适中',
|
||||
html: "\u5B57\u4F53\u5927\u5C0F",
|
||||
icon: "",
|
||||
tooltip: "\u9002\u4E2D",
|
||||
selector: [
|
||||
{
|
||||
html: '极小',
|
||||
fontSize: '2%'
|
||||
html: "\u6781\u5C0F",
|
||||
fontSize: "4%"
|
||||
},
|
||||
{
|
||||
html: '较小',
|
||||
fontSize: '4%'
|
||||
html: "\u8F83\u5C0F",
|
||||
fontSize: "5%"
|
||||
},
|
||||
{
|
||||
default: true,
|
||||
html: '适中',
|
||||
fontSize: '6%'
|
||||
html: "\u9002\u4E2D",
|
||||
fontSize: "6%"
|
||||
},
|
||||
{
|
||||
html: '较大',
|
||||
fontSize: '8%'
|
||||
html: "\u8F83\u5927",
|
||||
fontSize: "7%"
|
||||
},
|
||||
{
|
||||
html: '极大',
|
||||
fontSize: '10%'
|
||||
html: "\u6781\u5927",
|
||||
fontSize: "8%"
|
||||
},
|
||||
],
|
||||
onSelect: function(item) {
|
||||
@@ -1033,30 +1022,30 @@ function setting(art, danmuku) {
|
||||
},
|
||||
{
|
||||
width: 200,
|
||||
html: '不透明度',
|
||||
icon: '',
|
||||
tooltip: '100%',
|
||||
html: "\u4E0D\u900F\u660E\u5EA6",
|
||||
icon: "",
|
||||
tooltip: "100%",
|
||||
selector: [
|
||||
{
|
||||
default: true,
|
||||
opacity: 1,
|
||||
html: '100%'
|
||||
html: "100%"
|
||||
},
|
||||
{
|
||||
opacity: 0.75,
|
||||
html: '75%'
|
||||
html: "75%"
|
||||
},
|
||||
{
|
||||
opacity: 0.5,
|
||||
html: '50%'
|
||||
html: "50%"
|
||||
},
|
||||
{
|
||||
opacity: 0.25,
|
||||
html: '25%'
|
||||
html: "25%"
|
||||
},
|
||||
{
|
||||
opacity: 0,
|
||||
html: '0%'
|
||||
html: "0%"
|
||||
},
|
||||
],
|
||||
onSelect: function(item) {
|
||||
@@ -1068,34 +1057,34 @@ function setting(art, danmuku) {
|
||||
},
|
||||
{
|
||||
width: 200,
|
||||
html: '显示范围',
|
||||
icon: '',
|
||||
tooltip: '3/4',
|
||||
html: "\u663E\u793A\u8303\u56F4",
|
||||
icon: "",
|
||||
tooltip: "3/4",
|
||||
selector: [
|
||||
{
|
||||
html: '1/4',
|
||||
html: "1/4",
|
||||
margin: [
|
||||
10,
|
||||
'75%'
|
||||
"75%"
|
||||
]
|
||||
},
|
||||
{
|
||||
html: '半屏',
|
||||
html: "\u534A\u5C4F",
|
||||
margin: [
|
||||
10,
|
||||
'50%'
|
||||
"50%"
|
||||
]
|
||||
},
|
||||
{
|
||||
default: true,
|
||||
html: '3/4',
|
||||
html: "3/4",
|
||||
margin: [
|
||||
10,
|
||||
'25%'
|
||||
"25%"
|
||||
]
|
||||
},
|
||||
{
|
||||
html: '满屏',
|
||||
html: "\u6EE1\u5C4F",
|
||||
margin: [
|
||||
10,
|
||||
10
|
||||
@@ -1110,46 +1099,44 @@ function setting(art, danmuku) {
|
||||
}
|
||||
},
|
||||
{
|
||||
html: '弹幕防重叠',
|
||||
icon: '',
|
||||
tooltip: option.antiOverlap ? '开启' : '关闭',
|
||||
html: "\u5F39\u5E55\u9632\u91CD\u53E0",
|
||||
icon: "",
|
||||
tooltip: option.antiOverlap ? "\u5F00\u542F" : "\u5173\u95ED",
|
||||
switch: option.antiOverlap,
|
||||
onSwitch (item) {
|
||||
danmuku.config({
|
||||
antiOverlap: !item.switch
|
||||
});
|
||||
item.tooltip = item.switch ? '关闭' : '开启';
|
||||
item.tooltip = item.switch ? "\u5173\u95ED" : "\u5F00\u542F";
|
||||
return !item.switch;
|
||||
}
|
||||
},
|
||||
{
|
||||
html: '同步视频速度',
|
||||
icon: '',
|
||||
tooltip: option.synchronousPlayback ? '开启' : '关闭',
|
||||
html: "\u540C\u6B65\u89C6\u9891\u901F\u5EA6",
|
||||
icon: "",
|
||||
tooltip: option.synchronousPlayback ? "\u5F00\u542F" : "\u5173\u95ED",
|
||||
switch: option.synchronousPlayback,
|
||||
onSwitch (item) {
|
||||
danmuku.config({
|
||||
synchronousPlayback: !item.switch
|
||||
});
|
||||
item.tooltip = item.switch ? '关闭' : '开启';
|
||||
item.tooltip = item.switch ? "\u5173\u95ED" : "\u5F00\u542F";
|
||||
return !item.switch;
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
addEmitter();
|
||||
addControl();
|
||||
addSetting();
|
||||
});
|
||||
addEmitter();
|
||||
addControl();
|
||||
addSetting();
|
||||
}
|
||||
exports.default = setting;
|
||||
if (typeof document !== 'undefined') {
|
||||
if (!document.getElementById('artplayer-plugin-danmuku')) {
|
||||
const $style = document.createElement('style');
|
||||
$style.id = 'artplayer-plugin-danmuku';
|
||||
$style.textContent = _styleLessDefault.default;
|
||||
if (typeof document !== "undefined") {
|
||||
if (!document.getElementById("artplayer-plugin-danmuku")) {
|
||||
const $style = document.createElement("style");
|
||||
$style.id = "artplayer-plugin-danmuku";
|
||||
$style.textContent = (0, _styleLessDefault.default);
|
||||
document.head.appendChild($style);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,mCAAgC;;AAChC,mCAAgC;;AAEhC,SAAS,YAAY,CAAC,GAAG,EAAE;IACvB,MAAM,EACF,OAAO,CAAA,EACP,KAAK,EAAE,EAAE,WAAW,CAAA,EAAE,CAAA,IACzB,GAAG,GAAG,CAAC,WAAW,AAAC;IACpB,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,AAAC;IAC3C,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,AAAC;IACrB,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,AAAC;IAC3B,WAAW,CAAC,KAAK,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,wDAAwB,CAAC,CAAC,CAAC;CACzF;AAEc,SAAS,sBAAsB,CAAC,MAAM,EAAE;IACnD,OAAO,CAAC,GAAG,GAAK;QACZ,YAAY,CAAC,GAAG,CAAC,CAAC;QAClB,MAAM,OAAO,GAAG,IAAI,uBAAO,CAAC,GAAG,EAAE,MAAM,CAAC,AAAC;QACzC,uBAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACtB,OAAO;YACH,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;YACpC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,MAAM,IAAG;gBACT,OAAO,OAAO,CAAC,MAAM,CAAC;aACzB;YACD,IAAI,MAAM,IAAG;gBACT,OAAO,OAAO,CAAC,MAAM,CAAC;aACzB;SACJ,CAAC;KACL,CAAC;CACL;kBAnBuB,sBAAsB;AAqB9C,sBAAsB,CAAC,GAAG,gBAAuB,CAAC;AAClD,sBAAsB,CAAC,OAAO,UAAsB,CAAC;AACrD,sBAAsB,CAAC,KAAK,kBAAyB,CAAC;AAEtD,IAAI,OAAO,MAAM,KAAK,WAAW,EAC7B,MAAM,CAAC,wBAAwB,CAAC,GAAG,sBAAsB,CAAC;;;ACxC9D;;AAAA,qCAAuD;AACvD,2CAAwC;;AAEzB,MAAM,OAAO;IACxB,YAAY,GAAG,EAAE,MAAM,CAAE;QACrB,MAAM,EAAE,WAAW,CAAA,EAAE,QAAQ,CAAA,EAAE,GAAG,GAAG,AAAC;QAEtC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QAEhC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EACrB,IAAI;YACA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,6BAAkD,CAAC;SAC9E,CAAC,OAAO,KAAK,EAAE;QACZ,EAAE;SACL;QAGL,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEvC,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,GAAG,CAAC,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAEhC,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAED,WAAW,MAAM,GAAG;QAChB,OAAO;YACH,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,CAAC;YACR,MAAM,EAAE;gBAAC,IAAI;gBAAE,KAAK;aAAC;YACrB,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,IAAM,IAAI;YAAA;YAClB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,mBAAmB,EAAE,KAAK;YAC1B,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,IAAM,IAAI;SACzB,CAAC;KACL;IAED,WAAW,MAAM,GAAG;QAChB,OAAO;YACH,OAAO,EAAE,uBAAuB;YAChC,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,MAAM,EAAE,UAAU;YAClB,WAAW,EAAE,SAAS;YACtB,SAAS,EAAE,SAAS;YACpB,mBAAmB,EAAE,SAAS;YAC9B,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,0BAA0B;YACjC,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE,UAAU;SACzB,CAAC;KACL;IAED,IAAI,QAAQ,GAAG;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC;KACrF;IAED,IAAI,SAAS,GAAG;QACZ,MAAM,EAAE,KAAK,CAAA,EAAE,GAAG,IAAI,CAAC,KAAK,AAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,AAAC;QACpC,MAAM,EAAE,YAAY,CAAA,EAAE,GAAG,IAAI,CAAC,OAAO,AAAC;QAEtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EACzB,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;QAGzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,AAAC;YACtC,OAAO,KAAK,CAAC,YAAY,GAAG,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;SACvD;QAED,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACnC;IAED,IAAI,YAAY,GAAG;QACf,MAAM,EAAE,KAAK,CAAA,EAAE,GAAG,IAAI,CAAC,KAAK,AAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,AAAC;QACpC,MAAM,EAAE,YAAY,CAAA,EAAE,GAAG,IAAI,CAAC,OAAO,AAAC;QAEtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EACzB,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;QAGzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,AAAC;YACtC,OAAO,KAAK,CAAC,YAAY,GAAG,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;SACvD;QAED,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACnC;IAED,MAAM,CAAC,KAAK,ELine truncated
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,mCAAgC;;AAChC,mCAAgC;;AAEhC,SAAS,YAAY,CAAC,GAAG,EAAE;IACvB,MAAM,EACF,OAAO,CAAA,EACP,KAAK,EAAE,EAAE,WAAW,CAAA,EAAE,CAAA,IACzB,GAAG,GAAG,CAAC,WAAW,AAAC;IACpB,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,AAAC;IAC3C,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,AAAC;IACrB,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,AAAC;IAC3B,WAAW,CAAC,KAAK,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,wDAAwB,CAAC,CAAC,CAAC;CACzF;AAEc,SAAS,sBAAsB,CAAC,MAAM,EAAE;IACnD,OAAO,CAAC,GAAG,GAAK;QACZ,YAAY,CAAC,GAAG,CAAC,CAAC;QAClB,MAAM,OAAO,GAAG,IAAI,CAAA,GAAA,uBAAO,CAAA,CAAC,GAAG,EAAE,MAAM,CAAC,AAAC;QACzC,CAAA,GAAA,uBAAO,CAAA,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACtB,OAAO;YACH,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;YACpC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,MAAM,IAAG;gBACT,OAAO,OAAO,CAAC,MAAM,CAAC;aACzB;YACD,IAAI,MAAM,IAAG;gBACT,OAAO,OAAO,CAAC,MAAM,CAAC;aACzB;SACJ,CAAC;KACL,CAAC;CACL;kBApBuB,sBAAsB;AAsB9C,sBAAsB,CAAC,GAAG,gBAAuB,CAAC;AAClD,sBAAsB,CAAC,OAAO,UAAsB,CAAC;AACrD,sBAAsB,CAAC,KAAK,kBAAyB,CAAC;AAEtD,IAAI,OAAO,MAAM,KAAK,WAAW,EAC7B,MAAM,CAAC,wBAAwB,CAAC,GAAG,sBAAsB,CAAC;;;ACzC9D;;AAAA,qCAAuD;AACvD,2CAAwC;;AAEzB,MAAM,OAAO;IACxB,YAAY,GAAG,EAAE,MAAM,CAAE;QACrB,MAAM,EAAE,WAAW,CAAA,EAAE,QAAQ,CAAA,EAAE,GAAG,GAAG,AAAC;QAEtC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QAEhC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EACrB,IAAI;YACA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,6BAAkD,CAAC;SAC9E,CAAC,OAAO,KAAK,EAAE;QACZ,EAAE;SACL;QAGL,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEvC,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,GAAG,CAAC,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,GAAG,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAEhC,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAED,WAAW,MAAM,GAAG;QAChB,OAAO;YACH,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,CAAC;YACR,MAAM,EAAE;gBAAC,IAAI;gBAAE,KAAK;aAAC;YACrB,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,IAAM,IAAI;YAClB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,mBAAmB,EAAE,KAAK;YAC1B,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,IAAM,IAAI;SACzB,CAAC;KACL;IAED,WAAW,MAAM,GAAG;QAChB,OAAO;YACH,OAAO,EAAE,uBAAuB;YAChC,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,MAAM,EAAE,UAAU;YAClB,WAAW,EAAE,SAAS;YACtB,SAAS,EAAE,SAAS;YACpB,mBAAmB,EAAE,SAAS;YAC9B,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,0BAA0B;YACjC,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE,UAAU;SACzB,CAAC;KACL;IAED,IAAI,QAAQ,GAAG;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC;KACrF;IAED,IAAI,SAAS,GAAG;QACZ,MAAM,EAAE,KAAK,CAAA,EAAE,GAAG,IAAI,CAAC,KAAK,AAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,AAAC;QACpC,MAAM,EAAE,YAAY,CAAA,EAAE,GAAG,IAAI,CAAC,OAAO,AAAC;QAEtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EACzB,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;QAGzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,AAAC;YACtC,OAAO,KAAK,CAAC,YAAY,GAAG,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;SACvD;QAED,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACnC;IAED,IAAI,YAAY,GAAG;QACf,MAAM,EAAE,KAAK,CAAA,EAAE,GAAG,IAAI,CAAC,KAAK,AAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,AAAC;QACpC,MAAM,EAAE,YAAY,CAAA,EAAE,GAAG,IAAI,CAAC,OAAO,AAAC;QAEtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EACzB,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;QAGzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,AAAC;YACtC,OAAO,KAAK,CAAC,YAAY,GAAG,KAAK,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;SACvD;QLine truncated
|
||||
+141
-133
@@ -238,13 +238,13 @@ class Artplayer extends _emitterDefault.default {
|
||||
return instances;
|
||||
}
|
||||
static get version() {
|
||||
return "4.4.0";
|
||||
return "4.4.3";
|
||||
}
|
||||
static get env() {
|
||||
return "development";
|
||||
}
|
||||
static get build() {
|
||||
return "1652712724161";
|
||||
return "1654176459288";
|
||||
}
|
||||
static get config() {
|
||||
return _configDefault.default;
|
||||
@@ -382,7 +382,7 @@ if (typeof window !== 'undefined') window['Artplayer'] = Artplayer;
|
||||
console.log(`%c ArtPlayer %c ${Artplayer.version} %c https://artplayer.org`, 'color: #fff; background: #5f5f5f', 'color: #fff; background: #4bc729', '');
|
||||
|
||||
},{"bundle-text:./style/index.less":"doPnH","option-validator":"2tbdu","./utils/emitter":"8uSwy","./utils":"euhMG","./scheme":"jVxq1","./config":"1hSww","./whitelist":"eCrHi","./template":"eG0JW","./i18n":"6Q0In","./player":"kmRM5","./control":"nK2ZQ","./contextmenu":"iygWX","./info":"6tuCt","./subtitle":"1kFyE","./events":"akAUN","./hotkey":"f1oWx","./layer":"bKuSu","./loading":"4AfId","./notice":"aKncc","./mask":"1R5LH","./icons":"bPpva","./setting":"i2oRN","./storage":"9ruid","./plugins":"7Fd4c","./ads":"47pqz","./mobile":"hMVZh","@parcel/transformer-js/src/esmodule-helpers.js":"6SDkN"}],"doPnH":[function(require,module,exports) {
|
||||
module.exports = ".art-video-player {\n z-index: 20;\n width: 100%;\n height: 100%;\n zoom: 1;\n color: #eee;\n text-align: left;\n direction: ltr;\n user-select: none;\n -webkit-tap-highlight-color: #0000;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n background-color: #000;\n outline: none;\n margin: 0 auto;\n font-family: Roboto, Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n display: flex;\n position: relative;\n}\n\n.art-video-player *, .art-video-player :before, .art-video-player :after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: #666;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: #ccc;\n}\n\n.art-video-player .art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1.5;\n display: inline-flex;\n}\n\n.art-video-player .art-icon svg {\n fill: #fff;\n}\n\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n\n@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) {\n .art-video-player .art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000b3 !important;\n }\n}\n\n.art-video-player .art-video {\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: #000;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-poster {\n z-index: 11;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n width: 100%;\n text-align: center;\n color: #fff;\n pointer-events: none;\n text-shadow: 1px 0 1px #000, 0 1px 1px #000, -1px 0 1px #000, 0 -1px 1px #000, 1px 1px 1px #000, -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000;\n padding: 0 20px;\n font-size: 20px;\n display: none;\n position: absolute;\n bottom: 10px;\n}\n\n.art-video-player .art-subtitle p {\n word-break: break-all;\n height: fit-content;\n margin: 5px 0 0;\n line-height: 1.2;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: block;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: 50px;\n}\n\n.art-video-player .art-danmuku {\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers {\n z-index: 40;\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n\n.art-video-player.art-layer-show .art-layers {\n display: block;\n}\n\n.art-video-player .art-mask {\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-mask .art-state {\n width: 60px;\n height: 60px;\n opacity: .85;\n cursor: pointer;\n pointer-events: all;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n bottom: 65px;\n right: 30px;\n}\n\n.art-video-player.art-mask-show .art-mask {\n display: flex;\n}\n\n.art-video-player.art-mobile .art-state {\n position: static;\n}\n\n.art-video-player .art-loading {\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n\n.art-video-player .art-bottom {\n z-index: 60;\n height: 100px;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n background-image: linear-gradient(to top, #000, #0006, #0000);\n background-position: bottom;\n background-repeat: repeat-x;\n flex-direction: column;\n justify-content: space-between;\n padding: 50px 10px 0;\n transition: all .2s ease-in-out;\n display: flex;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-bottom .art-progress {\n z-index: 0;\n pointer-events: auto;\n flex: 1;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress {\n height: 4px;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n height: 50%;\n width: 100%;\n background: #fff3;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-botLine truncated
|
||||
module.exports = ".art-video-player {\n z-index: 20;\n width: 100%;\n height: 100%;\n zoom: 1;\n color: #eee;\n text-align: left;\n direction: ltr;\n user-select: none;\n -webkit-tap-highlight-color: #0000;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n background-color: #000;\n outline: none;\n margin: 0 auto;\n font-family: Roboto, Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n display: flex;\n position: relative;\n}\n\n.art-video-player *, .art-video-player :before, .art-video-player :after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: #666;\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: #ccc;\n}\n\n.art-video-player .art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1.5;\n display: inline-flex;\n}\n\n.art-video-player .art-icon svg {\n fill: #fff;\n}\n\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n\n@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) {\n .art-video-player .art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000b3 !important;\n }\n}\n\n.art-video-player .art-video {\n z-index: 10;\n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: #000;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-poster {\n z-index: 11;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n width: 100%;\n text-align: center;\n color: #fff;\n pointer-events: none;\n text-shadow: 1px 0 1px #000, 0 1px 1px #000, -1px 0 1px #000, 0 -1px 1px #000, 1px 1px 1px #000, -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000;\n padding: 0 20px;\n font-size: 20px;\n display: none;\n position: absolute;\n bottom: 10px;\n}\n\n.art-video-player .art-subtitle p {\n word-break: break-all;\n height: fit-content;\n margin: 5px 0 0;\n line-height: 1.2;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: block;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: 50px;\n}\n\n.art-video-player .art-danmuku {\n z-index: 30;\n width: 100%;\n height: 100%;\n pointer-events: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers {\n z-index: 40;\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-layers .art-layer {\n pointer-events: auto;\n}\n\n.art-video-player.art-layer-show .art-layers {\n display: block;\n}\n\n.art-video-player .art-mask {\n z-index: 50;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n overflow: hidden;\n}\n\n.art-video-player .art-mask .art-state {\n width: 60px;\n height: 60px;\n opacity: .85;\n cursor: pointer;\n pointer-events: all;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n bottom: 65px;\n right: 30px;\n}\n\n.art-video-player.art-mask-show .art-mask {\n display: flex;\n}\n\n.art-video-player.art-mobile .art-state {\n position: static;\n}\n\n.art-video-player .art-loading {\n z-index: 70;\n width: 100%;\n height: 100%;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n display: none;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player.art-loading-show .art-loading {\n display: flex;\n}\n\n.art-video-player .art-bottom {\n z-index: 60;\n height: 100px;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n background-image: linear-gradient(to top, #000, #0006, #0000);\n background-position: bottom;\n background-repeat: repeat-x;\n flex-direction: column;\n justify-content: space-between;\n padding: 50px 10px 0;\n transition: all .2s ease-in-out;\n display: flex;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.art-video-player .art-bottom .art-progress {\n z-index: 0;\n pointer-events: auto;\n flex: 1;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress {\n height: 4px;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner {\n height: 50%;\n width: 100%;\n background: #fff3;\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.art-video-player .art-botLine truncated
|
||||
|
||||
},{}],"2tbdu":[function(require,module,exports) {
|
||||
!function(r, t) {
|
||||
@@ -744,7 +744,7 @@ const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent);
|
||||
const isWechat = /MicroMessenger/i.test(userAgent);
|
||||
const isIE = /MSIE|Trident/i.test(userAgent);
|
||||
const isAndroid = /android/i.test(userAgent);
|
||||
const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream;
|
||||
const isIOS = /iPad|iPhone|iPod/i.test(userAgent) && !window.MSStream;
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"6SDkN"}],"kCmly":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
@@ -1238,7 +1238,7 @@ class Template {
|
||||
}
|
||||
static get html() {
|
||||
return `
|
||||
<div class="art-video-player art-subtitle-show art-layer-show">
|
||||
<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">
|
||||
<video class="art-video"></video>
|
||||
<div class="art-poster"></div>
|
||||
<div class="art-subtitle"></div>
|
||||
@@ -1264,7 +1264,7 @@ class Template {
|
||||
<div class="art-info-panel">
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Player version:</div>
|
||||
<div class="art-info-content">${"4.4.0"}</div>
|
||||
<div class="art-info-content">${"4.4.3"}</div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video url:</div>
|
||||
@@ -2330,7 +2330,6 @@ parcelHelpers.defineInteropFlag(exports);
|
||||
var _utils = require("../utils");
|
||||
function miniMix(art) {
|
||||
const { i18n , option , storage , events: { proxy } , template: { $player , $miniClose , $miniTitle , $miniHeader } , } = art;
|
||||
let cacheStyle = '';
|
||||
let isDroging = false;
|
||||
let lastPageX = 0;
|
||||
let lastPageY = 0;
|
||||
@@ -2372,7 +2371,6 @@ function miniMix(art) {
|
||||
if (value) {
|
||||
art.normalSize = 'mini';
|
||||
art.autoSize = false;
|
||||
cacheStyle = $player.style.cssText;
|
||||
_utils.addClass($player, 'art-mini');
|
||||
const top = storage.get('top');
|
||||
const left = storage.get('left');
|
||||
@@ -2385,9 +2383,8 @@ function miniMix(art) {
|
||||
art.mini = true;
|
||||
}
|
||||
} else {
|
||||
const $body = document.body;
|
||||
const top = $body.clientHeight - art.height - 50;
|
||||
const left = $body.clientWidth - art.width - 50;
|
||||
const top = window.innerHeight - art.height - 50;
|
||||
const left = window.innerWidth - art.width - 50;
|
||||
storage.set('top', top);
|
||||
storage.set('left', left);
|
||||
_utils.setStyle($player, 'top', `${top}px`);
|
||||
@@ -2398,7 +2395,6 @@ function miniMix(art) {
|
||||
art.notice.show = '';
|
||||
art.emit('mini', true);
|
||||
} else {
|
||||
$player.style.cssText = cacheStyle;
|
||||
_utils.removeClass($player, 'art-mini');
|
||||
_utils.setStyle($player, 'top', null);
|
||||
_utils.setStyle($player, 'left', null);
|
||||
@@ -2670,8 +2666,9 @@ function eventInit(art) {
|
||||
notice.show = `${i18n.get('Reconnect')}: ${reconnectTime}`;
|
||||
art.emit('error', reconnectTime);
|
||||
} else {
|
||||
art.mask.show = true;
|
||||
art.loading.show = false;
|
||||
art.controls.show = false;
|
||||
art.controls.show = true;
|
||||
_utils.addClass($player, 'art-error');
|
||||
await _utils.sleep(constructor.RECONNECT_SLEEP_TIME);
|
||||
notice.show = i18n.get('Video Load Failed');
|
||||
@@ -2680,7 +2677,7 @@ function eventInit(art) {
|
||||
});
|
||||
// art.on('video:loadeddata', () => {
|
||||
// });
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
art.on('video:loadedmetadata', ()=>{
|
||||
art.autoSize = option.autoSize;
|
||||
if (_utils.isMobile) {
|
||||
art.loading.show = false;
|
||||
@@ -2690,6 +2687,8 @@ function eventInit(art) {
|
||||
});
|
||||
art.on('video:loadstart', ()=>{
|
||||
art.loading.show = true;
|
||||
art.mask.show = false;
|
||||
art.controls.show = true;
|
||||
});
|
||||
art.on('video:pause', ()=>{
|
||||
art.controls.show = true;
|
||||
@@ -2711,6 +2710,7 @@ function eventInit(art) {
|
||||
});
|
||||
art.on('video:seeking', ()=>{
|
||||
art.loading.show = true;
|
||||
art.mask.show = false;
|
||||
});
|
||||
// art.on('video:stalled', () => {
|
||||
// });
|
||||
@@ -2723,6 +2723,7 @@ function eventInit(art) {
|
||||
// });
|
||||
art.on('video:waiting', ()=>{
|
||||
art.loading.show = true;
|
||||
art.mask.show = false;
|
||||
});
|
||||
}
|
||||
exports.default = eventInit;
|
||||
@@ -2761,7 +2762,7 @@ class Control extends _componentDefault.default {
|
||||
constructor(art){
|
||||
super(art);
|
||||
this.name = 'control';
|
||||
const { option , constructor , events: { proxy } , template: { $player } , } = art;
|
||||
const { constructor , events: { proxy } , template: { $player } , } = art;
|
||||
let activeTime = Date.now();
|
||||
proxy($player, [
|
||||
'click',
|
||||
@@ -2781,81 +2782,83 @@ class Control extends _componentDefault.default {
|
||||
_utils.removeClass($player, 'art-hover');
|
||||
}
|
||||
});
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
this.add(_progressDefault.default({
|
||||
name: 'progress',
|
||||
disable: option.isLive,
|
||||
position: 'top',
|
||||
index: 10
|
||||
}));
|
||||
this.add(_thumbnailsDefault.default({
|
||||
name: 'thumbnails',
|
||||
disable: !option.thumbnails.url || option.isLive || _utils.isMobile,
|
||||
position: 'top',
|
||||
index: 20
|
||||
}));
|
||||
this.add(_loopDefault.default({
|
||||
name: 'loop',
|
||||
disable: false,
|
||||
position: 'top',
|
||||
index: 30
|
||||
}));
|
||||
this.add(_playAndPauseDefault.default({
|
||||
name: 'playAndPause',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 10
|
||||
}));
|
||||
this.add(_volumeDefault.default({
|
||||
name: 'volume',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 20
|
||||
}));
|
||||
this.add(_timeDefault.default({
|
||||
name: 'time',
|
||||
disable: option.isLive,
|
||||
position: 'left',
|
||||
index: 30
|
||||
}));
|
||||
this.add(_qualityDefault.default({
|
||||
name: 'quality',
|
||||
disable: option.quality.length === 0,
|
||||
position: 'right',
|
||||
index: 10
|
||||
}));
|
||||
this.add(_screenshotDefault.default({
|
||||
name: 'screenshot',
|
||||
disable: !option.screenshot || _utils.isMobile,
|
||||
position: 'right',
|
||||
index: 20
|
||||
}));
|
||||
this.add(_settingDefault.default({
|
||||
name: 'setting',
|
||||
disable: !option.setting,
|
||||
position: 'right',
|
||||
index: 30
|
||||
}));
|
||||
this.add(_pipDefault.default({
|
||||
name: 'pip',
|
||||
disable: !option.pip,
|
||||
position: 'right',
|
||||
index: 40
|
||||
}));
|
||||
this.add(_fullscreenWebDefault.default({
|
||||
name: 'fullscreenWeb',
|
||||
disable: !option.fullscreenWeb,
|
||||
position: 'right',
|
||||
index: 50
|
||||
}));
|
||||
this.add(_fullscreenDefault.default({
|
||||
name: 'fullscreen',
|
||||
disable: !option.fullscreen,
|
||||
position: 'right',
|
||||
index: 60
|
||||
}));
|
||||
for(let index = 0; index < option.controls.length; index++)this.add(option.controls[index]);
|
||||
});
|
||||
this.init();
|
||||
}
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
this.add(_progressDefault.default({
|
||||
name: 'progress',
|
||||
disable: option.isLive,
|
||||
position: 'top',
|
||||
index: 10
|
||||
}));
|
||||
this.add(_thumbnailsDefault.default({
|
||||
name: 'thumbnails',
|
||||
disable: !option.thumbnails.url || option.isLive || _utils.isMobile,
|
||||
position: 'top',
|
||||
index: 20
|
||||
}));
|
||||
this.add(_loopDefault.default({
|
||||
name: 'loop',
|
||||
disable: false,
|
||||
position: 'top',
|
||||
index: 30
|
||||
}));
|
||||
this.add(_playAndPauseDefault.default({
|
||||
name: 'playAndPause',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 10
|
||||
}));
|
||||
this.add(_volumeDefault.default({
|
||||
name: 'volume',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 20
|
||||
}));
|
||||
this.add(_timeDefault.default({
|
||||
name: 'time',
|
||||
disable: option.isLive,
|
||||
position: 'left',
|
||||
index: 30
|
||||
}));
|
||||
this.add(_qualityDefault.default({
|
||||
name: 'quality',
|
||||
disable: option.quality.length === 0,
|
||||
position: 'right',
|
||||
index: 10
|
||||
}));
|
||||
this.add(_screenshotDefault.default({
|
||||
name: 'screenshot',
|
||||
disable: !option.screenshot || _utils.isMobile,
|
||||
position: 'right',
|
||||
index: 20
|
||||
}));
|
||||
this.add(_settingDefault.default({
|
||||
name: 'setting',
|
||||
disable: !option.setting,
|
||||
position: 'right',
|
||||
index: 30
|
||||
}));
|
||||
this.add(_pipDefault.default({
|
||||
name: 'pip',
|
||||
disable: !option.pip,
|
||||
position: 'right',
|
||||
index: 40
|
||||
}));
|
||||
this.add(_fullscreenWebDefault.default({
|
||||
name: 'fullscreenWeb',
|
||||
disable: !option.fullscreenWeb,
|
||||
position: 'right',
|
||||
index: 50
|
||||
}));
|
||||
this.add(_fullscreenDefault.default({
|
||||
name: 'fullscreen',
|
||||
disable: !option.fullscreen,
|
||||
position: 'right',
|
||||
index: 60
|
||||
}));
|
||||
for(let index = 0; index < option.controls.length; index++)this.add(option.controls[index]);
|
||||
}
|
||||
add(getOption) {
|
||||
const option = typeof getOption === 'function' ? getOption(this.art) : getOption;
|
||||
@@ -3194,11 +3197,13 @@ function progress(options) {
|
||||
_utils.setStyle($indicator, 'left', `calc(${percentage * 100}% - ${indicatorSize / 2}px)`);
|
||||
}
|
||||
}
|
||||
for(let index = 0; index < option.highlight.length; index++){
|
||||
const item = option.highlight[index];
|
||||
const left = _utils.clamp(item.time, 0, art.duration) / art.duration * 100;
|
||||
_utils.append($highlight, `<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`);
|
||||
}
|
||||
art.on('video:loadedmetadata', ()=>{
|
||||
for(let index = 0; index < option.highlight.length; index++){
|
||||
const item = option.highlight[index];
|
||||
const left = _utils.clamp(item.time, 0, art.duration) / art.duration * 100;
|
||||
_utils.append($highlight, `<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`);
|
||||
}
|
||||
});
|
||||
setBar('loaded', art.loaded);
|
||||
art.on('setBar', (type, percentage)=>{
|
||||
setBar(type, percentage);
|
||||
@@ -3353,10 +3358,10 @@ function setting(option) {
|
||||
...option,
|
||||
tooltip: art.i18n.get('Show Setting'),
|
||||
mounted: ($control)=>{
|
||||
const { events: { proxy } , icons , i18n , setting: setting1 , } = art;
|
||||
const { events: { proxy } , icons , i18n , } = art;
|
||||
_utils.append($control, icons.setting);
|
||||
proxy($control, 'click', ()=>{
|
||||
setting1.toggle = true;
|
||||
art.setting.toggle = true;
|
||||
});
|
||||
art.on('setting', (value)=>{
|
||||
_utils.tooltip($control, i18n.get(value ? 'Hide Setting' : 'Show Setting'));
|
||||
@@ -3502,12 +3507,9 @@ var _closeDefault = parcelHelpers.interopDefault(_close);
|
||||
class Contextmenu extends _componentDefault.default {
|
||||
constructor(art){
|
||||
super(art);
|
||||
this.art = art;
|
||||
this.name = 'contextmenu';
|
||||
this.$parent = art.template.$contextmenu;
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
if (!_utils.isMobile) this.init();
|
||||
});
|
||||
if (!_utils.isMobile) this.init();
|
||||
}
|
||||
init() {
|
||||
const { option , template: { $player , $contextmenu } , events: { proxy } , } = this.art;
|
||||
@@ -3692,7 +3694,7 @@ parcelHelpers.defineInteropFlag(exports);
|
||||
function version(option) {
|
||||
return {
|
||||
...option,
|
||||
html: `<a href="https://artplayer.org" target="_blank">ArtPlayer ${"4.4.0"}</a>`
|
||||
html: `<a href="https://artplayer.org" target="_blank">ArtPlayer ${"4.4.3"}</a>`
|
||||
};
|
||||
}
|
||||
exports.default = version;
|
||||
@@ -3722,9 +3724,7 @@ class Info extends _componentDefault.default {
|
||||
constructor(art){
|
||||
super(art);
|
||||
this.name = 'info';
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
if (!_utils.isMobile) this.init();
|
||||
});
|
||||
if (!_utils.isMobile) this.init();
|
||||
}
|
||||
init() {
|
||||
const { constructor , events: { proxy } , template: { $infoPanel , $infoClose , $video } , } = this.art;
|
||||
@@ -3764,9 +3764,7 @@ class Subtitle extends _componentDefault.default {
|
||||
constructor(art){
|
||||
super(art);
|
||||
this.name = 'subtitle';
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
this.init(art.option.subtitle);
|
||||
});
|
||||
this.init(art.option.subtitle);
|
||||
}
|
||||
get url() {
|
||||
return this.art.template.$track.src;
|
||||
@@ -3872,14 +3870,14 @@ class Events {
|
||||
this.proxy = this.proxy.bind(this);
|
||||
this.hover = this.hover.bind(this);
|
||||
this.loadImg = this.loadImg.bind(this);
|
||||
if (art.whitelist.state) art.once('video:loadedmetadata', ()=>{
|
||||
if (art.whitelist.state) {
|
||||
_clickInitDefault.default(art, this);
|
||||
_hoverInitDefault.default(art, this);
|
||||
_mousemoveInitDefault.default(art, this);
|
||||
_resizeInitDefault.default(art, this);
|
||||
_gestureInitDefault.default(art, this);
|
||||
_viewInitDefault.default(art, this);
|
||||
});
|
||||
}
|
||||
}
|
||||
proxy(target, name, callback, option = {}) {
|
||||
if (Array.isArray(name)) return name.map((item)=>this.proxy(target, item, callback, option)
|
||||
@@ -3984,11 +3982,11 @@ var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
var _utils = require("../utils");
|
||||
function resizeInit(art, events) {
|
||||
const { notice , option } = art;
|
||||
const { option } = art;
|
||||
const resizeFn = _utils.throttle(()=>{
|
||||
if (art.normalSize) art.autoSize = option.autoSize;
|
||||
art.aspectRatioReset = true;
|
||||
notice.show = '';
|
||||
art.notice.show = '';
|
||||
art.emit('resize');
|
||||
}, art.constructor.RESIZE_TIME);
|
||||
events.proxy(window, [
|
||||
@@ -4009,7 +4007,7 @@ parcelHelpers.defineInteropFlag(exports);
|
||||
var _utils = require("../utils");
|
||||
function gestureInit(art, events) {
|
||||
if (_utils.isMobile && !art.option.isLive) {
|
||||
const { notice , plugins , template: { $video , $bottom , $controls } , } = art;
|
||||
const { $video , $bottom , $controls } = art.template;
|
||||
let isDroging = false;
|
||||
let startX = 0;
|
||||
let startY = 0;
|
||||
@@ -4025,7 +4023,7 @@ function gestureInit(art, events) {
|
||||
};
|
||||
const onTouchMove = (event)=>{
|
||||
if (event.touches.length === 1 && isDroging && art.duration) {
|
||||
const autoOrientation = plugins.autoOrientation && plugins.autoOrientation.state;
|
||||
const autoOrientation = art.plugins.autoOrientation && art.plugins.autoOrientation.state;
|
||||
const { clientX , clientY } = event.touches[0];
|
||||
const ratioX = _utils.clamp((clientX - startX) / art.width, -1, 1);
|
||||
const ratioY = _utils.clamp((clientY - startY) / art.height, -1, 1);
|
||||
@@ -4033,7 +4031,7 @@ function gestureInit(art, events) {
|
||||
const currentTime = _utils.clamp(startTime + art.duration * ratio / 2, 0, art.duration);
|
||||
art.seek = currentTime;
|
||||
art.emit('setBar', 'played', _utils.clamp(currentTime / art.duration, 0, 1));
|
||||
notice.show = `${_utils.secondToTime(currentTime)} / ${_utils.secondToTime(art.duration)}`;
|
||||
art.notice.show = `${_utils.secondToTime(currentTime)} / ${_utils.secondToTime(art.duration)}`;
|
||||
}
|
||||
};
|
||||
const onTouchEnd = ()=>{
|
||||
@@ -4081,9 +4079,7 @@ class Hotkey {
|
||||
constructor(art){
|
||||
this.art = art;
|
||||
this.keys = {};
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
if (art.option.hotkey && !_utils.isMobile) this.init();
|
||||
});
|
||||
if (art.option.hotkey && !_utils.isMobile) this.init();
|
||||
}
|
||||
init() {
|
||||
const { proxy } = this.art.events;
|
||||
@@ -4148,9 +4144,7 @@ class Layer extends _componentDefault.default {
|
||||
const { option , template: { $layer } , } = art;
|
||||
this.name = 'layer';
|
||||
this.$parent = $layer;
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
for(let index = 0; index < option.layers.length; index++)this.add(option.layers[index]);
|
||||
});
|
||||
for(let index = 0; index < option.layers.length; index++)this.add(option.layers[index]);
|
||||
}
|
||||
}
|
||||
exports.default = Layer;
|
||||
@@ -4205,7 +4199,13 @@ class Mask extends _componentDefault.default {
|
||||
super(art);
|
||||
this.name = 'mask';
|
||||
const { template , icons , events } = art;
|
||||
_utils.append(template.$state, icons.state);
|
||||
const $state = _utils.append(template.$state, icons.state);
|
||||
const $error = _utils.append(template.$state, icons.error);
|
||||
_utils.setStyle($error, 'display', 'none');
|
||||
art.on('destroy', ()=>{
|
||||
_utils.setStyle($state, 'display', 'none');
|
||||
_utils.setStyle($error, 'display', null);
|
||||
});
|
||||
events.proxy(template.$state, 'click', ()=>art.play()
|
||||
);
|
||||
}
|
||||
@@ -4264,6 +4264,8 @@ var _switchOffSvg = require("bundle-text:./switch-off.svg");
|
||||
var _switchOffSvgDefault = parcelHelpers.interopDefault(_switchOffSvg);
|
||||
var _flipSvg = require("bundle-text:./flip.svg");
|
||||
var _flipSvgDefault = parcelHelpers.interopDefault(_flipSvg);
|
||||
var _errorSvg = require("bundle-text:./error.svg");
|
||||
var _errorSvgDefault = parcelHelpers.interopDefault(_errorSvg);
|
||||
class Icons {
|
||||
constructor(art){
|
||||
const icons = {
|
||||
@@ -4291,6 +4293,7 @@ class Icons {
|
||||
fullscreenWebOn: _fullscreenWebOnSvgDefault.default,
|
||||
switchOn: _switchOnSvgDefault.default,
|
||||
switchOff: _switchOffSvgDefault.default,
|
||||
error: _errorSvgDefault.default,
|
||||
...art.option.icons
|
||||
};
|
||||
Object.keys(icons).forEach((key)=>{
|
||||
@@ -4308,7 +4311,7 @@ class Icons {
|
||||
}
|
||||
exports.default = Icons;
|
||||
|
||||
},{"../utils":"euhMG","bundle-text:./loading.svg":"kSZpY","bundle-text:./state.svg":"l1cGI","bundle-text:./check.svg":"ihtKw","bundle-text:./play.svg":"aCrjI","bundle-text:./pause.svg":"djndS","bundle-text:./volume.svg":"3Mi6x","bundle-text:./volume-close.svg":"jxG45","bundle-text:./screenshot.svg":"eXfwA","bundle-text:./setting.svg":"kXSEM","bundle-text:./arrow-left.svg":"etyqn","bundle-text:./arrow-right.svg":"fU9m5","bundle-text:./playback-rate.svg":"wh93r","bundle-text:./aspect-ratio.svg":"2OSVS","bundle-text:./config.svg":"1WMKP","bundle-text:./pip.svg":"gGDL8","bundle-text:./lock.svg":"bDVqH","bundle-text:./unlock.svg":"b8r9U","bundle-text:./fullscreen-off.svg":"1F5ib","bundle-text:./fullscreen-on.svg":"6Nkxe","bundle-text:./fullscreen-web-off.svg":"akUW2","bundle-text:./fullscreen-web-on.svg":"5ohBx","bundle-text:./switch-on.svg":"2V2BU","bundle-text:./switch-off.svg":"cIVbn","bundle-text:./flip.svg":"eBNt7","@parcel/transformer-js/src/esmodule-helpers.js":"6SDkN"}],"kSZpY":[function(require,module,exports) {
|
||||
},{"../utils":"euhMG","bundle-text:./loading.svg":"kSZpY","bundle-text:./state.svg":"l1cGI","bundle-text:./check.svg":"ihtKw","bundle-text:./play.svg":"aCrjI","bundle-text:./pause.svg":"djndS","bundle-text:./volume.svg":"3Mi6x","bundle-text:./volume-close.svg":"jxG45","bundle-text:./screenshot.svg":"eXfwA","bundle-text:./setting.svg":"kXSEM","bundle-text:./arrow-left.svg":"etyqn","bundle-text:./arrow-right.svg":"fU9m5","bundle-text:./playback-rate.svg":"wh93r","bundle-text:./aspect-ratio.svg":"2OSVS","bundle-text:./config.svg":"1WMKP","bundle-text:./pip.svg":"gGDL8","bundle-text:./lock.svg":"bDVqH","bundle-text:./unlock.svg":"b8r9U","bundle-text:./fullscreen-off.svg":"1F5ib","bundle-text:./fullscreen-on.svg":"6Nkxe","bundle-text:./fullscreen-web-off.svg":"akUW2","bundle-text:./fullscreen-web-on.svg":"5ohBx","bundle-text:./switch-on.svg":"2V2BU","bundle-text:./switch-off.svg":"cIVbn","bundle-text:./flip.svg":"eBNt7","bundle-text:./error.svg":"32zQ7","@parcel/transformer-js/src/esmodule-helpers.js":"6SDkN"}],"kSZpY":[function(require,module,exports) {
|
||||
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50px\" height=\"50px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" class=\"uil-default\">\n <rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\" class=\"bk\"></rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(0 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-1s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(30 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(60 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(90 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"></animate></rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(120 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(150 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(180 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"></animate></rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(210 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(240 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(270 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"></animate></rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(300 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n <rect x=\"47\" y=\"40\" width=\"6\" height=\"20\" rx=\"5\" ry=\"5\" fill=\"#ffffff\" transform=\"rotate(330 50 50) translate(0 -30)\">\n <animate attributeName=\"opacity\" from=\"1\" to=\"0\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n</svg>";
|
||||
|
||||
},{}],"l1cGI":[function(require,module,exports) {
|
||||
@@ -4380,6 +4383,9 @@ module.exports = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLI
|
||||
},{}],"eBNt7":[function(require,module,exports) {
|
||||
module.exports = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg t=\"1652445277062\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"6034\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\">\n<path d=\"M554.666667 810.666667v85.333333h-85.333334v-85.333333h85.333334zM170.666667 178.005333a42.666667 42.666667 0 0 1 34.986666 18.218667l203.904 291.328a42.666667 42.666667 0 0 1 0 48.896l-203.946666 291.328A42.666667 42.666667 0 0 1 128 803.328V220.672a42.666667 42.666667 0 0 1 42.666667-42.666667z m682.666666 0a42.666667 42.666667 0 0 1 42.368 37.717334l0.298667 4.949333v582.656a42.666667 42.666667 0 0 1-74.24 28.629333l-3.413333-4.181333-203.904-291.328a42.666667 42.666667 0 0 1-3.029334-43.861333l3.029334-5.034667 203.946666-291.328A42.666667 42.666667 0 0 1 853.333333 178.005333zM554.666667 640v85.333333h-85.333334v-85.333333h85.333334zM196.266667 319.104V716.8L335.957333 512 196.309333 319.104zM554.666667 469.333333v85.333334h-85.333334v-85.333334h85.333334z m0-170.666666v85.333333h-85.333334V298.666667h85.333334z m0-170.666667v85.333333h-85.333334V128h85.333334z\" fill=\"#ffffff\" p-id=\"6035\">\n</path>\n</svg>";
|
||||
|
||||
},{}],"32zQ7":[function(require,module,exports) {
|
||||
module.exports = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg t=\"1652850026663\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2749\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"50\" height=\"50\">\n<path d=\"M593.8176 168.5504l356.00384 595.21024c26.15296 43.74528 10.73152 99.7376-34.44736 125.05088-14.39744 8.06912-30.72 12.30848-47.37024 12.30848H155.97568C103.75168 901.12 61.44 860.16 61.44 809.61536c0-16.09728 4.38272-31.92832 12.71808-45.8752L430.16192 168.5504c26.17344-43.7248 84.00896-58.65472 129.20832-33.34144a93.0816 93.0816 0 0 1 34.44736 33.34144zM512 819.2a61.44 61.44 0 1 0 0-122.88 61.44 61.44 0 0 0 0 122.88z m0-512a72.31488 72.31488 0 0 0-71.76192 81.3056l25.72288 205.7216a46.40768 46.40768 0 0 0 92.07808 0l25.72288-205.74208A72.31488 72.31488 0 0 0 512 307.2z\" p-id=\"2750\">\n</path>\n</svg>";
|
||||
|
||||
},{}],"i2oRN":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
@@ -4413,22 +4419,19 @@ class Setting extends _componentDefault.default {
|
||||
constructor(art){
|
||||
super(art);
|
||||
const { option , events: { proxy } , template: { $setting , $player } , } = art;
|
||||
this.art = art;
|
||||
this.name = 'setting';
|
||||
this.$parent = $setting;
|
||||
this.option = [];
|
||||
this.events = [];
|
||||
this.cache = new Map();
|
||||
if (option.setting) {
|
||||
art.once('video:loadedmetadata', ()=>{
|
||||
if (option.playbackRate) this.option.push(_playbackRateDefault.default(art));
|
||||
if (option.aspectRatio) this.option.push(_aspectRatioDefault.default(art));
|
||||
if (option.flip) this.option.push(_flipDefault.default(art));
|
||||
if (option.subtitleOffset) this.option.push(_subtitleOffsetDefault.default(art));
|
||||
for(let index = 0; index < option.settings.length; index++)this.option.push(option.settings[index]);
|
||||
this.option = makeRecursion(this.option);
|
||||
this.init(this.option);
|
||||
});
|
||||
if (option.playbackRate) this.option.push(_playbackRateDefault.default(art));
|
||||
if (option.aspectRatio) this.option.push(_aspectRatioDefault.default(art));
|
||||
if (option.flip) this.option.push(_flipDefault.default(art));
|
||||
if (option.subtitleOffset) this.option.push(_subtitleOffsetDefault.default(art));
|
||||
for(let index = 0; index < option.settings.length; index++)this.option.push(option.settings[index]);
|
||||
this.option = makeRecursion(this.option);
|
||||
this.init(this.option);
|
||||
art.on('blur', ()=>{
|
||||
if (this.show) {
|
||||
this.show = false;
|
||||
@@ -4496,6 +4499,7 @@ class Setting extends _componentDefault.default {
|
||||
_utils.append($left, $icon);
|
||||
item.$icon = $icon;
|
||||
_utils.def(item, 'icon', {
|
||||
configurable: true,
|
||||
get () {
|
||||
return $icon.innerHTML;
|
||||
},
|
||||
@@ -4509,6 +4513,7 @@ class Setting extends _componentDefault.default {
|
||||
_utils.append($left, $html);
|
||||
item.$html = $html;
|
||||
_utils.def(item, 'html', {
|
||||
configurable: true,
|
||||
get () {
|
||||
return $html.innerHTML;
|
||||
},
|
||||
@@ -4522,6 +4527,7 @@ class Setting extends _componentDefault.default {
|
||||
_utils.append($right, $tooltip);
|
||||
item.$tooltip = $tooltip;
|
||||
_utils.def(item, 'tooltip', {
|
||||
configurable: true,
|
||||
get () {
|
||||
return $tooltip.innerHTML;
|
||||
},
|
||||
@@ -4540,6 +4546,7 @@ class Setting extends _componentDefault.default {
|
||||
_utils.append($right, $state);
|
||||
item.$switch = item.switch;
|
||||
_utils.def(item, 'switch', {
|
||||
configurable: true,
|
||||
get () {
|
||||
return item.$switch;
|
||||
},
|
||||
@@ -4569,6 +4576,7 @@ class Setting extends _componentDefault.default {
|
||||
_utils.append($right, $state);
|
||||
item.$range = $range;
|
||||
_utils.def(item, 'range', {
|
||||
configurable: true,
|
||||
get () {
|
||||
return $range.valueAsNumber;
|
||||
},
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,0DAAmD;;AACnD,kDAAyC;;AACzC,yCAAsC;;AACtC,+BAAiC;AACjC,iCAA8B;;AAC9B,iCAA8B;;AAC9B,uCAAoC;;AACpC,qCAAkC;;AAClC,6BAA0B;;AAC1B,iCAA8B;;AAC9B,mCAAgC;;AAChC,2CAAwC;;AACxC,6BAA0B;;AAC1B,qCAAkC;;AAClC,iCAA8B;;AAC9B,iCAA8B;;AAC9B,+BAA4B;;AAC5B,mCAAgC;;AAChC,iCAA8B;;AAC9B,6BAA0B;;AAC1B,+BAA4B;;AAC5B,mCAAgC;;AAChC,mCAAgC;;AAChC,mCAAgC;;AAChC,2BAAwB;;AACxB,iCAA8B;;AAE9B,IAAI,EAAE,GAAG,CAAC,AAAC;AACX,MAAM,SAAS,GAAG,EAAE,AAAC;AACN,MAAM,SAAS,SAAS,uBAAO;IAC1C,YAAY,MAAM,EAAE,aAAa,CAAE;QAC/B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;QAEf,MAAM,WAAW,GAAG,MAAK,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,AAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,+BAAS,CAAC,WAAW,EAAE,sBAAM,CAAC,CAAC;QAE7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QAEvB,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAS,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;QAE/B,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAK,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAK,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,WAAW,GAAG,IAAI,2BAAW,CAAC,IAAI,CAAC,CAAC;YACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAQ,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAG,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;SACpC,MACG,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;QAGnC,IAAI,OAAO,aAAa,KAAK,UAAU,EACnC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,IAAM,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QAAA,CAAC,CAAC;QAGrD,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACxB;IAED,WAAW,SAAS,GAAG;QACnB,OAAO,SAAS,CAAC;KACpB;IAED,WAAW,OAAO,GAAG;QACjB,eAA2B;KAC9B;IAED,WAAW,GAAG,GAAG;QACb,qBAA4B;KAC/B;IAED,WAAW,KAAK,GAAG;QACf,uBAA8B;KACjC;IAED,WAAW,MAAM,GAAG;QAChB,OAAO,sBAAM,CAAC;KACjB;IAED,WAAW,KAAK,GAAG;QACf,OAAO,MAAK,CAAC;KAChB;IAED,WAAW,MAAM,GAAG;QAChB,OAAO,sBAAM,CAAC;KACjB;IAED,WAAW,OAAO,GAAG;QACjB,OAAO,uBAAO,CAAC;KAClB;IAED,WAAW,SAAS,GAAG;QACnB,OAAO,+BAAS,CAAC;KACpB;IAED,WAAW,MAAM,GAAG;QAChB,OAAO,+BAAS,CAAC,MAAM,CAAC;KAC3B;IAED,WAAW,IAAI,GAAG;QACd,OAAO,wBAAQ,CAAC,IAAI,CAAC;KACxB;IAED,WAAW,MAAM,GAAG;QAChB,OAAO;YACH,SAAS,EAAE,YAAY;YACvB,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,KAAK;YACX,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,IAAI;YACZ,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,KAAK;YACrB,eAAe,EAAE,KAAK;YACtB,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,UAAU,EAAE;gBACR,GAAG,EAAE,EAAE;gBACP,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;aACb;YACD,QAAQ,EAAE;gBACN,GAAG,EAAE,EAAE;gBACP,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,QAAQ,EAAE,OAAO;aACpB;YACD,aAAa,EAAE;gBACX,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,MAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,UAAU;aAChD;YACD,KAAK,EAAE,EAAE;YACT,UAAU,EAAE,EAAE;YACd,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE;SACzC,CAAC;KACL;IAED,IAAI,KAAK,GAAG;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;KAC5B;IAED,IAAI,KAAK,GAAG;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;KAC9B;IAED,OAAO,CAAC,UAAU,GAAG,IAAI,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAClC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACxB;CACJ;kBA1KoB,SAAS;AA4K9B,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;AAC7B,SAAS,CAAC,aAAa,GAAG,GAAG,CAAC;AAC9B,SAAS,CAAC,kBAAkB,GAAG,GAAG,CAAC;AACnC,SAAS,CAAC,mBAAmB,GAAG,EAAE,CAAC;AACnC,SAAS,CAAC,cAAc,GAAG,EAAE,CAAC;AAC9B,SAAS,CAAC,mBAAmB,GAAG,EAAE,CAAC;AACnC,SAAS,CAAC,qBAAqB,GAAG,EAAE,CAAC;AACrC,SAAS,CAAC,0BAA0B,GAAG,EAAE,CAAC;AAC1C,SAAS,CAAC,kBAAkB,GAAG,EAAE,CAAC;AAClC,SAAS,CAAC,mBAAmB,GAAG,EAAE,CAAC;AACnC,SAAS,CAAC,WAAW,GAAG,GAAG,CAAC;AAC5B,SAAS,CAAC,WAAWLine truncated
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,0DAAmD;;AACnD,kDAAyC;;AACzC,yCAAsC;;AACtC,+BAAiC;AACjC,iCAA8B;;AAC9B,iCAA8B;;AAC9B,uCAAoC;;AACpC,qCAAkC;;AAClC,6BAA0B;;AAC1B,iCAA8B;;AAC9B,mCAAgC;;AAChC,2CAAwC;;AACxC,6BAA0B;;AAC1B,qCAAkC;;AAClC,iCAA8B;;AAC9B,iCAA8B;;AAC9B,+BAA4B;;AAC5B,mCAAgC;;AAChC,iCAA8B;;AAC9B,6BAA0B;;AAC1B,+BAA4B;;AAC5B,mCAAgC;;AAChC,mCAAgC;;AAChC,mCAAgC;;AAChC,2BAAwB;;AACxB,iCAA8B;;AAE9B,IAAI,EAAE,GAAG,CAAC,AAAC;AACX,MAAM,SAAS,GAAG,EAAE,AAAC;AACN,MAAM,SAAS,SAAS,uBAAO;IAC1C,YAAY,MAAM,EAAE,aAAa,CAAE;QAC/B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;QAEf,MAAM,WAAW,GAAG,MAAK,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,AAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,+BAAS,CAAC,WAAW,EAAE,sBAAM,CAAC,CAAC;QAE7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QAEvB,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAS,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;QAE/B,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAK,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAK,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,WAAW,GAAG,IAAI,2BAAW,CAAC,IAAI,CAAC,CAAC;YACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAQ,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAG,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAO,CAAC,IAAI,CAAC,CAAC;SACpC,MACG,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAM,CAAC,IAAI,CAAC,CAAC;QAGnC,IAAI,OAAO,aAAa,KAAK,UAAU,EACnC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,IAAM,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QAAA,CAAC,CAAC;QAGrD,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACxB;IAED,WAAW,SAAS,GAAG;QACnB,OAAO,SAAS,CAAC;KACpB;IAED,WAAW,OAAO,GAAG;QACjB,eAA2B;KAC9B;IAED,WAAW,GAAG,GAAG;QACb,qBAA4B;KAC/B;IAED,WAAW,KAAK,GAAG;QACf,uBAA8B;KACjC;IAED,WAAW,MAAM,GAAG;QAChB,OAAO,sBAAM,CAAC;KACjB;IAED,WAAW,KAAK,GAAG;QACf,OAAO,MAAK,CAAC;KAChB;IAED,WAAW,MAAM,GAAG;QAChB,OAAO,sBAAM,CAAC;KACjB;IAED,WAAW,OAAO,GAAG;QACjB,OAAO,uBAAO,CAAC;KAClB;IAED,WAAW,SAAS,GAAG;QACnB,OAAO,+BAAS,CAAC;KACpB;IAED,WAAW,MAAM,GAAG;QAChB,OAAO,+BAAS,CAAC,MAAM,CAAC;KAC3B;IAED,WAAW,IAAI,GAAG;QACd,OAAO,wBAAQ,CAAC,IAAI,CAAC;KACxB;IAED,WAAW,MAAM,GAAG;QAChB,OAAO;YACH,SAAS,EAAE,YAAY;YACvB,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,KAAK;YACX,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,IAAI;YACZ,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,KAAK;YACrB,eAAe,EAAE,KAAK;YACtB,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,UAAU,EAAE;gBACR,GAAG,EAAE,EAAE;gBACP,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;aACb;YACD,QAAQ,EAAE;gBACN,GAAG,EAAE,EAAE;gBACP,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,EAAE;gBACT,QAAQ,EAAE,OAAO;aACpB;YACD,aAAa,EAAE;gBACX,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,MAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,UAAU;aAChD;YACD,KAAK,EAAE,EAAE;YACT,UAAU,EAAE,EAAE;YACd,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE;SACzC,CAAC;KACL;IAED,IAAI,KAAK,GAAG;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;KAC5B;IAED,IAAI,KAAK,GAAG;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;KAC9B;IAED,OAAO,CAAC,UAAU,GAAG,IAAI,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAClC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACxB;CACJ;kBA1KoB,SAAS;AA4K9B,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;AAC7B,SAAS,CAAC,aAAa,GAAG,GAAG,CAAC;AAC9B,SAAS,CAAC,kBAAkB,GAAG,GAAG,CAAC;AACnC,SAAS,CAAC,mBAAmB,GAAG,EAAE,CAAC;AACnC,SAAS,CAAC,cAAc,GAAG,EAAE,CAAC;AAC9B,SAAS,CAAC,mBAAmB,GAAG,EAAE,CAAC;AACnC,SAAS,CAAC,qBAAqB,GAAG,EAAE,CAAC;AACrC,SAAS,CAAC,0BAA0B,GAAG,EAAE,CAAC;AAC1C,SAAS,CAAC,kBAAkB,GAAG,EAAE,CAAC;AAClC,SAAS,CAAC,mBAAmB,GAAG,EAAE,CAAC;AACnC,SAAS,CAAC,WAAW,GAAG,GAAG,CAAC;AAC5B,SAAS,CAAC,WAAWLine truncated
|
||||
+16
-14
@@ -5,13 +5,14 @@
|
||||
"description": "ArtPlayer.js is a modern and full featured HTML5 video player",
|
||||
"scripts": {
|
||||
"build:all": "npm run build all",
|
||||
"bootstrap": "npx lerna bootstrap",
|
||||
"bootstrap": "npx lerna bootstrap --hoist",
|
||||
"lint": "npx eslint packages/*/src",
|
||||
"build:sw": "node ./scripts/build-sw.js",
|
||||
"test:create": "node ./scripts/createTests.js",
|
||||
"dev": "npx cross-env NODE_ENV=development node ./scripts/dev.js",
|
||||
"build": "npx cross-env NODE_ENV=production node ./scripts/build.js",
|
||||
"test": "npx cross-env NODE_ENV=test mocha-chrome ./test/index.html --mocha '{\"ui\":\"bdd\"}'"
|
||||
"test": "npx cross-env NODE_ENV=test mocha-chrome ./test/index.html --mocha '{\"ui\":\"bdd\"}'",
|
||||
"postinstall": "npm run bootstrap"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -29,21 +30,22 @@
|
||||
"homepage": "https://artplayer.org",
|
||||
"browserslist": "> 0.5%, last 2 versions, not dead",
|
||||
"dependencies": {
|
||||
"@babel/eslint-parser": "^7.17.0",
|
||||
"@babel/preset-react": "^7.16.7",
|
||||
"@parcel/config-default": "^2.5.0",
|
||||
"@parcel/core": "^2.5.0",
|
||||
"@parcel/optimizer-data-url": "^2.5.0",
|
||||
"@parcel/reporter-cli": "^2.5.0",
|
||||
"@parcel/transformer-inline-string": "^2.5.0",
|
||||
"@parcel/transformer-less": "^2.5.0",
|
||||
"@parcel/transformer-vue": "^2.5.0",
|
||||
"@babel/eslint-parser": "^7.18.2",
|
||||
"@babel/preset-react": "^7.17.12",
|
||||
"@parcel/config-default": "^2.6.0",
|
||||
"@parcel/core": "^2.6.0",
|
||||
"@parcel/optimizer-data-url": "^2.6.0",
|
||||
"@parcel/reporter-cli": "^2.6.0",
|
||||
"@parcel/transformer-inline-string": "^2.6.0",
|
||||
"@parcel/transformer-less": "^2.6.0",
|
||||
"@parcel/transformer-vue": "^2.6.0",
|
||||
"artplayer": "^4.4.6",
|
||||
"chai": "^4.3.6",
|
||||
"cpy": "^9.0.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.14.0",
|
||||
"glob": "^8.0.1",
|
||||
"lerna": "^4.0.0",
|
||||
"eslint": "^8.17.0",
|
||||
"glob": "^8.0.3",
|
||||
"lerna": "^5.1.1",
|
||||
"mocha": "^10.0.0",
|
||||
"mocha-chrome": "^2.2.0",
|
||||
"node-html-parser": "^5.3.3",
|
||||
|
||||
@@ -991,6 +991,7 @@ var art = new Artplayer({
|
||||
fullscreenWebOn: '',
|
||||
switchOn: '',
|
||||
switchOff: '',
|
||||
error: '',
|
||||
indicator: '',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -3,306 +3,10 @@ title: Danmuku plugin
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
## Demo
|
||||
:::danger Tip
|
||||
|
||||
👉 [View full demo](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku)
|
||||
The documentation of the current danmaku library plug-in, only the Chinese version
|
||||
|
||||
## Install
|
||||
:::
|
||||
|
||||
### Install by `npm`:
|
||||
|
||||
```bash
|
||||
$ npm install artplayer-plugin-danmuku
|
||||
```
|
||||
|
||||
### Install by `yarn`:
|
||||
|
||||
```bash
|
||||
$ yarn add artplayer-plugin-danmuku
|
||||
```
|
||||
|
||||
```js
|
||||
import artplayerPluginDanmuku from 'artplayer-plugin-danmuku';
|
||||
```
|
||||
|
||||
### Install by `script`:
|
||||
|
||||
```html
|
||||
<script src="path/to/artplayer-plugin-danmuku.js"></script>
|
||||
```
|
||||
|
||||
Then you can access the plugin function via `window.artplayerPluginDanmuku`
|
||||
|
||||
## Use
|
||||
|
||||
### Use the damuku array
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
autoSize: true,
|
||||
setting: true,
|
||||
playbackRate: true,
|
||||
fullscreenWeb: true,
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
// Damuku array
|
||||
danmuku: [
|
||||
{
|
||||
text: '111', // Danmu text
|
||||
time: 1, // Video time
|
||||
color: '#fff', // Danmu color
|
||||
border: false, // Danmu border
|
||||
mode: 0, // Danmu mode: 0-scroll or 1-static
|
||||
},
|
||||
{
|
||||
text: '222',
|
||||
time: 2,
|
||||
color: 'red',
|
||||
border: true,
|
||||
mode: 0,
|
||||
},
|
||||
{
|
||||
text: '333',
|
||||
time: 3,
|
||||
color: 'green',
|
||||
border: false,
|
||||
mode: 1,
|
||||
},
|
||||
],
|
||||
speed: 5, // The duration of the barrage, in seconds, in the range [1 ~ 10]
|
||||
opacity: 1, // Barrage transparency, the range is [0 ~ 1]
|
||||
fontSize: 25, // Font size, supports numbers and percentages
|
||||
color: '#FFFFFF', // Default font color
|
||||
mode: 0, // Default mode, 0-scroll, 1-still
|
||||
margin: [10, '25%'], // Barrage top and bottom margins, supports numbers and percentages
|
||||
antiOverlap: true, // Whether to prevent overlapping
|
||||
useWorker: true, // whether to use web workers
|
||||
synchronousPlayback: false, // Whether to sync to playback speed
|
||||
filter: (danmu) => danmu.text.length < 50, // Barrage filter function
|
||||
lockTime: 5, // Input box lock time
|
||||
maxLength: 100, // The maximum number of words that can be input can be input box
|
||||
minWidth: 200, // At the at least width of the input box
|
||||
maxWidth: 400, // Maximum width in the input box
|
||||
theme: 'dark', // The theme color of the input box
|
||||
beforeEmit: (danmu) => !!danmu.text.trim(), // Custom verification before the barrage emit
|
||||
mount: undefined, // Customized input box mount position
|
||||
}),
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
### Use the XML
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
// Damuku xml,like the Bilibili danmuku format
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
### Use asynchronous calls
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
// Use promise to return asynchronous
|
||||
danmuku: function () {
|
||||
return new Promise((resovle) => {
|
||||
return resovle([
|
||||
{
|
||||
text: '111',
|
||||
time: 1,
|
||||
},
|
||||
{
|
||||
text: '222',
|
||||
time: 2,
|
||||
},
|
||||
{
|
||||
text: '333',
|
||||
time: 3,
|
||||
},
|
||||
]);
|
||||
});
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
## Interface
|
||||
|
||||
### hide/show
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
Hidden or show the danmuku by methods `hide` and `show`
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: 'Hide',
|
||||
click: function () {
|
||||
art.plugins.artplayerPluginDanmuku.hide();
|
||||
},
|
||||
},
|
||||
{
|
||||
position: 'right',
|
||||
html: 'Show',
|
||||
click: function () {
|
||||
art.plugins.artplayerPluginDanmuku.show();
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
### isHide
|
||||
|
||||
- Type: `Boolean`
|
||||
|
||||
By attribute `ishide` judgment the current danmuku is hidden or displayed
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: 'Hide',
|
||||
click: function (_, event) {
|
||||
if (art.plugins.artplayerPluginDanmuku.isHide) {
|
||||
art.plugins.artplayerPluginDanmuku.show();
|
||||
event.target.innerText = 'Hide';
|
||||
} else {
|
||||
art.plugins.artplayerPluginDanmuku.hide();
|
||||
event.target.innerText = 'Show';
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
### emit
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
Send a real-time danmu by method `emit`
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: 'Send',
|
||||
click: function () {
|
||||
var text = prompt('Input the danmu text', 'danmu text');
|
||||
if (!text || !text.trim()) return;
|
||||
var color = '#' + Math.floor(Math.random() * 0xffffff).toString(16);
|
||||
art.plugins.artplayerPluginDanmuku.emit({
|
||||
text: text,
|
||||
color: color,
|
||||
border: true,
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
### config
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
Changing the danmu configuration in real time through method `config`, support attributes: `speed`, `margin`, `opacity`, `fontSize`, `synchronousPlayback`, `filter`
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: 'Size:<input type="range" min="12" max="50" step="1" value="25">',
|
||||
style: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
},
|
||||
mounted: function ($setting) {
|
||||
const $range = $setting.querySelector('input[type=range]');
|
||||
$range.addEventListener('change', () => {
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
fontSize: Number($range.value),
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
👉 [https://artplayer.org/document/zh-cn/Plugins/danmuku/](https://artplayer.org/document/zh-cn/Plugins/danmuku/)
|
||||
@@ -989,6 +989,7 @@ var art = new Artplayer({
|
||||
fullscreenWebOn: '',
|
||||
switchOn: '',
|
||||
switchOff: '',
|
||||
error: '',
|
||||
indicator: '',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -21,14 +21,17 @@ $ npm install artplayer-plugin-danmuku
|
||||
$ yarn add artplayer-plugin-danmuku
|
||||
```
|
||||
|
||||
```js
|
||||
import artplayerPluginDanmuku from 'artplayer-plugin-danmuku';
|
||||
```
|
||||
|
||||
### 通过 `script` 安装:
|
||||
|
||||
```html
|
||||
<!-- 本地 -->
|
||||
<script src="path/to/artplayer-plugin-danmuku/index.js"></script>
|
||||
|
||||
<!-- jsdelivr -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js"></script>
|
||||
|
||||
<!-- unpkg -->
|
||||
<script src="https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js"></script>
|
||||
```
|
||||
|
||||
然后你可以通过 `window.artplayerPluginDanmuku` 访问到插件函数
|
||||
@@ -88,7 +91,7 @@ var art = new Artplayer({
|
||||
lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60]
|
||||
maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500]
|
||||
minWidth: 200, // 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
|
||||
maxWidth: 400, // 输入框最大宽度,范围在[minWidth ~ Infinity],填 0 则为 100% 宽度
|
||||
maxWidth: 400, // 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
|
||||
theme: 'dark', // 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
|
||||
beforeEmit: (danmu) => !!danmu.text.trim(), // 发送弹幕前的自定义校验,返回 true 则可以发送
|
||||
|
||||
@@ -273,7 +276,20 @@ var art = new Artplayer({
|
||||
|
||||
- 类型: `Function`
|
||||
|
||||
通过方法 `config` 实时改变弹幕配置,支持属性有:`speed`、`margin`、`opacity`、`fontSize`、`synchronousPlayback`、`filter`
|
||||
通过方法 `config` 实时改变弹幕配置,支持属性有:
|
||||
|
||||
- danmuku
|
||||
- speed
|
||||
- opacity
|
||||
- fontSize
|
||||
- color
|
||||
- mode
|
||||
- margin
|
||||
- antiOverlap
|
||||
- synchronousPlayback
|
||||
- filter
|
||||
- lockTime
|
||||
- beforeEmit
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
@@ -308,3 +324,95 @@ var art = new Artplayer({
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
### load
|
||||
|
||||
- 类型: `Function`
|
||||
|
||||
通过 load 方法可以重载弹幕源,或者切换新弹幕
|
||||
|
||||
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
|
||||
▶ Run Code
|
||||
</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: '重载弹幕',
|
||||
click: function () {
|
||||
art.plugins.artplayerPluginDanmuku.load();
|
||||
},
|
||||
},
|
||||
{
|
||||
position: 'right',
|
||||
html: '切换弹幕',
|
||||
click: function () {
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
danmuku: '/assets/sample/danmuku-v2.xml',
|
||||
});
|
||||
art.plugins.artplayerPluginDanmuku.load();
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
## 事件
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
setting: true,
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:emit', (danmu) => {
|
||||
console.info('新增弹幕', danmu);
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:loaded', (danmus) => {
|
||||
console.info('加载弹幕', danmus.length);
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:error', (error) => {
|
||||
console.info('加载错误', error);
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:config', (option) => {
|
||||
console.info('配置变化', option);
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:stop', () => {
|
||||
console.info('弹幕停止');
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:start', () => {
|
||||
console.info('弹幕开始');
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:hide', () => {
|
||||
console.info('弹幕隐藏');
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:show', () => {
|
||||
console.info('弹幕显示');
|
||||
});
|
||||
|
||||
art.on('artplayerPluginDanmuku:destroy', () => {
|
||||
console.info('弹幕销毁');
|
||||
});
|
||||
```
|
||||
+23019
-22669
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer-plugin-danmuku.js v4.4.1
|
||||
* artplayer-plugin-danmuku.js v4.4.8
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf,s=o.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,n){if(!s[e]){if(!t[e]){var i="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(u&&"string"==typeof e)return u(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}m.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},m.cache={};var d=s[e]=new l.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return s[e].exports;function m(t){var e=m.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=s,l.parent=o,l.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(l,"root",{get:function(){return a.parcelRequire93cf}}),a.parcelRequire93cf=l;for(var d=0;d<e.length;d++)l(e[d]);var m=l(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}({E13ST:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function u(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new a.default(e,t);return s.default(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=u,u.env="production",u.version="4.4.1",u.build="1652773789670","undefined"!=typeof window&&(window.artplayerPluginDanmuku=u)},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"9v6Cv","./setting":"jAkJm"}],"8Gtnh":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("27c3930ee158179a"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1Line truncated
|
||||
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf,s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!s[e]){if(!t[e]){var i="function"==typeof a.parcelRequire93cf&&a.parcelRequire93cf;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}m.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},m.cache={};var d=s[e]=new u.Module(e);t[e][0].call(d.exports,m,d,d.exports,this)}return s[e].exports;function m(t){var e=m.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a.parcelRequire93cf}}),a.parcelRequire93cf=u;for(var d=0;d<e.length;d++)u(e[d]);var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}({E13ST:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),o=t("./setting"),s=i.interopDefault(o);function l(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=4.04,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 4.4.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,s.default)(e,n),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=l,l.env="production",l.version="4.4.8",l.build="1655097987373","undefined"!=typeof window&&(window.artplayerPluginDanmuku=l)},{"./danmuku":"8Gtnh","./setting":"jAkJm","@parcel/transformer-js/src/esmodule-helpers.js":"9v6Cv"}],"8Gtnh":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),o=i.interopDefault(a);class s{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("27c3930ee158179a"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("fullscreen",this.reset),e.on("fullscreenWeb",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return s.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadLine truncated
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"version": "4.4.1",
|
||||
"version": "4.4.8",
|
||||
"name": "artplayer-plugin-danmuku",
|
||||
"types": "types/artplayer-plugin-danmuku.d.ts",
|
||||
"description": "Danmuku plugin for ArtPlayer",
|
||||
"main": "dist/artplayer-plugin-danmuku.js",
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
@@ -18,8 +19,5 @@
|
||||
"html5",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"dependencies": {
|
||||
"vue": "^3.2.33"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,26 +14,35 @@ export function getMode(key) {
|
||||
|
||||
export function bilibiliDanmuParseFromXml(xmlString) {
|
||||
if (typeof xmlString !== 'string') return [];
|
||||
const srtList = xmlString.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);
|
||||
return srtList && srtList.length
|
||||
? srtList.map((item) => {
|
||||
const [, attrStr, text] = item.match(/<d p="(.+)">(.+)<\/d>/);
|
||||
const attr = attrStr.split(',');
|
||||
return attr.length === 8 && text.trim()
|
||||
? {
|
||||
text,
|
||||
time: Number(attr[0]),
|
||||
mode: getMode(Number(attr[1])),
|
||||
fontSize: Number(attr[2]),
|
||||
color: `#${Number(attr[3]).toString(16)}`,
|
||||
timestamp: Number(attr[4]),
|
||||
pool: Number(attr[5]),
|
||||
userID: attr[6],
|
||||
rowID: Number(attr[7]),
|
||||
}
|
||||
: null;
|
||||
})
|
||||
: [];
|
||||
const matches = xmlString.matchAll(/<d (?:.*? )??p="(?<p>.+?)"(?: .*?)?>(?<text>.+?)<\/d>/gs);
|
||||
return Array.from(matches)
|
||||
.map((match) => {
|
||||
const attr = match.groups.p.split(',');
|
||||
if (attr.length >= 8) {
|
||||
const text = match.groups.text
|
||||
.trim()
|
||||
.replaceAll('"', '"')
|
||||
.replaceAll(''', "'")
|
||||
.replaceAll('<', '<')
|
||||
.replaceAll('>', '>')
|
||||
.replaceAll('&', '&');
|
||||
|
||||
return {
|
||||
text,
|
||||
time: Number(attr[0]),
|
||||
mode: getMode(Number(attr[1])),
|
||||
fontSize: Number(attr[2]),
|
||||
color: `#${Number(attr[3]).toString(16)}`,
|
||||
timestamp: Number(attr[4]),
|
||||
pool: Number(attr[5]),
|
||||
userID: attr[6],
|
||||
rowID: Number(attr[7]),
|
||||
};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
export function bilibiliDanmuParseFromUrl(url) {
|
||||
|
||||
@@ -20,6 +20,7 @@ export default function artplayerPluginDanmuku(option) {
|
||||
return {
|
||||
name: 'artplayerPluginDanmuku',
|
||||
emit: danmuku.emit.bind(danmuku),
|
||||
load: danmuku.load.bind(danmuku),
|
||||
config: danmuku.config.bind(danmuku),
|
||||
hide: danmuku.hide.bind(danmuku),
|
||||
show: danmuku.show.bind(danmuku),
|
||||
|
||||
@@ -170,6 +170,12 @@ export default function setting(art, danmuku) {
|
||||
|
||||
onResize();
|
||||
art.on('resize', onResize);
|
||||
|
||||
art.on('destroy', () => {
|
||||
if (option.mount && $emitter.parentElement === option.mount) {
|
||||
option.mount.removeChild($emitter);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addControl() {
|
||||
@@ -248,11 +254,11 @@ export default function setting(art, danmuku) {
|
||||
selector: [
|
||||
{
|
||||
html: '极小',
|
||||
fontSize: '2%',
|
||||
fontSize: '4%',
|
||||
},
|
||||
{
|
||||
html: '较小',
|
||||
fontSize: '4%',
|
||||
fontSize: '5%',
|
||||
},
|
||||
{
|
||||
default: true,
|
||||
@@ -261,11 +267,11 @@ export default function setting(art, danmuku) {
|
||||
},
|
||||
{
|
||||
html: '较大',
|
||||
fontSize: '8%',
|
||||
fontSize: '7%',
|
||||
},
|
||||
{
|
||||
html: '极大',
|
||||
fontSize: '10%',
|
||||
fontSize: '8%',
|
||||
},
|
||||
],
|
||||
onSelect: function (item) {
|
||||
@@ -371,11 +377,9 @@ export default function setting(art, danmuku) {
|
||||
});
|
||||
}
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
addEmitter();
|
||||
addControl();
|
||||
addSetting();
|
||||
});
|
||||
addEmitter();
|
||||
addControl();
|
||||
addSetting();
|
||||
}
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
import type Artplayer from 'artplayer';
|
||||
|
||||
export = artplayerPluginDanmuku;
|
||||
export as namespace artplayerPluginDanmuku;
|
||||
|
||||
type Danmu = {
|
||||
/**
|
||||
* 弹幕文本
|
||||
*/
|
||||
text: string;
|
||||
|
||||
/**
|
||||
* 弹幕发送模式,0为滚动,1为静止
|
||||
*/
|
||||
mode?: 0 | 1;
|
||||
|
||||
/**
|
||||
* 弹幕颜色
|
||||
*/
|
||||
color?: string;
|
||||
|
||||
/**
|
||||
* 弹幕出现的时间,单位为秒
|
||||
*/
|
||||
time?: number;
|
||||
|
||||
/**
|
||||
* 弹幕是否有描边
|
||||
*/
|
||||
border?: boolean;
|
||||
};
|
||||
|
||||
type Option = {
|
||||
/**
|
||||
* 弹幕源,可以是弹幕数组,xml 地址或者一个返回 Promise 的函数
|
||||
*/
|
||||
danmuku: Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>;
|
||||
|
||||
/**
|
||||
* 弹幕持续时间,单位秒,范围在[1 ~ 10]
|
||||
*/
|
||||
speed?: number;
|
||||
|
||||
/**
|
||||
* 弹幕上下边距,支持数字和高度的百分比
|
||||
*/
|
||||
margin?: [number | `${number}%`, number | `${number}%`];
|
||||
|
||||
/**
|
||||
* 弹幕透明度,范围在[0 ~ 1]
|
||||
*/
|
||||
opacity?: number;
|
||||
|
||||
/**
|
||||
* 默认字体颜色
|
||||
*/
|
||||
color?: string;
|
||||
|
||||
/**
|
||||
* 默认弹幕发送模式,0为滚动,1为静止
|
||||
*/
|
||||
mode?: 0 | 1;
|
||||
|
||||
/**
|
||||
* 字体大小,支持数字和高度的百分比
|
||||
*/
|
||||
fontSize?: number | `${number}%`;
|
||||
|
||||
/**
|
||||
* 弹幕过滤函数,返回 true 则可以发送
|
||||
*/
|
||||
filter?: (danmu: Danmu) => boolean;
|
||||
|
||||
/**
|
||||
* 是否防重叠
|
||||
*/
|
||||
antiOverlap?: boolean;
|
||||
|
||||
/**
|
||||
* 是否使用 web worker
|
||||
*/
|
||||
useWorker?: boolean;
|
||||
|
||||
/**
|
||||
* 是否同步到播放速度
|
||||
*/
|
||||
synchronousPlayback?: boolean;
|
||||
|
||||
/**
|
||||
* 输入框锁定时间,单位秒,范围在[1 ~ 60]
|
||||
*/
|
||||
lockTime?: number;
|
||||
|
||||
/**
|
||||
* 输入框最大可输入的字数,范围在[0 ~ 500]
|
||||
*/
|
||||
maxLength?: number;
|
||||
|
||||
/**
|
||||
* 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
|
||||
*/
|
||||
minWidth?: number;
|
||||
|
||||
/**
|
||||
* 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
|
||||
*/
|
||||
maxWidth?: number;
|
||||
|
||||
/**
|
||||
* 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效
|
||||
*/
|
||||
mount?: Element;
|
||||
|
||||
/**
|
||||
* 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
|
||||
*/
|
||||
theme?: 'dark' | 'light';
|
||||
|
||||
/**
|
||||
* 发送弹幕前的自定义校验,返回 true 则可以发送
|
||||
*/
|
||||
beforeEmit?: (danmu: Danmu) => boolean;
|
||||
};
|
||||
|
||||
type danmuku = {
|
||||
name: 'artplayerPluginDanmuku';
|
||||
|
||||
/**
|
||||
* 发送一条实时弹幕
|
||||
*/
|
||||
emit: (danmu: Danmu) => danmuku;
|
||||
|
||||
/**
|
||||
* 重载弹幕源,或者切换新弹幕
|
||||
*/
|
||||
load: () => Promise<danmuku>;
|
||||
|
||||
/**
|
||||
* 实时改变弹幕配置
|
||||
*/
|
||||
config: (option: Option) => danmuku;
|
||||
|
||||
/**
|
||||
* 隐藏弹幕层
|
||||
*/
|
||||
hide: () => danmuku;
|
||||
|
||||
/**
|
||||
* 显示弹幕层
|
||||
*/
|
||||
show: () => danmuku;
|
||||
|
||||
/**
|
||||
* 是否隐藏弹幕层
|
||||
*/
|
||||
isHide: boolean;
|
||||
|
||||
/**
|
||||
* 是否弹幕层停止状态
|
||||
*/
|
||||
isStop: boolean;
|
||||
};
|
||||
|
||||
declare const artplayerPluginDanmuku: (option: Option) => (art: Artplayer) => danmuku;
|
||||
@@ -4,4 +4,4 @@
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r.parcelRequire4dc0&&r.parcelRequire4dc0,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof r.parcelRequire4dc0&&r.parcelRequire4dc0;if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},u.cache={};var d=l[t]=new h.Module(t);e[t][0].call(d.exports,u,d,d.exports,this)}return l[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r.parcelRequire4dc0}}),r.parcelRequire4dc0=h;for(var d=0;d<t.length;d++)h(t[d]);var u=h(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({"8nq87":[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("tiny-emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=s.clamp(i,10,1e3),this.option.width=s.clamp(n,10,1e3),this.option.column=s.clamp(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return s.sleep(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=s.clamp(i,0,this.video.duration),this.option.end=s.clamp(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,s.runPromisesInSeries(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.maLine truncated
|
||||
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c,l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof r.parcelRequire7b4c&&r.parcelRequire7b4c;if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=l[t]=new h.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return l[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r.parcelRequire7b4c}}),r.parcelRequire7b4c=h;for(var u=0;u<t.length;u++)h(t[u]);var d=h(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd&&define((function(){return d}))}({E13ST:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("tiny-emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=s.clamp(i,10,1e3),this.option.width=s.clamp(n,10,1e3),this.option.column=s.clamp(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return s.sleep(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=s.clamp(i,0,this.video.duration),this.option.end=s.clamp(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,s.runPromisesInSeries(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(Line truncated
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer.js v4.4.1
|
||||
* artplayer.js v4.4.7
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,o,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}d.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},d.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=c;for(var p=0;p<t.length;p++)c(t[p]);var d=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd&&define((function(){return d}))}({"6SN6P":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=e("bundle-text:./style/index.less"),i=o.interopDefault(n),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),d=e("./scheme"),u=o.interopDefault(d),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),v=e("./template"),y=o.interopDefault(v),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),R=e("./info"),O=o.interopDefault(R),M=e("./subtitle"),T=o.interopDefault(M),E=e("./events"),F=o.interopDefault(E),C=e("./hotkey"),P=o.interopDefault(C),z=e("./layer"),D=o.interopDefault(z),A=e("./loading"),H=o.interopDefault(A),L=e("./notice"),U=o.interopDefault(L),Z=e("./mask"),N=o.interopDefault(Z),V=e("./icons"),q=o.interopDefault(V),_=e("./setting"),W=o.interopDefault(_),B=e("./storage"),Y=o.interopDefault(B),G=e("./plugins"),X=o.interopDefault(G),Q=e("./ads"),J=o.interopDefault(Q),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=s.default(r,u.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new y.default(this),this.events=new F.default(this),this.whitelist.state?(this.storage=new Y.default(this),this.icons=new q.default(this),this.i18n=new x.default(this),this.notice=new U.default(this),this.player=new j.default(this),this.layers=new D.default(this),this.controls=new S.default(this),this.contextmenu=new $.default(this),this.subtitle=new T.default(this),this.ads=new J.default(this),this.info=new O.default(this),this.loading=new H.default(this),this.hotkey=new P.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.4.1"}static get env(){return"production"}static get build(){return"1652773785803"}static get config(){return h.default}static get utils(){return p}static get scheme(){return u.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return y.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLLine truncated
|
||||
!function(e,t,r,o,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({"6SN6P":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var n=e("bundle-text:./style/index.less"),i=o.interopDefault(n),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),v=e("./template"),y=o.interopDefault(v),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),R=e("./info"),O=o.interopDefault(R),M=e("./subtitle"),T=o.interopDefault(M),E=e("./events"),F=o.interopDefault(E),C=e("./hotkey"),P=o.interopDefault(C),z=e("./layer"),D=o.interopDefault(z),A=e("./loading"),H=o.interopDefault(A),L=e("./notice"),Z=o.interopDefault(L),U=e("./mask"),N=o.interopDefault(U),V=e("./icons"),q=o.interopDefault(V),_=e("./setting"),W=o.interopDefault(_),B=e("./storage"),Y=o.interopDefault(B),G=e("./plugins"),X=o.interopDefault(G),Q=e("./ads"),K=o.interopDefault(Q),J=e("./mobile"),ee=o.interopDefault(J);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isDestroy=!1,this.whitelist=new(0,g.default)(this),this.template=new(0,y.default)(this),this.events=new(0,F.default)(this),this.whitelist.state?(this.storage=new(0,Y.default)(this),this.icons=new(0,q.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,Z.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,D.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,$.default)(this),this.subtitle=new(0,T.default)(this),this.ads=new(0,K.default)(this),this.info=new(0,O.default)(this),this.loading=new(0,H.default)(this),this.hotkey=new(0,P.default)(this),this.mask=new(0,N.default)(this),this.setting=new(0,W.default)(this),this.plugins=new(0,X.default)(this)):this.mobile=new(0,ee.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.4.7"}static get env(){return"production"}static get build(){return"1655091084085"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return y.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICALine truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "artplayer",
|
||||
"version": "4.4.1",
|
||||
"version": "4.4.7",
|
||||
"main": "dist/artplayer.js",
|
||||
"types": "types/artplayer.d.ts",
|
||||
"homepage": "https://artplayer.org",
|
||||
|
||||
@@ -11,15 +11,12 @@ export default class Contextmenu extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.art = art;
|
||||
this.name = 'contextmenu';
|
||||
this.$parent = art.template.$contextmenu;
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
if (!isMobile) {
|
||||
this.init();
|
||||
}
|
||||
});
|
||||
if (!isMobile) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
@@ -20,7 +20,6 @@ export default class Control extends Component {
|
||||
this.name = 'control';
|
||||
|
||||
const {
|
||||
option,
|
||||
constructor,
|
||||
events: { proxy },
|
||||
template: { $player },
|
||||
@@ -43,119 +42,123 @@ export default class Control extends Component {
|
||||
}
|
||||
});
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
this.add(
|
||||
progress({
|
||||
name: 'progress',
|
||||
disable: option.isLive,
|
||||
position: 'top',
|
||||
index: 10,
|
||||
}),
|
||||
);
|
||||
this.init();
|
||||
}
|
||||
|
||||
this.add(
|
||||
thumbnails({
|
||||
name: 'thumbnails',
|
||||
disable: !option.thumbnails.url || option.isLive || isMobile,
|
||||
position: 'top',
|
||||
index: 20,
|
||||
}),
|
||||
);
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
|
||||
this.add(
|
||||
loop({
|
||||
name: 'loop',
|
||||
disable: false,
|
||||
position: 'top',
|
||||
index: 30,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
progress({
|
||||
name: 'progress',
|
||||
disable: option.isLive,
|
||||
position: 'top',
|
||||
index: 10,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
playAndPause({
|
||||
name: 'playAndPause',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 10,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
thumbnails({
|
||||
name: 'thumbnails',
|
||||
disable: !option.thumbnails.url || option.isLive || isMobile,
|
||||
position: 'top',
|
||||
index: 20,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
volume({
|
||||
name: 'volume',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 20,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
loop({
|
||||
name: 'loop',
|
||||
disable: false,
|
||||
position: 'top',
|
||||
index: 30,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
time({
|
||||
name: 'time',
|
||||
disable: option.isLive,
|
||||
position: 'left',
|
||||
index: 30,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
playAndPause({
|
||||
name: 'playAndPause',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 10,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
quality({
|
||||
name: 'quality',
|
||||
disable: option.quality.length === 0,
|
||||
position: 'right',
|
||||
index: 10,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
volume({
|
||||
name: 'volume',
|
||||
disable: false,
|
||||
position: 'left',
|
||||
index: 20,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
screenshot({
|
||||
name: 'screenshot',
|
||||
disable: !option.screenshot || isMobile,
|
||||
position: 'right',
|
||||
index: 20,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
time({
|
||||
name: 'time',
|
||||
disable: option.isLive,
|
||||
position: 'left',
|
||||
index: 30,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
setting({
|
||||
name: 'setting',
|
||||
disable: !option.setting,
|
||||
position: 'right',
|
||||
index: 30,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
quality({
|
||||
name: 'quality',
|
||||
disable: option.quality.length === 0,
|
||||
position: 'right',
|
||||
index: 10,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
pip({
|
||||
name: 'pip',
|
||||
disable: !option.pip,
|
||||
position: 'right',
|
||||
index: 40,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
screenshot({
|
||||
name: 'screenshot',
|
||||
disable: !option.screenshot || isMobile,
|
||||
position: 'right',
|
||||
index: 20,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
fullscreenWeb({
|
||||
name: 'fullscreenWeb',
|
||||
disable: !option.fullscreenWeb,
|
||||
position: 'right',
|
||||
index: 50,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
setting({
|
||||
name: 'setting',
|
||||
disable: !option.setting,
|
||||
position: 'right',
|
||||
index: 30,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
fullscreen({
|
||||
name: 'fullscreen',
|
||||
disable: !option.fullscreen,
|
||||
position: 'right',
|
||||
index: 60,
|
||||
}),
|
||||
);
|
||||
this.add(
|
||||
pip({
|
||||
name: 'pip',
|
||||
disable: !option.pip,
|
||||
position: 'right',
|
||||
index: 40,
|
||||
}),
|
||||
);
|
||||
|
||||
for (let index = 0; index < option.controls.length; index++) {
|
||||
this.add(option.controls[index]);
|
||||
}
|
||||
});
|
||||
this.add(
|
||||
fullscreenWeb({
|
||||
name: 'fullscreenWeb',
|
||||
disable: !option.fullscreenWeb,
|
||||
position: 'right',
|
||||
index: 50,
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
fullscreen({
|
||||
name: 'fullscreen',
|
||||
disable: !option.fullscreen,
|
||||
position: 'right',
|
||||
index: 60,
|
||||
}),
|
||||
);
|
||||
|
||||
for (let index = 0; index < option.controls.length; index++) {
|
||||
this.add(option.controls[index]);
|
||||
}
|
||||
}
|
||||
|
||||
add(getOption) {
|
||||
|
||||
@@ -102,14 +102,16 @@ export default function progress(options) {
|
||||
}
|
||||
}
|
||||
|
||||
for (let index = 0; index < option.highlight.length; index++) {
|
||||
const item = option.highlight[index];
|
||||
const left = (clamp(item.time, 0, art.duration) / art.duration) * 100;
|
||||
append(
|
||||
$highlight,
|
||||
`<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`,
|
||||
);
|
||||
}
|
||||
art.on('video:loadedmetadata', () => {
|
||||
for (let index = 0; index < option.highlight.length; index++) {
|
||||
const item = option.highlight[index];
|
||||
const left = (clamp(item.time, 0, art.duration) / art.duration) * 100;
|
||||
append(
|
||||
$highlight,
|
||||
`<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
setBar('loaded', art.loaded);
|
||||
|
||||
|
||||
@@ -9,13 +9,12 @@ export default function setting(option) {
|
||||
events: { proxy },
|
||||
icons,
|
||||
i18n,
|
||||
setting,
|
||||
} = art;
|
||||
|
||||
append($control, icons.setting);
|
||||
|
||||
proxy($control, 'click', () => {
|
||||
setting.toggle = true;
|
||||
art.setting.toggle = true;
|
||||
});
|
||||
|
||||
art.on('setting', (value) => {
|
||||
|
||||
@@ -2,11 +2,7 @@ import { clamp, secondToTime, isMobile, includeFromEvent } from '../utils';
|
||||
|
||||
export default function gestureInit(art, events) {
|
||||
if (isMobile && !art.option.isLive) {
|
||||
const {
|
||||
notice,
|
||||
plugins,
|
||||
template: { $video, $bottom, $controls },
|
||||
} = art;
|
||||
const { $video, $bottom, $controls } = art.template;
|
||||
|
||||
let isDroging = false;
|
||||
let startX = 0;
|
||||
@@ -25,7 +21,7 @@ export default function gestureInit(art, events) {
|
||||
|
||||
const onTouchMove = (event) => {
|
||||
if (event.touches.length === 1 && isDroging && art.duration) {
|
||||
const autoOrientation = plugins.autoOrientation && plugins.autoOrientation.state;
|
||||
const autoOrientation = art.plugins.autoOrientation && art.plugins.autoOrientation.state;
|
||||
const { clientX, clientY } = event.touches[0];
|
||||
const ratioX = clamp((clientX - startX) / art.width, -1, 1);
|
||||
const ratioY = clamp((clientY - startY) / art.height, -1, 1);
|
||||
@@ -33,7 +29,7 @@ export default function gestureInit(art, events) {
|
||||
const currentTime = clamp(startTime + (art.duration * ratio) / 2, 0, art.duration);
|
||||
art.seek = currentTime;
|
||||
art.emit('setBar', 'played', clamp(currentTime / art.duration, 0, 1));
|
||||
notice.show = `${secondToTime(currentTime)} / ${secondToTime(art.duration)}`;
|
||||
art.notice.show = `${secondToTime(currentTime)} / ${secondToTime(art.duration)}`;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -14,14 +14,12 @@ export default class Events {
|
||||
this.loadImg = this.loadImg.bind(this);
|
||||
|
||||
if (art.whitelist.state) {
|
||||
art.once('video:loadedmetadata', () => {
|
||||
clickInit(art, this);
|
||||
hoverInit(art, this);
|
||||
mousemoveInit(art, this);
|
||||
resizeInit(art, this);
|
||||
gestureInit(art, this);
|
||||
viewInit(art, this);
|
||||
});
|
||||
clickInit(art, this);
|
||||
hoverInit(art, this);
|
||||
mousemoveInit(art, this);
|
||||
resizeInit(art, this);
|
||||
gestureInit(art, this);
|
||||
viewInit(art, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { throttle } from '../utils';
|
||||
|
||||
export default function resizeInit(art, events) {
|
||||
const { notice, option } = art;
|
||||
const { option } = art;
|
||||
|
||||
const resizeFn = throttle(() => {
|
||||
if (art.normalSize) {
|
||||
art.autoSize = option.autoSize;
|
||||
}
|
||||
art.aspectRatioReset = true;
|
||||
notice.show = '';
|
||||
art.notice.show = '';
|
||||
art.emit('resize');
|
||||
}, art.constructor.RESIZE_TIME);
|
||||
|
||||
|
||||
@@ -5,11 +5,9 @@ export default class Hotkey {
|
||||
this.art = art;
|
||||
this.keys = {};
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
if (art.option.hotkey && !isMobile) {
|
||||
this.init();
|
||||
}
|
||||
});
|
||||
if (art.option.hotkey && !isMobile) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1652850026663" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2749" xmlns:xlink="http://www.w3.org/1999/xlink" width="50" height="50">
|
||||
<path d="M593.8176 168.5504l356.00384 595.21024c26.15296 43.74528 10.73152 99.7376-34.44736 125.05088-14.39744 8.06912-30.72 12.30848-47.37024 12.30848H155.97568C103.75168 901.12 61.44 860.16 61.44 809.61536c0-16.09728 4.38272-31.92832 12.71808-45.8752L430.16192 168.5504c26.17344-43.7248 84.00896-58.65472 129.20832-33.34144a93.0816 93.0816 0 0 1 34.44736 33.34144zM512 819.2a61.44 61.44 0 1 0 0-122.88 61.44 61.44 0 0 0 0 122.88z m0-512a72.31488 72.31488 0 0 0-71.76192 81.3056l25.72288 205.7216a46.40768 46.40768 0 0 0 92.07808 0l25.72288-205.74208A72.31488 72.31488 0 0 0 512 307.2z" p-id="2750">
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 927 B |
@@ -23,6 +23,7 @@ import fullscreenWebOn from 'bundle-text:./fullscreen-web-on.svg';
|
||||
import switchOn from 'bundle-text:./switch-on.svg';
|
||||
import switchOff from 'bundle-text:./switch-off.svg';
|
||||
import flip from 'bundle-text:./flip.svg';
|
||||
import error from 'bundle-text:./error.svg';
|
||||
|
||||
export default class Icons {
|
||||
constructor(art) {
|
||||
@@ -51,6 +52,7 @@ export default class Icons {
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
...art.option.icons,
|
||||
};
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@ export default class Info extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
this.name = 'info';
|
||||
art.once('video:loadedmetadata', () => {
|
||||
if (!isMobile) {
|
||||
this.init();
|
||||
}
|
||||
});
|
||||
|
||||
if (!isMobile) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
@@ -12,10 +12,8 @@ export default class Layer extends Component {
|
||||
this.name = 'layer';
|
||||
this.$parent = $layer;
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
for (let index = 0; index < option.layers.length; index++) {
|
||||
this.add(option.layers[index]);
|
||||
}
|
||||
});
|
||||
for (let index = 0; index < option.layers.length; index++) {
|
||||
this.add(option.layers[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,23 @@
|
||||
import { append } from './utils';
|
||||
import { append, setStyle } from './utils';
|
||||
import Component from './utils/component';
|
||||
|
||||
export default class Mask extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'mask';
|
||||
const { template, icons, events } = art;
|
||||
append(template.$state, icons.state);
|
||||
|
||||
const $state = append(template.$state, icons.state);
|
||||
const $error = append(template.$state, icons.error);
|
||||
|
||||
setStyle($error, 'display', 'none');
|
||||
|
||||
art.on('destroy', () => {
|
||||
setStyle($state, 'display', 'none');
|
||||
setStyle($error, 'display', null);
|
||||
});
|
||||
|
||||
events.proxy(template.$state, 'click', () => art.play());
|
||||
}
|
||||
}
|
||||
@@ -68,8 +68,9 @@ export default function eventInit(art) {
|
||||
notice.show = `${i18n.get('Reconnect')}: ${reconnectTime}`;
|
||||
art.emit('error', reconnectTime);
|
||||
} else {
|
||||
art.mask.show = true;
|
||||
art.loading.show = false;
|
||||
art.controls.show = false;
|
||||
art.controls.show = true;
|
||||
addClass($player, 'art-error');
|
||||
await sleep(constructor.RECONNECT_SLEEP_TIME);
|
||||
notice.show = i18n.get('Video Load Failed');
|
||||
@@ -81,7 +82,7 @@ export default function eventInit(art) {
|
||||
|
||||
// });
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
art.on('video:loadedmetadata', () => {
|
||||
art.autoSize = option.autoSize;
|
||||
if (isMobile) {
|
||||
art.loading.show = false;
|
||||
@@ -92,6 +93,8 @@ export default function eventInit(art) {
|
||||
|
||||
art.on('video:loadstart', () => {
|
||||
art.loading.show = true;
|
||||
art.mask.show = false;
|
||||
art.controls.show = true;
|
||||
});
|
||||
|
||||
art.on('video:pause', () => {
|
||||
@@ -122,6 +125,7 @@ export default function eventInit(art) {
|
||||
|
||||
art.on('video:seeking', () => {
|
||||
art.loading.show = true;
|
||||
art.mask.show = false;
|
||||
});
|
||||
|
||||
// art.on('video:stalled', () => {
|
||||
@@ -142,5 +146,6 @@ export default function eventInit(art) {
|
||||
|
||||
art.on('video:waiting', () => {
|
||||
art.loading.show = true;
|
||||
art.mask.show = false;
|
||||
});
|
||||
}
|
||||
@@ -9,7 +9,6 @@ export default function miniMix(art) {
|
||||
template: { $player, $miniClose, $miniTitle, $miniHeader },
|
||||
} = art;
|
||||
|
||||
let cacheStyle = '';
|
||||
let isDroging = false;
|
||||
let lastPageX = 0;
|
||||
let lastPageY = 0;
|
||||
@@ -57,7 +56,6 @@ export default function miniMix(art) {
|
||||
if (value) {
|
||||
art.normalSize = 'mini';
|
||||
art.autoSize = false;
|
||||
cacheStyle = $player.style.cssText;
|
||||
addClass($player, 'art-mini');
|
||||
const top = storage.get('top');
|
||||
const left = storage.get('left');
|
||||
@@ -70,9 +68,8 @@ export default function miniMix(art) {
|
||||
art.mini = true;
|
||||
}
|
||||
} else {
|
||||
const $body = document.body;
|
||||
const top = $body.clientHeight - art.height - 50;
|
||||
const left = $body.clientWidth - art.width - 50;
|
||||
const top = window.innerHeight - art.height - 50;
|
||||
const left = window.innerWidth - art.width - 50;
|
||||
storage.set('top', top);
|
||||
storage.set('left', left);
|
||||
setStyle($player, 'top', `${top}px`);
|
||||
@@ -83,7 +80,6 @@ export default function miniMix(art) {
|
||||
art.notice.show = '';
|
||||
art.emit('mini', true);
|
||||
} else {
|
||||
$player.style.cssText = cacheStyle;
|
||||
removeClass($player, 'art-mini');
|
||||
setStyle($player, 'top', null);
|
||||
setStyle($player, 'left', null);
|
||||
|
||||
@@ -31,7 +31,6 @@ export default class Setting extends Component {
|
||||
template: { $setting, $player },
|
||||
} = art;
|
||||
|
||||
this.art = art;
|
||||
this.name = 'setting';
|
||||
this.$parent = $setting;
|
||||
|
||||
@@ -40,31 +39,29 @@ export default class Setting extends Component {
|
||||
this.cache = new Map();
|
||||
|
||||
if (option.setting) {
|
||||
art.once('video:loadedmetadata', () => {
|
||||
if (option.playbackRate) {
|
||||
this.option.push(playbackRate(art));
|
||||
}
|
||||
if (option.playbackRate) {
|
||||
this.option.push(playbackRate(art));
|
||||
}
|
||||
|
||||
if (option.aspectRatio) {
|
||||
this.option.push(aspectRatio(art));
|
||||
}
|
||||
if (option.aspectRatio) {
|
||||
this.option.push(aspectRatio(art));
|
||||
}
|
||||
|
||||
if (option.flip) {
|
||||
this.option.push(flip(art));
|
||||
}
|
||||
if (option.flip) {
|
||||
this.option.push(flip(art));
|
||||
}
|
||||
|
||||
if (option.subtitleOffset) {
|
||||
this.option.push(subtitleOffset(art));
|
||||
}
|
||||
if (option.subtitleOffset) {
|
||||
this.option.push(subtitleOffset(art));
|
||||
}
|
||||
|
||||
for (let index = 0; index < option.settings.length; index++) {
|
||||
this.option.push(option.settings[index]);
|
||||
}
|
||||
for (let index = 0; index < option.settings.length; index++) {
|
||||
this.option.push(option.settings[index]);
|
||||
}
|
||||
|
||||
this.option = makeRecursion(this.option);
|
||||
this.option = makeRecursion(this.option);
|
||||
|
||||
this.init(this.option);
|
||||
});
|
||||
this.init(this.option);
|
||||
|
||||
art.on('blur', () => {
|
||||
if (this.show) {
|
||||
@@ -172,6 +169,7 @@ export default class Setting extends Component {
|
||||
item.$icon = $icon;
|
||||
|
||||
def(item, 'icon', {
|
||||
configurable: true,
|
||||
get() {
|
||||
return $icon.innerHTML;
|
||||
},
|
||||
@@ -189,6 +187,7 @@ export default class Setting extends Component {
|
||||
item.$html = $html;
|
||||
|
||||
def(item, 'html', {
|
||||
configurable: true,
|
||||
get() {
|
||||
return $html.innerHTML;
|
||||
},
|
||||
@@ -206,6 +205,7 @@ export default class Setting extends Component {
|
||||
item.$tooltip = $tooltip;
|
||||
|
||||
def(item, 'tooltip', {
|
||||
configurable: true,
|
||||
get() {
|
||||
return $tooltip.innerHTML;
|
||||
},
|
||||
@@ -227,6 +227,7 @@ export default class Setting extends Component {
|
||||
item.$switch = item.switch;
|
||||
|
||||
def(item, 'switch', {
|
||||
configurable: true,
|
||||
get() {
|
||||
return item.$switch;
|
||||
},
|
||||
@@ -257,6 +258,7 @@ export default class Setting extends Component {
|
||||
item.$range = $range;
|
||||
|
||||
def(item, 'range', {
|
||||
configurable: true,
|
||||
get() {
|
||||
return $range.valueAsNumber;
|
||||
},
|
||||
|
||||
@@ -2,4 +2,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.art-video-player {
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,7 @@ export default class Subtitle extends Component {
|
||||
|
||||
this.name = 'subtitle';
|
||||
|
||||
art.once('video:loadedmetadata', () => {
|
||||
this.init(art.option.subtitle);
|
||||
});
|
||||
this.init(art.option.subtitle);
|
||||
}
|
||||
|
||||
get url() {
|
||||
|
||||
@@ -33,7 +33,7 @@ export default class Template {
|
||||
|
||||
static get html() {
|
||||
return `
|
||||
<div class="art-video-player art-subtitle-show art-layer-show">
|
||||
<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">
|
||||
<video class="art-video"></video>
|
||||
<div class="art-poster"></div>
|
||||
<div class="art-subtitle"></div>
|
||||
|
||||
+3
-2
@@ -172,9 +172,9 @@ type Component = {
|
||||
add(option: ComponentOption): HTMLElement;
|
||||
};
|
||||
|
||||
type PluginFunction = (art: Artplayer) => any;
|
||||
type WhitelistFunction = (ua: string) => Boolean;
|
||||
type PluginFunction = (art: Artplayer) => any | ((option: any) => (art: Artplayer) => any);
|
||||
type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any;
|
||||
type WhitelistFunction = (ua: string) => Boolean;
|
||||
type EventCallback = (event: Event) => any;
|
||||
|
||||
type SubtitleOption = {
|
||||
@@ -731,6 +731,7 @@ declare class Artplayer extends Player {
|
||||
readonly plugins: {
|
||||
readonly id: number;
|
||||
add(plugin: PluginFunction): Artplayer['plugins'];
|
||||
[pluginName: string]: any;
|
||||
};
|
||||
|
||||
readonly i18n: {
|
||||
|
||||
+379
-112
@@ -414,7 +414,7 @@ describe("Document", function () {
|
||||
url: "./assets/sample/video.mp4",
|
||||
});
|
||||
art.on("ready", () => {
|
||||
console.info(Artplayer.instances.length);
|
||||
console.info(Artplayer.instances);
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
@@ -632,6 +632,7 @@ describe("Document", function () {
|
||||
it("Test36", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
// container: document.querySelector('.artplayer-app'),
|
||||
url: "./assets/sample/video.mp4",
|
||||
});
|
||||
|
||||
@@ -641,7 +642,6 @@ describe("Document", function () {
|
||||
it("Test37", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
// container: document.querySelector('.artplayer-app'),
|
||||
url: "./assets/sample/video.mp4",
|
||||
});
|
||||
|
||||
@@ -649,15 +649,6 @@ describe("Document", function () {
|
||||
});
|
||||
|
||||
it("Test38", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test39", function (done) {
|
||||
var art = new Artplayer(
|
||||
{
|
||||
container: ".artplayer-app",
|
||||
@@ -672,7 +663,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test40", function (done) {
|
||||
it("Test39", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -682,7 +673,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test41", function (done) {
|
||||
it("Test40", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -693,7 +684,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test42", function (done) {
|
||||
it("Test41", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -703,7 +694,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test43", function (done) {
|
||||
it("Test42", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -713,7 +704,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test44", function (done) {
|
||||
it("Test43", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -723,7 +714,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test45", function (done) {
|
||||
it("Test44", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -733,7 +724,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test46", function (done) {
|
||||
it("Test45", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -744,7 +735,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test47", function (done) {
|
||||
it("Test46", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -754,7 +745,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test48", function (done) {
|
||||
it("Test47", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -764,7 +755,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test49", function (done) {
|
||||
it("Test48", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -775,7 +766,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test50", function (done) {
|
||||
it("Test49", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -786,7 +777,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test51", function (done) {
|
||||
it("Test50", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -797,7 +788,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test52", function (done) {
|
||||
it("Test51", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -811,7 +802,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test53", function (done) {
|
||||
it("Test52", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -821,7 +812,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test54", function (done) {
|
||||
it("Test53", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -831,7 +822,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test55", function (done) {
|
||||
it("Test54", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -841,7 +832,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test56", function (done) {
|
||||
it("Test55", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -851,7 +842,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test57", function (done) {
|
||||
it("Test56", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -861,7 +852,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test58", function (done) {
|
||||
it("Test57", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -871,7 +862,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test59", function (done) {
|
||||
it("Test58", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -885,7 +876,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test60", function (done) {
|
||||
it("Test59", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -895,7 +886,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test61", function (done) {
|
||||
it("Test60", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -905,7 +896,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test62", function (done) {
|
||||
it("Test61", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -952,7 +943,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test63", function (done) {
|
||||
it("Test62", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -975,7 +966,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test64", function (done) {
|
||||
it("Test63", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1027,7 +1018,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test65", function (done) {
|
||||
it("Test64", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1051,7 +1042,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test66", function (done) {
|
||||
it("Test65", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1091,7 +1082,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test67", function (done) {
|
||||
it("Test66", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1104,7 +1095,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test68", function (done) {
|
||||
it("Test67", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1120,7 +1111,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test69", function (done) {
|
||||
it("Test68", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1142,7 +1133,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test70", function (done) {
|
||||
it("Test69", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1156,7 +1147,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test71", function (done) {
|
||||
it("Test70", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1169,22 +1160,48 @@ describe("Document", function () {
|
||||
|
||||
pause: "",
|
||||
|
||||
check: "",
|
||||
|
||||
volume: "",
|
||||
|
||||
volumeClose: "",
|
||||
|
||||
subtitle: "",
|
||||
|
||||
screenshot: "",
|
||||
|
||||
setting: "",
|
||||
|
||||
fullscreen: "",
|
||||
|
||||
fullscreenWeb: "",
|
||||
|
||||
pip: "",
|
||||
|
||||
arrowLeft: "",
|
||||
|
||||
arrowRight: "",
|
||||
|
||||
playbackRate: "",
|
||||
|
||||
aspectRatio: "",
|
||||
|
||||
config: "",
|
||||
|
||||
lock: "",
|
||||
|
||||
flip: "",
|
||||
|
||||
unlock: "",
|
||||
|
||||
fullscreenOff: "",
|
||||
|
||||
fullscreenOn: "",
|
||||
|
||||
fullscreenWebOff: "",
|
||||
|
||||
fullscreenWebOn: "",
|
||||
|
||||
switchOn: "",
|
||||
|
||||
switchOff: "",
|
||||
|
||||
error: "",
|
||||
|
||||
indicator: "",
|
||||
},
|
||||
});
|
||||
@@ -1192,7 +1209,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test72", function (done) {
|
||||
it("Test71", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.flv",
|
||||
@@ -1202,7 +1219,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test73", function (done) {
|
||||
it("Test72", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.flv",
|
||||
@@ -1218,7 +1235,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test74", function (done) {
|
||||
it("Test73", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1228,7 +1245,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test75", function (done) {
|
||||
it("Test74", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1238,7 +1255,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test76", function (done) {
|
||||
it("Test75", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1248,7 +1265,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test77", function (done) {
|
||||
it("Test76", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1260,7 +1277,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test78", function (done) {
|
||||
it("Test77", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1270,7 +1287,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test79", function (done) {
|
||||
it("Test78", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1320,19 +1337,41 @@ describe("Document", function () {
|
||||
},
|
||||
],
|
||||
|
||||
speed: 5, // 全局持续时间
|
||||
speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
|
||||
|
||||
opacity: 1, // 全局透明度
|
||||
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
|
||||
|
||||
color: "#fff", // 全局字体颜色
|
||||
fontSize: 25, // 字体大小,支持数字和百分比
|
||||
|
||||
size: 25, // 全局字体大小
|
||||
color: "#FFFFFF", // 默认字体颜色
|
||||
|
||||
maxlength: 50, // 全局最大长度
|
||||
mode: 0, // 默认模式,0-滚动,1-静止
|
||||
|
||||
margin: [10, 20], // 距离顶部和距离底部的高度值
|
||||
margin: [10, "25%"], // 弹幕上下边距,支持数字和百分比
|
||||
|
||||
antiOverlap: true, // 是否防重叠
|
||||
|
||||
useWorker: true, // 是否使用 web worker
|
||||
|
||||
synchronousPlayback: false, // 是否同步到播放速度
|
||||
|
||||
filter: (danmu) => danmu.text.length < 50, // 弹幕过滤函数,返回 true 则可以发送
|
||||
|
||||
lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60]
|
||||
|
||||
maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500]
|
||||
|
||||
minWidth: 200, // 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
|
||||
|
||||
maxWidth: 400, // 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
|
||||
|
||||
theme: "dark", // 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
|
||||
|
||||
beforeEmit: (danmu) => !!danmu.text.trim(), // 发送弹幕前的自定义校验,返回 true 则可以发送
|
||||
|
||||
// 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效
|
||||
|
||||
// mount: document.querySelector('.artplayer-danmuku'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -1340,7 +1379,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test80", function (done) {
|
||||
it("Test79", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1356,7 +1395,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test81", function (done) {
|
||||
it("Test80", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1394,7 +1433,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test82", function (done) {
|
||||
it("Test81", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1429,7 +1468,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test83", function (done) {
|
||||
it("Test82", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1462,7 +1501,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test84", function (done) {
|
||||
it("Test83", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1499,7 +1538,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test85", function (done) {
|
||||
it("Test84", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1536,7 +1575,88 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test85", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: "./assets/sample/danmuku.xml",
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: "right",
|
||||
|
||||
html: "重载弹幕",
|
||||
|
||||
click: function () {
|
||||
art.plugins.artplayerPluginDanmuku.load();
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
position: "right",
|
||||
|
||||
html: "切换弹幕",
|
||||
|
||||
click: function () {
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
danmuku: "./assets/sample/danmuku-v2.xml",
|
||||
});
|
||||
|
||||
art.plugins.artplayerPluginDanmuku.load();
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test86", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
setting: true,
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: "./assets/sample/danmuku.xml",
|
||||
}),
|
||||
],
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:emit", (danmu) => {
|
||||
console.info("新增弹幕", danmu);
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:loaded", (danmus) => {
|
||||
console.info("加载弹幕", danmus.length);
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:error", (error) => {
|
||||
console.info("加载错误", error);
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:config", (option) => {
|
||||
console.info("配置变化", option);
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:stop", () => {
|
||||
console.info("弹幕停止");
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:start", () => {
|
||||
console.info("弹幕开始");
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:hide", () => {
|
||||
console.info("弹幕隐藏");
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:show", () => {
|
||||
console.info("弹幕显示");
|
||||
});
|
||||
art.on("artplayerPluginDanmuku:destroy", () => {
|
||||
console.info("弹幕销毁");
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test87", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1549,7 +1669,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test87", function (done) {
|
||||
it("Test88", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1565,7 +1685,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test88", function (done) {
|
||||
it("Test89", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1581,7 +1701,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test89", function (done) {
|
||||
it("Test90", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1593,7 +1713,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test90", function (done) {
|
||||
it("Test91", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1605,7 +1725,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test91", function (done) {
|
||||
it("Test92", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1620,7 +1740,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test92", function (done) {
|
||||
it("Test93", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1634,7 +1754,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test93", function (done) {
|
||||
it("Test94", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1648,7 +1768,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test94", function (done) {
|
||||
it("Test95", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1663,7 +1783,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test95", function (done) {
|
||||
it("Test96", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1678,7 +1798,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test96", function (done) {
|
||||
it("Test97", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1692,7 +1812,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test97", function (done) {
|
||||
it("Test98", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1706,7 +1826,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test98", function (done) {
|
||||
it("Test99", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1718,7 +1838,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test99", function (done) {
|
||||
it("Test100", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1733,7 +1853,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test100", function (done) {
|
||||
it("Test101", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1746,7 +1866,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test101", function (done) {
|
||||
it("Test102", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1759,7 +1879,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test102", function (done) {
|
||||
it("Test103", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1775,7 +1895,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test103", function (done) {
|
||||
it("Test104", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1791,7 +1911,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test104", function (done) {
|
||||
it("Test105", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1807,7 +1927,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test105", function (done) {
|
||||
it("Test106", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1822,7 +1942,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test106", function (done) {
|
||||
it("Test107", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1834,7 +1954,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test107", function (done) {
|
||||
it("Test108", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1849,7 +1969,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test108", function (done) {
|
||||
it("Test109", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1863,7 +1983,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test109", function (done) {
|
||||
it("Test110", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1875,7 +1995,7 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test110", function (done) {
|
||||
it("Test111", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
@@ -1889,21 +2009,6 @@ describe("Document", function () {
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test111", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
autoSize: true,
|
||||
});
|
||||
art.on("ready", () => {
|
||||
console.info(art.rotate);
|
||||
art.rotate = 90;
|
||||
console.info(art.rotate);
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test112", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
@@ -2135,8 +2240,8 @@ describe("Document", function () {
|
||||
},
|
||||
],
|
||||
|
||||
onSelect: function (item, $dom) {
|
||||
console.info(item, $dom);
|
||||
onSelect: function (item, $dom, event) {
|
||||
console.info(item, $dom, event);
|
||||
|
||||
art.subtitle.url = item.url;
|
||||
|
||||
@@ -2175,8 +2280,8 @@ describe("Document", function () {
|
||||
},
|
||||
],
|
||||
|
||||
onSelect: function (item, $dom) {
|
||||
console.info(item, $dom);
|
||||
onSelect: function (item, $dom, event) {
|
||||
console.info(item, $dom, event);
|
||||
|
||||
art.switchQuality(item.url, item.html);
|
||||
|
||||
@@ -2226,6 +2331,168 @@ describe("Document", function () {
|
||||
});
|
||||
|
||||
it("Test123", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
setting: true,
|
||||
flip: true,
|
||||
playbackRate: true,
|
||||
aspectRatio: true,
|
||||
settings: [
|
||||
{
|
||||
html: "画中画模式",
|
||||
|
||||
tooltip: "关闭",
|
||||
|
||||
icon: '<img width="22" heigth="22" src="./assets/img/state.svg">',
|
||||
|
||||
switch: false,
|
||||
|
||||
onSwitch: function (item, $dom, event) {
|
||||
console.info(item, $dom, event);
|
||||
|
||||
const nextState = !item.switch;
|
||||
|
||||
art.pip = nextState;
|
||||
|
||||
// 改变提示文本
|
||||
|
||||
item.tooltip = nextState ? "开启" : "关闭";
|
||||
|
||||
// 改变按钮状态
|
||||
|
||||
return nextState;
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
html: "和列表组合",
|
||||
|
||||
width: 200,
|
||||
|
||||
selector: [
|
||||
{
|
||||
default: true,
|
||||
|
||||
html: "设置 01",
|
||||
},
|
||||
|
||||
{
|
||||
html: "设置 02",
|
||||
},
|
||||
|
||||
{
|
||||
html: "设置 03",
|
||||
|
||||
switch: false,
|
||||
|
||||
onSwitch: function (item, $dom, event) {
|
||||
return !item.switch;
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
html: "设置 04",
|
||||
|
||||
icon: "",
|
||||
|
||||
switch: true,
|
||||
|
||||
onSwitch: function (item, $dom, event) {
|
||||
return !item.switch;
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
onSelect: function (item) {
|
||||
return item.html;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test124", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "./assets/sample/video.mp4",
|
||||
setting: true,
|
||||
flip: true,
|
||||
playbackRate: true,
|
||||
aspectRatio: true,
|
||||
settings: [
|
||||
{
|
||||
html: "滑块",
|
||||
|
||||
tooltip: "5x",
|
||||
|
||||
icon: '<img width="22" heigth="22" src="./assets/img/state.svg">',
|
||||
|
||||
range: [5, 1, 10, 1],
|
||||
|
||||
onRange: function (item) {
|
||||
// 改变提示文本
|
||||
|
||||
return item.range + "x";
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
html: "和列表组合",
|
||||
|
||||
width: 200,
|
||||
|
||||
selector: [
|
||||
{
|
||||
default: true,
|
||||
|
||||
html: "设置 01",
|
||||
},
|
||||
|
||||
{
|
||||
html: "设置 02",
|
||||
},
|
||||
|
||||
{
|
||||
html: "设置 03",
|
||||
|
||||
tooltip: "5x",
|
||||
|
||||
range: [5, 1, 10, 1],
|
||||
|
||||
onRange: function (item) {
|
||||
return item.range + "x";
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
html: "设置 04",
|
||||
|
||||
icon: "",
|
||||
|
||||
tooltip: "5x",
|
||||
|
||||
range: [5, 1, 10, 1],
|
||||
|
||||
onRange: function (item) {
|
||||
return item.range + "x";
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
onSelect: function (item) {
|
||||
return item.html;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
testAll(art, done);
|
||||
});
|
||||
|
||||
it("Test125", function (done) {
|
||||
var art = new Artplayer({
|
||||
container: ".artplayer-app",
|
||||
url: "https://artplayer.org./assets/sample/video.mp4",
|
||||
|
||||
+17
-1
@@ -1,6 +1,22 @@
|
||||
import Artplayer from '../packages/artplayer/types/artplayer';
|
||||
import Artplayer from '../packages/artplayer';
|
||||
import artplayerPluginDanmuku from '../packages/artplayer-plugin-danmuku';
|
||||
|
||||
const art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: './assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '',
|
||||
margin: [0, '10%'],
|
||||
theme: 'light',
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
art.plugins.add(
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '',
|
||||
margin: [0, '10%'],
|
||||
theme: 'light',
|
||||
}),
|
||||
);
|
||||
Reference in new issue
Block a user