mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-31 21:21:20 -08:00
feat: add new properties and methods to enhance player functionality and documentation
This commit is contained in:
1 parent
4681a8bc7a
commit
47085d1275
4 files changed
+149
-4
No files matched your search
@@ -335,6 +335,30 @@ art.on('ready', () => {
|
||||
});
|
||||
```
|
||||
|
||||
## `info`
|
||||
|
||||
管理播放器的信息面板,常用于查看当前播放器和视频的运行状态,例如版本号、分辨率、时长等。
|
||||
|
||||
- 通过 `art.info.show` 控制面板的显示与隐藏
|
||||
- 触发的事件名为 `info`(详见事件文档)
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
art.info.show = true;
|
||||
|
||||
setTimeout(() => {
|
||||
art.info.show = false;
|
||||
}, 3000);
|
||||
});
|
||||
```
|
||||
|
||||
## `loading`
|
||||
|
||||
管理播放器的加载层
|
||||
|
||||
Reference in new issue
Block a user