fixed volume condition (last commit broke it)
This commit is contained in:
parent
dea8d1528a
commit
a23bb9a6a5
3 changed files with 10 additions and 9 deletions
|
@ -709,10 +709,6 @@ 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
|
||||
})
|
||||
|
||||
|
@ -3013,7 +3009,6 @@ 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;
|
||||
|
@ -3021,7 +3016,11 @@ const app = new Vue({
|
|||
this.cfg.audio.muted = true;
|
||||
}
|
||||
},
|
||||
|
||||
checkMuteChange() {
|
||||
if( this.cfg.audio.muted ) {
|
||||
this.cfg.audio.muted = false;
|
||||
}
|
||||
},
|
||||
async apiCall(url, callback) {
|
||||
const xmlHttp = new XMLHttpRequest();
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<div class="input-container">
|
||||
<button class="volume-button--small volume" @click="app.muteButtonPressed()" :class="{'active': app.cfg.audio.volume == 0}"></button>
|
||||
<input type="range" class="slider" @wheel="app.volumeWheel" step="0.01" min="0" max="1" v-model="app.mk.volume"
|
||||
v-if="typeof app.mk.volume != 'undefined'">
|
||||
v-if="typeof app.mk.volume != 'undefined'" @change="app.checkMuteChange()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -134,7 +134,8 @@
|
|||
<button class="volume-button--small volume" @click="muteButtonPressed()" :class="{'active': this.cfg.audio.volume == 0}"></button>
|
||||
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
|
||||
v-model="mk.volume"
|
||||
v-if="typeof mk.volume != 'undefined'">
|
||||
v-if="typeof mk.volume != 'undefined'"
|
||||
@change="checkMuteChange()">
|
||||
</div>
|
||||
<div class="app-chrome-item generic" v-if="false">
|
||||
<button class="playback-button--small">
|
||||
|
@ -298,7 +299,8 @@
|
|||
<button class="volume-button--small volume" @click="muteButtonPressed()" :class="{'active': this.cfg.audio.volume == 0}"></button>
|
||||
<input type="range" class="" @wheel="volumeWheel" step="0.01" min="0" max="1"
|
||||
v-model="mk.volume"
|
||||
v-if="typeof mk.volume != 'undefined'">
|
||||
v-if="typeof mk.volume != 'undefined'"
|
||||
@change="checkMuteChange()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue