Skip to content

🎥 Make videos programmatically with React

Merge remote-tracking branch 'origin/main' into fix-elements-caption-editing

Igor Samokhovets81ea9573c373
diff --cc packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsx
index 6e0cf57c09,3c805961fd..e27aca4ed8
--- a/packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsx
+++ b/packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsx
@@@ -44,60 -44,9 +44,60 @@@ const desiredFontSize = 80
const maximumTextWidth = 800;
const fontWeight = '700';
const textColor = '#ffffff';
- const highlightColor = '#18ff0e';
+ const highlightColor = '#4da3ff';
const activeWordScale = 1.03;
const defaultCombineTokensWithinMilliseconds = 800;
+const defaultCaptions: Caption[] = [
+ {
+ text: 'Captions',
+ startMs: 0,
+ endMs: 800,
+ timestampMs: 400,
+ confidence: null,
+ },
+ {
+ text: ' can',
+ startMs: 800,
+ endMs: 1500,
+ timestampMs: 1150,
+ confidence: null,
+ },
+ {
+ text: ' move',
+ startMs: 1500,
+ endMs: 2300,
+ timestampMs: 1900,
+ confidence: null,
+ },
+ {
+ text: ' with',
+ startMs: 2300,
+ endMs: 3100,
+ timestampMs: 2700,
+ confidence: null,
+ },
+ {
+ text: ' every',
+ startMs: 3100,
+ endMs: 4000,
+ timestampMs: 3550,
+ confidence: null,
+ },
+ {
+ text: ' spoken',
+ startMs: 4000,
+ endMs: 5100,
+ timestampMs: 4550,
+ confidence: null,
+ },
+ {
+ text: ' word.',
+ startMs: 5100,
+ endMs: 6500,
+ timestampMs: 5800,
+ confidence: null,
+ },
+];
const poppingWordCaptionsSchema = {
...Interactive.baseSchema,
diff --cc packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsx
index 458aa26435,e2062e6222..3749f2e39d
--- a/packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsx
+++ b/packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsx
@@@ -42,59 -42,8 +42,59 @@@ const desiredFontSize = 80
const maximumTextWidth = 800;
const fontWeight = '700';
const textColor = '#ffffff';
- const highlightColor = '#18ff0e';
+ const highlightColor = '#4da3ff';
const defaultCombineTokensWithinMilliseconds = 800;
+const defaultCaptions: Caption[] = [
+ {
+ text: 'Captions',
+ startMs: 0,
+ endMs: 800,
+ timestampMs: 400,
+ confidence: null,
+ },
+ {
+ text: ' can',
+ startMs: 800,
+ endMs: 1500,
+ timestampMs: 1150,
+ confidence: null,
+ },
+ {
+ text: ' move',
+ startMs: 1500,
+ endMs: 2300,
+ timestampMs: 1900,
+ confidence: null,
+ },
+ {
+ text: ' with',
+ startMs: 2300,
+ endMs: 3100,
+ timestampMs: 2700,
+ confidence: null,
+ },
+ {
+ text: ' every',
+ startMs: 3100,
+ endMs: 4000,
+ timestampMs: 3550,
+ confidence: null,
+ },
+ {
+ text: ' spoken',
+ startMs: 4000,
+ endMs: 5100,
+ timestampMs: 4550,
+ confidence: null,
+ },
+ {
+ text: ' word.',
+ startMs: 5100,
+ endMs: 6500,
+ timestampMs: 5800,
+ confidence: null,
+ },
+];
const wordHighlightCaptionsSchema = {
...Interactive.baseSchema,