@zync/zync-screnplay-player 0.1.250 → 0.1.252
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +43 -42
- package/dist/screenplay/RemotionRenderer/assets/wordObjects/LICENSE +21 -0
- package/dist/screenplay/RemotionRenderer/assets/wordObjects/images.js +24 -0
- package/dist/screenplay/RemotionRenderer/assets/wordObjects/manifest.json +67 -0
- package/dist/screenplay/RemotionRenderer/components/effects/CaptionWordObjectOverlay.js +243 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Sentence.js +10 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabConversationSpine.js +1 -1
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabRackFocus.js +1 -1
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillInset.js +51 -5
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameSentence.js +3 -1
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +9 -0
- package/dist/screenplay/RemotionRenderer/helpers/captionWordObjectGeometry.js +139 -0
- package/dist/screenplay/RemotionRenderer/helpers/captionWordObjects.js +112 -0
- package/dist/screenplay/RemotionRenderer/helpers/headingColors.js +12 -0
- package/dist/screenplay/RemotionRenderer/helpers/normalizeDisabledTranscripts.js +3 -629
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/SimpleFrameLayout.js +8 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionPunctuated.js +29 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBoom.js +30 -7
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBubble.js +30 -7
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentence.js +1 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence.js +8 -4
- package/dist/screenplay/RemotionRenderer/theme/themes/fullcover/TextFullCover.js +10 -5
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Sentence.js +14 -4
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +1 -1
- package/dist/screenplay/RemotionRenderer/tracks/Soundtrack.js +20 -3
- package/dist/timing.cjs +1050 -0
- package/package.json +8 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbsoluteFill, Sequence, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { CaptionWordObjectOverlay } from "../../../components/effects/CaptionWordObjectOverlay";
|
|
3
4
|
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
5
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
6
|
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
@@ -7,9 +8,14 @@ import { useTheme } from "../../hooks/useTheme";
|
|
|
7
8
|
import { getBrighterColor } from "../../../helpers/hexToRgb";
|
|
8
9
|
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
9
10
|
var fontFamily = FONT_FAMILIES.POPPINS;
|
|
10
|
-
|
|
11
|
+
var _CaptionPunctuated = function CaptionPunctuated(_ref) {
|
|
11
12
|
var transcripts = _ref.transcripts,
|
|
12
|
-
color = _ref.color
|
|
13
|
+
color = _ref.color,
|
|
14
|
+
wordObjectGeometry = _ref.wordObjectGeometry,
|
|
15
|
+
_ref$measurementRef = _ref.measurementRef,
|
|
16
|
+
measurementRef = _ref$measurementRef === void 0 ? null : _ref$measurementRef,
|
|
17
|
+
_ref$measurementFrame = _ref.measurementFrame,
|
|
18
|
+
measurementFrame = _ref$measurementFrame === void 0 ? null : _ref$measurementFrame;
|
|
13
19
|
var _useVideoConfig = useVideoConfig(),
|
|
14
20
|
width = _useVideoConfig.width;
|
|
15
21
|
var _useOrientationBased = useOrientationBased({
|
|
@@ -34,7 +40,8 @@ export var CaptionPunctuated = function CaptionPunctuated(_ref) {
|
|
|
34
40
|
accentColor = _useTheme.accentColor,
|
|
35
41
|
accentContrast = _useTheme.accentContrast;
|
|
36
42
|
var containerWidth = width * 0.8;
|
|
37
|
-
var
|
|
43
|
+
var currentFrame = useCurrentFrame();
|
|
44
|
+
var frame = measurementFrame !== null && measurementFrame !== void 0 ? measurementFrame : currentFrame;
|
|
38
45
|
var brighterColor = getBrighterColor(primaryColor, accentColor);
|
|
39
46
|
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
40
47
|
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
@@ -42,9 +49,10 @@ export var CaptionPunctuated = function CaptionPunctuated(_ref) {
|
|
|
42
49
|
textFontSize = _distributeTextToFit.fontSize;
|
|
43
50
|
return /*#__PURE__*/React.createElement(Sequence, {
|
|
44
51
|
key: index,
|
|
45
|
-
from: transcript.from,
|
|
46
|
-
durationInFrames: transcript.durationInFrames
|
|
52
|
+
from: measurementRef ? 0 : transcript.from,
|
|
53
|
+
durationInFrames: measurementRef ? undefined : transcript.durationInFrames
|
|
47
54
|
}, /*#__PURE__*/React.createElement("p", {
|
|
55
|
+
ref: measurementRef,
|
|
48
56
|
style: {
|
|
49
57
|
display: "flex",
|
|
50
58
|
alignItems: "center",
|
|
@@ -73,11 +81,26 @@ export var CaptionPunctuated = function CaptionPunctuated(_ref) {
|
|
|
73
81
|
})) === null || _transcript$punctuati2 === void 0 ? void 0 : _transcript$punctuati2.end));
|
|
74
82
|
return /*#__PURE__*/React.createElement("span", {
|
|
75
83
|
key: wordIndex,
|
|
84
|
+
"data-word-index": wordIndex,
|
|
76
85
|
style: {
|
|
77
86
|
color: isPunctuated ? color || brighterColor : "white",
|
|
78
87
|
textShadow: "3px 3px 3px #000"
|
|
79
88
|
}
|
|
80
89
|
}, word);
|
|
81
90
|
})));
|
|
91
|
+
}), !measurementRef && /*#__PURE__*/React.createElement(CaptionWordObjectOverlay, {
|
|
92
|
+
transcripts: transcripts,
|
|
93
|
+
geometry: wordObjectGeometry,
|
|
94
|
+
fontFamily: fontFamily,
|
|
95
|
+
color: color,
|
|
96
|
+
renderSource: function renderSource(transcript, wordIndex, at, ref) {
|
|
97
|
+
return /*#__PURE__*/React.createElement(_CaptionPunctuated, {
|
|
98
|
+
transcripts: [transcript],
|
|
99
|
+
color: color,
|
|
100
|
+
measurementRef: ref,
|
|
101
|
+
measurementFrame: at
|
|
102
|
+
});
|
|
103
|
+
}
|
|
82
104
|
}));
|
|
83
|
-
};
|
|
105
|
+
};
|
|
106
|
+
export { _CaptionPunctuated as CaptionPunctuated };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbsoluteFill, Sequence, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { CaptionWordObjectOverlay } from "../../../components/effects/CaptionWordObjectOverlay";
|
|
3
4
|
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
5
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
6
|
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
@@ -7,9 +8,14 @@ import { useTheme } from "../../hooks/useTheme";
|
|
|
7
8
|
import { getBrighterColor } from "../../../helpers/hexToRgb";
|
|
8
9
|
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
9
10
|
var fontFamily = FONT_FAMILIES.TITAN_ONE;
|
|
10
|
-
|
|
11
|
+
var _CaptionWordBoom = function CaptionWordBoom(_ref) {
|
|
11
12
|
var transcripts = _ref.transcripts,
|
|
12
|
-
color = _ref.color
|
|
13
|
+
color = _ref.color,
|
|
14
|
+
wordObjectGeometry = _ref.wordObjectGeometry,
|
|
15
|
+
_ref$measurementRef = _ref.measurementRef,
|
|
16
|
+
measurementRef = _ref$measurementRef === void 0 ? null : _ref$measurementRef,
|
|
17
|
+
_ref$measurementFrame = _ref.measurementFrame,
|
|
18
|
+
measurementFrame = _ref$measurementFrame === void 0 ? null : _ref$measurementFrame;
|
|
13
19
|
var _useVideoConfig = useVideoConfig(),
|
|
14
20
|
width = _useVideoConfig.width;
|
|
15
21
|
var _useOrientationBased = useOrientationBased({
|
|
@@ -34,7 +40,8 @@ export var CaptionWordBoom = function CaptionWordBoom(_ref) {
|
|
|
34
40
|
accentColor = _useTheme.accentColor,
|
|
35
41
|
accentContrast = _useTheme.accentContrast;
|
|
36
42
|
var containerWidth = width * 0.8;
|
|
37
|
-
var
|
|
43
|
+
var currentFrame = useCurrentFrame();
|
|
44
|
+
var frame = measurementFrame !== null && measurementFrame !== void 0 ? measurementFrame : currentFrame;
|
|
38
45
|
var brighterColor = getBrighterColor(primaryColor, accentColor);
|
|
39
46
|
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
40
47
|
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
@@ -42,9 +49,10 @@ export var CaptionWordBoom = function CaptionWordBoom(_ref) {
|
|
|
42
49
|
textFontSize = _distributeTextToFit.fontSize;
|
|
43
50
|
return /*#__PURE__*/React.createElement(Sequence, {
|
|
44
51
|
key: index,
|
|
45
|
-
from: transcript.from,
|
|
46
|
-
durationInFrames: transcript.durationInFrames
|
|
52
|
+
from: measurementRef ? 0 : transcript.from,
|
|
53
|
+
durationInFrames: measurementRef ? undefined : transcript.durationInFrames
|
|
47
54
|
}, /*#__PURE__*/React.createElement("p", {
|
|
55
|
+
ref: measurementRef,
|
|
48
56
|
style: {
|
|
49
57
|
display: "flex",
|
|
50
58
|
alignItems: "center",
|
|
@@ -75,13 +83,28 @@ export var CaptionWordBoom = function CaptionWordBoom(_ref) {
|
|
|
75
83
|
})) === null || _transcript$punctuati2 === void 0 ? void 0 : _transcript$punctuati2.end));
|
|
76
84
|
return /*#__PURE__*/React.createElement("span", {
|
|
77
85
|
key: wordIndex,
|
|
86
|
+
"data-word-index": wordIndex,
|
|
78
87
|
style: {
|
|
79
88
|
color: isPunctuated ? color || accentColor : "white",
|
|
80
89
|
transform: "scaleX(".concat(isPunctuated ? 1.15 : 1, ") scaleY(").concat(isPunctuated ? 1.3 : 1, ")"),
|
|
81
|
-
transition: "transform 0.2s",
|
|
90
|
+
transition: measurementRef ? undefined : "transform 0.2s",
|
|
82
91
|
textShadow: "0px 0px 4px #000000, 0px 0px 4px #000000, 0px 0px 4px #000000, 0px 0px 10px #000000, 0px 0px 10px #000000"
|
|
83
92
|
}
|
|
84
93
|
}, word);
|
|
85
94
|
})));
|
|
95
|
+
}), !measurementRef && /*#__PURE__*/React.createElement(CaptionWordObjectOverlay, {
|
|
96
|
+
transcripts: transcripts,
|
|
97
|
+
geometry: wordObjectGeometry,
|
|
98
|
+
fontFamily: fontFamily,
|
|
99
|
+
color: color,
|
|
100
|
+
renderSource: function renderSource(transcript, wordIndex, at, ref) {
|
|
101
|
+
return /*#__PURE__*/React.createElement(_CaptionWordBoom, {
|
|
102
|
+
transcripts: [transcript],
|
|
103
|
+
color: color,
|
|
104
|
+
measurementRef: ref,
|
|
105
|
+
measurementFrame: at
|
|
106
|
+
});
|
|
107
|
+
}
|
|
86
108
|
}));
|
|
87
|
-
};
|
|
109
|
+
};
|
|
110
|
+
export { _CaptionWordBoom as CaptionWordBoom };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbsoluteFill, Sequence, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { CaptionWordObjectOverlay } from "../../../components/effects/CaptionWordObjectOverlay";
|
|
3
4
|
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
5
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
6
|
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
@@ -7,9 +8,14 @@ import { useTheme } from "../../hooks/useTheme";
|
|
|
7
8
|
import { getBrighterColor } from "../../../helpers/hexToRgb";
|
|
8
9
|
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
9
10
|
var fontFamily = FONT_FAMILIES.MONTSERRAT;
|
|
10
|
-
|
|
11
|
+
var _CaptionWordBubble = function CaptionWordBubble(_ref) {
|
|
11
12
|
var transcripts = _ref.transcripts,
|
|
12
|
-
color = _ref.color
|
|
13
|
+
color = _ref.color,
|
|
14
|
+
wordObjectGeometry = _ref.wordObjectGeometry,
|
|
15
|
+
_ref$measurementRef = _ref.measurementRef,
|
|
16
|
+
measurementRef = _ref$measurementRef === void 0 ? null : _ref$measurementRef,
|
|
17
|
+
_ref$measurementFrame = _ref.measurementFrame,
|
|
18
|
+
measurementFrame = _ref$measurementFrame === void 0 ? null : _ref$measurementFrame;
|
|
13
19
|
var _useVideoConfig = useVideoConfig(),
|
|
14
20
|
width = _useVideoConfig.width;
|
|
15
21
|
var _useOrientationBased = useOrientationBased({
|
|
@@ -34,7 +40,8 @@ export var CaptionWordBubble = function CaptionWordBubble(_ref) {
|
|
|
34
40
|
accentColor = _useTheme.accentColor,
|
|
35
41
|
accentContrast = _useTheme.accentContrast;
|
|
36
42
|
var containerWidth = width * 0.8;
|
|
37
|
-
var
|
|
43
|
+
var currentFrame = useCurrentFrame();
|
|
44
|
+
var frame = measurementFrame !== null && measurementFrame !== void 0 ? measurementFrame : currentFrame;
|
|
38
45
|
var brighterColor = getBrighterColor(primaryColor, accentColor);
|
|
39
46
|
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
40
47
|
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
@@ -42,9 +49,10 @@ export var CaptionWordBubble = function CaptionWordBubble(_ref) {
|
|
|
42
49
|
textFontSize = _distributeTextToFit.fontSize;
|
|
43
50
|
return /*#__PURE__*/React.createElement(Sequence, {
|
|
44
51
|
key: index,
|
|
45
|
-
from: transcript.from,
|
|
46
|
-
durationInFrames: transcript.durationInFrames
|
|
52
|
+
from: measurementRef ? 0 : transcript.from,
|
|
53
|
+
durationInFrames: measurementRef ? undefined : transcript.durationInFrames
|
|
47
54
|
}, /*#__PURE__*/React.createElement("p", {
|
|
55
|
+
ref: measurementRef,
|
|
48
56
|
style: {
|
|
49
57
|
display: "flex",
|
|
50
58
|
gap: textFontSize / 2,
|
|
@@ -75,16 +83,31 @@ export var CaptionWordBubble = function CaptionWordBubble(_ref) {
|
|
|
75
83
|
})) === null || _transcript$punctuati2 === void 0 ? void 0 : _transcript$punctuati2.end));
|
|
76
84
|
return /*#__PURE__*/React.createElement("span", {
|
|
77
85
|
key: wordIndex,
|
|
86
|
+
"data-word-index": wordIndex,
|
|
78
87
|
style: {
|
|
79
88
|
borderRadius: "10px",
|
|
80
89
|
padding: "0.5rem 0.75rem 0.5rem 0.75rem",
|
|
81
90
|
color: isPunctuated ? color || accentColor : "white",
|
|
82
91
|
background: isPunctuated ? accentContrast : "transparent",
|
|
83
92
|
transform: "scaleX(".concat(isPunctuated ? 1.15 : 1, ") scaleY(").concat(isPunctuated ? 1.3 : 1, ")"),
|
|
84
|
-
transition: "transform 0.2s",
|
|
93
|
+
transition: measurementRef ? undefined : "transform 0.2s",
|
|
85
94
|
textShadow: isPunctuated ? "" : "-3px 0 black, 0 3px black, 3px 0 black, 0 -3px black"
|
|
86
95
|
}
|
|
87
96
|
}, word);
|
|
88
97
|
})));
|
|
98
|
+
}), !measurementRef && /*#__PURE__*/React.createElement(CaptionWordObjectOverlay, {
|
|
99
|
+
transcripts: transcripts,
|
|
100
|
+
geometry: wordObjectGeometry,
|
|
101
|
+
fontFamily: fontFamily,
|
|
102
|
+
color: color,
|
|
103
|
+
renderSource: function renderSource(transcript, wordIndex, at, ref) {
|
|
104
|
+
return /*#__PURE__*/React.createElement(_CaptionWordBubble, {
|
|
105
|
+
transcripts: [transcript],
|
|
106
|
+
color: color,
|
|
107
|
+
measurementRef: ref,
|
|
108
|
+
measurementFrame: at
|
|
109
|
+
});
|
|
110
|
+
}
|
|
89
111
|
}));
|
|
90
|
-
};
|
|
112
|
+
};
|
|
113
|
+
export { _CaptionWordBubble as CaptionWordBubble };
|
|
@@ -17,7 +17,9 @@ export var Sentence = function Sentence(_ref) {
|
|
|
17
17
|
var lines = _ref.lines,
|
|
18
18
|
fontSize = _ref.fontSize,
|
|
19
19
|
maxWidth = _ref.maxWidth,
|
|
20
|
-
maxHeight = _ref.maxHeight
|
|
20
|
+
maxHeight = _ref.maxHeight,
|
|
21
|
+
headingTextColor = _ref.headingTextColor,
|
|
22
|
+
headingBackgroundColor = _ref.headingBackgroundColor;
|
|
21
23
|
var opacity = useTimeInterpolate([0, 0.5], [0, 1]);
|
|
22
24
|
var _useOrientationBased = useOrientationBased({
|
|
23
25
|
landscape: {
|
|
@@ -58,11 +60,13 @@ export var Sentence = function Sentence(_ref) {
|
|
|
58
60
|
opacity: opacity
|
|
59
61
|
}
|
|
60
62
|
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
style: _objectSpread({
|
|
63
|
+
style: _objectSpread(_objectSpread({
|
|
62
64
|
borderRadius: "30px",
|
|
63
65
|
textAlign: "right",
|
|
64
66
|
padding: CHROME_PADDING
|
|
65
|
-
}, defaultGlassmorphismStyles)
|
|
67
|
+
}, defaultGlassmorphismStyles), headingBackgroundColor ? {
|
|
68
|
+
background: headingBackgroundColor
|
|
69
|
+
} : {})
|
|
66
70
|
}, lines.map(function (line, index) {
|
|
67
71
|
return /*#__PURE__*/React.createElement(AnimatedSentenceDefault, {
|
|
68
72
|
key: index,
|
|
@@ -71,7 +75,7 @@ export var Sentence = function Sentence(_ref) {
|
|
|
71
75
|
}, /*#__PURE__*/React.createElement("p", {
|
|
72
76
|
style: {
|
|
73
77
|
animationDelay: "".concat(index * 1000, "ms"),
|
|
74
|
-
color: "#000",
|
|
78
|
+
color: headingTextColor || "#000",
|
|
75
79
|
fontWeight: 700,
|
|
76
80
|
fontSize: fontSize,
|
|
77
81
|
textTransform: "uppercase",
|
|
@@ -91,7 +91,8 @@ var getWordStepFrames = function getWordStepFrames(_ref3) {
|
|
|
91
91
|
return Math.max(1, Math.min(MAX_WORD_STEP_FRAMES, maxStepFrames));
|
|
92
92
|
};
|
|
93
93
|
var PositionedWords = function PositionedWords(_ref4) {
|
|
94
|
-
var
|
|
94
|
+
var headingTextColor = _ref4.headingTextColor,
|
|
95
|
+
backgroundWipeFrames = _ref4.backgroundWipeFrames,
|
|
95
96
|
fontSize = _ref4.fontSize,
|
|
96
97
|
frame = _ref4.frame,
|
|
97
98
|
staticUntilIndex = _ref4.staticUntilIndex,
|
|
@@ -147,7 +148,7 @@ var PositionedWords = function PositionedWords(_ref4) {
|
|
|
147
148
|
return /*#__PURE__*/React.createElement("span", {
|
|
148
149
|
key: "".concat(word, "-").concat(index),
|
|
149
150
|
style: {
|
|
150
|
-
color: TEXT_COLOR,
|
|
151
|
+
color: headingTextColor || TEXT_COLOR,
|
|
151
152
|
fontFamily: fontFamily,
|
|
152
153
|
fontSize: fontSize,
|
|
153
154
|
fontWeight: 900,
|
|
@@ -162,7 +163,9 @@ var PositionedWords = function PositionedWords(_ref4) {
|
|
|
162
163
|
};
|
|
163
164
|
export var TextFullCover = function TextFullCover(_ref5) {
|
|
164
165
|
var _ref6, _ref7;
|
|
165
|
-
var
|
|
166
|
+
var headingTextColor = _ref5.headingTextColor,
|
|
167
|
+
headingBackgroundColor = _ref5.headingBackgroundColor,
|
|
168
|
+
text = _ref5.text,
|
|
166
169
|
sentence = _ref5.sentence,
|
|
167
170
|
sentenceText = _ref5.sentenceText,
|
|
168
171
|
children = _ref5.children,
|
|
@@ -194,8 +197,8 @@ export var TextFullCover = function TextFullCover(_ref5) {
|
|
|
194
197
|
var stepIndex = Math.min(lastStepIndex, Math.floor(frame / wordStepFrames));
|
|
195
198
|
var previousStepIndex = Math.max(0, stepIndex - 1);
|
|
196
199
|
var frameInWord = frame - stepIndex * wordStepFrames;
|
|
197
|
-
var currentBackgroundColor = getBackgroundColor(stepIndex);
|
|
198
|
-
var previousBackgroundColor = getBackgroundColor(Math.max(0, stepIndex - 1));
|
|
200
|
+
var currentBackgroundColor = headingBackgroundColor || getBackgroundColor(stepIndex);
|
|
201
|
+
var previousBackgroundColor = headingBackgroundColor || getBackgroundColor(Math.max(0, stepIndex - 1));
|
|
199
202
|
var shouldWipe = stepIndex > 0 && frameInWord < backgroundWipeFrames;
|
|
200
203
|
var wipeProgress = shouldWipe ? interpolate(frameInWord, [0, backgroundWipeFrames], [0, 1], {
|
|
201
204
|
easing: Easing.out(Easing.cubic),
|
|
@@ -235,6 +238,7 @@ export var TextFullCover = function TextFullCover(_ref5) {
|
|
|
235
238
|
width: "100%"
|
|
236
239
|
}
|
|
237
240
|
})) : null, shouldWipe ? /*#__PURE__*/React.createElement(PositionedWords, {
|
|
241
|
+
headingTextColor: headingTextColor,
|
|
238
242
|
backgroundWipeFrames: backgroundWipeFrames,
|
|
239
243
|
fontSize: fontSize,
|
|
240
244
|
frame: frame,
|
|
@@ -254,6 +258,7 @@ export var TextFullCover = function TextFullCover(_ref5) {
|
|
|
254
258
|
zIndex: 1
|
|
255
259
|
}
|
|
256
260
|
}, /*#__PURE__*/React.createElement(PositionedWords, {
|
|
261
|
+
headingTextColor: headingTextColor,
|
|
257
262
|
backgroundWipeFrames: backgroundWipeFrames,
|
|
258
263
|
fontSize: fontSize,
|
|
259
264
|
frame: frame,
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
import { AbsoluteFill } from "remotion";
|
|
2
8
|
import { useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
3
9
|
import { AnimatedSentence } from "../default/Sentence/AnimatedSentence";
|
|
@@ -8,7 +14,9 @@ export var Sentence = function Sentence(_ref) {
|
|
|
8
14
|
var lines = _ref.lines,
|
|
9
15
|
fontSize = _ref.fontSize,
|
|
10
16
|
maxWidth = _ref.maxWidth,
|
|
11
|
-
maxHeight = _ref.maxHeight
|
|
17
|
+
maxHeight = _ref.maxHeight,
|
|
18
|
+
headingTextColor = _ref.headingTextColor,
|
|
19
|
+
headingBackgroundColor = _ref.headingBackgroundColor;
|
|
12
20
|
var opacity = useTimeInterpolate([0, 0.5], [0, 1]);
|
|
13
21
|
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
14
22
|
style: {
|
|
@@ -19,7 +27,7 @@ export var Sentence = function Sentence(_ref) {
|
|
|
19
27
|
style: {
|
|
20
28
|
width: maxWidth,
|
|
21
29
|
height: maxHeight,
|
|
22
|
-
background: "rgba(255, 255, 255, 0.75)",
|
|
30
|
+
background: headingBackgroundColor || "rgba(255, 255, 255, 0.75)",
|
|
23
31
|
borderRadius: "30px",
|
|
24
32
|
display: "flex",
|
|
25
33
|
flexDirection: "column",
|
|
@@ -33,7 +41,9 @@ export var Sentence = function Sentence(_ref) {
|
|
|
33
41
|
index: index,
|
|
34
42
|
linesCount: lines.length
|
|
35
43
|
}, /*#__PURE__*/React.createElement("p", {
|
|
36
|
-
style: {
|
|
44
|
+
style: _objectSpread(_objectSpread({}, headingTextColor ? {
|
|
45
|
+
color: headingTextColor
|
|
46
|
+
} : {}), {}, {
|
|
37
47
|
text: "#101840",
|
|
38
48
|
fontSize: fontSize,
|
|
39
49
|
fontWeight: "bold",
|
|
@@ -42,7 +52,7 @@ export var Sentence = function Sentence(_ref) {
|
|
|
42
52
|
margin: 0,
|
|
43
53
|
fontFamily: fontFamily,
|
|
44
54
|
textWrap: "nowrap"
|
|
45
|
-
}
|
|
55
|
+
})
|
|
46
56
|
}, line));
|
|
47
57
|
})));
|
|
48
58
|
};
|
|
@@ -380,7 +380,7 @@ var TransitionVideoTrack = function TransitionVideoTrack(_ref9) {
|
|
|
380
380
|
transitionAfter = _ref10$transitionAfte === void 0 ? true : _ref10$transitionAfte;
|
|
381
381
|
var ComponentToRender = RegisteredComponents[component];
|
|
382
382
|
var hasNextSegment = index < array.length - 1;
|
|
383
|
-
var shouldTransition = hasNextSegment && transitionAfter !== false;
|
|
383
|
+
var shouldTransition = hasNextSegment && transitionAfter !== false && otherProps.durationInFrames >= transition.durationInFrames && array[index + 1].layout.durationInFrames >= transition.durationInFrames;
|
|
384
384
|
if (!ComponentToRender) {
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
import { Audio } from "remotion";
|
|
1
|
+
import { Audio, Sequence } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export var Soundtrack = function Soundtrack() {
|
|
4
4
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
5
5
|
src = _ref.src,
|
|
6
6
|
volume = _ref.volume,
|
|
7
|
-
loop = _ref.loop
|
|
7
|
+
loop = _ref.loop,
|
|
8
|
+
_ref$startAudioFrom = _ref.startAudioFrom,
|
|
9
|
+
startAudioFrom = _ref$startAudioFrom === void 0 ? 0 : _ref$startAudioFrom;
|
|
8
10
|
if (!src) {
|
|
9
11
|
return null;
|
|
10
12
|
}
|
|
13
|
+
|
|
14
|
+
// Advance the loop's local timeline while keeping the entire media period.
|
|
15
|
+
// trimBefore would shorten every repetition and can exceed media duration.
|
|
16
|
+
if (loop) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
18
|
+
from: -startAudioFrom,
|
|
19
|
+
layout: "none",
|
|
20
|
+
showInTimeline: false
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Audio, {
|
|
22
|
+
src: src,
|
|
23
|
+
volume: volume,
|
|
24
|
+
loop: true
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
11
27
|
return /*#__PURE__*/React.createElement(Audio, {
|
|
12
28
|
src: src,
|
|
13
29
|
volume: volume,
|
|
14
|
-
loop: loop
|
|
30
|
+
loop: loop,
|
|
31
|
+
trimBefore: startAudioFrom
|
|
15
32
|
});
|
|
16
33
|
};
|