mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
remove player object
This commit is contained in:
1 parent
59a8ccce81
commit
59400eb3bf
58 files changed
+295
-313
No files matched your search
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user