build all packages

This commit is contained in:
zhw2590582 committed 2021-11-28 16:36:42 +08:00
1 parent b909f2f498
commit 7341d53c5c
19 files changed
+178 -93

No files matched your search

@@ -69,7 +69,7 @@ console.info(Object.keys(Artplayer.utils))
- 类型: `Object`
存放了播放器的原生属性和方法
存放了视频的原生属性和方法
<div className="run-code">▶ Run Code</div>
@@ -111,7 +111,7 @@ console.info(Artplayer.option)
- 类型: `String`
播放器默认 `Html` 字符串,通常用于 `SSR` 的提前渲染,更多信息请访问 [配合SSR使用](/document/zh-cn/Questions/ssr)
播放器默认 `Html` 字符串,通常用于 `SSR` 的提前渲染
<div className="run-code">▶ Run Code</div>
@@ -33,6 +33,19 @@ slug: /zh-cn/events
| `video:volumechange` | The volume has changed. |
| `video:waiting` | Playback has stopped because of a temporary lack of data |
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('video:play', (...args) => {
console.info(args);
});
```
## 自定义事件
### ready
@@ -107,6 +120,12 @@ art.on('ready', (...args) => {
});
```
:::tip 提示
设置 `art.currentTime` 时不会触发 `seek` 事件
:::
### volume
在视频音量变化时触发
@@ -195,8 +214,10 @@ var art = new Artplayer({
url: '/assets/sample/video.mp4',
});
art.on('hover', (...args) => {
console.info(args);
art.on('hover', (state) => {
// state 为true时,鼠标从外面移进播放器
// state 为false时,鼠标从播放器移出外面
console.info(state);
});
```