mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
update events.d.ts
This commit is contained in:
1 parent
90915652aa
commit
677c99aa38
5 files changed
+28
-28
No files matched your search
@@ -10,20 +10,20 @@ export default function clickInit(art, events) {
|
||||
if (includeFromEvent(event, $player)) {
|
||||
art.isInput = event.target.tagName === 'INPUT';
|
||||
art.isFocus = true;
|
||||
art.emit('focus');
|
||||
art.emit('focus', event);
|
||||
} else {
|
||||
art.isInput = false;
|
||||
art.isFocus = false;
|
||||
art.emit('blur');
|
||||
art.emit('blur', event);
|
||||
}
|
||||
});
|
||||
|
||||
let clickTime = 0;
|
||||
events.proxy($video, 'click', () => {
|
||||
events.proxy($video, 'click', (event) => {
|
||||
const now = Date.now();
|
||||
|
||||
if (now - clickTime <= constructor.DB_CLICE_TIME) {
|
||||
art.emit('dblclick');
|
||||
art.emit('dblclick', event);
|
||||
|
||||
if (isMobile) {
|
||||
if (!art.isLock) {
|
||||
@@ -33,7 +33,7 @@ export default function clickInit(art, events) {
|
||||
art.fullscreen = !art.fullscreen;
|
||||
}
|
||||
} else {
|
||||
art.emit('click');
|
||||
art.emit('click', event);
|
||||
|
||||
if (!isMobile) {
|
||||
art.toggle();
|
||||
|
||||
@@ -22,8 +22,8 @@ export default class Setting extends Component {
|
||||
|
||||
const {
|
||||
option,
|
||||
proxy,
|
||||
template: { $setting, $player },
|
||||
controls,
|
||||
template: { $setting },
|
||||
} = art;
|
||||
|
||||
this.name = 'setting';
|
||||
@@ -43,12 +43,10 @@ export default class Setting extends Component {
|
||||
}
|
||||
});
|
||||
|
||||
proxy($player, 'click', (event) => {
|
||||
if (
|
||||
this.show &&
|
||||
!includeFromEvent(event, art.controls.setting) &&
|
||||
!includeFromEvent(event, this.$parent)
|
||||
) {
|
||||
art.on('focus', (event) => {
|
||||
const isSetting = includeFromEvent(event, controls.setting);
|
||||
const isParent = includeFromEvent(event, this.$parent);
|
||||
if (this.show && !isSetting && !isParent) {
|
||||
this.show = false;
|
||||
this.render(this.option);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user