格式化

This commit is contained in:
Harvey Zack committed 2018-11-21 19:45:44 +08:00
1 parent 0454f785be
commit 203ad0d3a0
75 files changed
+3120 -2904

No files matched your search

+21 -19
View File
@@ -1,26 +1,28 @@
import { debounce } from '../utils';
export default function mousemoveInitInit(art, events) {
const { refs: { $player } } = art;
const {
refs: { $player },
} = art;
const autoHide = debounce(() => {
$player.classList.add('artplayer-hide-cursor');
$player.classList.remove('artplayer-hover');
art.controls.hide();
}, 5000);
const autoHide = debounce(() => {
$player.classList.add('artplayer-hide-cursor');
$player.classList.remove('artplayer-hover');
art.controls.hide();
}, 5000);
art.on('hoverleave', () => {
if (art.isPlaying) {
autoHide();
}
});
art.on('hoverleave', () => {
if (art.isPlaying) {
autoHide();
}
});
events.proxy($player, 'mousemove', () => {
autoHide.clearTimeout();
$player.classList.remove('artplayer-hide-cursor');
art.controls.show();
if (!art.player.pipState && art.isPlaying) {
autoHide();
}
});
events.proxy($player, 'mousemove', () => {
autoHide.clearTimeout();
$player.classList.remove('artplayer-hide-cursor');
art.controls.show();
if (!art.player.pipState && art.isPlaying) {
autoHide();
}
});
}