mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
简化事件
This commit is contained in:
1 parent
938b90f3a7
commit
4718cd186b
36 files changed
+223
-250
No files matched your search
@@ -42,13 +42,13 @@ export default function aspectRatioMix(art, player) {
|
||||
|
||||
$player.dataset.aspectRatio = ratio;
|
||||
notice.show = `${i18n.get('Aspect ratio')}: ${ratio === 'default' ? i18n.get('Default') : ratio}`;
|
||||
art.emit('aspectRatioChange', ratio);
|
||||
art.emit('aspectRatio', ratio);
|
||||
} else if (player.aspectRatio) {
|
||||
setStyle($video, 'width', null);
|
||||
setStyle($video, 'height', null);
|
||||
setStyle($video, 'padding', null);
|
||||
delete $player.dataset.aspectRatio;
|
||||
art.emit('aspectRatioRemove');
|
||||
art.emit('aspectRatio');
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -58,7 +58,6 @@ export default function aspectRatioMix(art, player) {
|
||||
if (value && player.aspectRatio) {
|
||||
const { aspectRatio } = player;
|
||||
player.aspectRatio = aspectRatio;
|
||||
art.emit('aspectRatioReset');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user