diff --git a/frontend/app/components/Session/LivePlayer.tsx b/frontend/app/components/Session/LivePlayer.tsx index d470cb9d1..97ceabbb2 100644 --- a/frontend/app/components/Session/LivePlayer.tsx +++ b/frontend/app/components/Session/LivePlayer.tsx @@ -107,7 +107,7 @@ function LivePlayer({ useEffect(() => { const queryParams = new URLSearchParams(window.location.search); if ( - (queryParams.has('fullScreen') && queryParams.get('fullScreen') === 'true') || + (queryParams.has('fullScreen') && queryParams.get('fullScreen') === 'true') || (queryParams.has('fullView') && queryParams.get('fullView') === 'true') || location.pathname.includes('multiview') ) { setFullView(true); diff --git a/frontend/app/components/Session/Player/ReplayPlayer/PlayerContent.tsx b/frontend/app/components/Session/Player/ReplayPlayer/PlayerContent.tsx index ae347eb38..ae8da605c 100644 --- a/frontend/app/components/Session/Player/ReplayPlayer/PlayerContent.tsx +++ b/frontend/app/components/Session/Player/ReplayPlayer/PlayerContent.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { observer } from 'mobx-react-lite'; import cn from 'classnames'; import styles from 'Components/Session_/session.module.css'; @@ -22,6 +22,7 @@ interface IProps { function PlayerContent({ session, fullscreen, activeTab, setActiveTab }: IProps) { const { store } = React.useContext(PlayerContext) + const [fullView, setFullView] = React.useState(false) const { error, @@ -29,6 +30,11 @@ function PlayerContent({ session, fullscreen, activeTab, setActiveTab }: IProps) const hasError = !!error + useEffect(() => { + const isFullView = new URLSearchParams(location.search).get('fullview') + setFullView(isFullView === 'true'); + }, [session.sessionId]); + const sessionDays = countDaysFrom(session.startedAt); return (