From a3cba810b3891d062a514504d0abfa97d7777884 Mon Sep 17 00:00:00 2001 From: Amos Brocco Date: Wed, 17 Dec 2025 18:25:49 +0100 Subject: [PATCH 1/2] Fix search in playback (wrong paths in alternate), see #140 --- src/utils/builder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/builder.js b/src/utils/builder.js index a6191d5..bfb4e19 100644 --- a/src/utils/builder.js +++ b/src/utils/builder.js @@ -63,9 +63,10 @@ const buildAlternates = result => { for (const slide in slides) { if (hasProperty(slides, slide)) { const text = slides[slide]; + const slidepath = slide.replace('-',''); data.push({ - src: `presentation/${presentation}/${slide}.png`, + src: `presentation/${presentation}/svgs/${slidepath}.svg`, text, }); } From 3e92f4db447f53ae82c3c80e244eac5dee2a5fc4 Mon Sep 17 00:00:00 2001 From: germanocaumo Date: Thu, 5 Feb 2026 16:22:10 -0300 Subject: [PATCH 2/2] fix(alternates): use correct path according to version Since tldraw, we only have svgs available, so the alternates and search were broken. --- src/components/player/content/index.js | 12 +++++------- src/utils/builder.js | 9 +++++++-- src/utils/tldraw.js | 7 +++++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/components/player/content/index.js b/src/components/player/content/index.js index 6502f31..c8a86d1 100644 --- a/src/components/player/content/index.js +++ b/src/components/player/content/index.js @@ -3,7 +3,7 @@ import cx from 'classnames'; import Presentation from 'components/presentation'; import TldrawPresentation from 'components/tldraw'; import TldrawPresentationV2 from 'components/tldraw_v2'; -import { getTldrawBbbVersion } from 'utils/tldraw'; +import { getTldrawBbbVersion, isTldrawWhiteboard as isTldraw } from 'utils/tldraw'; import { useCurrentInterval, useShouldShowScreenShare } from 'components/utils/hooks'; import Screenshare from 'components/screenshare'; import Thumbnails from 'components/thumbnails'; @@ -30,12 +30,10 @@ const Content = ({ if (layout.single) return null; - const isTldrawWhiteboard = storage.tldraw.length || - storage.panzooms.tldraw || - storage.cursor.tldraw; + const isTldrawWhiteboard = isTldraw(); let presentation; - + if (isTldrawWhiteboard) { const bbbVersion = getTldrawBbbVersion(index); @@ -62,7 +60,7 @@ const Content = ({ {presentation} {layout.screenshare ? ( // video-js doesn't mount properly when not mounted in time - - ): null} + ) : null}
{ if (!result) return []; let data = []; + const useSvg = isTldrawWhiteboard(); + for (const presentation in result) { if (hasProperty(result, presentation)) { const slides = result[presentation]; @@ -63,10 +66,12 @@ const buildAlternates = result => { for (const slide in slides) { if (hasProperty(slides, slide)) { const text = slides[slide]; - const slidepath = slide.replace('-',''); + const slidepath = slide.replace('-', ''); data.push({ - src: `presentation/${presentation}/svgs/${slidepath}.svg`, + src: useSvg + ? `presentation/${presentation}/svgs/${slidepath}.svg` + : `presentation/${presentation}/${slide}.png`, text, }); } diff --git a/src/utils/tldraw.js b/src/utils/tldraw.js index 9417c7b..d60a7e7 100644 --- a/src/utils/tldraw.js +++ b/src/utils/tldraw.js @@ -193,6 +193,12 @@ const setupColorThemePaletteOverrides = () => { }; }; +const isTldrawWhiteboard = () => { + return (storage.tldraw && storage.tldraw.length > 0) || + (storage.panzooms && storage.panzooms.tldraw) || + (storage.cursor && storage.cursor.tldraw); +}; + export { getTldrawBbbVersion, getTldrawData, @@ -200,5 +206,6 @@ export { createTldrawImageAsset, createTldrawBackgroundShape, createTldrawCursorShape, + isTldrawWhiteboard, setupColorThemePaletteOverrides, };