diff --git a/apps/client/src/views/teleprompter/Teleprompter.tsx b/apps/client/src/views/teleprompter/Teleprompter.tsx index d2d000d87..8870a3a3d 100644 --- a/apps/client/src/views/teleprompter/Teleprompter.tsx +++ b/apps/client/src/views/teleprompter/Teleprompter.tsx @@ -1,5 +1,5 @@ import { OntimeView } from 'ontime-types'; -import { type CSSProperties, useState } from 'react'; +import { type CSSProperties, useEffect, useState } from 'react'; import EmptyPage from '../../common/components/state/EmptyPage'; import ViewParamsEditor from '../../common/components/view-params-editor/ViewParamsEditor'; @@ -50,6 +50,16 @@ function Teleprompter({ rundown, rundownMetadata, customFields }: TeleprompterDa const [flipV, setFlipV] = useState(options.flipV); const [showHelp, setShowHelp] = useState(false); + /** + * The flip params seed the local state, which the F key then owns. + * Without this the params would only ever apply on mount, so changing them in + * the view options, or from another device by redirecting this client to the + * same view with a different query, would silently do nothing. + * The speed option is kept live the same way, inside useTeleprompterScroll. + */ + useEffect(() => setFlipH(options.flipH), [options.flipH]); + useEffect(() => setFlipV(options.flipV), [options.flipV]); + const viewOptions = getTeleprompterOptions(customFields); const blocks = buildScript(rundown, rundownMetadata, customFields, {