diff --git a/src/video/components/Caption.tsx b/src/video/components/Caption.tsx index af3b8b80..34cca5af 100644 --- a/src/video/components/Caption.tsx +++ b/src/video/components/Caption.tsx @@ -17,6 +17,7 @@ export function Caption({ text }: { text?: string }) { }), }} style={{ + whiteSpace: "pre-line", ...captionSettings.style, }} /> diff --git a/src/video/components/CaptionRenderer.tsx b/src/video/components/CaptionRenderer.tsx index ed56781d..25118d11 100644 --- a/src/video/components/CaptionRenderer.tsx +++ b/src/video/components/CaptionRenderer.tsx @@ -50,14 +50,12 @@ export function CaptionRenderer({ animation="slide-up" show > - - {captions.current.map( - ({ identifier, end, start, text }) => - isVisible(start, end) && ( - - ) - )} - + {captions.current.map( + ({ identifier, end, start, text }) => + isVisible(start, end) && ( + + ) + )} ); }