remove player object

This commit is contained in:
zhw2590582 committed 2022-01-07 17:38:10 +08:00
1 parent 59a8ccce81
commit 59400eb3bf
58 files changed
+295 -313

No files matched your search

+4 -4
View File
@@ -1,9 +1,9 @@
import { setStyle, addClass, removeClass, hasClass, def } from '../utils';
export default function resizeMix(art, player) {
export default function resizeMix(art) {
const { $container, $player, $video } = art.template;
def(player, 'autoSize', {
def(art, 'autoSize', {
get() {
return hasClass($container, 'art-auto-size');
},
@@ -24,8 +24,8 @@ export default function resizeMix(art, player) {
setStyle($player, 'height', `${percentage}%`);
}
art.emit('autoSize', {
width: player.width,
height: player.height,
width: art.width,
height: art.height,
});
} else {
removeClass($container, 'art-auto-size');