From 1bdf853a348189a9f59e47640baf299dff632faf Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Fri, 3 Apr 2020 16:35:08 +0200 Subject: [PATCH] debug logging for #13 --- src/mixer/state.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mixer/state.ts b/src/mixer/state.ts index 96df3bb..982ae2e 100644 --- a/src/mixer/state.ts +++ b/src/mixer/state.ts @@ -470,6 +470,7 @@ export const play = (player: number): AppThunk => async (dispatch, getState) => return; } if (audioContext.state !== "running") { + console.log("Resuming AudioContext because Chrome bad"); await audioContext.resume(); } var state = getState().mixer.players[player]; @@ -621,6 +622,7 @@ export const openMicrophone = (micID: string): AppThunk => async ( // micSource?.disconnect(); // } if (audioContext.state !== "running") { + console.log("Resuming AudioContext because Chrome bad"); await audioContext.resume(); } dispatch(mixerState.actions.setMicError(null));