mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51: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,4 +1,4 @@
|
||||
import { errorHandle, addClass } from '../utils';
|
||||
import { errorHandle, addClass, debounce, removeClass } from '../utils';
|
||||
import Component from '../utils/component';
|
||||
import fullscreen from './fullscreen';
|
||||
import fullscreenWeb from './fullscreenWeb';
|
||||
@@ -19,7 +19,21 @@ export default class Control extends Component {
|
||||
|
||||
this.name = 'control';
|
||||
|
||||
const { option } = art;
|
||||
const {
|
||||
option,
|
||||
player,
|
||||
template: { $player },
|
||||
} = art;
|
||||
|
||||
this.delayHide = debounce(() => {
|
||||
if (player.playing && this.show) {
|
||||
addClass($player, 'art-hide-cursor');
|
||||
removeClass($player, 'art-hover');
|
||||
this.show = false;
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
this.cancelDelayHide = this.delayHide.clearTimeout;
|
||||
|
||||
art.on('ready', () => {
|
||||
this.add(
|
||||
@@ -130,7 +144,7 @@ export default class Control extends Component {
|
||||
}),
|
||||
);
|
||||
|
||||
option.controls.forEach(item => {
|
||||
option.controls.forEach((item) => {
|
||||
this.add(item);
|
||||
});
|
||||
});
|
||||
@@ -158,7 +172,7 @@ export default class Control extends Component {
|
||||
break;
|
||||
}
|
||||
|
||||
super.add(option, $ref => {
|
||||
super.add(option, ($ref) => {
|
||||
if (
|
||||
!option.disable &&
|
||||
option.position !== 'top' &&
|
||||
|
||||
Reference in new issue
Block a user