mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
1 parent
efc9cf7362
commit
6715bc457a
16 files changed
+268
-267
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { setStyle, errorHandle, def } from '../utils';
|
||||
import { setStyle, def } from '../utils';
|
||||
|
||||
export default function aspectRatioMix(art) {
|
||||
const {
|
||||
@@ -11,11 +11,7 @@ export default function aspectRatioMix(art) {
|
||||
get() {
|
||||
return $player.dataset.aspectRatio || 'default';
|
||||
},
|
||||
set(ratio) {
|
||||
if (!ratio) ratio = 'default';
|
||||
const ratioList = ['default', '4:3', '16:9'];
|
||||
errorHandle(ratioList.includes(ratio), `'aspectRatio' only accept ${ratioList.toString()} as parameters`);
|
||||
|
||||
set(ratio = 'default') {
|
||||
if (ratio === 'default') {
|
||||
setStyle($video, 'width', null);
|
||||
setStyle($video, 'height', null);
|
||||
|
||||
Reference in new issue
Block a user