Browse Source

remove parent span

pull/185/head
frost768 2 years ago
parent
commit
12555a5933
  1. 1
      src/video/components/Caption.tsx
  2. 14
      src/video/components/CaptionRenderer.tsx

1
src/video/components/Caption.tsx

@ -17,6 +17,7 @@ export function Caption({ text }: { text?: string }) { @@ -17,6 +17,7 @@ export function Caption({ text }: { text?: string }) {
}),
}}
style={{
whiteSpace: "pre-line",
...captionSettings.style,
}}
/>

14
src/video/components/CaptionRenderer.tsx

@ -50,14 +50,12 @@ export function CaptionRenderer({ @@ -50,14 +50,12 @@ export function CaptionRenderer({
animation="slide-up"
show
>
<span>
{captions.current.map(
({ identifier, end, start, text }) =>
isVisible(start, end) && (
<Caption key={identifier || `${start}-${end}`} text={text} />
)
)}
</span>
{captions.current.map(
({ identifier, end, start, text }) =>
isVisible(start, end) && (
<Caption key={identifier || `${start}-${end}`} text={text} />
)
)}
</Transition>
);
}

Loading…
Cancel
Save