mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 11:11:20 -08:00
feat: Add support for dynamic thumbnails in Artplayer
The code changes introduce a new `art.thumbnails` property that allows for dynamic setting of thumbnails in Artplayer. This feature enhances the user experience by providing a visual preview of the video content.
This commit is contained in:
1 parent
5655db4b20
commit
52d9064c8b
10 files changed
+260
-110
No files matched your search
@@ -940,4 +940,28 @@ art.on('ready', () => {
|
||||
];
|
||||
}, 3000);
|
||||
})
|
||||
```
|
||||
|
||||
## `thumbnails`
|
||||
|
||||
- Type: `Setter/Getter`
|
||||
- Parameter: `Object`
|
||||
|
||||
动态设置缩略图
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
art.thumbnails = {
|
||||
url: '/assets/sample/thumbnails.png',
|
||||
number: 60,
|
||||
column: 10,
|
||||
};
|
||||
});
|
||||
```
|
||||
Reference in new issue
Block a user