mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00: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
@@ -2,14 +2,18 @@ import { def, setStyle } from '../utils';
|
||||
|
||||
export default function posterMix(art) {
|
||||
const {
|
||||
option,
|
||||
template: { $poster },
|
||||
} = art;
|
||||
|
||||
def(art, 'poster', {
|
||||
get: () => option.poster,
|
||||
get: () => {
|
||||
try {
|
||||
return $poster.style['backgroundImage'].match(/"(.*)"/)[1];
|
||||
} catch (error) {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
set(url) {
|
||||
option.poster = url;
|
||||
setStyle($poster, 'backgroundImage', `url(${url})`);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user