mirror of
https://github.com/dergigi/boris.git
synced 2026-01-16 13:24:20 +01:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user