mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
fix control
This commit is contained in:
1 parent
c1780c3137
commit
9de1d74b7a
3 files changed
+25
-19
No files matched your search
@@ -20,17 +20,17 @@ export default class Control extends Component {
|
||||
this.name = 'control';
|
||||
this.timer = Date.now();
|
||||
|
||||
const {
|
||||
proxy,
|
||||
constructor,
|
||||
template: { $video },
|
||||
} = art;
|
||||
const { constructor } = art;
|
||||
|
||||
proxy($video, ['click', 'mousemove'], (event) => {
|
||||
art.on('mousemove', () => {
|
||||
if (!isMobile) {
|
||||
this.show = true;
|
||||
}
|
||||
});
|
||||
|
||||
art.on('click', () => {
|
||||
if (isMobile) {
|
||||
if (event.type === 'click') {
|
||||
this.show = !this.show;
|
||||
}
|
||||
this.toggle();
|
||||
} else {
|
||||
this.show = true;
|
||||
}
|
||||
@@ -64,6 +64,10 @@ export default class Control extends Component {
|
||||
return super.show;
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.show = !this.show;
|
||||
}
|
||||
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
|
||||
|
||||
Reference in new issue
Block a user