added delta
Browse files
Remotion-app/src/HelloWorld/TextStream.jsx
CHANGED
|
@@ -41,12 +41,13 @@ export const TextStream = () => {
|
|
| 41 |
>
|
| 42 |
<TransitionSeries>
|
| 43 |
{transcriptData.map((entry, index) => {
|
|
|
|
| 44 |
return (
|
| 45 |
<TransitionSeries.Sequence
|
| 46 |
style={subtitle}
|
| 47 |
key={index}
|
| 48 |
-
from={(entry.start +
|
| 49 |
-
durationInFrames={fps * (entry.end - entry.start +
|
| 50 |
>
|
| 51 |
<Letter style={subtitle}>{entry.text}</Letter>
|
| 52 |
</TransitionSeries.Sequence>
|
|
|
|
| 41 |
>
|
| 42 |
<TransitionSeries>
|
| 43 |
{transcriptData.map((entry, index) => {
|
| 44 |
+
const delta = entry.end - entry.start < 1 / 30 ? 0.2 : 0;
|
| 45 |
return (
|
| 46 |
<TransitionSeries.Sequence
|
| 47 |
style={subtitle}
|
| 48 |
key={index}
|
| 49 |
+
from={(entry.start + delta) * fps}
|
| 50 |
+
durationInFrames={fps * (entry.end - entry.start + delta)}
|
| 51 |
>
|
| 52 |
<Letter style={subtitle}>{entry.text}</Letter>
|
| 53 |
</TransitionSeries.Sequence>
|