mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 10:41:20 -08:00
update ci
This commit is contained in:
1 parent
bf0f7bfcaa
commit
aba956d4a4
7 files changed
+28
-18
No files matched your search
@@ -36,11 +36,11 @@ export default class Volume {
|
||||
});
|
||||
|
||||
proxy(this.$volume, 'click', () => {
|
||||
player.volume = 0;
|
||||
player.mute = true;
|
||||
});
|
||||
|
||||
proxy(this.$volumeClose, 'click', () => {
|
||||
player.volume = storage.get('volume');
|
||||
player.mute = false;
|
||||
});
|
||||
|
||||
hover(
|
||||
|
||||
@@ -2,7 +2,7 @@ import { debounce } from '../utils';
|
||||
|
||||
export default function mousemoveInitInit(art, events) {
|
||||
const {
|
||||
refs: { $player },
|
||||
refs: { $player, $video },
|
||||
} = art;
|
||||
|
||||
const autoHide = debounce(() => {
|
||||
@@ -17,11 +17,11 @@ export default function mousemoveInitInit(art, events) {
|
||||
}
|
||||
});
|
||||
|
||||
events.proxy($player, 'mousemove', () => {
|
||||
events.proxy($player, 'mousemove', event => {
|
||||
autoHide.clearTimeout();
|
||||
$player.classList.remove('artplayer-hide-cursor');
|
||||
art.controls.show();
|
||||
if (!art.player.pipState && art.isPlaying) {
|
||||
if (!art.player.pipState && art.isPlaying && event.target === $video) {
|
||||
autoHide();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -23,8 +23,9 @@ export default function volumeMix(art, player) {
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'mute', {
|
||||
value: () => {
|
||||
player.volume = 0;
|
||||
get: () => player.volume === 0,
|
||||
set: mute => {
|
||||
player.volume = mute ? 0 : storage.get('volume');
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user