mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
优化手机端UI
This commit is contained in:
1 parent
19a894fcb6
commit
beea013daf
16 files changed
+249
-129
No files matched your search
@@ -1,12 +1,20 @@
|
||||
export default function clickInit(art, events) {
|
||||
const { $player } = art.template;
|
||||
const {
|
||||
controls,
|
||||
template: { $player },
|
||||
} = art;
|
||||
|
||||
events.proxy(document, ['click', 'contextmenu'], (event) => {
|
||||
if (event.composedPath && event.composedPath().indexOf($player) > -1) {
|
||||
art.isFocus = true;
|
||||
art.emit('focus');
|
||||
} else if (art.isFocus) {
|
||||
} else {
|
||||
art.isFocus = false;
|
||||
art.emit('blur');
|
||||
}
|
||||
});
|
||||
|
||||
art.on('blur', () => {
|
||||
controls.delayHide();
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user