diff --git a/frontend/app/components/Session/WebPlayer.tsx b/frontend/app/components/Session/WebPlayer.tsx index 6eed3e2f5..6c8785dff 100644 --- a/frontend/app/components/Session/WebPlayer.tsx +++ b/frontend/app/components/Session/WebPlayer.tsx @@ -69,10 +69,10 @@ function WebPlayer(props: any) { } }, [session.events, session.errors, contextValue.player]) - const { ready: isPlayerReady, firstVisualEvent: visualOffset, messagesProcessed } = contextValue.store?.get() || {} + const { firstVisualEvent: visualOffset, messagesProcessed } = contextValue.store?.get() || {} React.useEffect(() => { - if (showNoteModal || activeTab !== '') { + if (showNoteModal) { contextValue.player.pause() } @@ -93,6 +93,12 @@ function WebPlayer(props: any) { } }, [activeTab, showNoteModal, visualOffset, messagesProcessed]) + React.useEffect(() => { + if (activeTab === 'Click Map') { + contextValue.player?.pause() + } + }, [activeTab]) + // LAYOUT (TODO: local layout state - useContext or something..) useEffect( () => () => {