mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 19:51:20 -08:00
优化playing
This commit is contained in:
1 parent
8dfe97b905
commit
bdb050f0a7
11 files changed
+43
-36
No files matched your search
@@ -3,6 +3,7 @@ import { debounce } from '../utils';
|
||||
export default function mousemoveInitInit(art, events) {
|
||||
const {
|
||||
template: { $player, $video },
|
||||
player
|
||||
} = art;
|
||||
|
||||
const autoHide = debounce(() => {
|
||||
@@ -12,7 +13,7 @@ export default function mousemoveInitInit(art, events) {
|
||||
}, 5000);
|
||||
|
||||
art.on('hoverleave', () => {
|
||||
if (art.isPlaying) {
|
||||
if (player.playing) {
|
||||
autoHide();
|
||||
}
|
||||
});
|
||||
@@ -21,7 +22,7 @@ export default function mousemoveInitInit(art, events) {
|
||||
autoHide.clearTimeout();
|
||||
$player.classList.remove('artplayer-hide-cursor');
|
||||
art.controls.show();
|
||||
if (!art.player.pipState && art.isPlaying && event.target === $video) {
|
||||
if (!art.player.pipState && player.playing && event.target === $video) {
|
||||
autoHide();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user