add art.type

This commit is contained in:
Harvey committed 2022-10-21 11:29:25 +08:00
1 parent 31a2a29871
commit f0e856093e
53 files changed
+226 -146

No files matched your search

@@ -721,6 +721,28 @@ art.on('ready', () => {
});
```
## type
- Type: `Setter/Getter`
- Parameter: `String`
Dynamic get and set video type
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('ready', () => {
console.info(art.type);
art.type = 'm3u8';
console.info(art.type);
});
```
## theme
- Type: `Setter/Getter`
@@ -721,6 +721,28 @@ art.on('ready', () => {
});
```
## type
- 类型: `Setter/Getter`
- 参数: `String`
动态获取和设置视频类型
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('ready', () => {
console.info(art.type);
art.type = 'm3u8';
console.info(art.type);
});
```
## theme
- 类型: `Setter/Getter`