Spaces:
Running
Running
Commit ·
96ba4b4
1
Parent(s): 519e0f2
Fixes
Browse files
src/ig-reel/IGSimpleScene.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
import { AbsoluteFill, Sequence, interpolate, staticFile, Audio, useCurrentFrame, Easing } from 'remotion';
|
| 3 |
import React, { useEffect, useState } from 'react'
|
| 4 |
import { RenderUtils } from '../RenderUtils';
|
| 5 |
-
import { Transcript, SectionMedia, OriginalManuscript } from 'common-utils'
|
| 6 |
import axios from 'axios';
|
| 7 |
import ExcitedSubtitles from '../subtitles/excited_Subtitles';
|
| 8 |
import _ from 'lodash';
|
|
@@ -237,9 +237,9 @@ export const IGSimpleScene: React.FC<any> = (props: {
|
|
| 237 |
}} className='absolute inset-0'>
|
| 238 |
{
|
| 239 |
SubtitleComponent ?
|
| 240 |
-
<SubtitleComponent group={group} word={word} />
|
| 241 |
:
|
| 242 |
-
<ExcitedSubtitles position='center' group={group} word={word} />
|
| 243 |
}
|
| 244 |
</div>
|
| 245 |
|
|
|
|
| 2 |
import { AbsoluteFill, Sequence, interpolate, staticFile, Audio, useCurrentFrame, Easing } from 'remotion';
|
| 3 |
import React, { useEffect, useState } from 'react'
|
| 4 |
import { RenderUtils } from '../RenderUtils';
|
| 5 |
+
import { Transcript, SectionMedia, OriginalManuscript, IGReelCaptionExtra } from 'common-utils'
|
| 6 |
import axios from 'axios';
|
| 7 |
import ExcitedSubtitles from '../subtitles/excited_Subtitles';
|
| 8 |
import _ from 'lodash';
|
|
|
|
| 237 |
}} className='absolute inset-0'>
|
| 238 |
{
|
| 239 |
SubtitleComponent ?
|
| 240 |
+
<SubtitleComponent group={group} word={word} fontSize={(item.extras as IGReelCaptionExtra)?.fontSize} />
|
| 241 |
:
|
| 242 |
+
<ExcitedSubtitles position='center' group={group} word={word} fontSize={(item.extras as IGReelCaptionExtra)?.fontSize} />
|
| 243 |
}
|
| 244 |
</div>
|
| 245 |
|
src/subtitles/excited_Subtitles.tsx
CHANGED
|
@@ -7,8 +7,8 @@ import GeneralSubtitles from './general_Subtitles';
|
|
| 7 |
import { RenderUtils } from '../RenderUtils';
|
| 8 |
|
| 9 |
|
| 10 |
-
const ExcitedSubtitles: React.FC<{ group: Group, word: Word, position: 'start' | 'center' | 'end' }> = ({
|
| 11 |
-
word, group }) => {
|
| 12 |
|
| 13 |
let frame = useCurrentFrame()
|
| 14 |
let rotation = 0
|
|
@@ -38,7 +38,9 @@ const ExcitedSubtitles: React.FC<{ group: Group, word: Word, position: 'start' |
|
|
| 38 |
width: '100%', height: '100%',
|
| 39 |
|
| 40 |
}}>
|
| 41 |
-
<GeneralSubtitles
|
|
|
|
|
|
|
| 42 |
transform: `rotate(${rotation}deg)`,
|
| 43 |
justifyContent: 'center',
|
| 44 |
alignContent: 'center'
|
|
|
|
| 7 |
import { RenderUtils } from '../RenderUtils';
|
| 8 |
|
| 9 |
|
| 10 |
+
const ExcitedSubtitles: React.FC<{ group: Group, word: Word, position: 'start' | 'center' | 'end', fontSize: string }> = ({
|
| 11 |
+
word, group, fontSize }) => {
|
| 12 |
|
| 13 |
let frame = useCurrentFrame()
|
| 14 |
let rotation = 0
|
|
|
|
| 38 |
width: '100%', height: '100%',
|
| 39 |
|
| 40 |
}}>
|
| 41 |
+
<GeneralSubtitles
|
| 42 |
+
fontSize={fontSize}
|
| 43 |
+
style={{
|
| 44 |
transform: `rotate(${rotation}deg)`,
|
| 45 |
justifyContent: 'center',
|
| 46 |
alignContent: 'center'
|
src/subtitles/general_Subtitles.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { Group, Word } from '../models/Types';
|
|
| 6 |
import _ from 'lodash'
|
| 7 |
|
| 8 |
|
| 9 |
-
const GeneralSubtitles: React.FC<{ group: Group, word: Word, position: 'start' | 'center' | 'end' }> = ({
|
| 10 |
style,
|
| 11 |
getHighlightStyle,
|
| 12 |
group,
|
|
|
|
| 6 |
import _ from 'lodash'
|
| 7 |
|
| 8 |
|
| 9 |
+
const GeneralSubtitles: React.FC<{ group: Group, word: Word, position: 'start' | 'center' | 'end', fontSize: string }> = ({
|
| 10 |
style,
|
| 11 |
getHighlightStyle,
|
| 12 |
group,
|