From 588b488856edab82cce7b645dd5569b7bde31abc Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Tue, 15 Jun 2021 01:15:46 +0800 Subject: [PATCH] Watch: set volume's session value to 0 when the player is muted (#1352) --- src/renderer/components/ft-video-player/ft-video-player.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 896cbd5a..72edb290 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -447,8 +447,10 @@ export default Vue.extend({ } }, - updateVolume: function (event) { - const volume = this.player.volume() + updateVolume: function (_event) { + // 0 means muted + // https://docs.videojs.com/html5#volume + const volume = this.player.muted() ? 0 : this.player.volume() sessionStorage.setItem('volume', volume) },