mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
Aspect ratio (#534)
* update * update * Create video2.mp4 * add art.quality * fix art.theme
This commit is contained in:
1 parent
1beff2c7fa
commit
4902322808
233 files changed
+2405
-2182
No files matched your search
@@ -920,4 +920,46 @@ art.on('ready', () => {
|
||||
art.cssVar('--art-theme', 'green');
|
||||
console.log(art.cssVar('--art-theme'));
|
||||
});
|
||||
```
|
||||
|
||||
## `quality`
|
||||
|
||||
- Type: `Setter`
|
||||
|
||||
动态设置画质列表
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js{19-29}
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
quality: [
|
||||
{
|
||||
default: true,
|
||||
html: 'SD 480P',
|
||||
url: '/assets/sample/video.mp4',
|
||||
},
|
||||
{
|
||||
html: 'HD 720P',
|
||||
url: '/assets/sample/video.mp4',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
setTimeout(() => {
|
||||
art.quality = [
|
||||
{
|
||||
default: true,
|
||||
html: '1080P',
|
||||
url: '/assets/sample/video.mp4',
|
||||
},
|
||||
{
|
||||
html: '4K',
|
||||
url: '/assets/sample/video.mp4',
|
||||
},
|
||||
];
|
||||
}, 3000);
|
||||
})
|
||||
```
|
||||
Reference in new issue
Block a user