mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
bugfix
This commit is contained in:
1 parent
9fd3e580bb
commit
4ce05442c7
36 files changed
+731
-683
No files matched your search
+6
-5
@@ -9,13 +9,14 @@ export default class Player {
|
||||
}
|
||||
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
const { $video } = this.art.refs;
|
||||
$video.controls = false;
|
||||
$video.poster = option.poster;
|
||||
const { option, refs: { $video } } = this.art;
|
||||
Object.keys(option.moreVideoAttr).forEach(key => {
|
||||
const value = option.moreVideoAttr[key];
|
||||
$video[key] = value;
|
||||
});
|
||||
$video.volume = clamp(option.volume, 0, 1);
|
||||
$video.poster = option.poster;
|
||||
$video.autoplay = option.autoplay;
|
||||
$video.preload = option.preload;
|
||||
$video.src = option.url;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user