fix: prevent double video player rendering

- Modified ContentPanel to disable VideoEmbedProcessor when isExternalVideo is true
- This prevents both ContentPanel and VideoEmbedProcessor from rendering ReactPlayer for the same video URL
- Fixes issue where video players were showing twice
This commit is contained in:
Gigi
2025-10-20 20:44:38 +02:00
parent 3673849a9a
commit 64aad42be3
2 changed files with 4 additions and 4 deletions

View File

@@ -847,7 +847,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
<VideoEmbedProcessor
ref={contentRef}
html={finalHtml}
renderVideoLinksAsEmbeds={settings?.renderVideoLinksAsEmbeds === true}
renderVideoLinksAsEmbeds={settings?.renderVideoLinksAsEmbeds === true && !isExternalVideo}
className="reader-markdown"
onMouseUp={handleSelectionEnd}
onTouchEnd={handleSelectionEnd}
@@ -863,7 +863,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
<VideoEmbedProcessor
ref={contentRef}
html={finalHtml || html || ''}
renderVideoLinksAsEmbeds={settings?.renderVideoLinksAsEmbeds === true}
renderVideoLinksAsEmbeds={settings?.renderVideoLinksAsEmbeds === true && !isExternalVideo}
className="reader-html"
onMouseUp={handleSelectionEnd}
onTouchEnd={handleSelectionEnd}