mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 01:56:16 -08:00
修复全屏时画面比例不对问题
This commit is contained in:
1 parent
c16f2647e7
commit
4f3d5e0240
5 files changed
+9
-17
No files matched your search
@@ -1440,10 +1440,6 @@
|
||||
var ratioList = ['default', '4:3', '16:9'];
|
||||
errorHandle(ratioList.includes(ratio), "'aspectRatio' only accept ".concat(ratioList.toString(), " as parameters"));
|
||||
|
||||
if (ratio === $player.dataset.aspectRatio) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ratio === 'default') {
|
||||
player.aspectRatioRemove();
|
||||
} else {
|
||||
@@ -1710,7 +1706,7 @@
|
||||
|
||||
$player.classList.add('artplayer-fullscreen');
|
||||
screenfull.request($player);
|
||||
player.aspectRatio('default');
|
||||
player.aspectRatioReset();
|
||||
art.emit('fullscreen:enabled');
|
||||
}
|
||||
});
|
||||
@@ -1720,7 +1716,7 @@
|
||||
player.fullscreenWebExit();
|
||||
$player.classList.remove('artplayer-fullscreen');
|
||||
screenfull.exit();
|
||||
player.aspectRatio('default');
|
||||
player.aspectRatioReset();
|
||||
art.emit('fullscreen:exit');
|
||||
}
|
||||
}
|
||||
@@ -1750,7 +1746,7 @@
|
||||
}
|
||||
|
||||
$player.classList.add('artplayer-web-fullscreen');
|
||||
player.aspectRatio('default');
|
||||
player.aspectRatioReset();
|
||||
art.emit('fullscreenWeb:enabled');
|
||||
}
|
||||
});
|
||||
@@ -1759,7 +1755,7 @@
|
||||
if (player.fullscreenWebState) {
|
||||
player.fullscreenExit();
|
||||
$player.classList.remove('artplayer-web-fullscreen');
|
||||
player.aspectRatio('default');
|
||||
player.aspectRatioReset();
|
||||
art.emit('fullscreenWeb:exit');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user