mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
Remove loop event and property
This commit is contained in:
1 parent
ce99b73d04
commit
3db53c425e
3 files changed
+1
-47
No files matched your search
@@ -107,23 +107,6 @@ art.on('restart', (url) => {
|
||||
});
|
||||
```
|
||||
|
||||
## `loop`
|
||||
|
||||
当出现区间循环时触发
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js{6}
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.on('loop', (start, end) => {
|
||||
console.info('loop', start, end);
|
||||
});
|
||||
```
|
||||
|
||||
## `pause`
|
||||
|
||||
当播放器暂停时触发
|
||||
|
||||
@@ -660,36 +660,6 @@ art.on('ready', () => {
|
||||
});
|
||||
```
|
||||
|
||||
## `loop`
|
||||
|
||||
- Type: `Setter/Getter`
|
||||
- Parameter: `Array`
|
||||
|
||||
设置和获取区间循序播放,单位秒
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js{8}
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
console.info(art.loop);
|
||||
art.loop = [5, 10];
|
||||
console.info(art.loop);
|
||||
});
|
||||
```
|
||||
|
||||
:::warning 提示
|
||||
|
||||
删除区间循环播放,只需要设置 `loop` 为 `[]` 即可
|
||||
|
||||
`art.loop` 与 `art.option.loop` 是两个不同的东西,请勿弄乱
|
||||
|
||||
:::
|
||||
|
||||
## `autoHeight`
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
@@ -883,6 +883,7 @@ var art = new Artplayer({
|
||||
|
||||
| 属性 | 类型 | 描述 |
|
||||
| ----------- | ---------- | ----------------------------------- |
|
||||
| `name` | `String` | 字幕名字 |
|
||||
| `url` | `String` | 字幕地址 |
|
||||
| `type` | `String` | 字幕类型,可选 `vtt`, `srt`, `ass` |
|
||||
| `style` | `Object` | 字幕样式 |
|
||||
|
||||
Reference in new issue
Block a user