mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
16 lines
375 B
JavaScript
16 lines
375 B
JavaScript
export default function hoverInit(art, events) {
|
|
const { refs: { $player } } = art;
|
|
events.hover(
|
|
$player,
|
|
() => {
|
|
$player.classList.add('artplayer-hover');
|
|
art.emit('hoverenter');
|
|
},
|
|
() => {
|
|
$player.classList.remove('artplayer-hover');
|
|
$player.classList.remove('artplayer-hide-cursor');
|
|
art.emit('hoverleave');
|
|
}
|
|
);
|
|
}
|