mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
优化自动隐藏controls
This commit is contained in:
1 parent
ce56c680da
commit
be3d97bf75
6 files changed
+36
-75
No files matched your search
@@ -1,10 +1,7 @@
|
||||
import { addClass, removeClass } from '../utils';
|
||||
|
||||
export default function hoverInit(art, events) {
|
||||
const {
|
||||
controls,
|
||||
template: { $player },
|
||||
} = art;
|
||||
const { $player } = art.template;
|
||||
|
||||
events.hover(
|
||||
$player,
|
||||
@@ -17,10 +14,4 @@ export default function hoverInit(art, events) {
|
||||
art.emit('hover');
|
||||
},
|
||||
);
|
||||
|
||||
art.on('hover', (value) => {
|
||||
if (!value) {
|
||||
controls.delayHide();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user