Merge pull request #63 from shemanaev/mute-osd-fix

Fix volume OSD not showing on mute toggle.
This commit is contained in:
Ian Walton 2021-04-24 08:25:15 -04:00 committed by GitHub
commit ec0a210ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -159,7 +159,7 @@ class mpvAudioPlayer {
}
self.setPlaybackRate(1);
self.setMute(false);
self.setMute(false, false);
if (self._paused) {
self._paused = false;
@ -315,9 +315,12 @@ class mpvAudioPlayer {
this.setVolume(Math.max(this.getVolume() - 2, 0));
}
setMute(mute) {
setMute(mute, triggerEvent = true) {
this._muted = mute;
window.api.player.setMuted(mute);
if (triggerEvent) {
this.events.trigger(this, 'volumechange');
}
}
isMuted() {

View File

@ -153,7 +153,7 @@
}
this.setPlaybackRate(1);
this.setMute(false);
this.setMute(false, false);
if (this._currentPlayOptions.fullscreen) {
this.appRouter.showVideoOsd().then(this.onNavigatedToOsd);
@ -635,9 +635,12 @@
this.setVolume(Math.max(this.getVolume() - 2, 0));
}
setMute(mute) {
setMute(mute, triggerEvent = true) {
this._muted = mute;
window.api.player.setMuted(mute);
if (triggerEvent) {
this.events.trigger(this, 'volumechange');
}
}
isMuted() {