From 7283344438cf3df3ad87ac4d61ffa4fe285bdb8f Mon Sep 17 00:00:00 2001 From: Rahim Alwer Date: Mon, 22 Apr 2024 16:41:32 +1000 Subject: [PATCH] fix(player): muted prop should take priority over storage closes #1247 --- packages/vidstack/src/core/state/media-player-delegate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vidstack/src/core/state/media-player-delegate.ts b/packages/vidstack/src/core/state/media-player-delegate.ts index 5b2cffb42..21c89fe35 100644 --- a/packages/vidstack/src/core/state/media-player-delegate.ts +++ b/packages/vidstack/src/core/state/media-player-delegate.ts @@ -89,7 +89,7 @@ export class MediaPlayerDelegate { if (provider) { provider.setVolume((await storage?.getVolume()) ?? volume()); - provider.setMuted((await storage?.getMuted()) ?? muted()); + provider.setMuted(muted() || !!(await storage?.getMuted())); const audioGain = (await storage?.getAudioGain()) ?? 1; if (audioGain > 1) provider.audioGain?.setGain?.(audioGain);