mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99bae1fab2 | ||
|
|
2294620436 | ||
|
|
a39a2a19da | ||
|
|
5758d4c93e | ||
|
|
fbd1d2170a | ||
|
|
55c7560ce2 | ||
|
|
bff84f9cb6 | ||
|
|
19d9e5cea9 | ||
|
|
b6c274b2cf | ||
|
|
f665cf9b92 | ||
|
|
ace7540b9c | ||
|
|
1d5ff8adf0 | ||
|
|
c09713d50f | ||
|
|
0971aba7f9 | ||
|
|
d29f821338 | ||
|
|
1db287fb24 | ||
|
|
eb9e42c8f5 | ||
|
|
e48c50956d | ||
|
|
691202ace4 | ||
|
|
1d4b2d58ac | ||
|
|
d81f9d4f65 | ||
|
|
7a2fb8302d | ||
|
|
dbac833a26 | ||
|
|
d148e7d9e5 | ||
|
|
8d04f11048 | ||
|
|
829d3a4b42 | ||
|
|
a831975f4f | ||
|
|
25d2319287 | ||
|
|
d1ead6c543 | ||
|
|
0149a6e557 | ||
|
|
35856b745f | ||
|
|
667b7f16e1 | ||
|
|
910c020488 | ||
|
|
463e05fcc0 | ||
|
|
9a2fd6d9fd | ||
|
|
0535b798b2 | ||
|
|
199c15ff3f | ||
|
|
830720790e | ||
|
|
3dea070ade | ||
|
|
9716f97a51 | ||
|
|
ff1f38aeb7 | ||
|
|
640360abd7 | ||
|
|
0c70663345 | ||
|
|
a4d7ff721b | ||
|
|
13ace1b8a8 | ||
|
|
7bbe1ed0be | ||
|
|
92f751250e | ||
|
|
422728844a | ||
|
|
107d884274 | ||
|
|
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 | ||
|
|
aa4d8d0211 | ||
|
|
ad7022b599 | ||
|
|
0eb07c22f2 | ||
|
|
72a314590c | ||
|
|
ab5ab9b85a | ||
|
|
f83e8a01fc | ||
|
|
7330c0224c | ||
|
|
0fac6ba017 | ||
|
|
e34e186085 | ||
|
|
a754f6181d | ||
|
|
f656116ac6 | ||
|
|
9728032922 | ||
|
|
a6188f0fe2 | ||
|
|
9b054d195a | ||
|
|
876989a572 | ||
|
|
7379df3f00 | ||
|
|
7909571e70 | ||
|
|
f020c30f56 | ||
|
|
0531717000 | ||
|
|
5eff6bccd9 | ||
|
|
83322860e0 | ||
|
|
40b76e1b74 | ||
|
|
3b3b469b9b | ||
|
|
1aeb2a93f8 | ||
|
|
893f77ba08 | ||
|
|
2cb73141fb | ||
|
|
93a517eaf8 | ||
|
|
d0f6d643a4 | ||
|
|
a989de98e5 | ||
|
|
7410a5be98 | ||
|
|
2c5ba00521 | ||
|
|
2189a41334 | ||
|
|
112256ddd7 | ||
|
|
42d43dfd15 | ||
|
|
ffb74b9717 | ||
|
|
c3f092dc2a | ||
|
|
e8d721f92f | ||
|
|
3f4ceefbc7 | ||
|
|
fc978e9d85 | ||
|
|
4c12972101 | ||
|
|
ddbb580fca | ||
|
|
92348f004d | ||
|
|
7558d98116 | ||
|
|
a5cda09e3c | ||
|
|
2b934ab988 | ||
|
|
3741f876d5 | ||
|
|
9c623b7fd7 | ||
|
|
c568076b6b | ||
|
|
1ba6898705 | ||
|
|
c1f34caa2e | ||
|
|
e85f14e1b5 | ||
|
|
c46a8b86f7 | ||
|
|
8bcc020627 | ||
|
|
e690af2de4 | ||
|
|
1ec4719806 | ||
|
|
31eacefa97 | ||
|
|
ddac5fd0f2 | ||
|
|
d50e22ea9b | ||
|
|
887792c853 | ||
|
|
642a2ac1a9 | ||
|
|
59f7a88e51 | ||
|
|
8c9e1e3446 | ||
|
|
a043a55b38 | ||
|
|
fd40fa71f6 | ||
|
|
a3889236be | ||
|
|
31bd26a813 | ||
|
|
c964f8e0fc | ||
|
|
ae682b0525 | ||
|
|
89a3b02ff5 | ||
|
|
0aeb1262db | ||
|
|
737b667c1b | ||
|
|
a6d144d555 | ||
|
|
0c1e8f0305 | ||
|
|
a18152b483 | ||
|
|
2f51e3d546 | ||
|
|
d540b7f32e | ||
|
|
de9005cf20 | ||
|
|
7ff42596ef | ||
|
|
e069101c99 | ||
|
|
c1acf27cd0 | ||
|
|
62ce58330e | ||
|
|
b5148d5f2f | ||
|
|
1a7cc79bb6 | ||
|
|
a1167f64e1 | ||
|
|
25ed8303f2 | ||
|
|
68c2c4058b | ||
|
|
628cc0633b | ||
|
|
8b862abb40 | ||
|
|
3775f5972b | ||
|
|
9e3389f8c0 | ||
|
|
e30aa833db | ||
|
|
f07ea0796a | ||
|
|
3c7d76954e | ||
|
|
fd51264bb8 | ||
|
|
33bb679046 | ||
|
|
d88a992efb | ||
|
|
194c65778b | ||
|
|
481d8fefbb | ||
|
|
611c6eb6f0 | ||
|
|
af9f9b3263 | ||
|
|
b78ff00d3a | ||
|
|
316f798709 | ||
|
|
8a5c96f8bf | ||
|
|
8b8ac80d72 | ||
|
|
4181109ec6 | ||
|
|
9e83d738b6 | ||
|
|
955dbc0ac2 | ||
|
|
13ffb722a1 | ||
|
|
c9e8d891e1 | ||
|
|
a39a64b3b1 | ||
|
|
145d6b7a96 | ||
|
|
d73e1efaf1 | ||
|
|
f74a2633b3 | ||
|
|
2df5d7dc6d | ||
|
|
185830e7a1 | ||
|
|
a01a587ca0 | ||
|
|
58c16a737c | ||
|
|
0d7725aabb | ||
|
|
0ed7f87794 | ||
|
|
26fba8e2a6 | ||
|
|
fa3c70e99f | ||
|
|
c366813c12 | ||
|
|
22af442720 | ||
|
|
3c4e4845e3 | ||
|
|
d8b4479f5d | ||
|
|
288e29af3a | ||
|
|
b2280d8b58 | ||
|
|
b2278c91b8 | ||
|
|
d27f43adfe | ||
|
|
9d31e8d6e0 | ||
|
|
c9cafbb55f | ||
|
|
21d4a50c54 | ||
|
|
c3e5afe4d3 | ||
|
|
703f881019 | ||
|
|
8fa763b9c7 | ||
|
|
9b723947e6 | ||
|
|
277dc9129d | ||
|
|
66700e0dff | ||
|
|
f8d0bae5d5 | ||
|
|
7efa43d5d5 | ||
|
|
7ce17f90c4 | ||
|
|
3e97b05a73 | ||
|
|
67fd787128 | ||
|
|
e5753e8f82 | ||
|
|
526096bef3 | ||
|
|
e9aadad873 | ||
|
|
992803e10c | ||
|
|
e437cb7a84 | ||
|
|
91c3370fdd | ||
|
|
5e05f9e4c2 | ||
|
|
7bcc296fc2 | ||
|
|
5ff4a8f70b | ||
|
|
09d1c2ed08 |
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
|
||||
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [4.5.3] - 2022-7-13
|
||||
|
||||
### Added
|
||||
- `url` 选项允许传空字符串,可用于异步设置 `art.url`
|
||||
|
||||
```js
|
||||
const art = new Artplayer({
|
||||
url: '',
|
||||
container: '.artplayer-app',
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
art.url = '/assets/sample/video.mp4';
|
||||
}, 1000);
|
||||
```
|
||||
|
||||
- `art.play()` 方法统一返回 `Promise`, `play` 事件也改为异步触发
|
||||
|
||||
```js
|
||||
const art = new Artplayer({
|
||||
url: '/assets/sample/video.mp4',
|
||||
container: '.artplayer-app',
|
||||
});
|
||||
|
||||
art.on('ready', async () => {
|
||||
try {
|
||||
await art.play();
|
||||
console.log('播放成功');
|
||||
} catch (error) {
|
||||
console.log('播放失败', error.message);
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
- 新增 `airplay` (隔空播放) 功能,当前只在 Safari 下可用
|
||||
|
||||
```js
|
||||
const art = new Artplayer({
|
||||
url: '/assets/sample/video.mp4',
|
||||
container: '.artplayer-app',
|
||||
airplay: true,
|
||||
});
|
||||
```
|
||||
|
||||
## [4.5.2] - 2022-6-22
|
||||
|
||||
### Added
|
||||
- 优化自动回放功能,让用户自行选择
|
||||
|
||||
## [4.5.0] - 2022-6-21
|
||||
|
||||
### 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
|
||||
- 添加 art.isInput 属性,当为 true 的时候不自动隐藏控制栏,如弹幕正在输入时
|
||||
- 添加 art.isLock 属性,在移动端当为 true 的时候不能操作快进、开始和暂停
|
||||
- 修复弹幕输入框的固定宽度 bug
|
||||
- 设置面板支持 range 和 onRange 选项
|
||||
- 添加 isAndroid 和 isIOS 工具函数
|
||||
- 弹幕库添加 lockTime 选项,可自定义输入框的锁定时间
|
||||
- 弹幕库添加 maxLength 选项,控制输入最大可输入字数
|
||||
- 弹幕库添加 minWidth 选项,控制输入框最小宽度
|
||||
- 弹幕库添加 maxWidth 选项,控制输入框最大宽度
|
||||
- 弹幕库添加 mount 选项,控制输入框自定义挂载位置
|
||||
- 弹幕库添加 beforeEmit 选项,控制弹幕发送前的校验
|
||||
- 弹幕库添加 theme 选项,控制输入框自定义挂载的主题色
|
||||
|
||||
## [4.4.0] - 2022-05-15
|
||||
|
||||
### Added
|
||||
- 设置面板支持 switch 和 onSwitch 选项
|
||||
- 弹幕库插件添加设置面板和弹幕发送
|
||||
- 弹幕库的选项添加默认模式和默认字号
|
||||
- 弹幕库字号支持按播放器的百分百
|
||||
- 修复翻转设置的图标缺失
|
||||
- 默认播放器获取了焦点后,不会自动隐藏控制栏
|
||||
- 删除字幕开关按钮,需要自行配置字幕开关
|
||||
@@ -0,0 +1,35 @@
|
||||
This project uses `parcel` as a development and packaging tool, so there are few overall configuration options
|
||||
|
||||
## 1. Install dependencies
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
yarn
|
||||
```
|
||||
|
||||
## 2. Develop the project and open the demo page
|
||||
|
||||
```base
|
||||
npm run dev
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
## 3. Package the project
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
```bash
|
||||
yarn build
|
||||
```
|
||||
@@ -89,6 +89,14 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
[CHANGELOG_CN.md](./CHANGELOG_CN.md)
|
||||
|
||||
## Contributing
|
||||
|
||||
[CONTRIBUTING.md](./CONTRIBUTING.md)
|
||||
|
||||
## Donations
|
||||
|
||||
We accept donations through these channels:
|
||||
|
||||
@@ -189,6 +189,7 @@ img {
|
||||
height: 70%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
@@ -199,10 +200,15 @@ img {
|
||||
font-size: 20px;
|
||||
width: 90%;
|
||||
height: 65%;
|
||||
margin-bottom: 10px;
|
||||
background-color: rgb(0 0 0 / 20%);
|
||||
border: 1px dashed rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.part-right .video-wrap .artplayer-danmuku {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.part-right .console {
|
||||
position: relative;
|
||||
z-index: 8;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
autoSize: true,
|
||||
fullscreen: true,
|
||||
fullscreenWeb: true,
|
||||
plugins: [
|
||||
artplayerPluginAds({
|
||||
// html广告,假如是视频广告则忽略该值
|
||||
html: '<img src="/assets/sample/poster.jpg">',
|
||||
|
||||
// 视频广告的地址
|
||||
video: '/assets/sample/test1.mp4',
|
||||
|
||||
// 广告跳转网址,为空则不跳转
|
||||
url: 'http://artplayer.org',
|
||||
|
||||
// 必须观看的时长,期间不能被跳过,单位为秒
|
||||
// 当该值大于或等于totalDuration时,不能提前关闭广告
|
||||
// 当该值等于或小于0时,则随时都可以关闭广告
|
||||
playDuration: 5,
|
||||
|
||||
// 广告总时长,单位为秒
|
||||
totalDuration: 10,
|
||||
|
||||
// 多语言支持
|
||||
i18n: {
|
||||
close: '关闭广告',
|
||||
countdown: '%s秒',
|
||||
detail: '查看详情',
|
||||
canBeClosed: '%s秒后可关闭广告',
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
// 广告被点击
|
||||
art.on('artplayerPluginAds:click', (ads) => {
|
||||
console.info('广告被点击', ads);
|
||||
});
|
||||
|
||||
// 广告被跳过
|
||||
art.on('artplayerPluginAds:skip', (ads) => {
|
||||
console.info('广告被跳过', ads);
|
||||
});
|
||||
@@ -4,46 +4,77 @@ var art = new Artplayer({
|
||||
autoSize: true,
|
||||
fullscreen: true,
|
||||
fullscreenWeb: true,
|
||||
flip: true,
|
||||
playbackRate: true,
|
||||
aspectRatio: true,
|
||||
setting: true,
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: '/assets/sample/danmuku.xml',
|
||||
speed: 5,
|
||||
opacity: 1,
|
||||
fontSize: 20,
|
||||
maxlength: 100,
|
||||
margin: ['10%', 60],
|
||||
antiOverlap: true,
|
||||
synchronousPlayback: false,
|
||||
filter: (danmu) => danmu.text.length < 50,
|
||||
danmuku: '/assets/sample/danmuku-v2.xml',
|
||||
speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
|
||||
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
|
||||
fontSize: 25, // 字体大小,支持数字和百分比
|
||||
color: '#FFFFFF', // 默认字体颜色
|
||||
mode: 0, // 默认模式,0-滚动,1-静止
|
||||
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'),
|
||||
}),
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: '隐藏',
|
||||
click: function (_, event) {
|
||||
if (art.plugins.artplayerPluginDanmuku.isHide) {
|
||||
art.plugins.artplayerPluginDanmuku.show();
|
||||
event.target.innerText = '隐藏';
|
||||
} else {
|
||||
art.plugins.artplayerPluginDanmuku.hide();
|
||||
event.target.innerText = '显示';
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
position: 'right',
|
||||
html: '发送',
|
||||
click: function () {
|
||||
var text = prompt('请输入弹幕文本', '弹幕测试文本');
|
||||
if (!text || !text.trim()) return;
|
||||
var color = '#' + Math.floor(Math.random() * 0xffffff).toString(16);
|
||||
art.plugins.artplayerPluginDanmuku.emit({
|
||||
text: text,
|
||||
color: color,
|
||||
border: true,
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// 监听手动输入的弹幕,保存到数据库
|
||||
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('弹幕销毁');
|
||||
});
|
||||
@@ -24,6 +24,7 @@ var art = new Artplayer({
|
||||
backdrop: true,
|
||||
playsInline: true,
|
||||
autoPlayback: true,
|
||||
airplay: true,
|
||||
theme: '#23ade5',
|
||||
lang: navigator.language.toLowerCase(),
|
||||
whitelist: ['*'],
|
||||
@@ -33,23 +34,61 @@ var art = new Artplayer({
|
||||
settings: [
|
||||
{
|
||||
width: 200,
|
||||
html: 'Custom Setting',
|
||||
tooltip: 'Click This',
|
||||
icon: '<img width="22" heigth="22" src="/assets/img/indicator.svg">',
|
||||
html: 'Subtitle',
|
||||
tooltip: 'Bilingual',
|
||||
icon: '<img width="22" heigth="22" src="/assets/img/subtitle.svg">',
|
||||
selector: [
|
||||
{
|
||||
default: true,
|
||||
html: 'Setting 01',
|
||||
html: 'Display',
|
||||
tooltip: 'Show',
|
||||
switch: true,
|
||||
onSwitch: function (item) {
|
||||
item.tooltip = item.switch ? 'Hide' : 'Show';
|
||||
art.subtitle.show = !item.switch;
|
||||
return !item.switch;
|
||||
},
|
||||
},
|
||||
{
|
||||
html: 'Setting 02',
|
||||
default: true,
|
||||
html: 'Bilingual',
|
||||
url: '/assets/sample/subtitle.srt',
|
||||
},
|
||||
{
|
||||
html: 'Chinese',
|
||||
url: '/assets/sample/subtitle.cn.srt',
|
||||
},
|
||||
{
|
||||
html: 'Japanese',
|
||||
url: '/assets/sample/subtitle.jp.srt',
|
||||
},
|
||||
],
|
||||
onSelect: function (item) {
|
||||
console.info('You clicked on the custom setting', item.html);
|
||||
art.subtitle.switch(item.url, {
|
||||
name: item.html,
|
||||
});
|
||||
return item.html;
|
||||
},
|
||||
},
|
||||
{
|
||||
html: 'Switcher',
|
||||
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
||||
tooltip: 'OFF',
|
||||
switch: false,
|
||||
onSwitch: function (item) {
|
||||
item.tooltip = item.switch ? 'OFF' : 'ON';
|
||||
console.info('You clicked on the custom switch', item.switch);
|
||||
return !item.switch;
|
||||
},
|
||||
},
|
||||
{
|
||||
html: 'Slider',
|
||||
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
||||
tooltip: '5x',
|
||||
range: [5, 1, 10, 0.1],
|
||||
onRange: function (item) {
|
||||
return item.range + 'x';
|
||||
},
|
||||
},
|
||||
],
|
||||
contextmenu: [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 48 48">
|
||||
<path d="M0 0h48v48H0z" fill="none"/>
|
||||
<path fill="#ffffff" d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 318 B |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
Vendored
+136
-36
@@ -10,7 +10,7 @@ type Selector = {
|
||||
/**
|
||||
* Html string of selector
|
||||
*/
|
||||
html: string;
|
||||
html: string | HTMLElement;
|
||||
};
|
||||
|
||||
type ComponentOption = {
|
||||
@@ -89,7 +89,7 @@ type SettingOption = {
|
||||
/**
|
||||
* The tooltip of setting
|
||||
*/
|
||||
tooltip?: string;
|
||||
tooltip?: string | HTMLElement;
|
||||
|
||||
/**
|
||||
* Whether the default is selected
|
||||
@@ -104,7 +104,35 @@ type SettingOption = {
|
||||
/**
|
||||
* When selector item click
|
||||
*/
|
||||
onSelect?(selector: SettingOption, element: HTMLElement, event: Event): void;
|
||||
onSelect?(item: SettingOption, element: HTMLElement, event: Event): void;
|
||||
|
||||
/**
|
||||
* Custom switch item
|
||||
*/
|
||||
switch?: boolean;
|
||||
|
||||
/**
|
||||
* When switch item click
|
||||
*/
|
||||
onSwitch?(item: SettingOption, element: HTMLElement, event: Event): void;
|
||||
|
||||
/**
|
||||
* Custom range item
|
||||
*/
|
||||
range?: number[] | number;
|
||||
|
||||
/**
|
||||
* When range item change
|
||||
*/
|
||||
onRange?(item: SettingOption, element: HTMLElement, event: Event): void;
|
||||
|
||||
$icon?: HTMLElement;
|
||||
$html?: HTMLElement;
|
||||
$tooltip?: HTMLElement;
|
||||
$switch?: boolean;
|
||||
$range?: HTMLElement;
|
||||
$parentItem?: SettingOption;
|
||||
$parentList?: SettingOption[];
|
||||
};
|
||||
|
||||
type Component = {
|
||||
@@ -144,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 = {
|
||||
@@ -171,13 +199,6 @@ type SubtitleOption = {
|
||||
encoding?: string;
|
||||
};
|
||||
|
||||
type AdsOption = {
|
||||
/**
|
||||
* The ads video url
|
||||
*/
|
||||
url: string;
|
||||
};
|
||||
|
||||
type Option = {
|
||||
/**
|
||||
* The container mounted by the player
|
||||
@@ -344,6 +365,11 @@ type Option = {
|
||||
*/
|
||||
autoOrientation?: boolean;
|
||||
|
||||
/**
|
||||
* Whether use airplay
|
||||
*/
|
||||
airplay?: boolean;
|
||||
|
||||
/**
|
||||
* Custom plugin list
|
||||
*/
|
||||
@@ -354,11 +380,6 @@ type Option = {
|
||||
*/
|
||||
whitelist?: (string | WhitelistFunction | RegExp)[];
|
||||
|
||||
/**
|
||||
* Custom ads list
|
||||
*/
|
||||
ads?: AdsOption[];
|
||||
|
||||
/**
|
||||
* Custom layer list
|
||||
*/
|
||||
@@ -391,7 +412,7 @@ type Option = {
|
||||
/**
|
||||
* Html string of quality
|
||||
*/
|
||||
html: string;
|
||||
html: string | HTMLElement;
|
||||
|
||||
/**
|
||||
* Video quality url
|
||||
@@ -479,6 +500,67 @@ type Option = {
|
||||
type AspectRatio = 'default' | '4:3' | '16:9' | void;
|
||||
type PlaybackRate = 0.5 | 0.75 | 1.0 | 1.25 | 1.5 | 1.75 | 2.0 | void;
|
||||
type Flip = 'normal' | 'horizontal' | 'vertical' | void;
|
||||
type Events =
|
||||
| 'video:canplay'
|
||||
| 'video:canplaythrough'
|
||||
| 'video:complete'
|
||||
| 'video:durationchange'
|
||||
| 'video:emptied'
|
||||
| 'video:ended'
|
||||
| 'video:loadeddata'
|
||||
| 'video:loadeddata'
|
||||
| 'video:loadedmetadata'
|
||||
| 'video:pause'
|
||||
| 'video:play'
|
||||
| 'video:playing'
|
||||
| 'video:progress'
|
||||
| 'video:ratechange'
|
||||
| 'video:seeked'
|
||||
| 'video:seeking'
|
||||
| 'video:stalled'
|
||||
| 'video:suspend'
|
||||
| 'video:timeupdate'
|
||||
| 'video:volumechange'
|
||||
| 'video:waiting'
|
||||
| 'hotkey'
|
||||
| 'destroy'
|
||||
| 'customType'
|
||||
| 'url'
|
||||
| 'subtitleUpdate'
|
||||
| 'subtitleLoad'
|
||||
| 'subtitleSwitch'
|
||||
| 'focus'
|
||||
| 'blur'
|
||||
| 'dblclick'
|
||||
| 'click'
|
||||
| 'setBar'
|
||||
| 'hover'
|
||||
| 'mousemove'
|
||||
| 'resize'
|
||||
| 'view'
|
||||
| 'aspectRatio'
|
||||
| 'autoHeight'
|
||||
| 'autoSize'
|
||||
| 'ready'
|
||||
| 'error'
|
||||
| 'flip'
|
||||
| 'fullscreen'
|
||||
| 'fullscreenWeb'
|
||||
| 'loop'
|
||||
| 'mini'
|
||||
| 'pause'
|
||||
| 'pip'
|
||||
| 'playbackRate'
|
||||
| 'play'
|
||||
| 'screenshot'
|
||||
| 'seek'
|
||||
| 'subtitleOffset'
|
||||
| 'switch'
|
||||
| 'restart'
|
||||
| 'volume'
|
||||
| 'lock'
|
||||
| 'selector'
|
||||
| string;
|
||||
|
||||
declare class Player {
|
||||
get aspectRatio(): AspectRatio;
|
||||
@@ -535,19 +617,20 @@ declare class Player {
|
||||
set theme(theme: string);
|
||||
get subtitleOffset(): number;
|
||||
set subtitleOffset(time: number);
|
||||
pause(): any;
|
||||
play(): any;
|
||||
toggle(): any;
|
||||
pause(): void;
|
||||
play(): Promise<void>;
|
||||
toggle(): void;
|
||||
attr(key: string, value: any): void;
|
||||
switchUrl(url: string): Promise<string>;
|
||||
switchQuality(url: string): Promise<string>;
|
||||
getDataURL(): Promise<string>;
|
||||
getBlobUrl(): Promise<string>;
|
||||
screenshot(): Promise<string>;
|
||||
airplay(): void;
|
||||
}
|
||||
|
||||
declare class Artplayer extends Player {
|
||||
constructor(option: Option, readyCallback: (this: Artplayer) => void);
|
||||
constructor(option: Option, readyCallback?: (this: Artplayer) => void);
|
||||
|
||||
static instances: Artplayer[];
|
||||
static version: string;
|
||||
@@ -582,10 +665,36 @@ declare class Artplayer extends Player {
|
||||
readonly isFocus: boolean;
|
||||
readonly isDestroy: boolean;
|
||||
|
||||
on(name: string, fn: Function, ctx?: object): void;
|
||||
once(name: string, fn: Function, ctx?: object): void;
|
||||
emit(name: string): void;
|
||||
off(name: string, callback?: Function): void;
|
||||
static NOTICE_TIME: number;
|
||||
static SETTING_WIDTH: number;
|
||||
static SETTING_ITEM_WIDTH: number;
|
||||
static SETTING_ITEM_HEIGHT: number;
|
||||
static INDICATOR_SIZE: number;
|
||||
static INDICATOR_SIZE_ICON: number;
|
||||
static INDICATOR_SIZE_MOBILE: number;
|
||||
static INDICATOR_SIZE_MOBILE_ICON: number;
|
||||
static VOLUME_PANEL_WIDTH: number;
|
||||
static VOLUME_HANDLE_WIDTH: number;
|
||||
static RESIZE_TIME: number;
|
||||
static SCROLL_TIME: number;
|
||||
static SCROLL_GAP: number;
|
||||
static AUTO_PLAYBACK_MAX: number;
|
||||
static RECONNECT_TIME_MAX: number;
|
||||
static RECONNECT_SLEEP_TIME: number;
|
||||
static CONTROL_HIDE_TIME: number;
|
||||
static DB_CLICE_TIME: number;
|
||||
static MOBILE_AUTO_PLAYBACKRAT: number;
|
||||
static MOBILE_AUTO_PLAYBACKRATE_TIME: number;
|
||||
static MOBILE_AUTO_ORIENTATION_TIME: number;
|
||||
static INFO_LOOP_TIME: number;
|
||||
static FAST_FORWARD_VALUE: number;
|
||||
static FAST_FORWARD_TIME: number;
|
||||
|
||||
on(name: Events, fn: Function, ctx?: object): void;
|
||||
once(name: Events, fn: Function, ctx?: object): void;
|
||||
emit(name: Events): void;
|
||||
off(name: Events, callback?: Function): void;
|
||||
|
||||
query(selector: string): HTMLElement;
|
||||
proxy(
|
||||
target: HTMLElement,
|
||||
@@ -678,6 +787,7 @@ declare class Artplayer extends Player {
|
||||
readonly plugins: {
|
||||
readonly id: number;
|
||||
add(plugin: PluginFunction): Artplayer['plugins'];
|
||||
[pluginName: string]: any;
|
||||
};
|
||||
|
||||
readonly i18n: {
|
||||
@@ -703,16 +813,6 @@ declare class Artplayer extends Player {
|
||||
switch(url: string, option?: SubtitleOption): Promise<string>;
|
||||
};
|
||||
|
||||
readonly ads: {
|
||||
index: number;
|
||||
isEnd: boolean;
|
||||
playing: boolean;
|
||||
current: AdsOption;
|
||||
prev: AdsOption;
|
||||
next: AdsOption;
|
||||
end(): void;
|
||||
};
|
||||
|
||||
readonly mobile: object;
|
||||
|
||||
readonly player: Player;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* artplayer-plugin-ads.js v1.0.4
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a.parcelRequirea5da&&a.parcelRequirea5da,o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,l){if(!o[n]){if(!e[n]){var t="function"==typeof a.parcelRequirea5da&&a.parcelRequirea5da;if(!l&&t)return t(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},u.cache={};var s=o[n]=new p.Module(n);e[n][0].call(s.exports,u,s,s.exports,this)}return o[n].exports;function u(e){var n=u.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=r,p.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(p,"root",{get:function(){return a.parcelRequirea5da}}),a.parcelRequirea5da=p;for(var s=0;s<n.length;s++)p(n[s]);var u=p(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({E13ST:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:r,loading:o},constructor:{validator:d,utils:{query:p,append:s,setStyle:u}}}=n;e=d({html:"",video:"",url:"",playDuration:5,totalDuration:10,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let c=null,y=null,f=null,g=null,m=null,v=null,x=0,h=null,b=!1,w=!1,D=!1;function j(e,n){return n.replace("%s",e)}function k(){b=!0,n.play(),e.video&&c.pause(),u(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function O(){b||(h=setTimeout((()=>{x+=1;const n=e.playDuration-x;n>=1?f.innerHTML=j(n,e.i18n.canBeClosed):(f.innerHTML=e.i18n.close,D||(D=!0)),g.innerHTML=j(e.totalDuration-x,e.i18n.countdown),x>=e.totalDuration?k():O()}),1e3))}function $(){b||clearTimeout(h)}function P(){w||(w=!0,function(){n.template.$ads=s(l,'<div class="artplayer-plugin-ads"></div>'),c=s(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=s(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),s(v,o),y=s(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:j(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${j(e.totalDuration,e.i18n.countdown)}</div></div>`),f=p(".artplayer-plugin-ads-close",y),g=p(".artplayer-plugin-ads-countdown",y),e.playDuration>=e.totalDuration&&u(f,"display","none"),n.proxy(f,"click",(()=>{D&&k()})),m=s(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const d=p(".artplayer-plugin-ads-detail",m),x=p(".artplayer-plugin-ads-muted",m),h=p(".artplayer-plugin-ads-fullscreen",m);if(e.url?n.proxy(d,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):u(d,"display","none"),e.video){const e=s(x,t),l=s(x,i);u(l,"display","none"),n.proxy(x,"click",(()=>{c.muted=!c.muted,c.muted?(u(e,"display","none"),u(l,"display","inline-flex")):(u(e,"display","inline-flex"),u(l,"display","none"))}))}else u(x,"display","none");const b=s(h,a),w=s(h,r);u(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(u(b,"display","inline-flex"),u(w,"display","none")):(u(b,"display","none"),u(w,"display","inline-flex"))})),n.proxy(c,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(c,"error",k),n.proxy(c,"loadedmetadata",(()=>{O(),c.play(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")}))):(O(),u(y,"display","flex"),u(m,"display","flex"),u(v,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?$():O()})))}return n.on("ready",(()=>{n.once("play",P),n.once("video:playing",P)})),{name:"artplayerPluginAds",skip:k,pause:$,play:O}}}if(l.default=r,r.env="production",r.version="1.0.4",r.build="1656294187607","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof
Line truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer-plugin-danmuku.js v4.3.16
|
||||
* 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,i,r,n){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf,a=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,i){if(!a[e]){if(!t[e]){var r="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf;if(!i&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},p.cache={};var h=a[e]=new u.Module(e);t[e][0].call(h.exports,p,h,h.exports,this)}return a[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=a,u.parent=o,u.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(u,"root",{get:function(){return s.parcelRequire93cf}}),s.parcelRequire93cf=u;for(var h=0;h<e.length;h++)u(e[h]);var p=u(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}({E13ST:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./danmuku"),s=r.interopDefault(n);function o(t){return e=>{const i=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),get isHide(){return i.isHide}}}}i.default=o,window.artplayerPluginDanmuku=o},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Gtnh":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),s=t("./getDanmuTop"),o=r.interopDefault(s);class a{constructor(t,e){this.art=t,this.utils=t.constructor.utils,this.validator=t.constructor.validator,this.queue=[],this.option={},this.$refs=[],this.config(e),this.isStop=!1,this.isHide=!1,this.animationFrameTimer=null,this.$danmuku=t.template.$danmuku,this.$player=t.template.$player,t.on("video:play",this.start.bind(this)),t.on("video:playing",this.start.bind(this)),t.on("video:pause",this.stop.bind(this)),t.on("video:waiting",this.stop.bind(this)),t.on("resize",this.resize.bind(this)),t.on("destroy",this.stop.bind(this)),t.on("fullscreen",this.reset.bind(this)),t.on("fullscreenWeb",this.reset.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,100],opacity:1,fontSize:25,filter:()=>!0,antiOverlap:!0,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",fontSize:"number",filter:"function",antiOverlap:"boolean",synchronousPlayback:"boolean"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[0];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[1];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}async load(){try{let t=[];t="function"==typeof this.option.danmuku?await this.option.danmuku():"function"==typeof this.option.danmuku.then?await this.option.danmuku:"string"==typeof this.option.danmuku?await n.bilibiliDanmuParseFromUrl(this.option.danmuku):this.option.danmuku,this.utils.errorHandle(Array.isArray(t),"Danmuku need return an array as result"),this.art.emit("artplayerPluginDanmuku:loaded",t),this.queue=[],this.$danmuku.innerText="",t.forEach((t=>this.emit(t)))}catcLine 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="1656294188506","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.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
|
||||
!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=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);const h=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(h).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1Line truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer.js v4.3.16
|
||||
* artplayer.js v4.5.3
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=a[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return a[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=a,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=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}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),s=e("option-validator"),a=o.interopDefault(s),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),M=o.interopDefault(k),S=e("./contextmenu"),I=o.interopDefault(S),F=e("./info"),$=o.interopDefault(F),T=e("./subtitle"),E=o.interopDefault(T),C=e("./events"),Y=o.interopDefault(C),D=e("./hotkey"),z=o.interopDefault(D),R=e("./layer"),A=o.interopDefault(R),O=e("./loading"),L=o.interopDefault(O),P=e("./notice"),H=o.interopDefault(P),_=e("./mask"),N=o.interopDefault(_),J=e("./icons"),q=o.interopDefault(J),V=e("./setting"),W=o.interopDefault(V),B=e("./storage"),U=o.interopDefault(B),Z=e("./plugins"),X=o.interopDefault(Z),G=e("./ads"),Q=o.interopDefault(G),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=a.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new v.default(this),this.events=new Y.default(this),this.whitelist.state?(this.storage=new U.default(this),this.icons=new q.default(this),this.i18n=new x.default(this),this.notice=new H.default(this),this.player=new j.default(this),this.layers=new A.default(this),this.controls=new M.default(this),this.contextmenu=new I.default(this),this.subtitle=new E.default(this),this.ads=new Q.default(this),this.info=new $.default(this),this.loading=new L.default(this),this.hotkey=new z.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.3.16"}static get env(){return"production"}static get build(){return"1651399264108"}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 a.default}static get kindOf(){return a.default.kindOf}static get html(){return v.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")}}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_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.SCLine truncated
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,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 n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}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 n.parcelRequireb749}}),n.parcelRequireb749=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}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),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"),C=o.interopDefault(I),$=e("./info"),F=o.interopDefault($),M=e("./subtitle"),T=o.interopDefault(M),E=e("./events"),P=o.interopDefault(E),z=e("./hotkey"),D=o.interopDefault(z),A=e("./layer"),R=o.interopDefault(A),O=e("./loading"),L=o.interopDefault(O),H=e("./notice"),N=o.interopDefault(H),Y=e("./mask"),V=o.interopDefault(Y),_=e("./icons"),q=o.interopDefault(_),W=e("./setting"),B=o.interopDefault(W),U=e("./storage"),Z=o.interopDefault(U),X=e("./plugins"),G=o.interopDefault(X),Q=e("./mobile"),J=o.interopDefault(Q);let K=0;const ee=[];class te extends c.default{constructor(e,t){super(),this.id=++K;const r=p.mergeDeep(te.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,P.default)(this),this.whitelist.state?(this.storage=new(0,Z.default)(this),this.icons=new(0,q.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,N.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,R.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,C.default)(this),this.subtitle=new(0,T.default)(this),this.info=new(0,F.default)(this),this.loading=new(0,L.default)(this),this.hotkey=new(0,D.default)(this),this.mask=new(0,V.default)(this),this.setting=new(0,B.default)(this),this.plugins=new(0,G.default)(this)):this.mobile=new(0,J.default)(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),ee.push(this)}static get instances(){return ee}static get version(){return"4.5.3"}static get env(){return"production"}static get build(){return"1657700130200"}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,airplay:!1,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),ee.splice(ee.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=te,te.NOTICE_TIME=2e3,te.SETTING_WIDTH=250,te.SETTING_ITEM_WIDTH=200,te.SETTING_ITEM_HEIGHT=35,te.INDICATOR_SIZE=14,te.INDICATOR_SIZE_ICON=16,te.INDICATOR_SIZE_MOBILE=18,te.INDICATOR_SIZE_MOBILE_ICON=20,te.VOLUME_PANEL_WIDTH=60,te.VOLUME_HANDLE_WIDLine truncated
|
||||
@@ -3,15 +3,15 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.18">
|
||||
<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.f3e31586.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.f7824698.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.bbc9832a.js" as="script">
|
||||
<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.0e268021.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a87b2434.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_h7Fx">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_nUPt themedImage--light_jK22" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_nUPt themedImage--dark_oeCH" height="28" width="28"></div><b class="navbar__title">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_DFv6"><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_DFv6"><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_G4Gn colorModeToggle_QI4_"><button class="clean-btn toggleButton_B3yp toggleButtonDisabled_gl26" 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_zw4B"><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_SG70"><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="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 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></footer></div>
|
||||
<script src="/document/assets/js/runtime~main.f7824698.js"></script>
|
||||
<script src="/document/assets/js/main.bbc9832a.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"><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.0e268021.js"></script>
|
||||
<script src="/document/assets/js/main.a87b2434.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,15 +3,15 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.18">
|
||||
<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.f3e31586.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.f7824698.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.bbc9832a.js" as="script">
|
||||
<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.0e268021.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a87b2434.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_h7Fx">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_nUPt themedImage--light_jK22" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_nUPt themedImage--dark_oeCH" height="28" width="28"></div><b class="navbar__title">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_DFv6"><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_DFv6"><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_G4Gn colorModeToggle_QI4_"><button class="clean-btn toggleButton_B3yp toggleButtonDisabled_gl26" 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_zw4B"><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_SG70"><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="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 role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><div class="docPage_oZIE"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_fZNX" type="button"></button><aside class="theme-doc-sidebar-container docSidebarContainer_qJKa"><div class="sidebar_XfmK"><nav class="menu thin-scrollbar menu_bP0b"><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-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="Line truncated
|
||||
<script src="/document/assets/js/runtime~main.f7824698.js"></script>
|
||||
<script src="/document/assets/js/main.bbc9832a.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.0e268021.js"></script>
|
||||
<script src="/document/assets/js/main.a87b2434.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}body,ol ol,ol ul,ul ol,ul ul{margin:0}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.admonition-icon svg,.alert__icon svg{fill:var(--ifm-alert-foreground-color)}.toggleButton_rCf9,html{-webkit-tap-highlight-color:transparent}.button,.dropdown__link,.searchbox,.text--truncate{white-space:nowrap}.searchbox__reset:focus,.searchbox__submit:focus,body:not(.navigation-with-keyboard) :not(input):focus{outline:0}pre,table{overflow:auto}.markdown li,body{word-wrap:break-word}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-basLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
.container,.row .col{padding:0 var(--ifm-spacing-horizontal);width:100%}.row .col,img{max-width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}body,ol ol,ol ul,ul ol,ul ul{margin:0}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.avatar__photo,.card,.text--truncate{overflow:hidden}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar__title,.text--truncate{text-overflow:ellipsis;white-space:nowrap}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.admonition-icon svg,.alert__icon svg{fill:var(--ifm-alert-foreground-color)}.toggleButton_B3yp,html{-webkit-tap-highlight-color:transparent}.button,.dropdown__link,.navbar__title,.searchbox,.text--truncate{white-space:nowrap}.searchbox__reset:focus,.searchbox__submit:focus,body:not(.navigation-with-keyboard) :not(input):focus{outline:0}pre,table{overflow:auto}.markdown li,body{word-wrap:break-word}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-bLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[176],{9278:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return u}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),m=s(n),u=r,v=m["".concat(p,".").concat(u)]||m[u]||d[u]||i;return n?a.createElement(v,l(l({ref:t},c),{},{components:n})):a.createElement(v,l({ref:t},c))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var s=2;s<i;s++)l[s]=n[s];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},1541:function(e,t,n){n.r(t),n.d(t,{assets:function(){return c},contentTitle:function(){return p},default:function(){return u},frontMatter:function(){return o},metadata:function(){return s},toc:function(){return d}});var a=n(7145),r=n(4736),i=(n(9301),n(9278)),l=["components"],o={title:"Quick start",sidebar_position:1,slug:"/"},p=void 0,s={unversionedId:"en/Overview",id:"en/Overview",title:"Quick start",description:"Install",source:"@site/docs/en/Overview.md",sourceDirName:"en",slug:"/",permalink:"/document/",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Quick start",sidebar_position:1,slug:"/"},sidebar:"en",next:{title:"Basic options",permalink:"/document/options"}},c={},d=[{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 in <code>Html</code>",id:"use-in-html",level:3},{value:"Use in <code>Vue</code>",id:"use-in-vue",level:3},{value:"Use in <code>React</code>",id:"use-in-react",level:3},{value:"Demo",id:"demo",level:2}],m={toc:d};function u(e){var t=e.components,n=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"install"},"Install"),(0,i.kt)("h3",{id:"install-by-npm"},"Install by ",(0,i.kt)("inlineCode",{parentName:"h3"},"npm"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ npm install artplayer\n")),(0,i.kt)("h3",{id:"install-by-yarn"},"Install by ",(0,i.kt)("inlineCode",{parentName:"h3"},"yarn"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ yarn add artplayer\n")),(0,i.kt)("p",null,"Then load the ",(0,i.kt)("inlineCode",{parentName:"p"},"Artplayer")," module:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"// ES6\nimport Artplayer from 'artplayer';\n\n// CommonJS\nconst Artplayer = require('artplayer');\n")),(0,i.kt)("h3",{id:"install-by-script"},"Install by ",(0,i.kt)("inlineCode",{parentName:"h3"},"script"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-html"},'\x3c!-- locally --\x3e\n<script src="path/to/artplayer.js"><\/script>\n\n\x3c!-- jsdelivr --\x3e\n<script src="https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js"><\/script>\n\n\x3c!-- unpkg --\x3e\n<script src="https://unpkg.com/artplayer/dist/artplayer.js"><\/script>\n')),(0,i.kt)("p",null,"Then you can access the constructor via ",(0,i.kt)("inlineCode",{parentName:"p"},"window.ArtPlayer")),(0,i.kt)("h2",{id:"use"},"Use"),(0,i.kt)("div",{className:"admonition admonitiLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[479],{9278:function(e,n,t){t.d(n,{Zo:function(){return l},kt:function(){return f}});var r=t(9301);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(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?a(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var d=r.createContext({}),c=function(e){var n=r.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},l=function(e){var n=c(e.components);return r.createElement(d.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,d=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=c(t),f=o,m=u["".concat(d,".").concat(f)]||u[f]||p[f]||a;return t?r.createElement(m,i(i({ref:n},l),{},{components:t})):r.createElement(m,i({ref:n},l))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=u;var s={};for(var d in n)hasOwnProperty.call(n,d)&&(s[d]=n[d]);s.originalType=e,s.mdxType="string"==typeof e?e:o,i[1]=s;for(var c=2;c<a;c++)i[c]=t[c];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}u.displayName="MDXCreateElement"},4110:function(e,n,t){t.r(n),t.d(n,{assets:function(){return l},contentTitle:function(){return d},default:function(){return f},frontMatter:function(){return s},metadata:function(){return c},toc:function(){return p}});var r=t(7145),o=t(4736),a=(t(9301),t(9278)),i=["components"],s={title:"How to add video ads",sidebar_position:5},d=void 0,c={unversionedId:"en/Questions/How_to_add_video_ads",id:"en/Questions/How_to_add_video_ads",title:"How to add video ads",description:"Video ads play before main video playback, support multiple video ads",source:"@site/docs/en/Questions/How_to_add_video_ads.md",sourceDirName:"en/Questions",slug:"/en/Questions/How_to_add_video_ads",permalink:"/document/en/Questions/How_to_add_video_ads",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"How to add video ads",sidebar_position:5},sidebar:"en",previous:{title:"How to import types",permalink:"/document/en/Questions/How_to_import_types"},next:{title:"How to add setting panel",permalink:"/document/en/Questions/How_to_add_setting_panel"}},l={},p=[],u={toc:p};function f(e){var n=e.components,t=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Video ads play before main video playback, support multiple video ads"),(0,a.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: 'https://artplayer.org/assets/sample/video.mp4',\n muted: true,\n autoSize: true,\n autoplay: true,\n ads: [\n {\n url: '/assets/sample/test1.mp4'\n },\n {\n url: '/assets/sample/test2.webm'\n },\n ],\n controls: [\n {\n position: 'right',\n html: 'Skip The Ads',\n click: function () {\n // Skip The Ads\n art.ads.end();\n },\n },\n ],\n layers: [\n {\n html: 'Skip The Ads',\n style: {\n position: 'absolute',\n top: '20px',\n right: '20px',\n },\n click: function () {\n // Skip The Ads\n art.ads.end();\n },\n },\n ],\n});\n\nart.on('ready', function () {\n // Triggers when each video advertisement is played\n art.on('ads:start', (item) => {\n console.info('Ads is playing: ' + item.url);\n });\n\n // Triggers when all video advertisements are end\n art.on('ads:end', () => {\n console.info('Ads is end');\n });\n\n // Current advertising index\n console.info(art.ads.index);\n\n // Whether all the adverti
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[696],{9278:function(n,e,t){t.d(e,{Zo:function(){return s},kt:function(){return c}});var a=t(9301);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 p=a.createContext({}),o=function(n){var e=a.useContext(p),t=e;return n&&(t="function"==typeof n?n(e):i(i({},e),n)),t},s=function(n){var e=o(n.components);return a.createElement(p.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,p=n.parentName,s=u(n,["components","mdxType","originalType","parentName"]),d=o(t),c=r,k=d["".concat(p,".").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 p in e)hasOwnProperty.call(e,p)&&(u[p]=e[p]);u.originalType=n,u.mdxType="string"==typeof n?n:r,i[1]=u;for(var o=2;o<l;o++)i[o]=t[o];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}d.displayName="MDXCreateElement"},502:function(n,e,t){t.r(e),t.d(e,{assets:function(){return s},contentTitle:function(){return p},default:function(){return c},frontMatter:function(){return u},metadata:function(){return o},toc:function(){return m}});var a=t(7145),r=t(4736),l=(t(9301),t(9278)),i=["components"],u={title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",sidebar_position:1},p=void 0,o={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.md",sourceDirName:"zh-cn/Plugins",slug:"/zh-cn/Plugins/danmuku",permalink:"/document/zh-cn/Plugins/danmuku",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")," \u5b89Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[941],{9278:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return c}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(p,".").concat(c)]||m[c]||d[c]||l;return n?a.createElement(k,i(i({ref:t},u),{},{components:n})):a.createElement(k,i({ref:t},u))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var s=2;s<l;s++)i[s]=n[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},18:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return p},default:function(){return c},frontMatter:function(){return o},metadata:function(){return s},toc:function(){return d}});var a=n(7145),r=n(4736),l=(n(9301),n(9278)),i=["components"],o={title:"Common properties",sidebar_position:3,slug:"/propertie"},p=void 0,s={unversionedId:"en/Properties",id:"en/Properties",title:"Common properties",description:"play",source:"@site/docs/en/Properties.md",sourceDirName:"en",slug:"/propertie",permalink:"/document/propertie",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Common properties",sidebar_position:3,slug:"/propertie"},sidebar:"en",previous:{title:"Basic options",permalink:"/document/options"},next:{title:"Advanced propertys",permalink:"/document/advance"}},u={},d=[{value:"play",id:"play",level:2},{value:"pause",id:"pause",level:2},{value:"toggle",id:"toggle",level:2},{value:"seek",id:"seek",level:2},{value:"forward",id:"forward",level:2},{value:"backward",id:"backward",level:2},{value:"volume",id:"volume",level:2},{value:"url",id:"url",level:2},{value:"switchUrl",id:"switchurl",level:2},{value:"switchQuality",id:"switchquality",level:2},{value:"muted",id:"muted",level:2},{value:"currentTime",id:"currenttime",level:2},{value:"duration",id:"duration",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"getDataURL",id:"getdataurl",level:2},{value:"getBlobUrl",id:"getbloburl",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"pip",id:"pip",level:2},{value:"poster",id:"poster",level:2},{value:"mini",id:"mini",level:2},{value:"playing",id:"playing",level:2},{value:"autoSize",id:"autosize",level:2},{value:"rect",id:"rect",level:2},{value:"flip",id:"flip",level:2},{value:"rotate",id:"rotate",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"loop",id:"loop",level:2},{value:"autoHeight",id:"autoheight",level:2},{value:"attr",id:"attr",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"destroy",id:"destroy",level:2}],m={toc:d};function c(e){var t=e.components,n=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"play"},"play"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Type: ",(0,l.kt)("inlineCode",{parentName:"li"},"Function"))),(0,l.kt)("p",null,"Play video"),(0,l.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n muted: true,\n});\n\nart.on('readLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[918],{9278:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return p}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,m=i(e,["components","mdxType","originalType","parentName"]),u=s(n),p=r,v=u["".concat(c,".").concat(p)]||u[p]||d[p]||l;return n?a.createElement(v,o(o({ref:t},m),{},{components:n})):a.createElement(v,o({ref:t},m))}));function p(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=u;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}u.displayName="MDXCreateElement"},1521:function(e,t,n){n.r(t),n.d(t,{default:function(){return We}});var a=n(9301),r=n(4927),l=n(7145),o=n(6437),i=n(8765);function c(e){var t=e.permalink,n=e.title,r=e.subLabel;return a.createElement(i.Z,{className:"pagination-nav__link",to:t},r&&a.createElement("div",{className:"pagination-nav__sublabel"},r),a.createElement("div",{className:"pagination-nav__label"},n))}function s(e){var t=e.previous,n=e.next;return a.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,o.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},a.createElement("div",{className:"pagination-nav__item"},t&&a.createElement(c,(0,l.Z)({},t,{subLabel:a.createElement(o.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")}))),a.createElement("div",{className:"pagination-nav__item pagination-nav__item--next"},n&&a.createElement(c,(0,l.Z)({},n,{subLabel:a.createElement(o.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next")}))))}var m=n(8099),d=n(4413),u=n(5395);var p={unreleased:function(e){var t=e.siteTitle,n=e.versionMetadata;return a.createElement(o.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var t=e.siteTitle,n=e.versionMetadata;return a.createElement(o.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function v(e){var t=p[e.versionMetadata.banner];return a.createElement(t,e)}function g(e){var t=e.versionLabel,n=e.to,r=e.onClick;return a.createElement(o.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(i.Z,{to:n,onClick:r},a.createElement(o.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function h(e){var t,n=e.className,l=e.versionMetadata,o=(0,m.Z)().siteConfig.title,i=(0,d.gA)({failfast:!0}).pluginId,c=(0,u.J)(i).savePreferredVersionName,s=(0,d.Jo)(i),p=s.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[918],{3905:function(e,t,n){"use strict";n.d(t,{Zo:function(){return u},kt:function(){return p}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),s=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},m={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,r=e.mdxType,l=e.originalType,i=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=s(n),p=r,v=d["".concat(i,".").concat(p)]||d[p]||m[p]||l;return n?a.createElement(v,o(o({ref:t},u),{},{components:n})):a.createElement(v,o({ref:t},u))}));function p(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=d;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var s=2;s<l;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},7209:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ot}});var a=n(7294),r=n(6010),l=n(7462),o=n(5999),c=n(9960);function i(e){var t=e.permalink,n=e.title,l=e.subLabel,o=e.isNext;return a.createElement(c.Z,{className:(0,r.Z)("pagination-nav__link",o?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},l&&a.createElement("div",{className:"pagination-nav__sublabel"},l),a.createElement("div",{className:"pagination-nav__label"},n))}function s(e){var t=e.previous,n=e.next;return a.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,o.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},t&&a.createElement(i,(0,l.Z)({},t,{subLabel:a.createElement(o.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&a.createElement(i,(0,l.Z)({},n,{subLabel:a.createElement(o.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}var u=n(2263),m=n(5551),d=n(373),p=n(5281),v=n(4477);var f={unreleased:function(e){var t=e.siteTitle,n=e.versionMetadata;return a.createElement(o.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var t=e.siteTitle,n=e.versionMetadata;return a.createElement(o.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function g(e){var t=f[e.versionMetadata.banner];return a.createElement(t,e)}function h(e){var t=e.versionLabel,n=e.to,r=e.onClick;return a.createElement(o.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(c.Z,{to:n,onClick:r},a.createElement(o.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function b(e){var t,n=e.className,l=e.versionMetadata,o=(0,u.Z)().siteConfig.title,c=(0,m.gA)({failfast:!0}).pluginId,i=(0,d.J)(c).savePreferredVersionName,s=(0,m.Jo)(c),v=s.latestDocSuggestion,fLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[514,869],{1967:function(e,t,a){a.r(t),a.d(t,{default:function(){return ee}});var n=a(9301),l=a(5334),r=a(1077),o=a(5395),i=a(4927),c=a(6283),s=a(7145);function d(e){return n.createElement("svg",(0,s.Z)({width:"20",height:"20","aria-hidden":"true"},e),n.createElement("g",{fill:"#7a7a7a"},n.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),n.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}var u=a(6437),m="collapseSidebarButton_lVx0",b="collapseSidebarButtonIcon_G89Y";function p(e){var t=e.onClick;return n.createElement("button",{type:"button",title:(0,u.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,i.Z)("button button--secondary button--outline",m),onClick:t},n.createElement(d,{className:b}))}var f=a(4736),v=a(8765),h=a(6e3),E=a(1981),_="menuHtmlItem_Zn0r",g="menuExternalLink_gYZB",k=a(2348),S=["item"],Z=["item","onItemClick","activePath","level","index"],C=["item","onItemClick","activePath","level","index"];function N(e){var t=e.item,a=(0,f.Z)(e,S);switch(t.type){case"category":return n.createElement(I,(0,s.Z)({item:t},a));case"html":return n.createElement(T,(0,s.Z)({item:t},a));default:return n.createElement(M,(0,s.Z)({item:t},a))}}function I(e){var t=e.item,a=e.onItemClick,l=e.activePath,r=e.level,c=e.index,d=(0,f.Z)(e,Z),m=t.items,b=t.label,p=t.collapsible,h=t.className,E=t.href,_=function(e){var t=(0,k.Z)();return(0,n.useMemo)((function(){return e.href?e.href:!t&&e.collapsible?(0,o.Wl)(e):void 0}),[e,t])}(t),g=(0,o._F)(t,l),S=(0,o.Mg)(E,l),C=(0,o.uR)({initialState:function(){return!!p&&(!g&&t.collapsed)}}),N=C.collapsed,I=C.setCollapsed;!function(e){var t=e.isActive,a=e.collapsed,l=e.setCollapsed,r=(0,o.D9)(t);(0,n.useEffect)((function(){t&&!r&&a&&l(!1)}),[t,r,a,l])}({isActive:g,collapsed:N,setCollapsed:I});var T=(0,o.fP)(),M=T.expandedItem,x=T.setExpandedItem;function y(e){void 0===e&&(e=!N),x(e?null:c),I(e)}var A=(0,o.LU)().autoCollapseSidebarCategories;return(0,n.useEffect)((function(){p&&M&&M!==c&&A&&I(!0)}),[p,M,c,I,A]),n.createElement("li",{className:(0,i.Z)(o.kM.docs.docSidebarItemCategory,o.kM.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":N},h)},n.createElement("div",{className:(0,i.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":S})},n.createElement(v.Z,(0,s.Z)({className:(0,i.Z)("menu__link",{"menu__link--sublist":p,"menu__link--sublist-caret":!E,"menu__link--active":g}),onClick:p?function(e){null==a||a(t),E?y(!1):(e.preventDefault(),y())}:function(){null==a||a(t)},"aria-current":S?"page":void 0,"aria-expanded":p?!N:void 0,href:p?null!=_?_:"#":_},d),b),E&&p&&n.createElement("button",{"aria-label":(0,u.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:b}),type:"button",className:"clean-btn menu__caret",onClick:function(e){e.preventDefault(),y()}})),n.createElement(o.zF,{lazy:!0,as:"ul",className:"menu__list",collapsed:N},n.createElement(L,{items:m,tabIndex:N?-1:0,onItemClick:a,activePath:l,level:r+1})))}function T(e){var t=e.item,a=e.level,l=e.index,r=t.value,c=t.defaultStyle,s=t.className;return n.createElement("li",{className:(0,i.Z)(o.kM.docs.docSidebarItemLink,o.kM.docs.docSidebarItemLinkLevel(a),c&&_+" menu__list-item",s),key:l,dangerouslySetInnerHTML:{__html:r}})}function M(e){var t=e.item,a=e.onItemClick,l=e.activePath,r=e.level,c=(e.index,(0,f.Z)(e,C)),d=t.href,u=t.label,m=t.className,b=(0,o._F)(t,l),p=(0,h.Z)(d);return n.createElement("li",{className:(0,i.Z)(o.kM.docs.docSidebarItemLink,o.kM.docs.docSidebarItemLinkLevel(r),"menu__list-item",m),key:u},n.createElement(v.Z,(0,s.Z)({className:(0,i.Z)("menu__link",!p&&g,{"menu__link--active":b}),"aria-current":b?"page":void 0,to:d},p&&{onClick:a?function(){return a(t)}:void 0},c),u,!p&&n.createElement(E.Z,null)))}var x=["items"];function y(e){var t=e.items,a=(0,f.Z)(e,x);return n.createElement(o.D_,null,t.map((function(e,t){return n.createElement(N,(0,s.Z)({key:t,item:e,index:t},a))})))}var L=(0,n.memo)(y),A="menu_bP0b",F="menuWithAnnouncementBar_GFA3";function P(e){var t=e.path,a=e.sidebar,l=e.className,Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[514,608],{9068:function(e,t,n){n.r(t),n.d(t,{default:function(){return ye}});var a=n(7294),r=n(4608),l=n(3460),i=n(6010),o=n(5999),c=n(2466),s=n(5936);var d=n(5281),u="backToTopButton_RiI4",m="backToTopButtonShow_ssHd";function b(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),r=n[0],l=n[1],i=(0,a.useRef)(!1),o=(0,c.Ct)(),d=o.startScroll,u=o.cancelScroll;return(0,c.RF)((function(e,n){var a=e.scrollY,r=null==n?void 0:n.scrollY;r&&(i.current?i.current=!1:a>=r?(u(),l(!1)):a<t?l(!1):a+window.innerHeight<document.documentElement.scrollHeight&&l(!0))})),(0,s.S)((function(e){e.location.hash&&(i.current=!0,l(!1))})),{shown:r,scrollToTop:function(){return d(0)}}}({threshold:300}),t=e.shown,n=e.scrollToTop;return a.createElement("button",{"aria-label":(0,o.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,i.Z)("clean-btn",d.k.common.backToTopButton,u,t&&m),type:"button",onClick:n})}var p=n(7524),v=n(6668),h=n(5537),f=n(7462);function E(e){return a.createElement("svg",(0,f.Z)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}var g="collapseSidebarButton_FykI",_="collapseSidebarButtonIcon_DTRl";function k(e){var t=e.onClick;return a.createElement("button",{type:"button",title:(0,o.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,o.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,i.Z)("button button--secondary button--outline",g),onClick:t},a.createElement(E,{className:_}))}var C=n(9689),I=n(3366),N=n(9688),S=n(3791),Z=n(8596),y=n(6043),x=Symbol("EmptyContext"),T=a.createContext(x);function L(e){var t=e.children,n=(0,a.useState)(null),r=n[0],l=n[1],i=(0,a.useMemo)((function(){return{expandedItem:r,setExpandedItem:l}}),[r]);return a.createElement(T.Provider,{value:i},t)}var w=n(9960),A=n(2389),F=["item","onItemClick","activePath","level","index"];function P(e){var t=e.categoryLabel,n=e.onClick;return a.createElement("button",{"aria-label":(0,o.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function M(e){var t=e.item,n=e.onItemClick,r=e.activePath,l=e.level,o=e.index,c=(0,I.Z)(e,F),s=t.items,u=t.label,m=t.collapsible,b=t.className,p=t.href,h=function(e){var t=(0,A.Z)();return(0,a.useMemo)((function(){return e.href?e.href:!t&&e.collapsible?(0,S.Wl)(e):void 0}),[e,t])}(t),E=(0,S._F)(t,r),g=(0,Z.Mg)(p,r),_=(0,y.u)({initialState:function(){return!!m&&(!E&&t.collapsed)}}),k=_.collapsed,C=_.setCollapsed;!function(e){var t=e.isActive,n=e.collapsed,r=e.setCollapsed,l=(0,N.D9)(t);(0,a.useEffect)((function(){t&&!l&&n&&r(!1)}),[t,l,n,r])}({isActive:E,collapsed:k,setCollapsed:C});var L=function(){var e=(0,a.useContext)(T);if(e===x)throw new N.i6("DocSidebarItemsExpandedStateProvider");return e}(),M=L.expandedItem,H=L.setExpandedItem;function B(e){void 0===e&&(e=!k),H(e?null:o),C(e)}var D=(0,v.L)().docs.sidebar.autoCollapseCategories;return(0,a.useEffect)((function(){m&&M&&M!==o&&D&&C(!0)}),[m,M,o,C,D]),a.createElement("li",{className:(0,i.Z)(d.k.docs.docSidebarItemCategory,d.k.docs.docSidebarItemCategoryLevel(l),"menu__list-item",{"menu__list-item--collapsed":k},b)},a.createElement("div",{className:(0,i.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g})},a.createElement(w.Z,(0,f.Z)({className:(0,i.Z)("menu__link",{"menu__link--sublist":m,"menu__link--sublist-caret":!p&&m,"menu__link--active":E}),onClick:m?function(e){null==n||n(t),p?B(!1):(e.preventDefault(),B())}:function(){null==n||n(t)},"aria-current":g?"page":void 0,"aria-expanded":m?!k:void 0,href:m?null!=h?h:"#":h},c),u),p&&m&&a.createElement(P,{categoryLabel:u,onClick:function(e){e.preventDefault(),B()}})),a.createElement(y.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:k},a.createElement(Q,{items:s,tabIndex:k?-1:0,onItemClick:n,activePath:r,level:l+1})))}var H=n(3919),B=n(541),D="menuExternalLink_KU1_",R=["item","onILine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[784],{3905:function(e,n,t){t.d(n,{Zo:function(){return m},kt:function(){return d}});var o=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 a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=o.createContext({}),s=function(e){var n=o.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},m=function(e){var n=s(e.components);return o.createElement(l.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},p=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),p=s(t),d=r,y=p["".concat(l,".").concat(d)]||p[d]||u[d]||a;return t?o.createElement(y,i(i({ref:n},m),{},{components:t})):o.createElement(y,i({ref:n},m))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=p;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s<a;s++)i[s]=t[s];return o.createElement.apply(null,i)}return o.createElement.apply(null,t)}p.displayName="MDXCreateElement"},8414:function(e,n,t){t.r(n),t.d(n,{assets:function(){return m},contentTitle:function(){return l},default:function(){return d},frontMatter:function(){return c},metadata:function(){return s},toc:function(){return u}});var o=t(7462),r=t(3366),a=(t(7294),t(3905)),i=["components"],c={title:"Handle a single component",sidebar_position:3},l=void 0,s={unversionedId:"en/Questions/Handle_single_component",id:"en/Questions/Handle_single_component",title:"Handle a single component",description:"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.",source:"@site/docs/en/Questions/Handle_single_component.mdx",sourceDirName:"en/Questions",slug:"/en/Questions/Handle_single_component",permalink:"/document/en/Questions/Handle_single_component",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Handle a single component",sidebar_position:3},sidebar:"en",previous:{title:"Add button to the controls",permalink:"/document/en/Questions/Create_button_in_the_controls"},next:{title:"How to import types",permalink:"/document/en/Questions/How_to_import_types"}},m={},u=[],p={toc:u};function d(e){var n=e.components,t=(0,r.Z)(e,i);return(0,a.kt)("wrapper",(0,o.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"When we add custom components in ",(0,a.kt)("inlineCode",{parentName:"p"},"layers"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"contextmenu"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"controls"),", It is best to add a ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," property that is used to position the DOM element of the component."),(0,a.kt)("p",null,"Here are three ways to get the DOM element of the component: component method ",(0,a.kt)("inlineCode",{parentName:"p"},"mounted"),", instance method ",(0,a.kt)("inlineCode",{parentName:"p"},"query"),", recommended through ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," direct acquisition."),(0,a.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n setting: true,\n});\n\nart.on('ready', () => {\n art.layers.add({\n name: 'layer1',\n html: 'your-layer',\n mounted: function($layer1) {\n //\n }\n });\n\n art.contextmenu.add({\n name: 'contextmenu1',\n html: 'your-contextmenu',\n mounted: function($contextmenu1) {\n //\n }\n });\n\n art.controls.add({\n name: 'control1',\n html: 'your-control',\n position: 'right',\n mounted: function(
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[615],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return f}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(n),f=o,d=m["".concat(l,".").concat(f)]||m[f]||u[f]||a;return n?r.createElement(d,c(c({ref:t},p),{},{components:n})):r.createElement(d,c({ref:t},p))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,c=new Array(a);c[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:o,c[1]=i;for(var s=2;s<a;s++)c[s]=n[s];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},6707:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return l},default:function(){return f},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var r=n(7462),o=n(3366),a=(n(7294),n(3905)),c=["components"],i={title:"\u4e0e React Portal \u4f7f\u7528",sidebar_position:6},l=void 0,s={unversionedId:"zh-cn/Questions/Use_with_react_portal",id:"zh-cn/Questions/Use_with_react_portal",title:"\u4e0e React Portal \u4f7f\u7528",description:"\u5728 layers\u3001contextmenu\u3001controls \u91cc\u4f7f\u7528 react \u7ec4\u4ef6\u4e5f\u662f\u975e\u5e38\u5bb9\u6613\u7684\u4e8b\uff0c\u901a\u8fc7 createPortal \u5904\u7406\u66f4\u590d\u6742\u7684\u4e1a\u52a1\u903b\u8f91",source:"@site/docs/zh-cn/Questions/Use_with_react_portal.mdx",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Use_with_react_portal",permalink:"/document/zh-cn/Questions/Use_with_react_portal",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"\u4e0e React Portal \u4f7f\u7528",sidebar_position:6},sidebar:"zh-cn",previous:{title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",permalink:"/document/zh-cn/Questions/How_to_add_setting_panel"}},p={},u=[],m={toc:u};function f(e){var t=e.components,n=(0,o.Z)(e,c);return(0,a.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u5728 layers\u3001contextmenu\u3001controls \u91cc\u4f7f\u7528 react \u7ec4\u4ef6\u4e5f\u662f\u975e\u5e38\u5bb9\u6613\u7684\u4e8b\uff0c\u901a\u8fc7 createPortal \u5904\u7406\u66f4\u590d\u6742\u7684\u4e1a\u52a1\u903b\u8f91"),(0,a.kt)("p",null,"\ud83d\udc49 ",(0,a.kt)("a",{parentName:"p",href:"https://codesandbox.io/s/artplayer-react-portal-5z32h"},"\u70b9\u51fb\u6253\u5f00\u5728\u7ebf\u6f14\u793a")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-jsx"},'import React, { useState, useEffect } from "react";\nimport ReactDOM, { createPortal } from "react-dom";\nimport Artplayer from "artplayer/examples/react/Artplayer";\n\nfunction Timer({ time }) {\n return <div>{time}</div>;\n}\n\nfunction App() {\n const [art, setArt] = useState(null);\n const [time, setTime] = useState(0);\n\n useEffect(() => {\n const update = () => setTime((time) => time + 1);\n setInterval(update, 1000);\n }, []);\n\n return (\n <div>\n <Artplayer\n option={{\n url: "https://artplayer.org/assets/sample/video.mp4",\n layers: [\n {\n html: "",\n name: "portal"\n }\n ],\n controls: [\n {\n position: "right",\n name: "portal",\n html: ""\n }\n ]\n }}\n style={{\n widLine truncated
|
||||
@@ -1 +1 @@
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[263],{2933:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var i=n(6272),a=n.n(i),s=n(7931);s.tokenizer.separator=/[\s\-/]+/;var r=function(){function e(e,t){this.searchDocs=e,this.lunrIndex=s.Index.load(t)}var t=e.prototype;return t.getLunrResult=function(e){return this.lunrIndex.query((function(t){var n=s.tokenizer(e);t.term(n,{boost:10}),t.term(n,{wildcard:s.Query.wildcard.TRAILING})}))},t.getHit=function(e,t,n){return{hierarchy:{lvl0:e.pageTitle||e.title,lvl1:0===e.type?null:e.title},url:e.url,_snippetResult:n?{content:{value:n,matchLevel:"full"}}:null,_highlightResult:{hierarchy:{lvl0:{value:0===e.type?t||e.title:e.pageTitle},lvl1:0===e.type?null:{value:t||e.title}}}}},t.getTitleHit=function(e,t,n){var i=t[0],a=t[0]+n,s=e.title.substring(0,i)+'<span class="algolia-docsearch-suggestion--highlight">'+e.title.substring(i,a)+"</span>"+e.title.substring(a,e.title.length);return this.getHit(e,s)},t.getKeywordHit=function(e,t,n){var i=t[0],a=t[0]+n,s=e.title+"<br /><i>Keywords: "+e.keywords.substring(0,i)+'<span class="algolia-docsearch-suggestion--highlight">'+e.keywords.substring(i,a)+"</span>"+e.keywords.substring(a,e.keywords.length)+"</i>";return this.getHit(e,s)},t.getContentHit=function(e,t){for(var n=t[0],i=t[0]+t[1],a=n,s=i,r=!0,l=!0,o=0;o<3;o++){var u=e.content.lastIndexOf(" ",a-2),c=e.content.lastIndexOf(".",a-2);if(c>0&&c>u){a=c+1,r=!1;break}if(u<0){a=0,r=!1;break}a=u+1}for(var h=0;h<10;h++){var g=e.content.indexOf(" ",s+1),d=e.content.indexOf(".",s+1);if(d>0&&d<g){s=d,l=!1;break}if(g<0){s=e.content.length,l=!1;break}s=g}var p=e.content.substring(a,n);return r&&(p="... "+p),p+='<span class="algolia-docsearch-suggestion--highlight">'+e.content.substring(n,i)+"</span>",p+=e.content.substring(i,s),l&&(p+=" ..."),this.getHit(e,null,p)},t.search=function(e){var t=this;return new Promise((function(n,i){var a=t.getLunrResult(e),s=[];a.length>5&&(a.length=5),t.titleHitsRes=[],t.contentHitsRes=[],a.forEach((function(n){var i=t.searchDocs[n.ref],a=n.matchData.metadata;for(var r in a)if(a[r].title){if(!t.titleHitsRes.includes(n.ref)){var l=a[r].title.position[0];s.push(t.getTitleHit(i,l,e.length)),t.titleHitsRes.push(n.ref)}}else if(a[r].content){var o=a[r].content.position[0];s.push(t.getContentHit(i,o))}else if(a[r].keywords){var u=a[r].keywords.position[0];s.push(t.getKeywordHit(i,u,e.length)),t.titleHitsRes.push(n.ref)}})),s.length>5&&(s.length=5),n(s)}))},e}(),l=n(8708),o=n.n(l),u="algolia-docsearch",c=u+"-suggestion",h={suggestion:'\n <a class="'+c+"\n {{#isCategoryHeader}}"+c+"__main{{/isCategoryHeader}}\n {{#isSubCategoryHeader}}"+c+'__secondary{{/isSubCategoryHeader}}\n "\n aria-label="Link to the result"\n href="{{{url}}}"\n >\n <div class="'+c+'--category-header">\n <span class="'+c+'--category-header-lvl0">{{{category}}}</span>\n </div>\n <div class="'+c+'--wrapper">\n <div class="'+c+'--subcategory-column">\n <span class="'+c+'--subcategory-column-text">{{{subcategory}}}</span>\n </div>\n {{#isTextOrSubcategoryNonEmpty}}\n <div class="'+c+'--content">\n <div class="'+c+'--subcategory-inline">{{{subcategory}}}</div>\n <div class="'+c+'--title">{{{title}}}</div>\n {{#text}}<div class="'+c+'--text">{{{text}}}</div>{{/text}}\n </div>\n {{/isTextOrSubcategoryNonEmpty}}\n </div>\n </a>\n ',suggestionSimple:'\n <div class="'+c+"\n {{#isCategoryHeader}}"+c+"__main{{/isCategoryHeader}}\n {{#isSubCategoryHeader}}"+c+'__secondary{{/isSubCategoryHeader}}\n suggestion-layout-simple\n ">\n <div class="'+c+'--category-header">\n {{^isLvl0}}\n <span class="'+c+"--category-header-lvl0 "+c+'--category-header-item">{{{category}}}</span>\n {{^isLvl1}}\n {{^isLvl1EmptyOrDuplicate}}\n <span class="'+c+"--category-header-lvl1 "+c+'--category-header-item">\n {{{subcategory}}}\n </span>\n {{/isLvl1EmptyOrDuplicate}}\n {{/isLvl1}}\n {{/isLvl0}}\n <div class="'+c+"--title "+c+'--category-header-item">\n {{#isLvl2}}\n {{{title}}}\n {{/isLvl2}}\n {{#isLvl1}}\n {{{subcategory}}}\n {{/isLvl1}}\n {{#isLvl0}}\n {{{category}}}\n {{/isLvl0}}\n </div>\n </div>\n <div class="'+c+'--wrapper">\n {{#text}}\n <div class="'+c+'--content">\n <div class="'+c+'--text">{{{text}}}</div>\n </div>\n {{/text}}\n </div>\n </div>\n ',footer:'\n <div class="algolia-docsearch-footer">\n </div>\n ',empty:'\n <div class="'+c+'">\n <div class="'+c+'--wrapper">\n <div class="'+c+"--content "+c+'--no-results">\n <div class="'+c+'--title">\n <div class="'+c+'--text">\n No results found for query <b>"{{query}}"</b>\n Line truncated
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[245],{4130:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var i=n(5485),a=n.n(i),s=n(1336);s.tokenizer.separator=/[\s\-/]+/;var r=function(){function e(e,t){this.searchDocs=e,this.lunrIndex=s.Index.load(t)}var t=e.prototype;return t.getLunrResult=function(e){return this.lunrIndex.query((function(t){var n=s.tokenizer(e);t.term(n,{boost:10}),t.term(n,{wildcard:s.Query.wildcard.TRAILING})}))},t.getHit=function(e,t,n){return{hierarchy:{lvl0:e.pageTitle||e.title,lvl1:0===e.type?null:e.title},url:e.url,_snippetResult:n?{content:{value:n,matchLevel:"full"}}:null,_highlightResult:{hierarchy:{lvl0:{value:0===e.type?t||e.title:e.pageTitle},lvl1:0===e.type?null:{value:t||e.title}}}}},t.getTitleHit=function(e,t,n){var i=t[0],a=t[0]+n,s=e.title.substring(0,i)+'<span class="algolia-docsearch-suggestion--highlight">'+e.title.substring(i,a)+"</span>"+e.title.substring(a,e.title.length);return this.getHit(e,s)},t.getKeywordHit=function(e,t,n){var i=t[0],a=t[0]+n,s=e.title+"<br /><i>Keywords: "+e.keywords.substring(0,i)+'<span class="algolia-docsearch-suggestion--highlight">'+e.keywords.substring(i,a)+"</span>"+e.keywords.substring(a,e.keywords.length)+"</i>";return this.getHit(e,s)},t.getContentHit=function(e,t){for(var n=t[0],i=t[0]+t[1],a=n,s=i,r=!0,l=!0,o=0;o<3;o++){var u=e.content.lastIndexOf(" ",a-2),c=e.content.lastIndexOf(".",a-2);if(c>0&&c>u){a=c+1,r=!1;break}if(u<0){a=0,r=!1;break}a=u+1}for(var h=0;h<10;h++){var g=e.content.indexOf(" ",s+1),d=e.content.indexOf(".",s+1);if(d>0&&d<g){s=d,l=!1;break}if(g<0){s=e.content.length,l=!1;break}s=g}var p=e.content.substring(a,n);return r&&(p="... "+p),p+='<span class="algolia-docsearch-suggestion--highlight">'+e.content.substring(n,i)+"</span>",p+=e.content.substring(i,s),l&&(p+=" ..."),this.getHit(e,null,p)},t.search=function(e){var t=this;return new Promise((function(n,i){var a=t.getLunrResult(e),s=[];a.length>5&&(a.length=5),t.titleHitsRes=[],t.contentHitsRes=[],a.forEach((function(n){var i=t.searchDocs[n.ref],a=n.matchData.metadata;for(var r in a)if(a[r].title){if(!t.titleHitsRes.includes(n.ref)){var l=a[r].title.position[0];s.push(t.getTitleHit(i,l,e.length)),t.titleHitsRes.push(n.ref)}}else if(a[r].content){var o=a[r].content.position[0];s.push(t.getContentHit(i,o))}else if(a[r].keywords){var u=a[r].keywords.position[0];s.push(t.getKeywordHit(i,u,e.length)),t.titleHitsRes.push(n.ref)}})),s.length>5&&(s.length=5),n(s)}))},e}(),l=n(1639),o=n.n(l),u="algolia-docsearch",c=u+"-suggestion",h={suggestion:'\n <a class="'+c+"\n {{#isCategoryHeader}}"+c+"__main{{/isCategoryHeader}}\n {{#isSubCategoryHeader}}"+c+'__secondary{{/isSubCategoryHeader}}\n "\n aria-label="Link to the result"\n href="{{{url}}}"\n >\n <div class="'+c+'--category-header">\n <span class="'+c+'--category-header-lvl0">{{{category}}}</span>\n </div>\n <div class="'+c+'--wrapper">\n <div class="'+c+'--subcategory-column">\n <span class="'+c+'--subcategory-column-text">{{{subcategory}}}</span>\n </div>\n {{#isTextOrSubcategoryNonEmpty}}\n <div class="'+c+'--content">\n <div class="'+c+'--subcategory-inline">{{{subcategory}}}</div>\n <div class="'+c+'--title">{{{title}}}</div>\n {{#text}}<div class="'+c+'--text">{{{text}}}</div>{{/text}}\n </div>\n {{/isTextOrSubcategoryNonEmpty}}\n </div>\n </a>\n ',suggestionSimple:'\n <div class="'+c+"\n {{#isCategoryHeader}}"+c+"__main{{/isCategoryHeader}}\n {{#isSubCategoryHeader}}"+c+'__secondary{{/isSubCategoryHeader}}\n suggestion-layout-simple\n ">\n <div class="'+c+'--category-header">\n {{^isLvl0}}\n <span class="'+c+"--category-header-lvl0 "+c+'--category-header-item">{{{category}}}</span>\n {{^isLvl1}}\n {{^isLvl1EmptyOrDuplicate}}\n <span class="'+c+"--category-header-lvl1 "+c+'--category-header-item">\n {{{subcategory}}}\n </span>\n {{/isLvl1EmptyOrDuplicate}}\n {{/isLvl1}}\n {{/isLvl0}}\n <div class="'+c+"--title "+c+'--category-header-item">\n {{#isLvl2}}\n {{{title}}}\n {{/isLvl2}}\n {{#isLvl1}}\n {{{subcategory}}}\n {{/isLvl1}}\n {{#isLvl0}}\n {{{category}}}\n {{/isLvl0}}\n </div>\n </div>\n <div class="'+c+'--wrapper">\n {{#text}}\n <div class="'+c+'--content">\n <div class="'+c+'--text">{{{text}}}</div>\n </div>\n {{/text}}\n </div>\n </div>\n ',footer:'\n <div class="algolia-docsearch-footer">\n </div>\n ',empty:'\n <div class="'+c+'">\n <div class="'+c+'--wrapper">\n <div class="'+c+"--content "+c+'--no-results">\n <div class="'+c+'--title">\n <div class="'+c+'--text">\n No results found for query <b>"{{query}}"</b>\n Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[270],{9278:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return k}});var a=n(9301);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 o(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 p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},s=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),s=d(n),k=l,c=s["".concat(p,".").concat(k)]||s[k]||m[k]||r;return n?a.createElement(c,i(i({ref:t},u),{},{components:n})):a.createElement(c,i({ref:t},u))}));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]=s;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:l,i[1]=o;for(var d=2;d<r;d++)i[d]=n[d];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}s.displayName="MDXCreateElement"},2646:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return p},default:function(){return k},frontMatter:function(){return o},metadata:function(){return d},toc:function(){return m}});var a=n(7145),l=n(4736),r=(n(9301),n(9278)),i=["components"],o={title:"Advanced propertys",sidebar_position:4,slug:"/advance"},p=void 0,d={unversionedId:"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.",source:"@site/docs/en/Advance.md",sourceDirName:"en",slug:"/advance",permalink:"/document/advance",tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"Advanced propertys",sidebar_position:4,slug:"/advance"},sidebar:"en",previous:{title:"Common properties",permalink:"/document/propertie"},next:{title:"Static propertys",permalink:"/document/class"}},u={},m=[{value:"id",id:"id",level:2},{value:"option",id:"option",level:2},{value:"isFocus",id:"isfocus",level:2},{value:"isDestroy",id:"isdestroy",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"template",id:"template",level:2},{value:"query",id:"query",level:3},{value:"query",id:"query-1",level:2},{value:"events",id:"events",level:2},{value:"proxy",id:"proxy",level:2},{value:"storage",id:"storage",level:2},{value:"icons",id:"icons",level:2},{value:"i18n",id:"i18n",level:2},{value:"get",id:"get",level:3},{value:"update",id:"update",level:3},{value:"player",id:"player",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"show",id:"show",level:3},{value:"style",id:"style",level:3},{value:"url",id:"url",level:3},{value:"switch",id:"switch",level:3},{value:"info",id:"info",level:2},{value:"layers",id:"layers",level:2},{value:"show",id:"show-1",level:3},{value:"add",id:"add",level:3},{value:"notice",id:"notice",level:2},{value:"show",id:"show-2",level:3},{value:"controls",id:"controls",level:2},{value:"show",id:"show-3",level:3},{value:"add",id:"add-1",level:3},{value:"contextmenu",id:"contextmenu",level:2},{value:"show",id:"show-4",level:3},{value:"add",id:"add-2",level:3},{value:"loading",id:"loading",level:2},{value:"show",id:"show-5",level:3},{value:"mask",id:"mask",level:2},{value:"show",id:"show-6",level:3},{value:"hotkey",id:"hotkey",level:2},{value:"add",id:"add-3",level:3},{value:"setting",id:"setting",level:2},{value:"show",id:"show-7",level:3},{value:"plugins",id:"plugins",level:2},{value:"add",id:"add-4",level:3}],s={toc:m};function k(e){var t=e.components,n=(0,l.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,r.kt)("div",{parentName:"div",classNameLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[373],{9278:function(e,n,t){t.d(n,{Zo:function(){return s},kt:function(){return d}});var r=t(9301);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(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?a(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},p={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,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),m=u(t),d=o,y=m["".concat(l,".").concat(d)]||m[d]||p[d]||a;return t?r.createElement(y,i(i({ref:n},s),{},{components:t})):r.createElement(y,i({ref:n},s))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=m;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var u=2;u<a;u++)i[u]=t[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}m.displayName="MDXCreateElement"},2090:function(e,n,t){t.r(n),t.d(n,{assets:function(){return s},contentTitle:function(){return l},default:function(){return d},frontMatter:function(){return c},metadata:function(){return u},toc:function(){return p}});var r=t(7145),o=t(4736),a=(t(9301),t(9278)),i=["components"],c={title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",sidebar_position:3},l=void 0,u={unversionedId:"zh-cn/Questions/Handle_single_component",id:"zh-cn/Questions/Handle_single_component",title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",description:"\u5f53\u6211\u4eec\u5728layers\u3001contextmenu\u3001controls\u91cc\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u65f6\uff0c\u6700\u597d\u5e26\u4e0a\u4e00\u4e2a\u552f\u4e00\u7684 name \u5c5e\u6027\uff0c\u8be5\u5c5e\u6027\u4e0d\u4f46\u4f1a\u4f5c\u4e3a\u7c7b\u540d\u6dfb\u52a0\u5230 dom \u5143\u7d20\u91cc\uff0c\u8fd8\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u5b9a\u4f4d\u5230\u7ec4\u4ef6\u3002",source:"@site/docs/zh-cn/Questions/Handle_single_component.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Handle_single_component",permalink:"/document/zh-cn/Questions/Handle_single_component",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",sidebar_position:3},sidebar:"zh-cn",previous:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",permalink:"/document/zh-cn/Questions/Create_button_in_the_controls"},next:{title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",permalink:"/document/zh-cn/Questions/How_to_import_types"}},s={},p=[],m={toc:p};function d(e){var n=e.components,t=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u5f53\u6211\u4eec\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"layers"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"contextmenu"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"controls"),"\u91cc\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u65f6\uff0c\u6700\u597d\u5e26\u4e0a\u4e00\u4e2a\u552f\u4e00\u7684 ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," \u5c5e\u6027\uff0c\u8be5\u5c5e\u6027\u4e0d\u4f46\u4f1a\u4f5c\u4e3a\u7c7b\u540d\u6dfb\u52a0\u5230 dom \u5143\u7d20\u91cc\uff0c\u8fd8\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u5b9a\u4f4d\u5230\u7ec4\u4ef6\u3002"),(0,a.kt)("p",null,"\u8fd9\u91cc\u6709\u4e09\u79cd\u65b9\u6cd5\u83b7\u53d6\u7ec4\u4ef6\u7684dom\u5143\u7d20\uff1a\u7ec4\u4ef6\u65b9\u6cd5 ",(0,a.kt)("inlineCode",{parentName:"p"},"mounted"),"\u3001\u5b9e\u4f8b\u65b9\u6cd5 ",(0,a.kt)("inlineCode",{parentName:"p"},"query"),"\u3001\u63a8\u8350\u901a\u8fc7 ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," \u76f4\u63a5\u83b7\u53d6"),(0,a.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"vaLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[201],{3905:function(n,e,t){t.d(e,{Zo:function(){return u},kt:function(){return p}});var r=t(7294);function l(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(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,r,l=function(n,e){if(null==n)return{};var t,r,l={},s=Object.keys(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||(l[t]=n[t]);return l}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(l[t]=n[t])}return l}var o=r.createContext({}),c=function(n){var e=r.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):a(a({},e),n)),t},u=function(n){var e=c(n.components);return r.createElement(o.Provider,{value:e},n.children)},m={inlineCode:"code",wrapper:function(n){var e=n.children;return r.createElement(r.Fragment,{},e)}},f=r.forwardRef((function(n,e){var t=n.components,l=n.mdxType,s=n.originalType,o=n.parentName,u=i(n,["components","mdxType","originalType","parentName"]),f=c(t),p=l,h=f["".concat(o,".").concat(p)]||f[p]||m[p]||s;return t?r.createElement(h,a(a({ref:e},u),{},{components:t})):r.createElement(h,a({ref:e},u))}));function p(n,e){var t=arguments,l=e&&e.mdxType;if("string"==typeof n||l){var s=t.length,a=new Array(s);a[0]=f;var i={};for(var o in e)hasOwnProperty.call(e,o)&&(i[o]=e[o]);i.originalType=n,i.mdxType="string"==typeof n?n:l,a[1]=i;for(var c=2;c<s;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}f.displayName="MDXCreateElement"},8582:function(n,e,t){t.r(e),t.d(e,{assets:function(){return u},contentTitle:function(){return o},default:function(){return p},frontMatter:function(){return i},metadata:function(){return c},toc:function(){return m}});var r=t(7462),l=t(3366),s=(t(7294),t(3905)),a=["components"],i={title:"Add select in the controls",sidebar_position:1},o=void 0,c={unversionedId:"en/Questions/Create_selector_in_the_controls",id:"en/Questions/Create_selector_in_the_controls",title:"Add select in the controls",description:"Sometimes you need to add a list in the controls, then you can use the selector and onSelect attribute when adding controls",source:"@site/docs/en/Questions/Create_selector_in_the_controls.mdx",sourceDirName:"en/Questions",slug:"/en/Questions/Create_selector_in_the_controls",permalink:"/document/en/Questions/Create_selector_in_the_controls",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Add select in the controls",sidebar_position:1},sidebar:"en",previous:{title:"Ads Plugin",permalink:"/document/en/Plugins/ads"},next:{title:"Add button to the controls",permalink:"/document/en/Questions/Create_button_in_the_controls"}},u={},m=[{value:"Switch Subtitle",id:"switch-subtitle",level:3},{value:"Switch filter",id:"switch-filter",level:3}],f={toc:m};function p(n){var e=n.components,t=(0,l.Z)(n,a);return(0,s.kt)("wrapper",(0,r.Z)({},f,t,{components:e,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Sometimes you need to add a list in the controls, then you can use the ",(0,s.kt)("inlineCode",{parentName:"p"},"selector")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"onSelect")," attribute when adding controls"),(0,s.kt)("h3",{id:"switch-subtitle"},"Switch Subtitle"),(0,s.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: 'Subtitle 01',\n selector: [\n {\n default: true,\n html: '<span style=\"color:red\">Subtitle 01</span>',\n url: '/assets/sample/subtitle.srt?id=1',\n },\n {\n html: '<span style=\"color:yellow\">Subtitle 02</span>',\n url: '/assets/sample/subtitle.srt?id=2',\n },\n ],\n onSelect: function (item, $dom) {\n console.info(item, $dom);\n\n art.subtitle.url = item.url;\n \n return 'You click ' + item.html;\n },\n },\n ],\n});\n")),(0,s.kt)("h3",{id:"switch-filter"Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[555],{9278:function(e,n,t){t.d(n,{Zo:function(){return m},kt:function(){return d}});var o=t(9301);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 a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=o.createContext({}),s=function(e){var n=o.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},m=function(e){var n=s(e.components);return o.createElement(l.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},p=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),p=s(t),d=r,y=p["".concat(l,".").concat(d)]||p[d]||u[d]||a;return t?o.createElement(y,i(i({ref:n},m),{},{components:t})):o.createElement(y,i({ref:n},m))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=p;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s<a;s++)i[s]=t[s];return o.createElement.apply(null,i)}return o.createElement.apply(null,t)}p.displayName="MDXCreateElement"},8406:function(e,n,t){t.r(n),t.d(n,{assets:function(){return m},contentTitle:function(){return l},default:function(){return d},frontMatter:function(){return c},metadata:function(){return s},toc:function(){return u}});var o=t(7145),r=t(4736),a=(t(9301),t(9278)),i=["components"],c={title:"Handle a single component",sidebar_position:3},l=void 0,s={unversionedId:"en/Questions/Handle_single_component",id:"en/Questions/Handle_single_component",title:"Handle a single component",description:"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.",source:"@site/docs/en/Questions/Handle_single_component.md",sourceDirName:"en/Questions",slug:"/en/Questions/Handle_single_component",permalink:"/document/en/Questions/Handle_single_component",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Handle a single component",sidebar_position:3},sidebar:"en",previous:{title:"Add button to the controls",permalink:"/document/en/Questions/Create_button_in_the_controls"},next:{title:"How to import types",permalink:"/document/en/Questions/How_to_import_types"}},m={},u=[],p={toc:u};function d(e){var n=e.components,t=(0,r.Z)(e,i);return(0,a.kt)("wrapper",(0,o.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"When we add custom components in ",(0,a.kt)("inlineCode",{parentName:"p"},"layers"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"contextmenu"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"controls"),", It is best to add a ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," property that is used to position the DOM element of the component."),(0,a.kt)("p",null,"Here are three ways to get the DOM element of the component: component method ",(0,a.kt)("inlineCode",{parentName:"p"},"mounted"),", instance method ",(0,a.kt)("inlineCode",{parentName:"p"},"query"),", recommended through ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," direct acquisition."),(0,a.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n setting: true,\n});\n\nart.on('ready', () => {\n art.layers.add({\n name: 'layer1',\n html: 'your-layer',\n mounted: function($layer1) {\n //\n }\n });\n\n art.contextmenu.add({\n name: 'contextmenu1',\n html: 'your-contextmenu',\n mounted: function($contextmenu1) {\n //\n }\n });\n\n art.controls.add({\n name: 'control1',\n html: 'your-control',\n position: 'right',\n mounted: function($control1)
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[280],{3905:function(t,e,n){n.d(e,{Zo:function(){return m},kt:function(){return c}});var a=n(7294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e){if(null==t)return{};var n,a,r=function(t,e){if(null==t)return{};var n,a,r={},l=Object.keys(t);for(a=0;a<l.length;a++)n=l[a],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)n=l[a],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var d=a.createContext({}),p=function(t){var e=a.useContext(d),n=e;return t&&(n="function"==typeof t?t(e):i(i({},e),t)),n},m=function(t){var e=p(t.components);return a.createElement(d.Provider,{value:e},t.children)},s={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},u=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,l=t.originalType,d=t.parentName,m=o(t,["components","mdxType","originalType","parentName"]),u=p(n),c=r,g=u["".concat(d,".").concat(c)]||u[c]||s[c]||l;return n?a.createElement(g,i(i({ref:e},m),{},{components:n})):a.createElement(g,i({ref:e},m))}));function c(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=n.length,i=new Array(l);i[0]=u;var o={};for(var d in e)hasOwnProperty.call(e,d)&&(o[d]=e[d]);o.originalType=t,o.mdxType="string"==typeof t?t:r,i[1]=o;for(var p=2;p<l;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}u.displayName="MDXCreateElement"},3797:function(t,e,n){n.r(e),n.d(e,{assets:function(){return m},contentTitle:function(){return d},default:function(){return c},frontMatter:function(){return o},metadata:function(){return p},toc:function(){return s}});var a=n(7462),r=n(3366),l=(n(7294),n(3905)),i=["components"],o={title:"How to add setting panel",sidebar_position:6},d=void 0,p={unversionedId:"en/Questions/How_to_add_setting_panel",id:"en/Questions/How_to_add_setting_panel",title:"How to add setting panel",description:"Add selector list",source:"@site/docs/en/Questions/How_to_add_setting_panel.mdx",sourceDirName:"en/Questions",slug:"/en/Questions/How_to_add_setting_panel",permalink:"/document/en/Questions/How_to_add_setting_panel",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"How to add setting panel",sidebar_position:6},sidebar:"en",previous:{title:"How to import types",permalink:"/document/en/Questions/How_to_import_types"},next:{title:"Use with React Portal",permalink:"/document/en/Questions/Use_with_react_portal"}},m={},s=[{value:"Add selector list",id:"add-selector-list",level:2},{value:"Add switch button",id:"add-switch-button",level:2},{value:"Add range slider",id:"add-range-slider",level:2}],u={toc:s};function c(t){var e=t.components,n=(0,r.Z)(t,i);return(0,l.kt)("wrapper",(0,a.Z)({},u,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"add-selector-list"},"Add selector list"),(0,l.kt)("p",null,"Settings panels are similar to a collection of list selections, and support multi-layer nested"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Property"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"html")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"DOM elements of selector")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"icon")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"Icon of selector")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"selector")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"Array")),(0,l.kLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[250],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},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({}),d=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(o.Provider,{value:t},e.children)},m={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,u=p(e,["components","mdxType","originalType","parentName"]),k=d(n),s=l,N=k["".concat(o,".").concat(s)]||k[s]||m[s]||r;return n?a.createElement(N,i(i({ref:t},u),{},{components:n})):a.createElement(N,i({ref:t},u))}));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 d=2;d<r;d++)i[d]=n[d];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},4863:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return o},default:function(){return s},frontMatter:function(){return p},metadata:function(){return d},toc:function(){return m}});var a=n(7462),l=n(3366),r=(n(7294),n(3905)),i=["components"],p={title:"\u9ad8\u7ea7\u5c5e\u6027",sidebar_position:4,slug:"/zh-cn/advance"},o=void 0,d={unversionedId:"zh-cn/Advance",id:"zh-cn/Advance",title:"\u9ad8\u7ea7\u5c5e\u6027",description:"\u8fd9\u9875\u9762\u662f\u5bf9\u5e38\u7528\u5c5e\u6027\u7684\u4e00\u4e9b\u989d\u5916\u8865\u5145\uff0c\u9700\u8981\u6df1\u5165\u5f00\u53d1\u81ea\u5b9a\u4e49\u529f\u80fd\u65f6\u624d\u9700\u8981\u9605\u8bfb",source:"@site/docs/zh-cn/Advance.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/advance",permalink:"/document/zh-cn/advance",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"\u9ad8\u7ea7\u5c5e\u6027",sidebar_position:4,slug:"/zh-cn/advance"},sidebar:"zh-cn",previous:{title:"\u5e38\u7528\u5c5e\u6027",permalink:"/document/zh-cn/propertie"},next:{title:"\u9759\u6001\u5c5e\u6027",permalink:"/document/zh-cn/class"}},u={},m=[{value:"id",id:"id",level:2},{value:"option",id:"option",level:2},{value:"isFocus",id:"isfocus",level:2},{value:"isInput",id:"isinput",level:2},{value:"isLock",id:"islock",level:2},{value:"isDestroy",id:"isdestroy",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"template",id:"template",level:2},{value:"query",id:"query",level:3},{value:"query",id:"query-1",level:2},{value:"events",id:"events",level:2},{value:"proxy",id:"proxy",level:2},{value:"storage",id:"storage",level:2},{value:"icons",id:"icons",level:2},{value:"i18n",id:"i18n",level:2},{value:"get",id:"get",level:3},{value:"update",id:"update",level:3},{value:"player",id:"player",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"show",id:"show",level:3},{value:"style",id:"style",level:3},{value:"url",id:"url",level:3},{value:"switch",id:"switch",level:3},{value:"info",id:"info",level:2},{value:"layers",id:"layers",level:2},{value:"show",id:"show-1",level:3},{value:"add",id:"add",level:3},{value:"notice",id:"notice",level:2},{value:"show",id:"show-2",level:3},{value:"controls",id:"controls",level:2},{value:"show",id:"show-3",level:3},{value:"add",id:"add-1",level:3},{value:"contextmenu",id:"contextmenu",level:2},{value:"show",id:"show-4",level:3},{value:"add",id:"add-2",level:3},{value:"loading",id:"loading",level:2},{value:"show",id:"show-5",level:3},{value:"mask",id:"mask",level:2},{value:"show",id:"show-6",level:3},{value:"hotkey",id:"hotkey",level:2},{value:"add",id:"add-3",level:3},{value:"setting",id:"setting",level:2},{value:"show",id:"show-7",level:3},{value:"plugins",id:"plugins",level:2},{value:"add",id:"add-4",level:3}],k={tocLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[343],{3343:function(e,t,u){u.r(t)}}]);
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[366],{9278:function(n,e,t){t.d(e,{Zo:function(){return m},kt:function(){return f}});var r=t(9301);function l(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(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,r,l=function(n,e){if(null==n)return{};var t,r,l={},s=Object.keys(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||(l[t]=n[t]);return l}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(l[t]=n[t])}return l}var o=r.createContext({}),c=function(n){var e=r.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):a(a({},e),n)),t},m=function(n){var e=c(n.components);return r.createElement(o.Provider,{value:e},n.children)},u={inlineCode:"code",wrapper:function(n){var e=n.children;return r.createElement(r.Fragment,{},e)}},p=r.forwardRef((function(n,e){var t=n.components,l=n.mdxType,s=n.originalType,o=n.parentName,m=i(n,["components","mdxType","originalType","parentName"]),p=c(t),f=l,h=p["".concat(o,".").concat(f)]||p[f]||u[f]||s;return t?r.createElement(h,a(a({ref:e},m),{},{components:t})):r.createElement(h,a({ref:e},m))}));function f(n,e){var t=arguments,l=e&&e.mdxType;if("string"==typeof n||l){var s=t.length,a=new Array(s);a[0]=p;var i={};for(var o in e)hasOwnProperty.call(e,o)&&(i[o]=e[o]);i.originalType=n,i.mdxType="string"==typeof n?n:l,a[1]=i;for(var c=2;c<s;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},8412:function(n,e,t){t.r(e),t.d(e,{assets:function(){return m},contentTitle:function(){return o},default:function(){return f},frontMatter:function(){return i},metadata:function(){return c},toc:function(){return u}});var r=t(7145),l=t(4736),s=(t(9301),t(9278)),a=["components"],i={title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",sidebar_position:1},o=void 0,c={unversionedId:"zh-cn/Questions/Create_selector_in_the_controls",id:"zh-cn/Questions/Create_selector_in_the_controls",title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",description:"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u5728\u6dfb\u52a0\u63a7\u4ef6\u7684\u65f6\u5019\u4f7f\u7528 selector \u548c onSelect \u5c5e\u6027",source:"@site/docs/zh-cn/Questions/Create_selector_in_the_controls.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Create_selector_in_the_controls",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",sidebar_position:1},sidebar:"zh-cn",previous:{title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",permalink:"/document/zh-cn/Plugins/danmuku"},next:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",permalink:"/document/zh-cn/Questions/Create_button_in_the_controls"}},m={},u=[{value:"\u5207\u6362\u5b57\u5e55",id:"\u5207\u6362\u5b57\u5e55",level:3},{value:"\u5207\u6362\u6ee4\u955c",id:"\u5207\u6362\u6ee4\u955c",level:3}],p={toc:u};function f(n){var e=n.components,t=(0,l.Z)(n,a);return(0,s.kt)("wrapper",(0,r.Z)({},p,t,{components:e,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u5728\u6dfb\u52a0\u63a7\u4ef6\u7684\u65f6\u5019\u4f7f\u7528 ",(0,s.kt)("inlineCode",{parentName:"p"},"selector")," \u548c ",(0,s.kt)("inlineCode",{parentName:"p"},"onSelect")," \u5c5e\u6027"),(0,s.kt)("h3",{id:"\u5207\u6362\u5b57\u5e55"},"\u5207\u6362\u5b57\u5e55"),(0,s.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: 'Subtitle 01',\n selector: [\n {\n default: true,\n html: '<span style=\"color:red\">Subtitle 01</span>',\n url: '/assets/sample/subtitle.srt?id=1',\n },\n {\n html: '<span style=\"color:yellow\">Subtitle 02</span>',\n Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[80],{9278:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return f}});var r=n(9301);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),m=s(n),f=o,d=m["".concat(l,".").concat(f)]||m[f]||u[f]||a;return n?r.createElement(d,i(i({ref:t},p),{},{components:n})):r.createElement(d,i({ref:t},p))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},7239:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return l},default:function(){return f},frontMatter:function(){return c},metadata:function(){return s},toc:function(){return u}});var r=n(7145),o=n(4736),a=(n(9301),n(9278)),i=["components"],c={title:"Use with React Portal",sidebar_position:6},l=void 0,s={unversionedId:"en/Questions/Use_with_react_portal",id:"en/Questions/Use_with_react_portal",title:"Use with React Portal",description:"It is also very easy to use React Components in layers, contextmenu, controls. Handle more complex logic through ReactDOM.createPortal.",source:"@site/docs/en/Questions/Use_with_react_portal.md",sourceDirName:"en/Questions",slug:"/en/Questions/Use_with_react_portal",permalink:"/document/en/Questions/Use_with_react_portal",tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"Use with React Portal",sidebar_position:6},sidebar:"en",previous:{title:"How to add setting panel",permalink:"/document/en/Questions/How_to_add_setting_panel"}},p={},u=[],m={toc:u};function f(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"It is also very easy to use ",(0,a.kt)("inlineCode",{parentName:"p"},"React Components")," in ",(0,a.kt)("inlineCode",{parentName:"p"},"layers"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"contextmenu"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"controls"),". Handle more complex logic through ",(0,a.kt)("inlineCode",{parentName:"p"},"ReactDOM.createPortal"),"."),(0,a.kt)("p",null,"\ud83d\udc49 ",(0,a.kt)("a",{parentName:"p",href:"https://codesandbox.io/s/artplayer-react-portal-5z32h"},"Click to open an online demo")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-jsx"},'import React, { useState, useEffect } from "react";\nimport ReactDOM, { createPortal } from "react-dom";\nimport Artplayer from "artplayer/examples/react/Artplayer";\n\nfunction Timer({ time }) {\n return <div>{time}</div>;\n}\n\nfunction App() {\n const [art, setArt] = useState(null);\n const [time, setTime] = useState(0);\n\n useEffect(() => {\n const update = () => setTime((time) => time + 1);\n setInterval(update, 1000);\n }, []);\n\n return (\n <div>\n <Artplayer\n option={{\n url: "https://artplayer.org/assets/sample/video.mp4",\n layers: [\n {\n html: "",\n name: "portal"\n }\n ],\n controls: [\n {\n position: "right",\n name: "portal",\n html: ""\n }\n ]\n }}\n style={{\n width: "600px",\n height: "400px",\n margLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[928],{9278:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return c}});var a=t(9301);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(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?r(Object(t),!0).forEach((function(n){l(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e,n){if(null==e)return{};var t,a,l=function(e,n){if(null==e)return{};var t,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||(l[t]=e[t]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}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},u=function(e){var n=s(e.components);return a.createElement(o.Provider,{value:n},e.children)},d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,l=e.mdxType,r=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=s(t),c=l,k=m["".concat(o,".").concat(c)]||m[c]||d[c]||r;return t?a.createElement(k,i(i({ref:n},u),{},{components:t})):a.createElement(k,i({ref:n},u))}));function c(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=t.length,i=new Array(r);i[0]=m;var p={};for(var o in n)hasOwnProperty.call(n,o)&&(p[o]=n[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var s=2;s<r;s++)i[s]=t[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}m.displayName="MDXCreateElement"},3196:function(e,n,t){t.r(n),t.d(n,{assets:function(){return u},contentTitle:function(){return o},default:function(){return c},frontMatter:function(){return p},metadata:function(){return s},toc:function(){return d}});var a=t(7145),l=t(4736),r=(t(9301),t(9278)),i=["components"],p={title:"\u5e38\u7528\u5c5e\u6027",sidebar_position:3,slug:"/zh-cn/propertie"},o=void 0,s={unversionedId:"zh-cn/Properties",id:"zh-cn/Properties",title:"\u5e38\u7528\u5c5e\u6027",description:"play",source:"@site/docs/zh-cn/Properties.md",sourceDirName:"zh-cn",slug:"/zh-cn/propertie",permalink:"/document/zh-cn/propertie",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"\u5e38\u7528\u5c5e\u6027",sidebar_position:3,slug:"/zh-cn/propertie"},sidebar:"zh-cn",previous:{title:"\u57fa\u7840\u53c2\u6570",permalink:"/document/zh-cn/options"},next:{title:"\u9ad8\u7ea7\u5c5e\u6027",permalink:"/document/zh-cn/advance"}},u={},d=[{value:"play",id:"play",level:2},{value:"pause",id:"pause",level:2},{value:"toggle",id:"toggle",level:2},{value:"seek",id:"seek",level:2},{value:"forward",id:"forward",level:2},{value:"backward",id:"backward",level:2},{value:"volume",id:"volume",level:2},{value:"url",id:"url",level:2},{value:"switchUrl",id:"switchurl",level:2},{value:"switchQuality",id:"switchquality",level:2},{value:"muted",id:"muted",level:2},{value:"currentTime",id:"currenttime",level:2},{value:"duration",id:"duration",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"getDataURL",id:"getdataurl",level:2},{value:"getBlobUrl",id:"getbloburl",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"pip",id:"pip",level:2},{value:"poster",id:"poster",level:2},{value:"mini",id:"mini",level:2},{value:"playing",id:"playing",level:2},{value:"autoSize",id:"autosize",level:2},{value:"rect",id:"rect",level:2},{value:"flip",id:"flip",level:2},{value:"rotate",id:"rotate",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"loop",id:"loop",level:2},{value:"autoHeight",id:"autoheight",level:2},{value:"attr",id:"attr",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"destroy",id:"destroy",level:2}],m={toc:d};function c(e){var n=e.components,t=(0,l.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"play"},"play"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u7c7b\u578b: ",(0,r.kt)("inlineCode",{parentName:"li"},"Function"))),(0,r.kt)("p",null,"\u64ad\u653e\u89c6\u9891"),(0,r.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"var art = new ArtplayerLine 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:"\u5e7f\u544a\u63d2\u4ef6",permalink:"/document/zh-cn/Plugins/ads"}},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-yarn-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,l.kt)("inlineCoLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[610],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),p=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(o.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,h=m["".concat(o,".").concat(d)]||m[d]||c[d]||l;return n?r.createElement(h,s(s({ref:t},u),{},{components:n})):r.createElement(h,s({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,s=new Array(l);s[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,s[1]=i;for(var p=2;p<l;p++)s[p]=n[p];return r.createElement.apply(null,s)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},2360:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(7294),a=n(6010),l="tabItem_OmH5";function s(e){var t=e.children,n=e.hidden,s=e.className;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l,s),hidden:n},t)}},9877:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(7462),a=n(7294),l=n(2389),s=n(7392),i=n(7094),o=n(2466),p=n(6010),u="tabList_uSqn",c="tabItem_LplD";function m(e){var t,n,l,m=e.lazy,d=e.block,h=e.defaultValue,v=e.values,y=e.groupId,f=e.className,b=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&void 0!==e.props.value)return e;throw new Error("Docusaurus error: Bad <Tabs> child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.')})),g=null!=v?v:b.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),k=(0,s.l)(g,(function(e,t){return e.value===t.value}));if(k.length>0)throw new Error('Docusaurus error: Duplicate values "'+k.map((function(e){return e.value})).join(", ")+'" found in <Tabs>. Every value needs to be unique.');var N=null===h?h:null!=(t=null!=h?h:null==(n=b.find((function(e){return e.props.default})))?void 0:n.props.value)?t:null==(l=b[0])?void 0:l.props.value;if(null!==N&&!g.some((function(e){return e.value===N})))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+N+'" but none of its children has the corresponding value. Available values are: '+g.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var x=(0,i.U)(),j=x.tabGroupChoices,w=x.setTabGroupChoices,T=(0,a.useState)(N),A=T[0],O=T[1],Z=[],E=(0,o.o5)().blockElementScrollPositionUntilNextRender;if(null!=y){var I=j[y];null!=I&&I!==A&&g.some((function(e){return e.value===I}))&&O(I)}var P=function(e){var t=e.currentTarget,n=Z.indexOf(t),r=g[n].value;r!==A&&(E(t),O(r),null!=y&&w(y,r))},L=function(e){var t,n=null;switch(e.key){case"ArrowRight":var r=Z.indexOf(e.currentTarget)+1;n=Z[r]||Z[0];break;case"ArrowLeft":var a=Z.indexOf(e.currentTarget)-1;n=Z[a]||Z[Z.length-1]}null==(t=n)||t.focus()};return a.createElement("div",{className:(0,p.Z)("tabs-container",u)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,p.Z)("tabs",{"tabs--block":d},f)},g.map((function(e){var t=e.value,n=e.label,l=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:A===t?0:-1,"aria-selected":A===t,key:t,ref:function(e){return Z.push(e)},onKeyDown:L,onFocus:P,onClick:P},l,{className:(0,p.Z)("tabs__item",c,null==l?void 0:l.className,{"tabs__item--active":A===t})}),null!=n?n:t)}))),m?(0,a.cloneElement)(b.filter((function(e){Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[778],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return m}});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 l(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?l(Object(t),!0).forEach((function(n){a(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 o(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=p(t),m=a,f=d["".concat(s,".").concat(m)]||d[m]||u[m]||l;return t?r.createElement(f,i(i({ref:n},c),{},{components:t})):r.createElement(f,i({ref:n},c))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=d;var o={};for(var s in n)hasOwnProperty.call(n,s)&&(o[s]=n[s]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p<l;p++)i[p]=t[p];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}d.displayName="MDXCreateElement"},8094:function(e,n,t){t.r(n),t.d(n,{assets:function(){return c},contentTitle:function(){return s},default:function(){return m},frontMatter:function(){return o},metadata:function(){return p},toc:function(){return u}});var r=t(7462),a=t(3366),l=(t(7294),t(3905)),i=["components"],o={title:"\u5e7f\u544a\u63d2\u4ef6",sidebar_position:2},s=void 0,p={unversionedId:"zh-cn/Plugins/ads",id:"zh-cn/Plugins/ads",title:"\u5e7f\u544a\u63d2\u4ef6",description:"\u6f14\u793a",source:"@site/docs/zh-cn/Plugins/ads.mdx",sourceDirName:"zh-cn/Plugins",slug:"/zh-cn/Plugins/ads",permalink:"/document/zh-cn/Plugins/ads",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"\u5e7f\u544a\u63d2\u4ef6",sidebar_position:2},sidebar:"zh-cn",previous:{title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",permalink:"/document/zh-cn/Plugins/danmuku"},next:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls"}},c={},u=[{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}],d={toc:u};function m(e){var n=e.components,t=(0,a.Z)(e,i);return(0,l.kt)("wrapper",(0,r.Z)({},d,t,{components:n,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-ads/index.js&example=ads"},"\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-ads\n")),(0,l.kt)("h3",{id:"\u901a\u8fc7-yarn-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"h3"},"yarn")," \u5b89\u88c5\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"$ yarn add artplayer-plugin-ads\n")),(0,l.kt)("h3",{id:"\u901a\u8fc7-script-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"h3"},"script")," \u5b89\u88c5\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-html"},'\x3c!-- \u672c\u5730 --\x3e\n<script src="path/to/artplayer-plugin-ads.js"><\/script>\n\n\x3c!-- jsdelivr --\x3e\n<script src="https://cdn.js
Line truncated
|
||||
@@ -0,0 +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},{value:"airplay",id:"airplay",level:2}],d=Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[60],{9278:function(n,e,t){t.d(e,{Zo:function(){return l},kt:function(){return f}});var r=t(9301);function o(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function a(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function i(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?a(Object(t),!0).forEach((function(e){o(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function s(n,e){if(null==n)return{};var t,r,o=function(n,e){if(null==n)return{};var t,r,o={},a=Object.keys(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}var c=r.createContext({}),u=function(n){var e=r.useContext(c),t=e;return n&&(t="function"==typeof n?n(e):i(i({},e),n)),t},l=function(n){var e=u(n.components);return r.createElement(c.Provider,{value:e},n.children)},p={inlineCode:"code",wrapper:function(n){var e=n.children;return r.createElement(r.Fragment,{},e)}},d=r.forwardRef((function(n,e){var t=n.components,o=n.mdxType,a=n.originalType,c=n.parentName,l=s(n,["components","mdxType","originalType","parentName"]),d=u(t),f=o,m=d["".concat(c,".").concat(f)]||d[f]||p[f]||a;return t?r.createElement(m,i(i({ref:e},l),{},{components:t})):r.createElement(m,i({ref:e},l))}));function f(n,e){var t=arguments,o=e&&e.mdxType;if("string"==typeof n||o){var a=t.length,i=new Array(a);i[0]=d;var s={};for(var c in e)hasOwnProperty.call(e,c)&&(s[c]=e[c]);s.originalType=n,s.mdxType="string"==typeof n?n:o,i[1]=s;for(var u=2;u<a;u++)i[u]=t[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}d.displayName="MDXCreateElement"},7102:function(n,e,t){t.r(e),t.d(e,{assets:function(){return l},contentTitle:function(){return c},default:function(){return f},frontMatter:function(){return s},metadata:function(){return u},toc:function(){return p}});var r=t(7145),o=t(4736),a=(t(9301),t(9278)),i=["components"],s={title:"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a",sidebar_position:5},c=void 0,u={unversionedId:"zh-cn/Questions/How_to_add_video_ads",id:"zh-cn/Questions/How_to_add_video_ads",title:"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a",description:"\u89c6\u9891\u5e7f\u544a\u5b58\u5728\u4e8e\u6b63\u5f0f\u89c6\u9891\u64ad\u653e\u4e4b\u524d\uff0c\u652f\u6301\u591a\u4e2a\u89c6\u9891\u5e7f\u544a",source:"@site/docs/zh-cn/Questions/How_to_add_video_ads.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/How_to_add_video_ads",permalink:"/document/zh-cn/Questions/How_to_add_video_ads",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a",sidebar_position:5},sidebar:"zh-cn",previous:{title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",permalink:"/document/zh-cn/Questions/How_to_import_types"},next:{title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",permalink:"/document/zh-cn/Questions/How_to_add_setting_panel"}},l={},p=[],d={toc:p};function f(n){var e=n.components,t=(0,o.Z)(n,i);return(0,a.kt)("wrapper",(0,r.Z)({},d,t,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u89c6\u9891\u5e7f\u544a\u5b58\u5728\u4e8e\u6b63\u5f0f\u89c6\u9891\u64ad\u653e\u4e4b\u524d\uff0c\u652f\u6301\u591a\u4e2a\u89c6\u9891\u5e7f\u544a"),(0,a.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: 'https://artplayer.org/assets/sample/video.mp4',\n muted: true,\n autoSize: true,\n autoplay: true,\n ads: [\n {\n url: '/assets/sample/test1.mp4',\n },\n {\n url: '/assets/sample/test2.webm',\n },\n ],\n controls: [\n {\n position: 'right',\n html: '\u8df3\u8fc7\u5e7f\u544a',\n click: function () {\n art.ads.end();\n },\n },\n ],\n layers: [\n {\n html: '\u8df3\u8fc7\u5e7f\u544a',\n style: {\n position: 'absolute',\n top: '20px',\n right: '20px',\n },\n click: function () {\n art.ads.end();\n },\n },\n ],\n});\n\nart.on('ready', function () {\n // \u5f53\u6bcf\u4e2a\u89c6\u9891\u5e7f\u544a\u64ad\u653e\u65f6\u89e6\u53d1\n art.on('ads:start', function (item) {\n
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[619],{3905:function(e,n,t){t.d(n,{Zo:function(){return s},kt:function(){return d}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(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?a(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},p={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,o=e.mdxType,a=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),m=u(t),d=o,y=m["".concat(l,".").concat(d)]||m[d]||p[d]||a;return t?r.createElement(y,i(i({ref:n},s),{},{components:t})):r.createElement(y,i({ref:n},s))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=m;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var u=2;u<a;u++)i[u]=t[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}m.displayName="MDXCreateElement"},4418:function(e,n,t){t.r(n),t.d(n,{assets:function(){return s},contentTitle:function(){return l},default:function(){return d},frontMatter:function(){return c},metadata:function(){return u},toc:function(){return p}});var r=t(7462),o=t(3366),a=(t(7294),t(3905)),i=["components"],c={title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",sidebar_position:3},l=void 0,u={unversionedId:"zh-cn/Questions/Handle_single_component",id:"zh-cn/Questions/Handle_single_component",title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",description:"\u5f53\u6211\u4eec\u5728layers\u3001contextmenu\u3001controls\u91cc\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u65f6\uff0c\u6700\u597d\u5e26\u4e0a\u4e00\u4e2a\u552f\u4e00\u7684 name \u5c5e\u6027\uff0c\u8be5\u5c5e\u6027\u4e0d\u4f46\u4f1a\u4f5c\u4e3a\u7c7b\u540d\u6dfb\u52a0\u5230 dom \u5143\u7d20\u91cc\uff0c\u8fd8\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u5b9a\u4f4d\u5230\u7ec4\u4ef6\u3002",source:"@site/docs/zh-cn/Questions/Handle_single_component.mdx",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Handle_single_component",permalink:"/document/zh-cn/Questions/Handle_single_component",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",sidebar_position:3},sidebar:"zh-cn",previous:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",permalink:"/document/zh-cn/Questions/Create_button_in_the_controls"},next:{title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",permalink:"/document/zh-cn/Questions/How_to_import_types"}},s={},p=[],m={toc:p};function d(e){var n=e.components,t=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u5f53\u6211\u4eec\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"layers"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"contextmenu"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"controls"),"\u91cc\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u65f6\uff0c\u6700\u597d\u5e26\u4e0a\u4e00\u4e2a\u552f\u4e00\u7684 ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," \u5c5e\u6027\uff0c\u8be5\u5c5e\u6027\u4e0d\u4f46\u4f1a\u4f5c\u4e3a\u7c7b\u540d\u6dfb\u52a0\u5230 dom \u5143\u7d20\u91cc\uff0c\u8fd8\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u5b9a\u4f4d\u5230\u7ec4\u4ef6\u3002"),(0,a.kt)("p",null,"\u8fd9\u91cc\u6709\u4e09\u79cd\u65b9\u6cd5\u83b7\u53d6\u7ec4\u4ef6\u7684dom\u5143\u7d20\uff1a\u7ec4\u4ef6\u65b9\u6cd5 ",(0,a.kt)("inlineCode",{parentName:"p"},"mounted"),"\u3001\u5b9e\u4f8b\u65b9\u6cd5 ",(0,a.kt)("inlineCode",{parentName:"p"},"query"),"\u3001\u63a8\u8350\u901a\u8fc7 ",(0,a.kt)("inlineCode",{parentName:"p"},"name")," \u76f4\u63a5\u83b7\u53d6"),(0,a.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"languagLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[645],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return f}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),m=s(n),f=o,d=m["".concat(l,".").concat(f)]||m[f]||u[f]||a;return n?r.createElement(d,i(i({ref:t},p),{},{components:n})):r.createElement(d,i({ref:t},p))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},8999:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return l},default:function(){return f},frontMatter:function(){return c},metadata:function(){return s},toc:function(){return u}});var r=n(7462),o=n(3366),a=(n(7294),n(3905)),i=["components"],c={title:"Use with React Portal",sidebar_position:6},l=void 0,s={unversionedId:"en/Questions/Use_with_react_portal",id:"en/Questions/Use_with_react_portal",title:"Use with React Portal",description:"It is also very easy to use React Components in layers, contextmenu, controls. Handle more complex logic through ReactDOM.createPortal.",source:"@site/docs/en/Questions/Use_with_react_portal.mdx",sourceDirName:"en/Questions",slug:"/en/Questions/Use_with_react_portal",permalink:"/document/en/Questions/Use_with_react_portal",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"Use with React Portal",sidebar_position:6},sidebar:"en",previous:{title:"How to add setting panel",permalink:"/document/en/Questions/How_to_add_setting_panel"}},p={},u=[],m={toc:u};function f(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"It is also very easy to use ",(0,a.kt)("inlineCode",{parentName:"p"},"React Components")," in ",(0,a.kt)("inlineCode",{parentName:"p"},"layers"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"contextmenu"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"controls"),". Handle more complex logic through ",(0,a.kt)("inlineCode",{parentName:"p"},"ReactDOM.createPortal"),"."),(0,a.kt)("p",null,"\ud83d\udc49 ",(0,a.kt)("a",{parentName:"p",href:"https://codesandbox.io/s/artplayer-react-portal-5z32h"},"Click to open an online demo")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-jsx"},'import React, { useState, useEffect } from "react";\nimport ReactDOM, { createPortal } from "react-dom";\nimport Artplayer from "artplayer/examples/react/Artplayer";\n\nfunction Timer({ time }) {\n return <div>{time}</div>;\n}\n\nfunction App() {\n const [art, setArt] = useState(null);\n const [time, setTime] = useState(0);\n\n useEffect(() => {\n const update = () => setTime((time) => time + 1);\n setInterval(update, 1000);\n }, []);\n\n return (\n <div>\n <Artplayer\n option={{\n url: "https://artplayer.org/assets/sample/video.mp4",\n layers: [\n {\n html: "",\n name: "portal"\n }\n ],\n controls: [\n {\n position: "right",\n name: "portal",\n html: ""\n }\n ]\n }}\n style={{\n width: "600px",\n height: "400px",\n
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[28],{3905:function(n,e,t){t.d(e,{Zo:function(){return m},kt:function(){return f}});var r=t(7294);function l(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(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,r,l=function(n,e){if(null==n)return{};var t,r,l={},s=Object.keys(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||(l[t]=n[t]);return l}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(l[t]=n[t])}return l}var o=r.createContext({}),c=function(n){var e=r.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):a(a({},e),n)),t},m=function(n){var e=c(n.components);return r.createElement(o.Provider,{value:e},n.children)},u={inlineCode:"code",wrapper:function(n){var e=n.children;return r.createElement(r.Fragment,{},e)}},p=r.forwardRef((function(n,e){var t=n.components,l=n.mdxType,s=n.originalType,o=n.parentName,m=i(n,["components","mdxType","originalType","parentName"]),p=c(t),f=l,h=p["".concat(o,".").concat(f)]||p[f]||u[f]||s;return t?r.createElement(h,a(a({ref:e},m),{},{components:t})):r.createElement(h,a({ref:e},m))}));function f(n,e){var t=arguments,l=e&&e.mdxType;if("string"==typeof n||l){var s=t.length,a=new Array(s);a[0]=p;var i={};for(var o in e)hasOwnProperty.call(e,o)&&(i[o]=e[o]);i.originalType=n,i.mdxType="string"==typeof n?n:l,a[1]=i;for(var c=2;c<s;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},9450:function(n,e,t){t.r(e),t.d(e,{assets:function(){return m},contentTitle:function(){return o},default:function(){return f},frontMatter:function(){return i},metadata:function(){return c},toc:function(){return u}});var r=t(7462),l=t(3366),s=(t(7294),t(3905)),a=["components"],i={title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",sidebar_position:1},o=void 0,c={unversionedId:"zh-cn/Questions/Create_selector_in_the_controls",id:"zh-cn/Questions/Create_selector_in_the_controls",title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",description:"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u5728\u6dfb\u52a0\u63a7\u4ef6\u7684\u65f6\u5019\u4f7f\u7528 selector \u548c onSelect \u5c5e\u6027",source:"@site/docs/zh-cn/Questions/Create_selector_in_the_controls.mdx",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Create_selector_in_the_controls",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",sidebar_position:1},sidebar:"zh-cn",previous:{title:"\u5e7f\u544a\u63d2\u4ef6",permalink:"/document/zh-cn/Plugins/ads"},next:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",permalink:"/document/zh-cn/Questions/Create_button_in_the_controls"}},m={},u=[{value:"\u5207\u6362\u5b57\u5e55",id:"\u5207\u6362\u5b57\u5e55",level:3},{value:"\u5207\u6362\u6ee4\u955c",id:"\u5207\u6362\u6ee4\u955c",level:3}],p={toc:u};function f(n){var e=n.components,t=(0,l.Z)(n,a);return(0,s.kt)("wrapper",(0,r.Z)({},p,t,{components:e,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u5728\u6dfb\u52a0\u63a7\u4ef6\u7684\u65f6\u5019\u4f7f\u7528 ",(0,s.kt)("inlineCode",{parentName:"p"},"selector")," \u548c ",(0,s.kt)("inlineCode",{parentName:"p"},"onSelect")," \u5c5e\u6027"),(0,s.kt)("h3",{id:"\u5207\u6362\u5b57\u5e55"},"\u5207\u6362\u5b57\u5e55"),(0,s.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: 'Subtitle 01',\n selector: [\n {\n default: true,\n html: '<span style=\"color:red\">Subtitle 01</span>',\n url: '/assets/sample/subtitle.srt?id=1',\n },\n {\n html: '<span style=\"color:yellow\">Subtitle 02</span>',\n Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[220],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return c}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),s=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(d,".").concat(c)]||m[c]||u[c]||l;return n?a.createElement(k,o(o({ref:t},p),{},{components:n})):a.createElement(k,o({ref:t},p))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var d in t)hasOwnProperty.call(t,d)&&(i[d]=t[d]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},6641:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return d},default:function(){return c},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var a=n(7462),r=n(3366),l=(n(7294),n(3905)),o=["components"],i={title:"\u5b9e\u4f8b\u4e8b\u4ef6",sidebar_position:6,slug:"/zh-cn/events"},d=void 0,s={unversionedId:"zh-cn/Events",id:"zh-cn/Events",title:"\u5b9e\u4f8b\u4e8b\u4ef6",description:"\u64ad\u653e\u5668\u7684\u4e8b\u4ef6\u5206\u4e3a\u4e24\u79cd\uff0c\u4e00\u79cd\u89c6\u9891\u7684\u539f\u751f\u4e8b\u4ef6\uff0c\u53e6\u5916\u4e00\u79cd\u662f\u81ea\u5b9a\u4e49\u7684\u4e8b\u4ef6\u3002\u539f\u751f\u4e8b\u4ef6\u6765\u81ea video \u5143\u7d20\uff0c\u662f\u76f4\u63a5\u76d1\u542cvideo\u5143\u7d20\u7684\u539f\u59cb\u4e8b\u4ef6\uff0c\u4e3a\u4e86\u8ba9\u5b83\u548c\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u533a\u5206\uff0c\u539f\u751f\u4e8b\u4ef6\u6dfb\u52a0\u4e86\u524d\u7f00 video:",source:"@site/docs/zh-cn/Events.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/events",permalink:"/document/zh-cn/events",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"\u5b9e\u4f8b\u4e8b\u4ef6",sidebar_position:6,slug:"/zh-cn/events"},sidebar:"zh-cn",previous:{title:"\u9759\u6001\u5c5e\u6027",permalink:"/document/zh-cn/class"},next:{title:"\u7b2c\u4e09\u65b9\u5e93",permalink:"/document/zh-cn/libraries"}},p={},u=[{value:"\u539f\u751f\u4e8b\u4ef6",id:"\u539f\u751f\u4e8b\u4ef6",level:2},{value:"\u81ea\u5b9a\u4e49\u4e8b\u4ef6",id:"\u81ea\u5b9a\u4e49\u4e8b\u4ef6",level:2},{value:"ready",id:"ready",level:3},{value:"play",id:"play",level:3},{value:"pause",id:"pause",level:3},{value:"seek",id:"seek",level:3},{value:"volume",id:"volume",level:3},{value:"destroy",id:"destroy",level:3},{value:"focus",id:"focus",level:3},{value:"blur",id:"blur",level:3},{value:"hover",id:"hover",level:3},{value:"resize",id:"resize",level:3},{value:"mousemove",id:"mousemove",level:3},{value:"url",id:"url",level:3},{value:"fullscreen",id:"fullscreen",level:3},{value:"fullscreenWeb",id:"fullscreenweb",level:3},{value:"hotkey",id:"hotkey",level:3}],m={toc:u};function c(e){var t=e.components,n=(0,r.Z)(e,o);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u64ad\u653e\u5668\u7684\u4e8b\u4ef6\u5206\u4e3a\u4e24\u79cd\uff0c\u4e00\u79cd\u89c6\u9891\u7684\u539f\u751f\u4e8b\u4ef6\uff0c\u53e6\u5916\u4e00\u79cd\u662f\u81ea\u5b9a\u4e49\u7684\u4e8b\u4ef6\u3002\u539f\u751f\u4e8b\u4ef6\u6765\u81ea ",(0,l.kt)("inlineCode",{parentName:"p"},"video")," \u5143\u7d20\uff0c\u662f\u76f4\u63a5\u76d1\u542c",(0,l.kt)("inlineCode",{parentName:"p"},"video"),"\u5143\u7d20\u7684\u539f\u59cb\u4e8b\u4ef6\uff0c\u4e3a\u4e86\u8ba9\u5b83\u548c\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u5Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[220],{9278:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return c}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),s=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(d,".").concat(c)]||m[c]||u[c]||l;return n?a.createElement(k,o(o({ref:t},p),{},{components:n})):a.createElement(k,o({ref:t},p))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var d in t)hasOwnProperty.call(t,d)&&(i[d]=t[d]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},1153:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return d},default:function(){return c},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var a=n(7145),r=n(4736),l=(n(9301),n(9278)),o=["components"],i={title:"\u5b9e\u4f8b\u4e8b\u4ef6",sidebar_position:6,slug:"/zh-cn/events"},d=void 0,s={unversionedId:"zh-cn/Events",id:"zh-cn/Events",title:"\u5b9e\u4f8b\u4e8b\u4ef6",description:"\u64ad\u653e\u5668\u7684\u4e8b\u4ef6\u5206\u4e3a\u4e24\u79cd\uff0c\u4e00\u79cd\u89c6\u9891\u7684\u539f\u751f\u4e8b\u4ef6\uff0c\u53e6\u5916\u4e00\u79cd\u662f\u81ea\u5b9a\u4e49\u7684\u4e8b\u4ef6\u3002\u539f\u751f\u4e8b\u4ef6\u6765\u81ea video \u5143\u7d20\uff0c\u662f\u76f4\u63a5\u76d1\u542cvideo\u5143\u7d20\u7684\u539f\u59cb\u4e8b\u4ef6\uff0c\u4e3a\u4e86\u8ba9\u5b83\u548c\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u533a\u5206\uff0c\u539f\u751f\u4e8b\u4ef6\u6dfb\u52a0\u4e86\u524d\u7f00 video:",source:"@site/docs/zh-cn/Events.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/events",permalink:"/document/zh-cn/events",tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"\u5b9e\u4f8b\u4e8b\u4ef6",sidebar_position:6,slug:"/zh-cn/events"},sidebar:"zh-cn",previous:{title:"\u9759\u6001\u5c5e\u6027",permalink:"/document/zh-cn/class"},next:{title:"\u7b2c\u4e09\u65b9\u5e93",permalink:"/document/zh-cn/libraries"}},p={},u=[{value:"\u539f\u751f\u4e8b\u4ef6",id:"\u539f\u751f\u4e8b\u4ef6",level:2},{value:"\u81ea\u5b9a\u4e49\u4e8b\u4ef6",id:"\u81ea\u5b9a\u4e49\u4e8b\u4ef6",level:2},{value:"ready",id:"ready",level:3},{value:"play",id:"play",level:3},{value:"pause",id:"pause",level:3},{value:"seek",id:"seek",level:3},{value:"volume",id:"volume",level:3},{value:"destroy",id:"destroy",level:3},{value:"focus",id:"focus",level:3},{value:"blur",id:"blur",level:3},{value:"hover",id:"hover",level:3},{value:"resize",id:"resize",level:3},{value:"mousemove",id:"mousemove",level:3},{value:"url",id:"url",level:3},{value:"fullscreen",id:"fullscreen",level:3},{value:"fullscreenWeb",id:"fullscreenweb",level:3},{value:"hotkey",id:"hotkey",level:3}],m={toc:u};function c(e){var t=e.components,n=(0,r.Z)(e,o);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u64ad\u653e\u5668\u7684\u4e8b\u4ef6\u5206\u4e3a\u4e24\u79cd\uff0c\u4e00\u79cd\u89c6\u9891\u7684\u539f\u751f\u4e8b\u4ef6\uff0c\u53e6\u5916\u4e00\u79cd\u662f\u81ea\u5b9a\u4e49\u7684\u4e8b\u4ef6\u3002\u539f\u751f\u4e8b\u4ef6\u6765\u81ea ",(0,l.kt)("inlineCode",{parentName:"p"},"video")," \u5143\u7d20\uff0c\u662f\u76f4\u63a5\u76d1\u542c",(0,l.kt)("inlineCode",{parentName:"p"},"video"),"\u5143\u7d20\u7684\u539f\u59cb\u4e8b\u4ef6\uff0c\u4e3a\u4e86\u8ba9\u5b83\u548c\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u533a\u5206Line truncated
|
||||
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[869],{5869:function(e,t,n){n.r(t),n.d(t,{default:function(){return c}});var a=n(9301),l=n(1077),o=n(6437),r=n(5395);function c(){return a.createElement(a.Fragment,null,a.createElement(r.d,{title:(0,o.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(l.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]);
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[608],{4608:function(e,t,n){n.r(t),n.d(t,{default:function(){return c}});var a=n(7294),l=n(3460),o=n(5999),r=n(1944);function c(){return a.createElement(a.Fragment,null,a.createElement(r.d,{title:(0,o.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(l.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[48],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return c}});var a=t(7294);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(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?r(Object(t),!0).forEach((function(n){l(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e,n){if(null==e)return{};var t,a,l=function(e,n){if(null==e)return{};var t,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||(l[t]=e[t]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}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},u=function(e){var n=s(e.components);return a.createElement(o.Provider,{value:n},e.children)},d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,l=e.mdxType,r=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=s(t),c=l,k=m["".concat(o,".").concat(c)]||m[c]||d[c]||r;return t?a.createElement(k,i(i({ref:n},u),{},{components:t})):a.createElement(k,i({ref:n},u))}));function c(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=t.length,i=new Array(r);i[0]=m;var p={};for(var o in n)hasOwnProperty.call(n,o)&&(p[o]=n[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var s=2;s<r;s++)i[s]=t[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}m.displayName="MDXCreateElement"},4387:function(e,n,t){t.r(n),t.d(n,{assets:function(){return u},contentTitle:function(){return o},default:function(){return c},frontMatter:function(){return p},metadata:function(){return s},toc:function(){return d}});var a=t(7462),l=t(3366),r=(t(7294),t(3905)),i=["components"],p={title:"\u5e38\u7528\u5c5e\u6027",sidebar_position:3,slug:"/zh-cn/propertie"},o=void 0,s={unversionedId:"zh-cn/Properties",id:"zh-cn/Properties",title:"\u5e38\u7528\u5c5e\u6027",description:"play",source:"@site/docs/zh-cn/Properties.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/propertie",permalink:"/document/zh-cn/propertie",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"\u5e38\u7528\u5c5e\u6027",sidebar_position:3,slug:"/zh-cn/propertie"},sidebar:"zh-cn",previous:{title:"\u57fa\u7840\u53c2\u6570",permalink:"/document/zh-cn/options"},next:{title:"\u9ad8\u7ea7\u5c5e\u6027",permalink:"/document/zh-cn/advance"}},u={},d=[{value:"play",id:"play",level:2},{value:"pause",id:"pause",level:2},{value:"toggle",id:"toggle",level:2},{value:"seek",id:"seek",level:2},{value:"forward",id:"forward",level:2},{value:"backward",id:"backward",level:2},{value:"volume",id:"volume",level:2},{value:"url",id:"url",level:2},{value:"switchUrl",id:"switchurl",level:2},{value:"switchQuality",id:"switchquality",level:2},{value:"muted",id:"muted",level:2},{value:"currentTime",id:"currenttime",level:2},{value:"duration",id:"duration",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"getDataURL",id:"getdataurl",level:2},{value:"getBlobUrl",id:"getbloburl",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"pip",id:"pip",level:2},{value:"poster",id:"poster",level:2},{value:"mini",id:"mini",level:2},{value:"playing",id:"playing",level:2},{value:"autoSize",id:"autosize",level:2},{value:"rect",id:"rect",level:2},{value:"flip",id:"flip",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"loop",id:"loop",level:2},{value:"autoHeight",id:"autoheight",level:2},{value:"attr",id:"attr",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"airplay",id:"airplay",level:2},{value:"destroy",id:"destroy",level:2}],m={toc:d};function c(e){var n=e.components,t=(0,l.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"play"},"play"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u7c7b\u578b: ",(0,r.kt)("inlineCode",{parentName:"li"},"Function"))),(0,r.kt)("p",null,"\u64ad\u653e\u89c6\u9891"),(0,r.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"var art = neLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[4],{9278:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return d}});var r=n(9301);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},l=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),f=s(n),d=o,m=f["".concat(u,".").concat(d)]||f[d]||p[d]||i;return n?r.createElement(m,c(c({ref:t},l),{},{components:n})):r.createElement(m,c({ref:t},l))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,c=new Array(i);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var s=2;s<i;s++)c[s]=n[s];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},9120:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return u},default:function(){return d},frontMatter:function(){return a},metadata:function(){return s},toc:function(){return p}});var r=n(7145),o=n(4736),i=(n(9301),n(9278)),c=["components"],a={title:"Add button to the controls",sidebar_position:2},u=void 0,s={unversionedId:"en/Questions/Create_button_in_the_controls",id:"en/Questions/Create_button_in_the_controls",title:"Add button to the controls",description:"\u25b6 Run Code",source:"@site/docs/en/Questions/Create_button_in_the_controls.md",sourceDirName:"en/Questions",slug:"/en/Questions/Create_button_in_the_controls",permalink:"/document/en/Questions/Create_button_in_the_controls",tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"Add button to the controls",sidebar_position:2},sidebar:"en",previous:{title:"Add select in the controls",permalink:"/document/en/Questions/Create_selector_in_the_controls"},next:{title:"Handle a single component",permalink:"/document/en/Questions/Handle_single_component"}},l={},p=[],f={toc:p};function d(e){var t=e.components,n=(0,o.Z)(e,c);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"var time = 0;\nvar art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: '<button type=\"button\">Click Me!</button>',\n click: function (_, event) {\n // The second parameter is an event object\n time += 1;\n event.target.innerText = 'You Click ' + time;\n },\n },\n ],\n});\n")))}d.isMDXComponent=!0}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[359],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return c}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(p,".").concat(c)]||m[c]||d[c]||l;return n?a.createElement(k,i(i({ref:t},u),{},{components:n})):a.createElement(k,i({ref:t},u))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var s=2;s<l;s++)i[s]=n[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},5883:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return p},default:function(){return c},frontMatter:function(){return o},metadata:function(){return s},toc:function(){return d}});var a=n(7462),r=n(3366),l=(n(7294),n(3905)),i=["components"],o={title:"Common properties",sidebar_position:3,slug:"/propertie"},p=void 0,s={unversionedId:"en/Properties",id:"en/Properties",title:"Common properties",description:"play",source:"@site/docs/en/Properties.mdx",sourceDirName:"en",slug:"/propertie",permalink:"/document/propertie",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Common properties",sidebar_position:3,slug:"/propertie"},sidebar:"en",previous:{title:"Basic options",permalink:"/document/options"},next:{title:"Advanced propertys",permalink:"/document/advance"}},u={},d=[{value:"play",id:"play",level:2},{value:"pause",id:"pause",level:2},{value:"toggle",id:"toggle",level:2},{value:"seek",id:"seek",level:2},{value:"forward",id:"forward",level:2},{value:"backward",id:"backward",level:2},{value:"volume",id:"volume",level:2},{value:"url",id:"url",level:2},{value:"switchUrl",id:"switchurl",level:2},{value:"switchQuality",id:"switchquality",level:2},{value:"muted",id:"muted",level:2},{value:"currentTime",id:"currenttime",level:2},{value:"duration",id:"duration",level:2},{value:"screenshot",id:"screenshot",level:2},{value:"getDataURL",id:"getdataurl",level:2},{value:"getBlobUrl",id:"getbloburl",level:2},{value:"fullscreen",id:"fullscreen",level:2},{value:"fullscreenWeb",id:"fullscreenweb",level:2},{value:"pip",id:"pip",level:2},{value:"poster",id:"poster",level:2},{value:"mini",id:"mini",level:2},{value:"playing",id:"playing",level:2},{value:"autoSize",id:"autosize",level:2},{value:"rect",id:"rect",level:2},{value:"flip",id:"flip",level:2},{value:"playbackRate",id:"playbackrate",level:2},{value:"aspectRatio",id:"aspectratio",level:2},{value:"loop",id:"loop",level:2},{value:"autoHeight",id:"autoheight",level:2},{value:"attr",id:"attr",level:2},{value:"title",id:"title",level:2},{value:"theme",id:"theme",level:2},{value:"airplay",id:"airplay",level:2},{value:"destroy",id:"destroy",level:2}],m={toc:d};function c(e){var t=e.components,n=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"play"},"play"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Type: ",(0,l.kt)("inlineCode",{parentName:"li"},"Function"))),(0,l.kt)("p",null,"Play video"),(0,l.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n muted: true,\n});\nLine truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[142],{9278:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var r=n(9301);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(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,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),y=s(n),m=o,f=y["".concat(c,".").concat(m)]||y[m]||l[m]||a;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=y;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}y.displayName="MDXCreateElement"},461:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return c},default:function(){return m},frontMatter:function(){return p},metadata:function(){return s},toc:function(){return l}});var r=n(7145),o=n(4736),a=(n(9301),n(9278)),i=["components"],p={title:"How to import types",sidebar_position:4},c=void 0,s={unversionedId:"en/Questions/How_to_import_types",id:"en/Questions/How_to_import_types",title:"How to import types",description:"Sometimes you lose TypeScript syntax prompt, then you can import types manually",source:"@site/docs/en/Questions/How_to_import_types.md",sourceDirName:"en/Questions",slug:"/en/Questions/How_to_import_types",permalink:"/document/en/Questions/How_to_import_types",tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"How to import types",sidebar_position:4},sidebar:"en",previous:{title:"Handle a single component",permalink:"/document/en/Questions/Handle_single_component"},next:{title:"How to add video ads",permalink:"/document/en/Questions/How_to_add_video_ads"}},u={},l=[],y={toc:l};function m(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},y,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Sometimes you lose ",(0,a.kt)("inlineCode",{parentName:"p"},"TypeScript")," syntax prompt, then you can import types manually"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'/**\n * @typedef { import("artplayer/types/artplayer") } Artplayer\n */\n\n/**\n * @type {Artplayer} - An Artplayer instance.\n */\nconst art1 = {};\n\n/**\n * @param {Artplayer} art2 - An Artplayer instance.\n */\nfunction getInstance(art2) {\n //\n}\n')))}m.isMDXComponent=!0}}]);
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[601],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(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,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),y=s(n),m=o,f=y["".concat(c,".").concat(m)]||y[m]||l[m]||a;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=y;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}y.displayName="MDXCreateElement"},7702:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return c},default:function(){return m},frontMatter:function(){return p},metadata:function(){return s},toc:function(){return l}});var r=n(7462),o=n(3366),a=(n(7294),n(3905)),i=["components"],p={title:"How to import types",sidebar_position:4},c=void 0,s={unversionedId:"en/Questions/How_to_import_types",id:"en/Questions/How_to_import_types",title:"How to import types",description:"Sometimes you lose TypeScript syntax prompt, then you can import types manually",source:"@site/docs/en/Questions/How_to_import_types.mdx",sourceDirName:"en/Questions",slug:"/en/Questions/How_to_import_types",permalink:"/document/en/Questions/How_to_import_types",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"How to import types",sidebar_position:4},sidebar:"en",previous:{title:"Handle a single component",permalink:"/document/en/Questions/Handle_single_component"},next:{title:"How to add setting panel",permalink:"/document/en/Questions/How_to_add_setting_panel"}},u={},l=[],y={toc:l};function m(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},y,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Sometimes you lose ",(0,a.kt)("inlineCode",{parentName:"p"},"TypeScript")," syntax prompt, then you can import types manually"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'/**\n * @typedef { import("artplayer/types/artplayer") } Artplayer\n */\n\n/**\n * @type {Artplayer} - An Artplayer instance.\n */\nconst art1 = {};\n\n/**\n * @param {Artplayer} art2 - An Artplayer instance.\n */\nfunction getInstance(art2) {\n //\n}\n')))}m.isMDXComponent=!0}}]);
|
||||
@@ -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:"Ads Plugin",permalink:"/document/en/Plugins/ads"}},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}}]);
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[576],{9278:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return u}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},s=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=c(n),u=r,v=m["".concat(l,".").concat(u)]||m[u]||d[u]||i;return n?a.createElement(v,p(p({ref:t},s),{},{components:n})):a.createElement(v,p({ref:t},s))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,p=new Array(i);p[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:r,p[1]=o;for(var c=2;c<i;c++)p[c]=n[c];return a.createElement.apply(null,p)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},7962:function(e,t,n){n.r(t),n.d(t,{assets:function(){return s},contentTitle:function(){return l},default:function(){return u},frontMatter:function(){return o},metadata:function(){return c},toc:function(){return d}});var a=n(7145),r=n(4736),i=(n(9301),n(9278)),p=["components"],o={title:"\u5feb\u901f\u4e0a\u624b",sidebar_position:1,slug:"/zh-cn"},l=void 0,c={unversionedId:"zh-cn/Overview",id:"zh-cn/Overview",title:"\u5feb\u901f\u4e0a\u624b",description:"\u5b89\u88c5",source:"@site/docs/zh-cn/Overview.md",sourceDirName:"zh-cn",slug:"/zh-cn",permalink:"/document/zh-cn",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"\u5feb\u901f\u4e0a\u624b",sidebar_position:1,slug:"/zh-cn"},sidebar:"zh-cn",next:{title:"\u57fa\u7840\u53c2\u6570",permalink:"/document/zh-cn/options"}},s={},d=[{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:"\u5728 <code>Html</code> \u4f7f\u7528",id:"\u5728-html-\u4f7f\u7528",level:3},{value:"\u4e0e <code>Vue</code> \u4f7f\u7528",id:"\u4e0e-vue-\u4f7f\u7528",level:3},{value:"\u4e0e <code>React</code> \u4f7f\u7528",id:"\u4e0e-react-\u4f7f\u7528",level:3},{value:"\u6f14\u793a",id:"\u6f14\u793a",level:2}],m={toc:d};function u(e){var t=e.components,n=(0,r.Z)(e,p);return(0,i.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"\u5b89\u88c5"},"\u5b89\u88c5"),(0,i.kt)("h3",{id:"\u901a\u8fc7-npm-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,i.kt)("inlineCode",{parentName:"h3"},"npm")," \u5b89\u88c5\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ npm install artplayer\n")),(0,i.kt)("h3",{id:"\u901a\u8fc7-yarn-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,i.kt)("inlineCode",{parentName:"h3"},"yarn")," \u5b89\u88c5\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ yarn add artplayer\n")),(0,i.kt)("p",null,"\u7136\u540e\u52a0\u8f7d ",(0,i.kt)("inlineCode",{parentName:"p"},"artplayer")," \u6a21\u5757\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"// ES6\nimport Artplayer from 'artplayer';\n\n// CommonJS\nconst Artplayer = require('artplayer');\n")),(0,i.kt)("h3",{id:"\u901a\u8fc7-script-\u5b89\u88c5"},"\u901a\u8fc7 ",(0,i.kt)("inlineCode",{parentName:"h3"},"script")," \u5b89\u88c5\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-html"},'\x3c!-- locally --\xLine truncated
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! For license information please see 759.03b9424c.js.LICENSE.txt */
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[759],{8708:function(e,t,n){"use strict";e.exports=n(1170)},4223:function(e,t,n){"use strict";var i=n(8540),r={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};i.isMsie()&&i.mixin(r.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),i.isMsie()&&i.isMsie()<=7&&i.mixin(r.input,{marginTop:"-1px"}),e.exports=r},6460:function(e,t,n){"use strict";var i="aaDataset",r="aaValue",s="aaDatum",o=n(8540),a=n(6171),u=n(5262),c=n(4223),l=n(6087);function h(e){var t;(e=e||{}).templates=e.templates||{},e.source||o.error("missing source"),e.name&&(t=e.name,!/^[_a-zA-Z0-9-]+$/.test(t))&&o.error("invalid dataset name: "+e.name),this.query=null,this._isEmpty=!0,this.highlight=!!e.highlight,this.name=void 0===e.name||null===e.name?o.getUniqueId():e.name,this.source=e.source,this.displayFn=function(e){return e=e||"value",o.isFunction(e)?e:t;function t(t){return t[e]}}(e.display||e.displayKey),this.debounce=e.debounce,this.cache=!1!==e.cache,this.templates=function(e,t){return{empty:e.empty&&o.templatify(e.empty),header:e.header&&o.templatify(e.header),footer:e.footer&&o.templatify(e.footer),suggestion:e.suggestion||n};function n(e){return"<p>"+t(e)+"</p>"}}(e.templates,this.displayFn),this.css=o.mixin({},c,e.appendTo?c.appendTo:{}),this.cssClasses=e.cssClasses=o.mixin({},c.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||o.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var n=o.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=e.$menu&&e.$menu.find(n+"-"+this.name).length>0?a.element(e.$menu.find(n+"-"+this.name)[0]):a.element(u.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=e.$menu,this.clearCachedSuggestions()}h.extractDatasetName=function(e){return a.element(e).data(i)},h.extractValue=function(e){return a.element(e).data(r)},h.extractDatum=function(e){var t=a.element(e).data(s);return"string"==typeof t&&(t=JSON.parse(t)),t},o.mixin(h.prototype,l,{_render:function(e,t){if(this.$el){var n,c=this,l=[].slice.call(arguments,2);if(this.$el.empty(),n=t&&t.length,this._isEmpty=!n,!n&&this.templates.empty)this.$el.html(h.apply(this,l)).prepend(c.templates.header?f.apply(this,l):null).append(c.templates.footer?d.apply(this,l):null);else if(n)this.$el.html(p.apply(this,l)).prepend(c.templates.header?f.apply(this,l):null).append(c.templates.footer?d.apply(this,l):null);else if(t&&!Array.isArray(t))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(n?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(n?"without":"with")+"-"+this.name),this.trigger("rendered",e)}function h(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!0}].concat(t),c.templates.empty.apply(this,t)}function p(){var e,n,l=[].slice.call(arguments,0),h=this,p=u.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return e=a.element(p).css(this.css.suggestions),n=o.map(t,f),e.append.apply(e,n),e;function f(e){var t,n=u.suggestion.replace("%PREFIX%",h.cssClasses.prefix).replace("%SUGGESTION%",h.cssClasses.suggestion);return(t=a.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(c.templates.suggestion.apply(this,[e].concat(l)))).data(i,c.name),t.data(r,c.displayFn(e)||void 0),t.data(s,JSON.stringify(e)),t.children().each((function(){a.element(this).css(h.css.suggestionChild)})),t}}function f(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.header.apply(this,t)}function d(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.footer.apply(this,t)}},getRoot:function(){return this.$el},update:function(e){function t(t){if(!this.canceled&&e===this.query){var n=[].slice.call(arguments,1);this.cacheSuggestions(e,t,n),this._render.apply(this,[e,t].concat(n))}}if(this.query=e,this.canceled=!1,this.shouldFetchFroLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[575],{9278:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return m}});var r=n(9301);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=u(n),m=a,h=d["".concat(i,".").concat(m)]||d[m]||c[m]||l;return n?r.createElement(h,s(s({ref:t},p),{},{components:n})):r.createElement(h,s({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,s=new Array(l);s[0]=d;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o.mdxType="string"==typeof e?e:a,s[1]=o;for(var u=2;u<l;u++)s[u]=n[u];return r.createElement.apply(null,s)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},9922:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return i},default:function(){return m},frontMatter:function(){return o},metadata:function(){return u},toc:function(){return c}});var r=n(7145),a=n(4736),l=(n(9301),n(9278)),s=["components"],o={title:"\u7b2c\u4e09\u65b9\u5e93",sidebar_position:7,slug:"/zh-cn/libraries"},i=void 0,u={unversionedId:"zh-cn/Libraries",id:"zh-cn/Libraries",title:"\u7b2c\u4e09\u65b9\u5e93",description:"flv.js",source:"@site/docs/zh-cn/Libraries.md",sourceDirName:"zh-cn",slug:"/zh-cn/libraries",permalink:"/document/zh-cn/libraries",tags:[],version:"current",sidebarPosition:7,frontMatter:{title:"\u7b2c\u4e09\u65b9\u5e93",sidebar_position:7,slug:"/zh-cn/libraries"},sidebar:"zh-cn",previous:{title:"\u5b9e\u4f8b\u4e8b\u4ef6",permalink:"/document/zh-cn/events"},next:{title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",permalink:"/document/zh-cn/Plugins/danmuku"}},p={},c=[{value:"flv.js",id:"flvjs",level:2},{value:"hls.js",id:"hlsjs",level:2},{value:"dash.js",id:"dashjs",level:2},{value:"shaka-player",id:"shaka-player",level:2},{value:"webtorrent",id:"webtorrent",level:2}],d={toc:c};function m(e){var t=e.components,n=(0,a.Z)(e,s);return(0,l.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"flvjs"},"flv.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e3b\u9875: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/Bilibili/flv.js"},"https://github.com/Bilibili/flv.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://cdn.jsdelivr.net/npm/flv.js@1.6.2/dist/flv.min.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: '/assets/sample/video.flv',\n customType: {\n flv: function (video, url) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: url,\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n },\n },\n});\n")),(0,l.kt)("h2",{id:"hlsjs"},"hls.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e3b\u9875: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/video-dev/hls.js"},"https://github.com/video-dev/hls.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://cdn.jsdelivr.net/npm/hls.js@1.1.1/dist/hls.min.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',\n customType: {\n m3u8: function (video, url) {\n
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[849],{5849:function(e,t,u){u.r(t)}}]);
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[519],{9278:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return y}});var r=n(9301);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),f=u(n),y=o,m=f["".concat(p,".").concat(y)]||f[y]||l[y]||i;return n?r.createElement(m,a(a({ref:t},s),{},{components:n})):r.createElement(m,a({ref:t},s))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:o,a[1]=c;for(var u=2;u<i;u++)a[u]=n[u];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},9285:function(e,t,n){n.r(t),n.d(t,{assets:function(){return s},contentTitle:function(){return p},default:function(){return y},frontMatter:function(){return c},metadata:function(){return u},toc:function(){return l}});var r=n(7145),o=n(4736),i=(n(9301),n(9278)),a=["components"],c={title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",sidebar_position:4},p=void 0,u={unversionedId:"zh-cn/Questions/How_to_import_types",id:"zh-cn/Questions/How_to_import_types",title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",description:"\u6709\u65f6\u4f60\u4f1a\u4e22\u5931 TypeScript \u7684\u8bed\u6cd5\u63d0\u793a\uff0c\u8fd9\u65f6\u5019\u4f60\u53ef\u4ee5\u624b\u52a8\u5bfc\u5165\u7c7b\u578b",source:"@site/docs/zh-cn/Questions/How_to_import_types.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/How_to_import_types",permalink:"/document/zh-cn/Questions/How_to_import_types",tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",sidebar_position:4},sidebar:"zh-cn",previous:{title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",permalink:"/document/zh-cn/Questions/Handle_single_component"},next:{title:"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a",permalink:"/document/zh-cn/Questions/How_to_add_video_ads"}},s={},l=[],f={toc:l};function y(e){var t=e.components,n=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"\u6709\u65f6\u4f60\u4f1a\u4e22\u5931 ",(0,i.kt)("inlineCode",{parentName:"p"},"TypeScript")," \u7684\u8bed\u6cd5\u63d0\u793a\uff0c\u8fd9\u65f6\u5019\u4f60\u53ef\u4ee5\u624b\u52a8\u5bfc\u5165\u7c7b\u578b "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},'/**\n * @typedef { import("artplayer/types/artplayer") } Artplayer\n */\n\n/**\n * @type {Artplayer} - \u4e00\u4e2a Artplayer \u5b9e\u4f8b\n */\nconst art1 = {};\n\n/**\n * @param {Artplayer} art2 - \u4e00\u4e2a Artplayer \u5b9e\u4f8b\n */\nfunction getInstance(art2) {\n //\n}\n')))}y.isMDXComponent=!0}}]);
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[167],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return y}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),f=u(n),y=o,m=f["".concat(p,".").concat(y)]||f[y]||l[y]||i;return n?r.createElement(m,a(a({ref:t},s),{},{components:n})):r.createElement(m,a({ref:t},s))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:o,a[1]=c;for(var u=2;u<i;u++)a[u]=n[u];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},1288:function(e,t,n){n.r(t),n.d(t,{assets:function(){return s},contentTitle:function(){return p},default:function(){return y},frontMatter:function(){return c},metadata:function(){return u},toc:function(){return l}});var r=n(7462),o=n(3366),i=(n(7294),n(3905)),a=["components"],c={title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",sidebar_position:4},p=void 0,u={unversionedId:"zh-cn/Questions/How_to_import_types",id:"zh-cn/Questions/How_to_import_types",title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",description:"\u6709\u65f6\u4f60\u4f1a\u4e22\u5931 TypeScript \u7684\u8bed\u6cd5\u63d0\u793a\uff0c\u8fd9\u65f6\u5019\u4f60\u53ef\u4ee5\u624b\u52a8\u5bfc\u5165\u7c7b\u578b",source:"@site/docs/zh-cn/Questions/How_to_import_types.mdx",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/How_to_import_types",permalink:"/document/zh-cn/Questions/How_to_import_types",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",sidebar_position:4},sidebar:"zh-cn",previous:{title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",permalink:"/document/zh-cn/Questions/Handle_single_component"},next:{title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",permalink:"/document/zh-cn/Questions/How_to_add_setting_panel"}},s={},l=[],f={toc:l};function y(e){var t=e.components,n=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"\u6709\u65f6\u4f60\u4f1a\u4e22\u5931 ",(0,i.kt)("inlineCode",{parentName:"p"},"TypeScript")," \u7684\u8bed\u6cd5\u63d0\u793a\uff0c\u8fd9\u65f6\u5019\u4f60\u53ef\u4ee5\u624b\u52a8\u5bfc\u5165\u7c7b\u578b "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},'/**\n * @typedef { import("artplayer/types/artplayer") } Artplayer\n */\n\n/**\n * @type {Artplayer} - \u4e00\u4e2a Artplayer \u5b9e\u4f8b\n */\nconst art1 = {};\n\n/**\n * @param {Artplayer} art2 - \u4e00\u4e2a Artplayer \u5b9e\u4f8b\n */\nfunction getInstance(art2) {\n //\n}\n')))}y.isMDXComponent=!0}}]);
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see 878.0f9d5667.js.LICENSE.txt */
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[878],{1639:function(e,t,n){"use strict";e.exports=n(9281)},7114:function(e,t,n){"use strict";var i=n(5670),r={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};i.isMsie()&&i.mixin(r.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),i.isMsie()&&i.isMsie()<=7&&i.mixin(r.input,{marginTop:"-1px"}),e.exports=r},3312:function(e,t,n){"use strict";var i="aaDataset",r="aaValue",s="aaDatum",o=n(5670),a=n(3855),u=n(6619),c=n(7114),l=n(6823);function h(e){var t;(e=e||{}).templates=e.templates||{},e.source||o.error("missing source"),e.name&&(t=e.name,!/^[_a-zA-Z0-9-]+$/.test(t))&&o.error("invalid dataset name: "+e.name),this.query=null,this._isEmpty=!0,this.highlight=!!e.highlight,this.name=void 0===e.name||null===e.name?o.getUniqueId():e.name,this.source=e.source,this.displayFn=function(e){return e=e||"value",o.isFunction(e)?e:t;function t(t){return t[e]}}(e.display||e.displayKey),this.debounce=e.debounce,this.cache=!1!==e.cache,this.templates=function(e,t){return{empty:e.empty&&o.templatify(e.empty),header:e.header&&o.templatify(e.header),footer:e.footer&&o.templatify(e.footer),suggestion:e.suggestion||n};function n(e){return"<p>"+t(e)+"</p>"}}(e.templates,this.displayFn),this.css=o.mixin({},c,e.appendTo?c.appendTo:{}),this.cssClasses=e.cssClasses=o.mixin({},c.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||o.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var n=o.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=e.$menu&&e.$menu.find(n+"-"+this.name).length>0?a.element(e.$menu.find(n+"-"+this.name)[0]):a.element(u.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=e.$menu,this.clearCachedSuggestions()}h.extractDatasetName=function(e){return a.element(e).data(i)},h.extractValue=function(e){return a.element(e).data(r)},h.extractDatum=function(e){var t=a.element(e).data(s);return"string"==typeof t&&(t=JSON.parse(t)),t},o.mixin(h.prototype,l,{_render:function(e,t){if(this.$el){var n,c=this,l=[].slice.call(arguments,2);if(this.$el.empty(),n=t&&t.length,this._isEmpty=!n,!n&&this.templates.empty)this.$el.html(h.apply(this,l)).prepend(c.templates.header?f.apply(this,l):null).append(c.templates.footer?d.apply(this,l):null);else if(n)this.$el.html(p.apply(this,l)).prepend(c.templates.header?f.apply(this,l):null).append(c.templates.footer?d.apply(this,l):null);else if(t&&!Array.isArray(t))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(n?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(n?"without":"with")+"-"+this.name),this.trigger("rendered",e)}function h(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!0}].concat(t),c.templates.empty.apply(this,t)}function p(){var e,n,l=[].slice.call(arguments,0),h=this,p=u.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return e=a.element(p).css(this.css.suggestions),n=o.map(t,f),e.append.apply(e,n),e;function f(e){var t,n=u.suggestion.replace("%PREFIX%",h.cssClasses.prefix).replace("%SUGGESTION%",h.cssClasses.suggestion);return(t=a.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(c.templates.suggestion.apply(this,[e].concat(l)))).data(i,c.name),t.data(r,c.displayFn(e)||void 0),t.data(s,JSON.stringify(e)),t.children().each((function(){a.element(this).css(h.css.suggestionChild)})),t}}function f(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.header.apply(this,t)}function d(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.footer.apply(this,t)}},getRoot:function(){return this.$el},update:function(e){function t(t){if(!this.canceled&&e===this.query){var n=[].slice.call(arguments,1);this.cacheSuggestions(e,t,n),this._render.apply(this,[e,t].concat(n))}}if(this.query=e,this.canceled=!1,this.shouldFetchFroLine truncated
|
||||
File renamed without changes.
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[267],{9278:function(n,e,t){t.d(e,{Zo:function(){return u},kt:function(){return f}});var r=t(9301);function l(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(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,r,l=function(n,e){if(null==n)return{};var t,r,l={},s=Object.keys(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||(l[t]=n[t]);return l}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r<s.length;r++)t=s[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(l[t]=n[t])}return l}var o=r.createContext({}),c=function(n){var e=r.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):a(a({},e),n)),t},u=function(n){var e=c(n.components);return r.createElement(o.Provider,{value:e},n.children)},m={inlineCode:"code",wrapper:function(n){var e=n.children;return r.createElement(r.Fragment,{},e)}},p=r.forwardRef((function(n,e){var t=n.components,l=n.mdxType,s=n.originalType,o=n.parentName,u=i(n,["components","mdxType","originalType","parentName"]),p=c(t),f=l,h=p["".concat(o,".").concat(f)]||p[f]||m[f]||s;return t?r.createElement(h,a(a({ref:e},u),{},{components:t})):r.createElement(h,a({ref:e},u))}));function f(n,e){var t=arguments,l=e&&e.mdxType;if("string"==typeof n||l){var s=t.length,a=new Array(s);a[0]=p;var i={};for(var o in e)hasOwnProperty.call(e,o)&&(i[o]=e[o]);i.originalType=n,i.mdxType="string"==typeof n?n:l,a[1]=i;for(var c=2;c<s;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},9663:function(n,e,t){t.r(e),t.d(e,{assets:function(){return u},contentTitle:function(){return o},default:function(){return f},frontMatter:function(){return i},metadata:function(){return c},toc:function(){return m}});var r=t(7145),l=t(4736),s=(t(9301),t(9278)),a=["components"],i={title:"Add select in the controls",sidebar_position:1},o=void 0,c={unversionedId:"en/Questions/Create_selector_in_the_controls",id:"en/Questions/Create_selector_in_the_controls",title:"Add select in the controls",description:"Sometimes you need to add a list in the controls, then you can use the selector and onSelect attribute when adding controls",source:"@site/docs/en/Questions/Create_selector_in_the_controls.md",sourceDirName:"en/Questions",slug:"/en/Questions/Create_selector_in_the_controls",permalink:"/document/en/Questions/Create_selector_in_the_controls",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Add select in the controls",sidebar_position:1},sidebar:"en",previous:{title:"Danmuku plugin",permalink:"/document/en/Plugins/danmuku"},next:{title:"Add button to the controls",permalink:"/document/en/Questions/Create_button_in_the_controls"}},u={},m=[{value:"Switch Subtitle",id:"switch-subtitle",level:3},{value:"Switch filter",id:"switch-filter",level:3}],p={toc:m};function f(n){var e=n.components,t=(0,l.Z)(n,a);return(0,s.kt)("wrapper",(0,r.Z)({},p,t,{components:e,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Sometimes you need to add a list in the controls, then you can use the ",(0,s.kt)("inlineCode",{parentName:"p"},"selector")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"onSelect")," attribute when adding controls"),(0,s.kt)("h3",{id:"switch-subtitle"},"Switch Subtitle"),(0,s.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: 'Subtitle 01',\n selector: [\n {\n default: true,\n html: '<span style=\"color:red\">Subtitle 01</span>',\n url: '/assets/sample/subtitle.srt?id=1',\n },\n {\n html: '<span style=\"color:yellow\">Subtitle 02</span>',\n url: '/assets/sample/subtitle.srt?id=2',\n },\n ],\n onSelect: function (item, $dom) {\n console.info(item, $dom);\n\n art.subtitle.url = item.url;\n \n return 'You click ' + item.html;\n },\n },\n ],\n});\n")),(0,s.kt)("h3",{id:"switch-filter"},Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[283],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={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,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=p(n),m=r,k=d["".concat(s,".").concat(m)]||d[m]||u[m]||l;return n?a.createElement(k,i(i({ref:t},c),{},{components:n})):a.createElement(k,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var p=2;p<l;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},2606:function(e,t,n){n.r(t),n.d(t,{assets:function(){return c},contentTitle:function(){return s},default:function(){return m},frontMatter:function(){return o},metadata:function(){return p},toc:function(){return u}});var a=n(7462),r=n(3366),l=(n(7294),n(3905)),i=["components"],o={title:"Static propertys",sidebar_position:5,slug:"/class"},s=void 0,p={unversionedId:"en/Class",id:"en/Class",title:"Static propertys",description:"Static attributes exist in the constructor artplayer, and the player instance is not directly associated",source:"@site/docs/en/Class.mdx",sourceDirName:"en",slug:"/class",permalink:"/document/class",draft:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"Static propertys",sidebar_position:5,slug:"/class"},sidebar:"en",previous:{title:"Advanced propertys",permalink:"/document/advance"},next:{title:"Common events",permalink:"/document/events"}},c={},u=[{value:"instances",id:"instances",level:2},{value:"version",id:"version",level:2},{value:"env",id:"env",level:2},{value:"utils",id:"utils",level:2},{value:"config",id:"config",level:2},{value:"scheme",id:"scheme",level:2},{value:"validator",id:"validator",level:2},{value:"option",id:"option",level:2},{value:"html",id:"html",level:2},{value:"kindOf",id:"kindof",level:2}],d={toc:u};function m(e){var t=e.components,n=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,l.kt)("div",{parentName:"div",className:"admonition-heading"},(0,l.kt)("h5",{parentName:"div"},(0,l.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,l.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,l.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))),"Tip")),(0,l.kt)("div",{parentName:"div",className:"admonition-content"},(0,l.kt)("p",{parentName:"div"},"Static attributes exist in the constructor artplayer, and the player instance is not directly associated"))),(0,l.kt)("h2",{id:"instances"},"instances"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Type: ",(0,l.kt)("inlineCode",{parentName:"li"},"Array"))),(0,l.kt)("p",null,"A array that saves all player instances, and can manage multiple instances through this
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[904],{9278:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return m}});var r=n(9301);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},l=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),f=s(n),m=o,d=f["".concat(u,".").concat(m)]||f[m]||p[m]||i;return n?r.createElement(d,c(c({ref:t},l),{},{components:n})):r.createElement(d,c({ref:t},l))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,c=new Array(i);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var s=2;s<i;s++)c[s]=n[s];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},8866:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return u},default:function(){return m},frontMatter:function(){return a},metadata:function(){return s},toc:function(){return p}});var r=n(7145),o=n(4736),i=(n(9301),n(9278)),c=["components"],a={title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",sidebar_position:2},u=void 0,s={unversionedId:"zh-cn/Questions/Create_button_in_the_controls",id:"zh-cn/Questions/Create_button_in_the_controls",title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",description:"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae\uff0c\u5982\u5f00\u5173\u6309\u94ae\u6216\u8005\u5355\u9009\u6309\u94ae\u7b49\u7b49\uff0c\u4f60\u751a\u81f3\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u6837\u5f0f\u5e93\u5982 bootstrap",source:"@site/docs/zh-cn/Questions/Create_button_in_the_controls.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Create_button_in_the_controls",permalink:"/document/zh-cn/Questions/Create_button_in_the_controls",tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",sidebar_position:2},sidebar:"zh-cn",previous:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls"},next:{title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",permalink:"/document/zh-cn/Questions/Handle_single_component"}},l={},p=[],f={toc:p};function m(e){var t=e.components,n=(0,o.Z)(e,c);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae\uff0c\u5982\u5f00\u5173\u6309\u94ae\u6216\u8005\u5355\u9009\u6309\u94ae\u7b49\u7b49\uff0c\u4f60\u751a\u81f3\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u6837\u5f0f\u5e93\u5982 ",(0,i.kt)("inlineCode",{parentName:"p"},"bootstrap")),(0,i.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"var time = 0;\nvar art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: '<button type=\"button\">Click Me!</button>',\n click: function (_, event) {\n // \u7b2c\u4e8c\u4e2a\u53c2\u6570\u662f\u4e8b\u4ef6\u5bf9\u8c61\n time += 1;\n event.target.innerText = 'You Click ' + time;\n },\n },\n ],\n});\n")))}m.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":"link","label":"Ads Plugin","href":"/document/en/Plugins/ads","docId":"en/Plugins/ads"}]},{"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 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":"link","label":"\u5e7f\u544a\u63d2\u4ef6","href":"/document/zh-cn/Plugins/ads","docId":"zh-cn/Plugins/ads"}]},{"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":"\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 constructor artplayer, and the player instance is not directly associated","sidebar":"en"},"en/Events":{"id":"en/EventLine 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 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[811],{9278:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return k}});var a=n(9301);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"},4498: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(7145),l=n(4736),r=(n(9301),n(9278)),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.md",sourceDirName:"en",slug:"/options",permalink:"/document/options",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.components,n=(0,l.ZLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[146],{3905:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return m}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},l=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),f=s(n),m=o,d=f["".concat(u,".").concat(m)]||f[m]||p[m]||i;return n?r.createElement(d,c(c({ref:t},l),{},{components:n})):r.createElement(d,c({ref:t},l))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,c=new Array(i);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var s=2;s<i;s++)c[s]=n[s];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},998:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return u},default:function(){return m},frontMatter:function(){return a},metadata:function(){return s},toc:function(){return p}});var r=n(7462),o=n(3366),i=(n(7294),n(3905)),c=["components"],a={title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",sidebar_position:2},u=void 0,s={unversionedId:"zh-cn/Questions/Create_button_in_the_controls",id:"zh-cn/Questions/Create_button_in_the_controls",title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",description:"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae\uff0c\u5982\u5f00\u5173\u6309\u94ae\u6216\u8005\u5355\u9009\u6309\u94ae\u7b49\u7b49\uff0c\u4f60\u751a\u81f3\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u6837\u5f0f\u5e93\u5982 bootstrap",source:"@site/docs/zh-cn/Questions/Create_button_in_the_controls.mdx",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Create_button_in_the_controls",permalink:"/document/zh-cn/Questions/Create_button_in_the_controls",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae",sidebar_position:2},sidebar:"zh-cn",previous:{title:"\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u5217\u8868",permalink:"/document/zh-cn/Questions/Create_selector_in_the_controls"},next:{title:"\u5904\u7406\u5355\u4e2a\u7ec4\u4ef6",permalink:"/document/zh-cn/Questions/Handle_single_component"}},l={},p=[],f={toc:p};function m(e){var t=e.components,n=(0,o.Z)(e,c);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"\u6709\u65f6\u4f60\u9700\u8981\u5728\u63a7\u5236\u680f\u6dfb\u52a0\u6309\u94ae\uff0c\u5982\u5f00\u5173\u6309\u94ae\u6216\u8005\u5355\u9009\u6309\u94ae\u7b49\u7b49\uff0c\u4f60\u751a\u81f3\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u6837\u5f0f\u5e93\u5982 ",(0,i.kt)("inlineCode",{parentName:"p"},"bootstrap")),(0,i.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"var time = 0;\nvar art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: '<button type=\"button\">Click Me!</button>',\n click: function (_, event) {\n // \u7b2c\u4e8c\u4e2a\u53c2\u6570\u662f\u4e8b\u4ef6\u5bf9\u8c61\n time += 1;\n event.target.innerText = 'You Click ' + time;\n },\n },\n ],\n});\n")))}m.isMDXComponent=!0}}]);
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[182],{9278:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={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,r=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=p(n),m=r,k=d["".concat(s,".").concat(m)]||d[m]||u[m]||l;return n?a.createElement(k,i(i({ref:t},c),{},{components:n})):a.createElement(k,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var p=2;p<l;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},3222:function(e,t,n){n.r(t),n.d(t,{assets:function(){return c},contentTitle:function(){return s},default:function(){return m},frontMatter:function(){return o},metadata:function(){return p},toc:function(){return u}});var a=n(7145),r=n(4736),l=(n(9301),n(9278)),i=["components"],o={title:"Static propertys",sidebar_position:5,slug:"/class"},s=void 0,p={unversionedId:"en/Class",id:"en/Class",title:"Static propertys",description:"Static attributes exist in the constructor artplayer, and the player instance is not directly associated",source:"@site/docs/en/Class.md",sourceDirName:"en",slug:"/class",permalink:"/document/class",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"Static propertys",sidebar_position:5,slug:"/class"},sidebar:"en",previous:{title:"Advanced propertys",permalink:"/document/advance"},next:{title:"Common events",permalink:"/document/events"}},c={},u=[{value:"instances",id:"instances",level:2},{value:"version",id:"version",level:2},{value:"env",id:"env",level:2},{value:"utils",id:"utils",level:2},{value:"config",id:"config",level:2},{value:"scheme",id:"scheme",level:2},{value:"validator",id:"validator",level:2},{value:"option",id:"option",level:2},{value:"html",id:"html",level:2},{value:"kindOf",id:"kindof",level:2}],d={toc:u};function m(e){var t=e.components,n=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,l.kt)("div",{parentName:"div",className:"admonition-heading"},(0,l.kt)("h5",{parentName:"div"},(0,l.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,l.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,l.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))),"Tip")),(0,l.kt)("div",{parentName:"div",className:"admonition-content"},(0,l.kt)("p",{parentName:"div"},"Static attributes exist in the constructor artplayer, and the player instance is not directly associated"))),(0,l.kt)("h2",{id:"instances"},"instances"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Type: ",(0,l.kt)("inlineCode",{parentName:"li"},"Array"))),(0,l.kt)("p",null,"A array that saves all player instances, and can manage multiple instances through this property wLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[178],{3769:function(e){e.exports=JSON.parse('{"plugin":{"name":"docusaurus-plugin-content-docs","id":"default"}}')}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[87],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(n),m=a,h=d["".concat(i,".").concat(m)]||d[m]||p[m]||l;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u<l;u++)o[u]=n[u];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},9713:function(e,t,n){n.r(t),n.d(t,{assets:function(){return c},contentTitle:function(){return i},default:function(){return m},frontMatter:function(){return s},metadata:function(){return u},toc:function(){return p}});var r=n(7462),a=n(3366),l=(n(7294),n(3905)),o=["components"],s={title:"\u7b2c\u4e09\u65b9\u5e93",sidebar_position:7,slug:"/zh-cn/libraries"},i=void 0,u={unversionedId:"zh-cn/Libraries",id:"zh-cn/Libraries",title:"\u7b2c\u4e09\u65b9\u5e93",description:"flv.js",source:"@site/docs/zh-cn/Libraries.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/libraries",permalink:"/document/zh-cn/libraries",draft:!1,tags:[],version:"current",sidebarPosition:7,frontMatter:{title:"\u7b2c\u4e09\u65b9\u5e93",sidebar_position:7,slug:"/zh-cn/libraries"},sidebar:"zh-cn",previous:{title:"\u5b9e\u4f8b\u4e8b\u4ef6",permalink:"/document/zh-cn/events"},next:{title:"\u5f39\u5e55\u5e93\u63d2\u4ef6",permalink:"/document/zh-cn/Plugins/danmuku"}},c={},p=[{value:"flv.js",id:"flvjs",level:2},{value:"hls.js",id:"hlsjs",level:2},{value:"dash.js",id:"dashjs",level:2},{value:"shaka-player",id:"shaka-player",level:2},{value:"webtorrent",id:"webtorrent",level:2}],d={toc:p};function m(e){var t=e.components,n=(0,a.Z)(e,o);return(0,l.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"flvjs"},"flv.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e3b\u9875: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/Bilibili/flv.js"},"https://github.com/Bilibili/flv.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://unpkg.com/flv.js@1.6.2/dist/flv.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: '/assets/sample/video.flv',\n customType: {\n flv: function (video, url) {\n if (flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: url,\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n } else {\n art.notice.show = '\u4e0d\u652f\u6301\u64ad\u653e\u683c\u5f0f\uff1aflv';\n }\n },\n },\n});\n")),(0,l.kt)("h2",{id:"hlsjs"},"hls.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e3b\u9875: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/video-dev/hls.js"},"https://github.com/video-dev/hls.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://cdnjs.cloudflare.com/ajax/libs/hls.js/8.0.0-beta.3/hls.min.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[235],{3905:function(e,n,t){t.d(n,{Zo:function(){return s},kt:function(){return m}});var l=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 r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,l,a=function(e,n){if(null==e)return{};var t,l,a={},r=Object.keys(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=l.createContext({}),u=function(e){var n=l.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=u(e.components);return l.createElement(c.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return l.createElement(l.Fragment,{},n)}},d=l.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),d=u(t),m=a,k=d["".concat(c,".").concat(m)]||d[m]||p[m]||r;return t?l.createElement(k,i(i({ref:n},s),{},{components:t})):l.createElement(k,i({ref:n},s))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=d;var o={};for(var c in n)hasOwnProperty.call(n,c)&&(o[c]=n[c]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var u=2;u<r;u++)i[u]=t[u];return l.createElement.apply(null,i)}return l.createElement.apply(null,t)}d.displayName="MDXCreateElement"},287:function(e,n,t){t.r(n),t.d(n,{assets:function(){return s},contentTitle:function(){return c},default:function(){return m},frontMatter:function(){return o},metadata:function(){return u},toc:function(){return p}});var l=t(7462),a=t(3366),r=(t(7294),t(3905)),i=["components"],o={title:"\u9759\u6001\u5c5e\u6027",sidebar_position:5,slug:"/zh-cn/class"},c=void 0,u={unversionedId:"zh-cn/Class",id:"zh-cn/Class",title:"\u9759\u6001\u5c5e\u6027",description:"\u9759\u6001\u5c5e\u6027\u5b58\u5728\u4e8e\u6784\u9020\u51fd\u6570 Artplayer \u4e0a\uff0c\u548c\u64ad\u653e\u5668\u5b9e\u4f8b\u6ca1\u6709\u76f4\u63a5\u5173\u8054",source:"@site/docs/zh-cn/Class.mdx",sourceDirName:"zh-cn",slug:"/zh-cn/class",permalink:"/document/zh-cn/class",draft:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"\u9759\u6001\u5c5e\u6027",sidebar_position:5,slug:"/zh-cn/class"},sidebar:"zh-cn",previous:{title:"\u9ad8\u7ea7\u5c5e\u6027",permalink:"/document/zh-cn/advance"},next:{title:"\u5b9e\u4f8b\u4e8b\u4ef6",permalink:"/document/zh-cn/events"}},s={},p=[{value:"instances",id:"instances",level:2},{value:"version",id:"version",level:2},{value:"env",id:"env",level:2},{value:"utils",id:"utils",level:2},{value:"config",id:"config",level:2},{value:"scheme",id:"scheme",level:2},{value:"validator",id:"validator",level:2},{value:"option",id:"option",level:2},{value:"html",id:"html",level:2},{value:"kindOf",id:"kindof",level:2}],d={toc:p};function m(e){var n=e.components,t=(0,a.Z)(e,i);return(0,r.kt)("wrapper",(0,l.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,r.kt)("div",{parentName:"div",className:"admonition-heading"},(0,r.kt)("h5",{parentName:"div"},(0,r.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,r.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,r.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))),"\u63d0\u793a")),(0,r.kt)("div",{parentName:"div",className:"admonition-content"},(0,r.kt)("p",{parentName:"div"},"\u9759\u6001\u5c5e\u6027\u5b58\u5728\u4e8e\u6784\u9020\u51fd\u6570 ",(0,r.kt)("inlineCode",{parentName:"p"},"Artplayer")," \u4e0a\uff0c\u548c\u64ad\u653e\u5668\u5b9e\u4f8b\u6ca1\u6709\u76f4\u63a5\u5173\u8054"))),(0Line truncated
|
||||
@@ -0,0 +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
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[696],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},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 o(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 p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=d(n),k=l,c=m["".concat(p,".").concat(k)]||m[k]||s[k]||r;return n?a.createElement(c,i(i({ref:t},u),{},{components:n})):a.createElement(c,i({ref:t},u))}));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]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:l,i[1]=o;for(var d=2;d<r;d++)i[d]=n[d];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},8761:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return p},default:function(){return k},frontMatter:function(){return o},metadata:function(){return d},toc:function(){return s}});var a=n(7462),l=n(3366),r=(n(7294),n(3905)),i=["components"],o={title:"Advanced propertys",sidebar_position:4,slug:"/advance"},p=void 0,d={unversionedId:"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.",source:"@site/docs/en/Advance.mdx",sourceDirName:"en",slug:"/advance",permalink:"/document/advance",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"Advanced propertys",sidebar_position:4,slug:"/advance"},sidebar:"en",previous:{title:"Common properties",permalink:"/document/propertie"},next:{title:"Static propertys",permalink:"/document/class"}},u={},s=[{value:"id",id:"id",level:2},{value:"option",id:"option",level:2},{value:"isFocus",id:"isfocus",level:2},{value:"isInput",id:"isinput",level:2},{value:"isLock",id:"islock",level:2},{value:"isDestroy",id:"isdestroy",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"template",id:"template",level:2},{value:"query",id:"query",level:3},{value:"query",id:"query-1",level:2},{value:"events",id:"events",level:2},{value:"proxy",id:"proxy",level:2},{value:"storage",id:"storage",level:2},{value:"icons",id:"icons",level:2},{value:"i18n",id:"i18n",level:2},{value:"get",id:"get",level:3},{value:"update",id:"update",level:3},{value:"player",id:"player",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"show",id:"show",level:3},{value:"style",id:"style",level:3},{value:"url",id:"url",level:3},{value:"switch",id:"switch",level:3},{value:"info",id:"info",level:2},{value:"layers",id:"layers",level:2},{value:"show",id:"show-1",level:3},{value:"add",id:"add",level:3},{value:"notice",id:"notice",level:2},{value:"show",id:"show-2",level:3},{value:"controls",id:"controls",level:2},{value:"show",id:"show-3",level:3},{value:"add",id:"add-1",level:3},{value:"contextmenu",id:"contextmenu",level:2},{value:"show",id:"show-4",level:3},{value:"add",id:"add-2",level:3},{value:"loading",id:"loading",level:2},{value:"show",id:"show-5",level:3},{value:"mask",id:"mask",level:2},{value:"show",id:"show-6",level:3},{value:"hotkey",id:"hotkey",level:2},{value:"add",id:"add-3",level:3},{value:"setting",id:"setting",level:2},{value:"show",id:"show-7",level:3},{value:"plugins",id:"plugins",level:2},{value:"add",id:"add-4",level:3}],m={toc:s};function k(e){var t=e.components,n=(0,l.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("div",{className:"admonLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[894],{3769:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[122],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),p=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(o.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,y=m["".concat(o,".").concat(d)]||m[d]||c[d]||l;return n?r.createElement(y,s(s({ref:t},u),{},{components:n})):r.createElement(y,s({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,s=new Array(l);s[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,s[1]=i;for(var p=2;p<l;p++)s[p]=n[p];return r.createElement.apply(null,s)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},2360:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(7294),a=n(6010),l="tabItem_OmH5";function s(e){var t=e.children,n=e.hidden,s=e.className;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l,s),hidden:n},t)}},9877:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(7462),a=n(7294),l=n(2389),s=n(7392),i=n(7094),o=n(2466),p=n(6010),u="tabList_uSqn",c="tabItem_LplD";function m(e){var t,n,l,m=e.lazy,d=e.block,y=e.defaultValue,v=e.values,f=e.groupId,h=e.className,b=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&void 0!==e.props.value)return e;throw new Error("Docusaurus error: Bad <Tabs> child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.')})),g=null!=v?v:b.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),k=(0,s.l)(g,(function(e,t){return e.value===t.value}));if(k.length>0)throw new Error('Docusaurus error: Duplicate values "'+k.map((function(e){return e.value})).join(", ")+'" found in <Tabs>. Every value needs to be unique.');var N=null===y?y:null!=(t=null!=y?y:null==(n=b.find((function(e){return e.props.default})))?void 0:n.props.value)?t:null==(l=b[0])?void 0:l.props.value;if(null!==N&&!g.some((function(e){return e.value===N})))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+N+'" but none of its children has the corresponding value. Available values are: '+g.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var x=(0,i.U)(),j=x.tabGroupChoices,w=x.setTabGroupChoices,T=(0,a.useState)(N),A=T[0],O=T[1],I=[],Z=(0,o.o5)().blockElementScrollPositionUntilNextRender;if(null!=f){var E=j[f];null!=E&&E!==A&&g.some((function(e){return e.value===E}))&&O(E)}var P=function(e){var t=e.currentTarget,n=I.indexOf(t),r=g[n].value;r!==A&&(Z(t),O(r),null!=f&&w(f,r))},L=function(e){var t,n=null;switch(e.key){case"ArrowRight":var r=I.indexOf(e.currentTarget)+1;n=I[r]||I[0];break;case"ArrowLeft":var a=I.indexOf(e.currentTarget)-1;n=I[a]||I[I.length-1]}null==(t=n)||t.focus()};return a.createElement("div",{className:(0,p.Z)("tabs-container",u)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,p.Z)("tabs",{"tabs--block":d},h)},g.map((function(e){var t=e.value,n=e.label,l=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:A===t?0:-1,"aria-selected":A===t,key:t,ref:function(e){return I.push(e)},onKeyDown:L,onFocus:P,onClick:P},l,{className:(0,p.Z)("tabs__item",c,null==l?void 0:l.className,{"tabs__item--active":A===t})}),null!=n?n:t)}))),m?(0,a.cloneElement)(b.filter((function(e){Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[748],{9278:function(n,e,t){t.d(e,{Zo:function(){return p},kt:function(){return c}});var a=t(9301);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({}),s=function(n){var e=a.useContext(o),t=e;return n&&(t="function"==typeof n?n(e):i(i({},e),n)),t},p=function(n){var e=s(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,p=u(n,["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:e},p),{},{components:t})):a.createElement(k,i({ref:e},p))}));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 s=2;s<l;s++)i[s]=t[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}d.displayName="MDXCreateElement"},5624:function(n,e,t){t.r(e),t.d(e,{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(7145),r=t(4736),l=(t(9301),t(9278)),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.md",sourceDirName:"en/Plugins",slug:"/en/Plugins/danmuku",permalink:"/document/en/Plugins/danmuku",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(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:"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-html"},'<sLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[96],{9278:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return s}});var a=n(9301);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({}),d=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(o.Provider,{value:t},e.children)},m={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,u=p(e,["components","mdxType","originalType","parentName"]),k=d(n),s=l,N=k["".concat(o,".").concat(s)]||k[s]||m[s]||r;return n?a.createElement(N,i(i({ref:t},u),{},{components:n})):a.createElement(N,i({ref:t},u))}));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 d=2;d<r;d++)i[d]=n[d];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},8083:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return o},default:function(){return s},frontMatter:function(){return p},metadata:function(){return d},toc:function(){return m}});var a=n(7145),l=n(4736),r=(n(9301),n(9278)),i=["components"],p={title:"\u9ad8\u7ea7\u5c5e\u6027",sidebar_position:4,slug:"/zh-cn/advance"},o=void 0,d={unversionedId:"zh-cn/Advance",id:"zh-cn/Advance",title:"\u9ad8\u7ea7\u5c5e\u6027",description:"\u8fd9\u9875\u9762\u662f\u5bf9\u5e38\u7528\u5c5e\u6027\u7684\u4e00\u4e9b\u989d\u5916\u8865\u5145\uff0c\u9700\u8981\u6df1\u5165\u5f00\u53d1\u81ea\u5b9a\u4e49\u529f\u80fd\u65f6\u624d\u9700\u8981\u9605\u8bfb",source:"@site/docs/zh-cn/Advance.md",sourceDirName:"zh-cn",slug:"/zh-cn/advance",permalink:"/document/zh-cn/advance",tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"\u9ad8\u7ea7\u5c5e\u6027",sidebar_position:4,slug:"/zh-cn/advance"},sidebar:"zh-cn",previous:{title:"\u5e38\u7528\u5c5e\u6027",permalink:"/document/zh-cn/propertie"},next:{title:"\u9759\u6001\u5c5e\u6027",permalink:"/document/zh-cn/class"}},u={},m=[{value:"id",id:"id",level:2},{value:"option",id:"option",level:2},{value:"isFocus",id:"isfocus",level:2},{value:"isDestroy",id:"isdestroy",level:2},{value:"whitelist",id:"whitelist",level:2},{value:"template",id:"template",level:2},{value:"query",id:"query",level:3},{value:"query",id:"query-1",level:2},{value:"events",id:"events",level:2},{value:"proxy",id:"proxy",level:2},{value:"storage",id:"storage",level:2},{value:"icons",id:"icons",level:2},{value:"i18n",id:"i18n",level:2},{value:"get",id:"get",level:3},{value:"update",id:"update",level:3},{value:"player",id:"player",level:2},{value:"subtitle",id:"subtitle",level:2},{value:"show",id:"show",level:3},{value:"style",id:"style",level:3},{value:"url",id:"url",level:3},{value:"switch",id:"switch",level:3},{value:"info",id:"info",level:2},{value:"layers",id:"layers",level:2},{value:"show",id:"show-1",level:3},{value:"add",id:"add",level:3},{value:"notice",id:"notice",level:2},{value:"show",id:"show-2",level:3},{value:"controls",id:"controls",level:2},{value:"show",id:"show-3",level:3},{value:"add",id:"add-1",level:3},{value:"contextmenu",id:"contextmenu",level:2},{value:"show",id:"show-4",level:3},{value:"add",id:"add-2",level:3},{value:"loading",id:"loading",level:2},{value:"show",id:"show-5",level:3},{value:"mask",id:"mask",level:2},{value:"show",id:"show-6",level:3},{value:"hotkey",id:"hotkey",level:2},{value:"add",id:"add-3",level:3},{value:"setting",id:"setting",level:2},{value:"show",id:"show-7",level:3},{value:"plugins",id:"plugins",level:2},{value:"add",id:"add-4",level:3}],k={toc:m};function s(e){var t=e.components,n=(0,l.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({}Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[206],{9278:function(t,e,n){n.d(e,{Zo:function(){return m},kt:function(){return c}});var r=n(9301);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e){if(null==t)return{};var n,r,a=function(t,e){if(null==t)return{};var n,r,a={},l=Object.keys(t);for(r=0;r<l.length;r++)n=l[r],e.indexOf(n)>=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)n=l[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var p=r.createContext({}),u=function(t){var e=r.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):i(i({},e),t)),n},m=function(t){var e=u(t.components);return r.createElement(p.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},s=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,l=t.originalType,p=t.parentName,m=o(t,["components","mdxType","originalType","parentName"]),s=u(n),c=a,k=s["".concat(p,".").concat(c)]||s[c]||d[c]||l;return n?r.createElement(k,i(i({ref:e},m),{},{components:n})):r.createElement(k,i({ref:e},m))}));function c(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var l=n.length,i=new Array(l);i[0]=s;var o={};for(var p in e)hasOwnProperty.call(e,p)&&(o[p]=e[p]);o.originalType=t,o.mdxType="string"==typeof t?t:a,i[1]=o;for(var u=2;u<l;u++)i[u]=n[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}s.displayName="MDXCreateElement"},3785:function(t,e,n){n.r(e),n.d(e,{assets:function(){return m},contentTitle:function(){return p},default:function(){return c},frontMatter:function(){return o},metadata:function(){return u},toc:function(){return d}});var r=n(7145),a=n(4736),l=(n(9301),n(9278)),i=["components"],o={title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",sidebar_position:6},p=void 0,u={unversionedId:"zh-cn/Questions/How_to_add_setting_panel",id:"zh-cn/Questions/How_to_add_setting_panel",title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",description:"\u8bbe\u7f6e\u9762\u677f\u7c7b\u4f3c\u4e8e\u5217\u8868\u9009\u62e9\u7684\u96c6\u5408\uff0c\u800c\u4e14\u652f\u6301\u591a\u5c42\u5d4c\u5957",source:"@site/docs/zh-cn/Questions/How_to_add_setting_panel.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/How_to_add_setting_panel",permalink:"/document/zh-cn/Questions/How_to_add_setting_panel",tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",sidebar_position:6},sidebar:"zh-cn",previous:{title:"\u5982\u4f55\u6dfb\u52a0\u89c6\u9891\u5e7f\u544a",permalink:"/document/zh-cn/Questions/How_to_add_video_ads"},next:{title:"\u4e0e React Portal \u4f7f\u7528",permalink:"/document/zh-cn/Questions/Use_with_react_portal"}},m={},d=[],s={toc:d};function c(t){var e=t.components,n=(0,a.Z)(t,i);return(0,l.kt)("wrapper",(0,r.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u8bbe\u7f6e\u9762\u677f\u7c7b\u4f3c\u4e8e\u5217\u8868\u9009\u62e9\u7684\u96c6\u5408\uff0c\u800c\u4e14\u652f\u6301\u591a\u5c42\u5d4c\u5957"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u5c5e\u6027"),(0,l.kt)("th",{parentName:"tr",align:null},"\u7c7b\u578b"),(0,l.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"html")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"\u5143\u7d20\u7684 DOM \u5143\u7d20")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"icon")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"\u5143\u7d20\u7684\u56fe\u6807")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"selector")),Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[757],{9278:function(e,t,r){r.d(t,{Zo:function(){return p},kt:function(){return m}});var n=r(9301);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),u=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=u(r),m=a,f=d["".concat(i,".").concat(m)]||d[m]||c[m]||l;return r?n.createElement(f,o(o({ref:t},p),{},{components:r})):n.createElement(f,o({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,o=new Array(l);o[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u<l;u++)o[u]=r[u];return n.createElement.apply(null,o)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},4312:function(e,t,r){r.r(t),r.d(t,{assets:function(){return p},contentTitle:function(){return i},default:function(){return m},frontMatter:function(){return s},metadata:function(){return u},toc:function(){return c}});var n=r(7145),a=r(4736),l=(r(9301),r(9278)),o=["components"],s={title:"Third party librarys",sidebar_position:7,slug:"/libraries"},i=void 0,u={unversionedId:"en/Libraries",id:"en/Libraries",title:"Third party librarys",description:"flv.js",source:"@site/docs/en/Libraries.md",sourceDirName:"en",slug:"/libraries",permalink:"/document/libraries",tags:[],version:"current",sidebarPosition:7,frontMatter:{title:"Third party librarys",sidebar_position:7,slug:"/libraries"},sidebar:"en",previous:{title:"Common events",permalink:"/document/events"},next:{title:"Danmuku plugin",permalink:"/document/en/Plugins/danmuku"}},p={},c=[{value:"flv.js",id:"flvjs",level:2},{value:"hls.js",id:"hlsjs",level:2},{value:"dash.js",id:"dashjs",level:2},{value:"shaka-player",id:"shaka-player",level:2},{value:"webtorrent",id:"webtorrent",level:2}],d={toc:c};function m(e){var t=e.components,r=(0,a.Z)(e,o);return(0,l.kt)("wrapper",(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"flvjs"},"flv.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Homepage: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/Bilibili/flv.js"},"https://github.com/Bilibili/flv.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://cdn.jsdelivr.net/npm/flv.js@1.6.2/dist/flv.min.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: '/assets/sample/video.flv',\n customType: {\n flv: function (video, url) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: url,\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n },\n },\n});\n")),(0,l.kt)("h2",{id:"hlsjs"},"hls.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Homepage: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/video-dev/hls.js"},"https://github.com/video-dev/hls.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://cdn.jsdelivr.net/npm/hls.js@1.1.1/dist/hls.min.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',\n customType: {\n m3u8: function (video, url) {\n var hls = new Hls();\n hls.loadSource(url);\n hls.attachMedia(video);Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[189],{9278:function(t,e,n){n.d(e,{Zo:function(){return d},kt:function(){return c}});var r=n(9301);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e){if(null==t)return{};var n,r,a=function(t,e){if(null==t)return{};var n,r,a={},l=Object.keys(t);for(r=0;r<l.length;r++)n=l[r],e.indexOf(n)>=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)n=l[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var p=r.createContext({}),s=function(t){var e=r.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},d=function(t){var e=s(t.components);return r.createElement(p.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},m=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,l=t.originalType,p=t.parentName,d=i(t,["components","mdxType","originalType","parentName"]),m=s(n),c=a,f=m["".concat(p,".").concat(c)]||m[c]||u[c]||l;return n?r.createElement(f,o(o({ref:e},d),{},{components:n})):r.createElement(f,o({ref:e},d))}));function c(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var p in e)hasOwnProperty.call(e,p)&&(i[p]=e[p]);i.originalType=t,i.mdxType="string"==typeof t?t:a,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},5479:function(t,e,n){n.r(e),n.d(e,{assets:function(){return d},contentTitle:function(){return p},default:function(){return c},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var r=n(7145),a=n(4736),l=(n(9301),n(9278)),o=["components"],i={title:"How to add setting panel",sidebar_position:6},p=void 0,s={unversionedId:"en/Questions/How_to_add_setting_panel",id:"en/Questions/How_to_add_setting_panel",title:"How to add setting panel",description:"Settings panels are similar to a collection of list selections, and support multi-layer nested",source:"@site/docs/en/Questions/How_to_add_setting_panel.md",sourceDirName:"en/Questions",slug:"/en/Questions/How_to_add_setting_panel",permalink:"/document/en/Questions/How_to_add_setting_panel",tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"How to add setting panel",sidebar_position:6},sidebar:"en",previous:{title:"How to add video ads",permalink:"/document/en/Questions/How_to_add_video_ads"},next:{title:"Use with React Portal",permalink:"/document/en/Questions/Use_with_react_portal"}},d={},u=[],m={toc:u};function c(t){var e=t.components,n=(0,a.Z)(t,o);return(0,l.kt)("wrapper",(0,r.Z)({},m,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Settings panels are similar to a collection of list selections, and support multi-layer nested"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Property"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"html")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"DOM elements of selector")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"icon")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"Icon of selector")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"selector")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"Array")),(0,l.kt)("td",{parentName:"tr",align:null},"Selector list")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentNamLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[881],{3905:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return d}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},l=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),f=s(n),d=o,m=f["".concat(u,".").concat(d)]||f[d]||p[d]||i;return n?r.createElement(m,a(a({ref:t},l),{},{components:n})):r.createElement(m,a({ref:t},l))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:o,a[1]=c;for(var s=2;s<i;s++)a[s]=n[s];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},7224:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return u},default:function(){return d},frontMatter:function(){return c},metadata:function(){return s},toc:function(){return p}});var r=n(7462),o=n(3366),i=(n(7294),n(3905)),a=["components"],c={title:"Add button to the controls",sidebar_position:2},u=void 0,s={unversionedId:"en/Questions/Create_button_in_the_controls",id:"en/Questions/Create_button_in_the_controls",title:"Add button to the controls",description:"\u25b6 Run Code",source:"@site/docs/en/Questions/Create_button_in_the_controls.mdx",sourceDirName:"en/Questions",slug:"/en/Questions/Create_button_in_the_controls",permalink:"/document/en/Questions/Create_button_in_the_controls",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"Add button to the controls",sidebar_position:2},sidebar:"en",previous:{title:"Add select in the controls",permalink:"/document/en/Questions/Create_selector_in_the_controls"},next:{title:"Handle a single component",permalink:"/document/en/Questions/Handle_single_component"}},l={},p=[],f={toc:p};function d(e){var t=e.components,n=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("div",{className:"run-code"},"\u25b6 Run Code"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"var time = 0;\nvar art = new Artplayer({\n container: '.artplayer-app',\n url: '/assets/sample/video.mp4',\n controls: [\n {\n position: 'right',\n html: '<button type=\"button\">Click Me!</button>',\n click: function (_, event) {\n // The second parameter is an event object\n time += 1;\n event.target.innerText = 'You Click ' + time;\n },\n },\n ],\n});\n")))}d.isMDXComponent=!0}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[740],{3905:function(t,n,e){e.d(n,{Zo:function(){return d},kt:function(){return c}});var a=e(7294);function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,a)}return e}function i(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?l(Object(e),!0).forEach((function(n){r(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function o(t,n){if(null==t)return{};var e,a,r=function(t,n){if(null==t)return{};var e,a,r={},l=Object.keys(t);for(a=0;a<l.length;a++)e=l[a],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)e=l[a],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}var m=a.createContext({}),p=function(t){var n=a.useContext(m),e=n;return t&&(e="function"==typeof t?t(n):i(i({},n),t)),e},d=function(t){var n=p(t.components);return a.createElement(m.Provider,{value:n},t.children)},u={inlineCode:"code",wrapper:function(t){var n=t.children;return a.createElement(a.Fragment,{},n)}},s=a.forwardRef((function(t,n){var e=t.components,r=t.mdxType,l=t.originalType,m=t.parentName,d=o(t,["components","mdxType","originalType","parentName"]),s=p(e),c=r,k=s["".concat(m,".").concat(c)]||s[c]||u[c]||l;return e?a.createElement(k,i(i({ref:n},d),{},{components:e})):a.createElement(k,i({ref:n},d))}));function c(t,n){var e=arguments,r=n&&n.mdxType;if("string"==typeof t||r){var l=e.length,i=new Array(l);i[0]=s;var o={};for(var m in n)hasOwnProperty.call(n,m)&&(o[m]=n[m]);o.originalType=t,o.mdxType="string"==typeof t?t:r,i[1]=o;for(var p=2;p<l;p++)i[p]=e[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,e)}s.displayName="MDXCreateElement"},4043:function(t,n,e){e.r(n),e.d(n,{assets:function(){return d},contentTitle:function(){return m},default:function(){return c},frontMatter:function(){return o},metadata:function(){return p},toc:function(){return u}});var a=e(7462),r=e(3366),l=(e(7294),e(3905)),i=["components"],o={title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",sidebar_position:6},m=void 0,p={unversionedId:"zh-cn/Questions/How_to_add_setting_panel",id:"zh-cn/Questions/How_to_add_setting_panel",title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",description:"\u6dfb\u52a0\u9009\u62e9\u5217\u8868",source:"@site/docs/zh-cn/Questions/How_to_add_setting_panel.mdx",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/How_to_add_setting_panel",permalink:"/document/zh-cn/Questions/How_to_add_setting_panel",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",sidebar_position:6},sidebar:"zh-cn",previous:{title:"\u5982\u4f55\u5bfc\u5165\u7c7b\u578b",permalink:"/document/zh-cn/Questions/How_to_import_types"},next:{title:"\u4e0e React Portal \u4f7f\u7528",permalink:"/document/zh-cn/Questions/Use_with_react_portal"}},d={},u=[{value:"\u6dfb\u52a0\u9009\u62e9\u5217\u8868",id:"\u6dfb\u52a0\u9009\u62e9\u5217\u8868",level:2},{value:"\u6dfb\u52a0\u5207\u6362\u6309\u94ae",id:"\u6dfb\u52a0\u5207\u6362\u6309\u94ae",level:2},{value:"\u6dfb\u52a0\u8303\u56f4\u6ed1\u52a8",id:"\u6dfb\u52a0\u8303\u56f4\u6ed1\u52a8",level:2}],s={toc:u};function c(t){var n=t.components,e=(0,r.Z)(t,i);return(0,l.kt)("wrapper",(0,a.Z)({},s,e,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"\u6dfb\u52a0\u9009\u62e9\u5217\u8868"},"\u6dfb\u52a0\u9009\u62e9\u5217\u8868"),(0,l.kt)("p",null,"\u8bbe\u7f6e\u9762\u677f\u7c7b\u4f3c\u4e8e\u5217\u8868\u9009\u62e9\u7684\u96c6\u5408\uff0c\u800c\u4e14\u652f\u6301\u591a\u5c42\u5d4c\u5957"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u5c5e\u6027"),(0,l.kt)("th",{parentName:"tr",align:null},"\u7c7b\u578b"),(0,l.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"html")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"String"),"\u3001",(0,l.kt)("inlineCode",{parentName:"td"},"Element")),(0,l.kt)("td",{parentName:"tr",align:null},"\u5143\u7d20\u7684 DOM \u5143\u7d20")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"icon")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"tdLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[591],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return m}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=u(n),m=a,f=d["".concat(i,".").concat(m)]||d[m]||c[m]||l;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u<l;u++)o[u]=n[u];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},6165:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return i},default:function(){return m},frontMatter:function(){return s},metadata:function(){return u},toc:function(){return c}});var r=n(7462),a=n(3366),l=(n(7294),n(3905)),o=["components"],s={title:"Third party librarys",sidebar_position:7,slug:"/libraries"},i=void 0,u={unversionedId:"en/Libraries",id:"en/Libraries",title:"Third party librarys",description:"flv.js",source:"@site/docs/en/Libraries.mdx",sourceDirName:"en",slug:"/libraries",permalink:"/document/libraries",draft:!1,tags:[],version:"current",sidebarPosition:7,frontMatter:{title:"Third party librarys",sidebar_position:7,slug:"/libraries"},sidebar:"en",previous:{title:"Common events",permalink:"/document/events"},next:{title:"Danmuku plugin",permalink:"/document/en/Plugins/danmuku"}},p={},c=[{value:"flv.js",id:"flvjs",level:2},{value:"hls.js",id:"hlsjs",level:2},{value:"dash.js",id:"dashjs",level:2},{value:"shaka-player",id:"shaka-player",level:2},{value:"webtorrent",id:"webtorrent",level:2}],d={toc:c};function m(e){var t=e.components,n=(0,a.Z)(e,o);return(0,l.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"flvjs"},"flv.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Homepage: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/Bilibili/flv.js"},"https://github.com/Bilibili/flv.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://unpkg.com/flv.js@1.6.2/dist/flv.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: '/assets/sample/video.flv',\n customType: {\n flv: function (video, url) {\n if (flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: url,\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n } else {\n art.notice.show = 'Does not support playback of flv';\n }\n },\n },\n});\n")),(0,l.kt)("h2",{id:"hlsjs"},"hls.js"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Homepage: ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/video-dev/hls.js"},"https://github.com/video-dev/hls.js"))),(0,l.kt)("div",{className:"run-code","data-libs":"https://cdnjs.cloudflare.com/ajax/libs/hls.js/8.0.0-beta.3/hls.min.js"},"\u25b6 Run Code"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"var art = new Artplayer({\n container: '.artplayer-app',\n autoplay: true,\n url: 'https://test-streams.mux.dev/x36xhz
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[721],{9278:function(e,n,t){t.d(n,{Zo:function(){return s},kt:function(){return m}});var l=t(9301);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 r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,l,a=function(e,n){if(null==e)return{};var t,l,a={},r=Object.keys(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=l.createContext({}),u=function(e){var n=l.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=u(e.components);return l.createElement(c.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return l.createElement(l.Fragment,{},n)}},d=l.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),d=u(t),m=a,k=d["".concat(c,".").concat(m)]||d[m]||p[m]||r;return t?l.createElement(k,i(i({ref:n},s),{},{components:t})):l.createElement(k,i({ref:n},s))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=d;var o={};for(var c in n)hasOwnProperty.call(n,c)&&(o[c]=n[c]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var u=2;u<r;u++)i[u]=t[u];return l.createElement.apply(null,i)}return l.createElement.apply(null,t)}d.displayName="MDXCreateElement"},8022:function(e,n,t){t.r(n),t.d(n,{assets:function(){return s},contentTitle:function(){return c},default:function(){return m},frontMatter:function(){return o},metadata:function(){return u},toc:function(){return p}});var l=t(7145),a=t(4736),r=(t(9301),t(9278)),i=["components"],o={title:"\u9759\u6001\u5c5e\u6027",sidebar_position:5,slug:"/zh-cn/class"},c=void 0,u={unversionedId:"zh-cn/Class",id:"zh-cn/Class",title:"\u9759\u6001\u5c5e\u6027",description:"\u9759\u6001\u5c5e\u6027\u5b58\u5728\u4e8e\u6784\u9020\u51fd\u6570 Artplayer \u4e0a\uff0c\u548c\u64ad\u653e\u5668\u5b9e\u4f8b\u6ca1\u6709\u76f4\u63a5\u5173\u8054",source:"@site/docs/zh-cn/Class.md",sourceDirName:"zh-cn",slug:"/zh-cn/class",permalink:"/document/zh-cn/class",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"\u9759\u6001\u5c5e\u6027",sidebar_position:5,slug:"/zh-cn/class"},sidebar:"zh-cn",previous:{title:"\u9ad8\u7ea7\u5c5e\u6027",permalink:"/document/zh-cn/advance"},next:{title:"\u5b9e\u4f8b\u4e8b\u4ef6",permalink:"/document/zh-cn/events"}},s={},p=[{value:"instances",id:"instances",level:2},{value:"version",id:"version",level:2},{value:"env",id:"env",level:2},{value:"utils",id:"utils",level:2},{value:"config",id:"config",level:2},{value:"scheme",id:"scheme",level:2},{value:"validator",id:"validator",level:2},{value:"option",id:"option",level:2},{value:"html",id:"html",level:2},{value:"kindOf",id:"kindof",level:2}],d={toc:p};function m(e){var n=e.components,t=(0,a.Z)(e,i);return(0,r.kt)("wrapper",(0,l.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,r.kt)("div",{parentName:"div",className:"admonition-heading"},(0,r.kt)("h5",{parentName:"div"},(0,r.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,r.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,r.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))),"\u63d0\u793a")),(0,r.kt)("div",{parentName:"div",className:"admonition-content"},(0,r.kt)("p",{parentName:"div"},"\u9759\u6001\u5c5e\u6027\u5b58\u5728\u4e8e\u6784\u9020\u51fd\u6570 ",(0,r.kt)("inlineCode",{parentName:"p"},"Artplayer")," \u4e0a\uff0c\u548c\u64ad\u653e\u5668\u5b9e\u4f8b\u6ca1\u6709\u76f4\u63a5\u5173\u8054"))),(0,r.kt)("hLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[13],{9278:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return f}});var r=n(9301);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(n),f=o,d=m["".concat(l,".").concat(f)]||m[f]||u[f]||a;return n?r.createElement(d,c(c({ref:t},p),{},{components:n})):r.createElement(d,c({ref:t},p))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,c=new Array(a);c[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:o,c[1]=i;for(var s=2;s<a;s++)c[s]=n[s];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},9893:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return l},default:function(){return f},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var r=n(7145),o=n(4736),a=(n(9301),n(9278)),c=["components"],i={title:"\u4e0e React Portal \u4f7f\u7528",sidebar_position:6},l=void 0,s={unversionedId:"zh-cn/Questions/Use_with_react_portal",id:"zh-cn/Questions/Use_with_react_portal",title:"\u4e0e React Portal \u4f7f\u7528",description:"\u5728 layers\u3001contextmenu\u3001controls \u91cc\u4f7f\u7528 react \u7ec4\u4ef6\u4e5f\u662f\u975e\u5e38\u5bb9\u6613\u7684\u4e8b\uff0c\u901a\u8fc7 createPortal \u5904\u7406\u66f4\u590d\u6742\u7684\u4e1a\u52a1\u903b\u8f91",source:"@site/docs/zh-cn/Questions/Use_with_react_portal.md",sourceDirName:"zh-cn/Questions",slug:"/zh-cn/Questions/Use_with_react_portal",permalink:"/document/zh-cn/Questions/Use_with_react_portal",tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"\u4e0e React Portal \u4f7f\u7528",sidebar_position:6},sidebar:"zh-cn",previous:{title:"\u600e\u4e48\u6dfb\u52a0\u8bbe\u7f6e\u9762\u677f",permalink:"/document/zh-cn/Questions/How_to_add_setting_panel"}},p={},u=[],m={toc:u};function f(e){var t=e.components,n=(0,o.Z)(e,c);return(0,a.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u5728 layers\u3001contextmenu\u3001controls \u91cc\u4f7f\u7528 react \u7ec4\u4ef6\u4e5f\u662f\u975e\u5e38\u5bb9\u6613\u7684\u4e8b\uff0c\u901a\u8fc7 createPortal \u5904\u7406\u66f4\u590d\u6742\u7684\u4e1a\u52a1\u903b\u8f91"),(0,a.kt)("p",null,"\ud83d\udc49 ",(0,a.kt)("a",{parentName:"p",href:"https://codesandbox.io/s/artplayer-react-portal-5z32h"},"\u70b9\u51fb\u6253\u5f00\u5728\u7ebf\u6f14\u793a")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-jsx"},'import React, { useState, useEffect } from "react";\nimport ReactDOM, { createPortal } from "react-dom";\nimport Artplayer from "artplayer/examples/react/Artplayer";\n\nfunction Timer({ time }) {\n return <div>{time}</div>;\n}\n\nfunction App() {\n const [art, setArt] = useState(null);\n const [time, setTime] = useState(0);\n\n useEffect(() => {\n const update = () => setTime((time) => time + 1);\n setInterval(update, 1000);\n }, []);\n\n return (\n <div>\n <Artplayer\n option={{\n url: "https://artplayer.org/assets/sample/video.mp4",\n layers: [\n {\n html: "",\n name: "portal"\n }\n ],\n controls: [\n {\n position: "right",\n name: "portal",\n html: ""\n }\n ]\n }}\n style={{\n width: "600px"Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[509],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});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 l(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?l(Object(t),!0).forEach((function(n){a(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 o(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),d=p(t),m=a,f=d["".concat(s,".").concat(m)]||d[m]||c[m]||l;return t?r.createElement(f,i(i({ref:n},u),{},{components:t})):r.createElement(f,i({ref:n},u))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=d;var o={};for(var s in n)hasOwnProperty.call(n,s)&&(o[s]=n[s]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p<l;p++)i[p]=t[p];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}d.displayName="MDXCreateElement"},2126:function(e,n,t){t.r(n),t.d(n,{assets:function(){return u},contentTitle:function(){return s},default:function(){return m},frontMatter:function(){return o},metadata:function(){return p},toc:function(){return c}});var r=t(7462),a=t(3366),l=(t(7294),t(3905)),i=["components"],o={title:"Ads Plugin",sidebar_position:2},s=void 0,p={unversionedId:"en/Plugins/ads",id:"en/Plugins/ads",title:"Ads Plugin",description:"Demo",source:"@site/docs/en/Plugins/ads.mdx",sourceDirName:"en/Plugins",slug:"/en/Plugins/ads",permalink:"/document/en/Plugins/ads",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"Ads Plugin",sidebar_position:2},sidebar:"en",previous:{title:"Danmuku plugin",permalink:"/document/en/Plugins/danmuku"},next:{title:"Add select in the controls",permalink:"/document/en/Questions/Create_selector_in_the_controls"}},u={},c=[{value:"Demo",id:"demo",level:2},{value:"Install",id:"install",level:2},{value:"Install from <code>npm</code>:",id:"install-from-npm",level:3},{value:"Install from <code>yarn</code>:",id:"install-from-yarn",level:3},{value:"Install from <code>script</code>:",id:"install-from-script",level:3},{value:"Use",id:"use",level:2}],d={toc:c};function m(e){var n=e.components,t=(0,a.Z)(e,i);return(0,l.kt)("wrapper",(0,r.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-ads/index.js&example=ads"},"View Demo")),(0,l.kt)("h2",{id:"install"},"Install"),(0,l.kt)("h3",{id:"install-from-npm"},"Install from ",(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-ads\n")),(0,l.kt)("h3",{id:"install-from-yarn"},"Install from ",(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-ads\n")),(0,l.kt)("h3",{id:"install-from-script"},"Install from ",(0,l.kt)("inlineCode",{parentName:"h3"},"script"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-html"},'\x3c!-- local --\x3e\n<script src="path/to/artplayer-plugin-ads.js"><\/script>\n\n\x3c!-- jsdelivr --\x3e\n<script src="https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js"><\/script>\n\n\x3c!-- unpkg --\x3e\n<script src="https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js"><\/script>\n')),(0,l.kt)("p",null,"Then you can access the plugin function through ",(0,l.kt)("inlineCode",{parentName:"p"},"window.artplayerPluginAds")),(0,l.kt)("h2",{id:"use"},"Use"),(0,l.kt)("div",{className:"run-codeLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[14],{9278:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return c}});var a=n(9301);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),s=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,v=m["".concat(d,".").concat(c)]||m[c]||u[c]||l;return n?a.createElement(v,o(o({ref:t},p),{},{components:n})):a.createElement(v,o({ref:t},p))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var d in t)hasOwnProperty.call(t,d)&&(i[d]=t[d]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},147:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return d},default:function(){return c},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var a=n(7145),r=n(4736),l=(n(9301),n(9278)),o=["components"],i={title:"Common events",sidebar_position:6,slug:"/events"},d=void 0,s={unversionedId:"en/Events",id:"en/Events",title:"Common events",description:"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:",source:"@site/docs/en/Events.mdx",sourceDirName:"en",slug:"/events",permalink:"/document/events",tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"Common events",sidebar_position:6,slug:"/events"},sidebar:"en",previous:{title:"Static propertys",permalink:"/document/class"},next:{title:"Third party librarys",permalink:"/document/libraries"}},p={},u=[{value:"Native event",id:"native-event",level:2},{value:"Custom event",id:"custom-event",level:2},{value:"ready",id:"ready",level:3},{value:"play",id:"play",level:3},{value:"pause",id:"pause",level:3},{value:"seek",id:"seek",level:3},{value:"volume",id:"volume",level:3},{value:"destroy",id:"destroy",level:3},{value:"focus",id:"focus",level:3},{value:"blur",id:"blur",level:3},{value:"hover",id:"hover",level:3},{value:"resize",id:"resize",level:3},{value:"mousemove",id:"mousemove",level:3},{value:"url",id:"url",level:3},{value:"fullscreen",id:"fullscreen",level:3},{value:"fullscreenWeb",id:"fullscreenweb",level:3},{value:"hotkey",id:"hotkey",level:3}],m={toc:u};function c(e){var t=e.components,n=(0,r.Z)(e,o);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"The event of the player is divided into two, a ",(0,l.kt)("inlineCode",{parentName:"p"},"native event")," of a video, and another is a ",(0,l.kt)("inlineCode",{parentName:"p"},"custom event"),". The ",(0,l.kt)("inlineCode",{parentName:"p"},"native event")," comes from ",(0,l.kt)("inlineCode",{parentName:"p"},"Video Elements"),", is the original event of the ",(0,l.kt)("inlineCode",{parentName:"p"},"Video Element"),", in order to distinguish it and ",(0,l.kt)("inlineCode",{parentName:"p"},"custom events"),", the native event adds a prefix ",(0,l.kt)("inlineCode",{parentName:"p"},"video:")),(0,l.kt)("h2",{id:"native-event"},"Native event"),(0,l.kt)("p",null,"For more information, please read ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#events"},"Mozilla Video Events")),(0,l.kt)("table",null,(0,l.kt)("theadLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[14],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return c}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),s=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,v=m["".concat(d,".").concat(c)]||m[c]||u[c]||l;return n?a.createElement(v,o(o({ref:t},p),{},{components:n})):a.createElement(v,o({ref:t},p))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var d in t)hasOwnProperty.call(t,d)&&(i[d]=t[d]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},7733:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return d},default:function(){return c},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var a=n(7462),r=n(3366),l=(n(7294),n(3905)),o=["components"],i={title:"Common events",sidebar_position:6,slug:"/events"},d=void 0,s={unversionedId:"en/Events",id:"en/Events",title:"Common events",description:"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:",source:"@site/docs/en/Events.mdx",sourceDirName:"en",slug:"/events",permalink:"/document/events",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{title:"Common events",sidebar_position:6,slug:"/events"},sidebar:"en",previous:{title:"Static propertys",permalink:"/document/class"},next:{title:"Third party librarys",permalink:"/document/libraries"}},p={},u=[{value:"Native event",id:"native-event",level:2},{value:"Custom event",id:"custom-event",level:2},{value:"ready",id:"ready",level:3},{value:"play",id:"play",level:3},{value:"pause",id:"pause",level:3},{value:"seek",id:"seek",level:3},{value:"volume",id:"volume",level:3},{value:"destroy",id:"destroy",level:3},{value:"focus",id:"focus",level:3},{value:"blur",id:"blur",level:3},{value:"hover",id:"hover",level:3},{value:"resize",id:"resize",level:3},{value:"mousemove",id:"mousemove",level:3},{value:"url",id:"url",level:3},{value:"fullscreen",id:"fullscreen",level:3},{value:"fullscreenWeb",id:"fullscreenweb",level:3},{value:"hotkey",id:"hotkey",level:3}],m={toc:u};function c(e){var t=e.components,n=(0,r.Z)(e,o);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"The event of the player is divided into two, a ",(0,l.kt)("inlineCode",{parentName:"p"},"native event")," of a video, and another is a ",(0,l.kt)("inlineCode",{parentName:"p"},"custom event"),". The ",(0,l.kt)("inlineCode",{parentName:"p"},"native event")," comes from ",(0,l.kt)("inlineCode",{parentName:"p"},"Video Elements"),", is the original event of the ",(0,l.kt)("inlineCode",{parentName:"p"},"Video Element"),", in order to distinguish it and ",(0,l.kt)("inlineCode",{parentName:"p"},"custom events"),", the native event adds a prefix ",(0,l.kt)("inlineCode",{parentName:"p"},"video:")),(0,l.kt)("h2",{id:"native-event"},"Native event"),(0,l.kt)("p",null,"For more information, please read ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#events"},"Mozilla Video Events")),(0,l.kt)("table",null,(0,l.Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[303],{9278:function(e,t,n){n.d(t,{Zo:function(){return d},kt:function(){return s}});var a=n(9301);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"},4711: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(7145),l=n(4736),r=(n(9301),n(9278)),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.md",sourceDirName:"zh-cn",slug:"/zh-cn/options",permalink:"/document/zh-cn/options",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",level:2},{valLine truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see main.a87b2434.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,2 +0,0 @@
|
||||
/*! For license information please see main.bbc9832a.js.LICENSE.txt */
|
||||
(self.webpackChunkartplayer_document=self.webpackChunkartplayer_document||[]).push([[179],{3169:function(e,t,n){e.exports=n(405)},435:function(e,t,n){var r={"./":2365};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=435},5426: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/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-document/src/script/main.js"],themeConfig:{hideableSidebar:!0,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:[]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage"},metadata:[],autoCollapseSidebarCategories:!1,tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},plugins:["/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-document/node_modules/_docusaurus-lunr-search@2.1.15@docusaurus-lunr-search/src/index.js"],presets:[["@docusaurus/preset-classic",{docs:{path:"./docs",routeBasePath:"/",sidebarPath:"/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-document/sidebars.js"},blog:!1,theme:{customCss:"/Users/zhaohaiwei/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}},8089:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(9301),o=n(7145);function a(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(s){return void n(s)}l.done?t(u):Promise.resolve(u).then(r,o)}var i=n(3169),l=n.n(i),u=n(7525),s=n.n(u);function c(e){var t=e.error,n=e.retry,o=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"))):o?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:"linLine truncated
|
||||
@@ -0,0 +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(d=0;d<e.length;d++){n=e[d][0],r=e[d][1],a=e[d][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(d--,1);var i=r();void 0!==i&&(t=i)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[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",509:"f94d3623",514:"1be78505",558:"41890f3a",591:"f4b604e6",601:"6edbf6fb",610:"3c6a0f85",615:"1fd37a74",619:"55c4a126",645:"571421b9",667:"701cf4af",696:"ba9533a1",740:"f1478c6c",778:"40f8650c",784:"1cbc9196",881:"e434372a",894:"bbdb8589",918:"17896441"}[e]||e)+"."+{14:"f311cd28",28:"1598cfd0",48:"acc4fc21",53:"c4f71b33",78:"e9becb25",87:"b42e72b3",122:"4c1211ba",146:"7239afe4",167:"ccddce42",201:"1846dcb6",220:"4742c5c1",228:"98216284",235:"b7afa659",245:"dd7e9f1f",250:"c0eb89ee",280:"aec979a9",283:"ec084d59",343:"e9b08a58",359:"7f4c2697",509:"468b4c0d",514:"b9120311",558:"59961a93",591:"1489f678",601:"9f8c00bc",608:"1d321a91",610:"417259b8",615:"d6a451a2",619:"943e022d",645:"bd81ea31",667:"8ef5a7aa",696:"7e3769fb",740:"d97369bf",778:"9e76cac1",784:"2dd1fd8d",878:"0f9d5667",881:"c02b87d1",894:"b738498d",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 i=document.getElementsByTagName("script"),d=0;d<i.length;d++){var b=i[d];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",f94d3623:"509","1be78505":"514","41890f3a":"558",f4b604e6:"591","6edbf6fb":"601","3c6a0f85":"610","1fd37a74":"615","55c4a126":"619","571421b9":"645","701cf4af":"667",ba9533a1:"696",f1478c6c:"740","40f8650c":"778","1cbc9196":"784",e434372a:"881",bbdb8589:"894"}[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],i=0;if(f.some((function(t){return 0Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(){"use strict";var e,t,n,r,a,f={},o={};function d(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,d),n.loaded=!0,n.exports}d.m=f,d.c=o,e=[],d.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 o=!0,c=0;c<n.length;c++)(!1&a||f>=a)&&Object.keys(d.O).every((function(e){return d.O[e](n[c])}))?n.splice(c--,1):(o=!1,a<f&&(f=a));if(o){e.splice(i--,1);var u=r();void 0!==u&&(t=u)}}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]},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},d.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);d.r(a);var f={};t=t||[null,n({}),n([]),n(n)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},d.d(a,f),a},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce((function(t,n){return d.f[n](e,t),t}),[]))},d.u=function(e){return"assets/js/"+({4:"680dfb05",13:"f6dd5ff7",14:"faf6497a",53:"935f2afb",60:"47432895",80:"37aca663",96:"cc0122d1",142:"3853da8b",176:"0a29ddce",178:"a2b05b94",182:"9e17caf1",189:"e01d4acd",206:"d216be4f",220:"5d64abea",267:"88314349",270:"246dbf43",303:"fb30adf9",366:"3719a97c",373:"255be35d",479:"0ad8f5eb",514:"1be78505",519:"d7709f93",555:"28d5cbfe",575:"7d40ea66",576:"7086e348",696:"0d39a128",721:"f68770c9",748:"c09202f4",757:"dd094eca",811:"95803a7a",904:"8dba96f0",918:"17896441",928:"385d9f37",941:"0fa62a73"}[e]||e)+"."+{4:"861b5943",13:"62a0116d",14:"7326ccc6",53:"f413d2c2",60:"0cfe839e",80:"409a21f8",96:"ee82ea94",142:"2b1ce11d",176:"39ae4328",178:"b8f7dc4f",182:"e41b8729",189:"d6d90f69",206:"08d0e284",220:"83311d43",263:"c7cafc65",267:"d0d90848",270:"ce092bf5",303:"6b198519",366:"48456c11",373:"b6fbdc5c",479:"2783714d",514:"0c21701e",519:"64af1242",555:"46854407",575:"466c6663",576:"e46e6e92",696:"ff9dd377",721:"2c2df4aa",748:"569b6298",757:"c5454b1e",759:"03b9424c",811:"9977a1a7",849:"393538d4",869:"5926a8c9",904:"5a8841e8",918:"46085774",928:"0f085779",941:"ad4188e8"}[e]+".js"},d.miniCssF=function(e){},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},a="artplayer-document:",d.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var o,c;if(void 0!==n)for(var u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var b=u[i];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")==a+n){o=b;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-webpack",a+n),o.src=e),r[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var a=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach((function(e){return e(n)})),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),c&&document.head.appendChild(o)}},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/document/",d.gca=function(e){return e={17896441:"918",47432895:"60",88314349:"267","680dfb05":"4",f6dd5ff7:"13",faf6497a:"14","935f2afb":"53","37aca663":"80",cc0122d1:"96","3853da8b":"142","0a29ddce":"176",a2b05b94:"178","9e17caf1":"182",e01d4acd:"189",d216be4f:"206","5d64abea":"220","246dbf43":"270",fb30adf9:"303","3719a97c":"366","255be35d":"373","0ad8f5eb":"479","1be78505":"514",d7709f93:"519","28d5cbfe":"555","7d40ea66":"575","7086e348":"576","0d39a128":"696",f68770c9:"721",c09202f4:"748",dd094eca:"757","95803a7a":"811","8dba96f0":"904","385d9f37":"928","0fa62a73":"941"}[e]||e,d.p+d.u(e)},function(){var e={552:0,532:0};d.f.j=function(t,n){var r=d.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^5[35]2$/.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=d.p+d.u(t),o=new Error;d.l(f,(function(n){if(d.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;o.message="Loading chunk "+t+" failed.\n("+a+": "+f+")",o.name="ChunkLoadError",o.type=a,o.request=f,r[1](o)}}),"chunk-"+t,t)}},d.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,f=n[0],o=n[1],c=n[2],u=0;if(f.some((function(t){return 0!==e[t]}))){fLine truncated
|
||||
@@ -3,15 +3,15 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="generator" content="Docusaurus v2.0.0-beta.18">
|
||||
<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.f3e31586.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.f7824698.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.bbc9832a.js" as="script">
|
||||
<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.0e268021.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a87b2434.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_h7Fx">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_nUPt themedImage--light_jK22" height="28" width="28"><img src="/document/img/logo.png" alt="Artplayer.js" class="themedImage_nUPt themedImage--dark_oeCH" height="28" width="28"></div><b class="navbar__title">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_DFv6"><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_DFv6"><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_G4Gn colorModeToggle_QI4_"><button class="clean-btn toggleButton_B3yp toggleButtonDisabled_gl26" 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_zw4B"><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_SG70"><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="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 role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><div class="docPage_oZIE"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_fZNX" type="button"></button><aside class="theme-doc-sidebar-container docSidebarContainer_qJKa"><div class="sidebar_XfmK"><nav class="menu thin-scrollbar menu_bP0b"><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-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="Line truncated
|
||||
<script src="/document/assets/js/runtime~main.f7824698.js"></script>
|
||||
<script src="/document/assets/js/main.bbc9832a.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.0e268021.js"></script>
|
||||
<script src="/document/assets/js/main.a87b2434.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-en/Plugins/ads">
|
||||
<head>
|
||||
<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">Ads 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/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="Ads 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/ads"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Plugins/ads" hreflang="en"><link data-rh="true" rel="alternate" href="https://artplayer.org/document/en/Plugins/ads" hreflang="x-default"><link rel="stylesheet" href="/document/assets/css/styles.eba261b7.css">
|
||||
<link rel="preload" href="/document/assets/js/runtime~main.0e268021.js" as="script">
|
||||
<link rel="preload" href="/document/assets/js/main.a87b2434.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.0e268021.js"></script>
|
||||
<script src="/document/assets/js/main.a87b2434.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loaded 100 of 353 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user