added volume mute condition
This commit is contained in:
parent
e0814e3c95
commit
ca7bc39ca1
1 changed files with 5 additions and 0 deletions
|
@ -709,6 +709,10 @@ const app = new Vue({
|
|||
|
||||
|
||||
this.mk.addEventListener(MusicKit.Events.playbackVolumeDidChange, (_a) => {
|
||||
if( this.cfg.audio.muted && this.cfg.audio.lastVolume != 0 ) {
|
||||
this.cfg.audio.muted = false;
|
||||
this.cfg.audio.lastVolume = 0;
|
||||
}
|
||||
this.cfg.audio.volume = this.mk.volume
|
||||
})
|
||||
|
||||
|
@ -3009,6 +3013,7 @@ const app = new Vue({
|
|||
muteButtonPressed() {
|
||||
if( this.cfg.audio.muted ) {
|
||||
this.mk.volume = this.cfg.audio.lastVolume;
|
||||
this.cfg.lastVolume = 0;
|
||||
this.cfg.audio.muted = false;
|
||||
} else {
|
||||
this.cfg.audio.lastVolume = this.cfg.audio.volume;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue