Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/studio/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export function StudioApp() {
const { syncPreviewTimelineHotkey, syncPreviewHistoryHotkey } = appHotkeys;
const handlePreviewIframeRef = useCallback(
(iframe: HTMLIFrameElement | null) => {
if (previewIframeRef.current === iframe) return;
previewIframeRef.current = iframe;
setPreviewIframe(iframe);
syncPreviewTimelineHotkey(iframe);
Expand Down
6 changes: 4 additions & 2 deletions packages/studio/src/components/nle/NLELayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ export const NLELayout = memo(function NLELayout({
const currentLevel = compositionStack[compositionStack.length - 1];
const directUrl = compositionStack.length > 1 ? currentLevel.previewUrl : undefined;

const onIframeRefRef = useRef(onIframeRef);
onIframeRefRef.current = onIframeRef;
useEffect(() => {
onIframeRef?.(iframeRef.current);
}, [compositionStack.length, onIframeRef, refreshKey, iframeRef]);
onIframeRefRef.current?.(iframeRef.current);
}, [compositionStack.length, refreshKey, iframeRef]);

// Save master seek position before drilling down so we can restore it on back-navigation.
// saveSeekPosition() sets pendingSeekRef in useTimelinePlayer which onIframeLoad reads.
Expand Down
Loading