mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
update docs
This commit is contained in:
1 parent
a0bc4d3a39
commit
1388df955f
16 files changed
+11133
-59
No files matched your search
@@ -5,9 +5,19 @@ export default function attrInit(art, player) {
|
||||
Object.keys(option.moreVideoAttr).forEach(key => {
|
||||
$video[key] = option.moreVideoAttr[key];
|
||||
});
|
||||
$video.volume = clamp(option.volume, 0, 1);
|
||||
$video.poster = option.poster;
|
||||
$video.autoplay = option.autoplay;
|
||||
|
||||
if (option.volume) {
|
||||
$video.volume = clamp(option.volume, 0, 1);
|
||||
}
|
||||
|
||||
if (option.poster) {
|
||||
$video.poster = option.poster;
|
||||
}
|
||||
|
||||
if (option.autoplay) {
|
||||
$video.autoplay = option.autoplay;
|
||||
}
|
||||
|
||||
sleep().then(() => {
|
||||
art.emit('beforeMountUrl', option.url);
|
||||
$video.src = player.mountUrl(option.url);
|
||||
|
||||
Reference in new issue
Block a user