mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
修复弹幕自适应
This commit is contained in:
1 parent
b70c11ede6
commit
35ac59dc45
8 files changed
+44
-38
No files matched your search
@@ -19,12 +19,14 @@ export default function fullscreenRotateMix(art, player) {
|
||||
if (needSpin) {
|
||||
const scale = Math.min(bodyHeight / playerWidth, bodyWidth / playerHeight).toFixed(2);
|
||||
setStyle($player, 'transform', `rotate(90deg) scale(${scale},${scale})`);
|
||||
art.emit('resize');
|
||||
art.emit('fullscreenRotateChange', true);
|
||||
}
|
||||
} else {
|
||||
removeClass($container, 'art-fullscreen-rotate');
|
||||
player.autoSize = art.option.autoSize;
|
||||
setStyle($player, 'transform', null);
|
||||
art.emit('resize');
|
||||
art.emit('fullscreenRotateChange', false);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user