From 110bf2720217e440837c67ea6912f8dd34644ba8 Mon Sep 17 00:00:00 2001 From: James Cheese Date: Mon, 16 Sep 2024 10:33:34 +0100 Subject: [PATCH] Change LocalAudioOutputProvider to not bind an audio element on startup when isAudioOn set is false --- src/providers/LocalAudioOutputProvider/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/LocalAudioOutputProvider/index.tsx b/src/providers/LocalAudioOutputProvider/index.tsx index 287eb023..152b475f 100644 --- a/src/providers/LocalAudioOutputProvider/index.tsx +++ b/src/providers/LocalAudioOutputProvider/index.tsx @@ -30,7 +30,7 @@ export const LocalAudioOutputProvider: React.FC< return; } - if (audioRef.current) { + if (audioRef.current && isAudioOn) { (async (element: HTMLAudioElement) => { try { await audioVideo.bindAudioElement(element);