@zync/zync-screnplay-player 0.1.204 → 0.1.205
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/components/LottieAnimationGlobal.js +21 -21
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabColdOpen.js +741 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabConversationSpine.js +607 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabDocumentaryInset.js +606 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabRackFocus.js +603 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabStudioSet.js +589 -0
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +50 -50
- package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +4 -4
- package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -80
- package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +3 -3
- package/dist/screenplay/RemotionRenderer/development.js +164 -1239
- package/dist/screenplay/RemotionRenderer/helpers/convertToSeconds.js +8 -8
- package/dist/screenplay/RemotionRenderer/helpers/faceBasedVideoStyles.js +4 -4
- package/dist/screenplay/RemotionRenderer/helpers/faceCenteredVideoTransforms.js +46 -46
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabColdOpenLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabConversationSpineLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabDocumentaryInsetLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabRackFocusLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabStudioSetLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +25 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +51 -51
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +12 -2
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +20 -20
- package/package.json +47 -47
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AbsoluteFill, Easing, interpolate, OffthreadVideo, useCurrentFrame, useVideoConfig } from 'remotion';
|
|
3
|
+
import { loadFont as loadHeadlineFont } from '@remotion/google-fonts/Oswald';
|
|
4
|
+
import { loadFont as loadBodyFont } from '@remotion/google-fonts/Poppins';
|
|
5
|
+
import { useOrientationBased } from '../../hooks/useOrientationBased.js';
|
|
6
|
+
import { useTheme } from '../../theme/hooks/useTheme.js';
|
|
7
|
+
import { distributeTextToFit } from '../../theme/themes/default/Sentence/SentenceSimple.helpers.js';
|
|
8
|
+
import FaceCenteredVideo from '../utils/FaceCenteredVideo';
|
|
9
|
+
import { BlurOverlay } from '../utils/BlurOverlay';
|
|
10
|
+
import { CHROME_PADDING } from '../../config.js';
|
|
11
|
+
import { useVirtualBackground } from '../../hooks/useVirtualBackground';
|
|
12
|
+
import { VirtualBackgroundUnderlay } from '../backgrounds/VirtualBackgroundUnderlay';
|
|
13
|
+
var _loadHeadlineFont = loadHeadlineFont(),
|
|
14
|
+
headlineFontFamily = _loadHeadlineFont.fontFamily;
|
|
15
|
+
var _loadBodyFont = loadBodyFont(),
|
|
16
|
+
bodyFontFamily = _loadBodyFont.fontFamily;
|
|
17
|
+
var withAlpha = function withAlpha(color, alpha) {
|
|
18
|
+
if (!color || typeof color !== 'string' || !color.startsWith('#')) {
|
|
19
|
+
return color;
|
|
20
|
+
}
|
|
21
|
+
var hex = color.replace('#', '');
|
|
22
|
+
if (![3, 6].includes(hex.length)) {
|
|
23
|
+
return color;
|
|
24
|
+
}
|
|
25
|
+
var normalizedHex = hex.length === 3 ? hex.split('').map(function (_char) {
|
|
26
|
+
return _char + _char;
|
|
27
|
+
}).join('') : hex;
|
|
28
|
+
var intValue = Number.parseInt(normalizedHex, 16);
|
|
29
|
+
if (Number.isNaN(intValue)) {
|
|
30
|
+
return color;
|
|
31
|
+
}
|
|
32
|
+
var r = intValue >> 16 & 255;
|
|
33
|
+
var g = intValue >> 8 & 255;
|
|
34
|
+
var b = intValue & 255;
|
|
35
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
36
|
+
};
|
|
37
|
+
var sanitizeText = function sanitizeText(value) {
|
|
38
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
39
|
+
};
|
|
40
|
+
var clampLines = function clampLines() {
|
|
41
|
+
var lines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
42
|
+
var maxLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
43
|
+
if (lines.length <= maxLines) return lines;
|
|
44
|
+
var trimmed = lines.slice(0, maxLines);
|
|
45
|
+
var last = trimmed[maxLines - 1].trimEnd();
|
|
46
|
+
var shortened = last.length > 3 ? last.slice(0, -3).trimEnd() : last;
|
|
47
|
+
trimmed[maxLines - 1] = "".concat(shortened, "...");
|
|
48
|
+
return trimmed;
|
|
49
|
+
};
|
|
50
|
+
var mergeFilters = function mergeFilters() {
|
|
51
|
+
for (var _len = arguments.length, filters = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52
|
+
filters[_key] = arguments[_key];
|
|
53
|
+
}
|
|
54
|
+
var merged = filters.filter(Boolean);
|
|
55
|
+
return merged.length ? merged.join(' ') : undefined;
|
|
56
|
+
};
|
|
57
|
+
var interpolateWithClamp = function interpolateWithClamp(frame, inputRange, outputRange) {
|
|
58
|
+
var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Easing.out(Easing.ease);
|
|
59
|
+
return interpolate(frame, inputRange, outputRange, {
|
|
60
|
+
easing: easing,
|
|
61
|
+
extrapolateLeft: 'clamp',
|
|
62
|
+
extrapolateRight: 'clamp'
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
export var CreatorCollabDocumentaryInset = function CreatorCollabDocumentaryInset(_ref) {
|
|
66
|
+
var children = _ref.children,
|
|
67
|
+
text = _ref.text,
|
|
68
|
+
fullName = _ref.fullName,
|
|
69
|
+
title = _ref.title,
|
|
70
|
+
collaboratorName = _ref.collaboratorName,
|
|
71
|
+
collaboratorTitle = _ref.collaboratorTitle,
|
|
72
|
+
topicLabel = _ref.topicLabel,
|
|
73
|
+
activeSpeaker = _ref.activeSpeaker,
|
|
74
|
+
_ref$startVideoFrom = _ref.startVideoFrom,
|
|
75
|
+
startVideoFrom = _ref$startVideoFrom === void 0 ? 0 : _ref$startVideoFrom,
|
|
76
|
+
firstVideoFile = _ref.firstVideoFile,
|
|
77
|
+
_ref$startSecondVideo = _ref.startSecondVideoFrom,
|
|
78
|
+
startSecondVideoFrom = _ref$startSecondVideo === void 0 ? 0 : _ref$startSecondVideo,
|
|
79
|
+
secondVideoFile = _ref.secondVideoFile,
|
|
80
|
+
firstNoBackgroundVideoUrl = _ref.firstNoBackgroundVideoUrl,
|
|
81
|
+
firstNoBackgroundFaceMetadata = _ref.firstNoBackgroundFaceMetadata,
|
|
82
|
+
noBackgroundVideoEffects = _ref.noBackgroundVideoEffects;
|
|
83
|
+
var _useVideoConfig = useVideoConfig(),
|
|
84
|
+
width = _useVideoConfig.width,
|
|
85
|
+
height = _useVideoConfig.height,
|
|
86
|
+
fps = _useVideoConfig.fps,
|
|
87
|
+
durationInFrames = _useVideoConfig.durationInFrames;
|
|
88
|
+
var frame = useCurrentFrame();
|
|
89
|
+
var _useTheme = useTheme(),
|
|
90
|
+
primaryColor = _useTheme.primaryColor,
|
|
91
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
92
|
+
accentColor = _useTheme.accentColor;
|
|
93
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
94
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
95
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
96
|
+
var showVirtual = isVirtual && !!firstNoBackgroundVideoUrl;
|
|
97
|
+
var safeText = sanitizeText(text);
|
|
98
|
+
var safeTopicLabel = sanitizeText(topicLabel);
|
|
99
|
+
var safeFullName = sanitizeText(fullName);
|
|
100
|
+
var safeTitle = sanitizeText(title);
|
|
101
|
+
var safeCollaboratorName = sanitizeText(collaboratorName);
|
|
102
|
+
var safeCollaboratorTitle = sanitizeText(collaboratorTitle);
|
|
103
|
+
var speaker = sanitizeText(activeSpeaker).toLowerCase();
|
|
104
|
+
var collaboratorActive = speaker === 'collaborator';
|
|
105
|
+
var creatorActive = !collaboratorActive;
|
|
106
|
+
var hasTitle = Boolean(safeText);
|
|
107
|
+
var hasHostInfo = Boolean(safeFullName || safeTitle);
|
|
108
|
+
var hasCollaboratorInfo = Boolean(safeCollaboratorName || safeCollaboratorTitle);
|
|
109
|
+
var hasCollaboratorVideo = Boolean(secondVideoFile);
|
|
110
|
+
var showCutaway = hasCollaboratorVideo || hasCollaboratorInfo;
|
|
111
|
+
var _useOrientationBased = useOrientationBased({
|
|
112
|
+
landscape: {
|
|
113
|
+
framePadding: CHROME_PADDING + 12,
|
|
114
|
+
introTitleTop: height * 0.22,
|
|
115
|
+
introTitleLeft: CHROME_PADDING + 18,
|
|
116
|
+
introTitleWidth: Math.min(width * 0.52, 860),
|
|
117
|
+
introTitleHeight: height * 0.3,
|
|
118
|
+
introTitleFontSize: 92,
|
|
119
|
+
introTitleLines: 3,
|
|
120
|
+
settledTitleTop: CHROME_PADDING + 16,
|
|
121
|
+
settledTitleLeft: CHROME_PADDING + 18,
|
|
122
|
+
settledTitleWidth: Math.min(width * 0.32, 520),
|
|
123
|
+
settledTitleHeight: 120,
|
|
124
|
+
settledTitleFontSize: 40,
|
|
125
|
+
settledTitleLines: 2,
|
|
126
|
+
topicFontSize: 12,
|
|
127
|
+
lowerThirdLeft: CHROME_PADDING + 18,
|
|
128
|
+
lowerThirdBottom: 122,
|
|
129
|
+
lowerThirdWidth: Math.min(width * 0.33, 520),
|
|
130
|
+
hostNameMaxFontSize: 34,
|
|
131
|
+
hostRoleMaxFontSize: 20,
|
|
132
|
+
cutawayTop: height * 0.2,
|
|
133
|
+
cutawayRight: CHROME_PADDING - 16,
|
|
134
|
+
cutawayWidth: Math.min(width * 0.34, 520),
|
|
135
|
+
cutawayHeight: Math.min(height * 0.48, 420),
|
|
136
|
+
cutawayBleed: Math.min(58, width * 0.05),
|
|
137
|
+
cutawayRadius: 34,
|
|
138
|
+
cutawayLabelSize: 11,
|
|
139
|
+
cutawayNameSize: 28,
|
|
140
|
+
cutawayRoleSize: 14
|
|
141
|
+
},
|
|
142
|
+
portrait: {
|
|
143
|
+
framePadding: CHROME_PADDING + 4,
|
|
144
|
+
introTitleTop: height * 0.18,
|
|
145
|
+
introTitleLeft: width / 2,
|
|
146
|
+
introTitleWidth: Math.min(width * 0.8, 640),
|
|
147
|
+
introTitleHeight: height * 0.25,
|
|
148
|
+
introTitleFontSize: 64,
|
|
149
|
+
introTitleLines: 3,
|
|
150
|
+
settledTitleTop: CHROME_PADDING + 16,
|
|
151
|
+
settledTitleLeft: CHROME_PADDING + 8,
|
|
152
|
+
settledTitleWidth: Math.min(width * 0.64, 500),
|
|
153
|
+
settledTitleHeight: 128,
|
|
154
|
+
settledTitleFontSize: 34,
|
|
155
|
+
settledTitleLines: 2,
|
|
156
|
+
topicFontSize: 15,
|
|
157
|
+
lowerThirdLeft: CHROME_PADDING + 8,
|
|
158
|
+
lowerThirdBottom: 184,
|
|
159
|
+
lowerThirdWidth: Math.min(width * 0.6, 520),
|
|
160
|
+
hostNameMaxFontSize: 40,
|
|
161
|
+
hostRoleMaxFontSize: 24,
|
|
162
|
+
cutawayTop: CHROME_PADDING + 84,
|
|
163
|
+
cutawayRight: CHROME_PADDING - 4,
|
|
164
|
+
cutawayWidth: Math.min(width * 0.52, 360),
|
|
165
|
+
cutawayHeight: Math.min(height * 0.28, 284),
|
|
166
|
+
cutawayBleed: Math.min(26, width * 0.04),
|
|
167
|
+
cutawayRadius: 28,
|
|
168
|
+
cutawayLabelSize: 12,
|
|
169
|
+
cutawayNameSize: 24,
|
|
170
|
+
cutawayRoleSize: 15
|
|
171
|
+
},
|
|
172
|
+
square: {
|
|
173
|
+
framePadding: CHROME_PADDING + 4,
|
|
174
|
+
introTitleTop: height * 0.2,
|
|
175
|
+
introTitleLeft: width / 2,
|
|
176
|
+
introTitleWidth: Math.min(width * 0.76, 560),
|
|
177
|
+
introTitleHeight: height * 0.24,
|
|
178
|
+
introTitleFontSize: 58,
|
|
179
|
+
introTitleLines: 2,
|
|
180
|
+
settledTitleTop: CHROME_PADDING + 10,
|
|
181
|
+
settledTitleLeft: CHROME_PADDING + 6,
|
|
182
|
+
settledTitleWidth: Math.min(width * 0.62, 420),
|
|
183
|
+
settledTitleHeight: 88,
|
|
184
|
+
settledTitleFontSize: 28,
|
|
185
|
+
settledTitleLines: 1,
|
|
186
|
+
topicFontSize: 11,
|
|
187
|
+
lowerThirdLeft: CHROME_PADDING + 6,
|
|
188
|
+
lowerThirdBottom: 152,
|
|
189
|
+
lowerThirdWidth: Math.min(width * 0.56, 400),
|
|
190
|
+
hostNameMaxFontSize: 31,
|
|
191
|
+
hostRoleMaxFontSize: 18,
|
|
192
|
+
cutawayTop: CHROME_PADDING + 74,
|
|
193
|
+
cutawayRight: CHROME_PADDING - 2,
|
|
194
|
+
cutawayWidth: Math.min(width * 0.48, 288),
|
|
195
|
+
cutawayHeight: Math.min(height * 0.26, 220),
|
|
196
|
+
cutawayBleed: Math.min(22, width * 0.04),
|
|
197
|
+
cutawayRadius: 24,
|
|
198
|
+
cutawayLabelSize: 10,
|
|
199
|
+
cutawayNameSize: 19,
|
|
200
|
+
cutawayRoleSize: 12
|
|
201
|
+
}
|
|
202
|
+
}),
|
|
203
|
+
orientation = _useOrientationBased.orientation,
|
|
204
|
+
framePadding = _useOrientationBased.framePadding,
|
|
205
|
+
introTitleTop = _useOrientationBased.introTitleTop,
|
|
206
|
+
introTitleLeft = _useOrientationBased.introTitleLeft,
|
|
207
|
+
introTitleWidth = _useOrientationBased.introTitleWidth,
|
|
208
|
+
introTitleHeight = _useOrientationBased.introTitleHeight,
|
|
209
|
+
introTitleFontSize = _useOrientationBased.introTitleFontSize,
|
|
210
|
+
introTitleLines = _useOrientationBased.introTitleLines,
|
|
211
|
+
settledTitleTop = _useOrientationBased.settledTitleTop,
|
|
212
|
+
settledTitleLeft = _useOrientationBased.settledTitleLeft,
|
|
213
|
+
settledTitleWidth = _useOrientationBased.settledTitleWidth,
|
|
214
|
+
settledTitleHeight = _useOrientationBased.settledTitleHeight,
|
|
215
|
+
settledTitleFontSize = _useOrientationBased.settledTitleFontSize,
|
|
216
|
+
settledTitleLines = _useOrientationBased.settledTitleLines,
|
|
217
|
+
topicFontSize = _useOrientationBased.topicFontSize,
|
|
218
|
+
lowerThirdLeft = _useOrientationBased.lowerThirdLeft,
|
|
219
|
+
lowerThirdBottom = _useOrientationBased.lowerThirdBottom,
|
|
220
|
+
lowerThirdWidth = _useOrientationBased.lowerThirdWidth,
|
|
221
|
+
hostNameMaxFontSize = _useOrientationBased.hostNameMaxFontSize,
|
|
222
|
+
hostRoleMaxFontSize = _useOrientationBased.hostRoleMaxFontSize,
|
|
223
|
+
cutawayTop = _useOrientationBased.cutawayTop,
|
|
224
|
+
cutawayRight = _useOrientationBased.cutawayRight,
|
|
225
|
+
cutawayWidth = _useOrientationBased.cutawayWidth,
|
|
226
|
+
cutawayHeight = _useOrientationBased.cutawayHeight,
|
|
227
|
+
cutawayBleed = _useOrientationBased.cutawayBleed,
|
|
228
|
+
cutawayRadius = _useOrientationBased.cutawayRadius,
|
|
229
|
+
cutawayLabelSize = _useOrientationBased.cutawayLabelSize,
|
|
230
|
+
cutawayNameSize = _useOrientationBased.cutawayNameSize,
|
|
231
|
+
cutawayRoleSize = _useOrientationBased.cutawayRoleSize;
|
|
232
|
+
var isLandscape = orientation === 'landscape';
|
|
233
|
+
var isPortrait = orientation === 'portrait';
|
|
234
|
+
var introReveal = interpolateWithClamp(frame, [0, fps * 0.9], [0, 1]);
|
|
235
|
+
var introExit = interpolateWithClamp(frame, [fps * 1.6, fps * 2.35], [1, 0]);
|
|
236
|
+
var introOpacity = introReveal * introExit;
|
|
237
|
+
var introTranslateY = interpolateWithClamp(frame, [0, fps * 1, fps * 2.35], [26, 0, -24], Easing.out(Easing.cubic));
|
|
238
|
+
var settledOpacity = interpolateWithClamp(frame, [fps * 2.0, fps * 2.9], [0, 1]);
|
|
239
|
+
var settledTranslateY = interpolateWithClamp(frame, [fps * 2.0, fps * 2.9], [14, 0]);
|
|
240
|
+
var lowerThirdBaseOpacity = interpolateWithClamp(frame, [fps * 1.2, fps * 2.0], [0, 1]);
|
|
241
|
+
var lowerThirdSustain = durationInFrames > fps * 10 ? interpolateWithClamp(frame, [fps * 6.5, fps * 9.5], [1, 0.52]) : 1;
|
|
242
|
+
var lowerThirdOpacity = lowerThirdBaseOpacity * lowerThirdSustain;
|
|
243
|
+
var lowerThirdTranslateY = interpolateWithClamp(frame, [fps * 1.2, fps * 2.0], [18, 0]);
|
|
244
|
+
var cutawayReveal = interpolateWithClamp(frame, [fps * 1.9, fps * 3.1], [0, 1]);
|
|
245
|
+
var cutawayTranslateX = interpolateWithClamp(frame, [fps * 1.9, fps * 3.1], [54, 0], Easing.out(Easing.cubic));
|
|
246
|
+
var cutawayScale = interpolateWithClamp(frame, [fps * 1.9, fps * 3.1], [0.94, 1]);
|
|
247
|
+
var accent = accentColor || '#f4ca62';
|
|
248
|
+
var textColor = primaryContrast || '#ffffff';
|
|
249
|
+
var softTextColor = withAlpha(textColor, 0.78) || textColor;
|
|
250
|
+
var mutedTextColor = withAlpha(textColor, 0.62) || textColor;
|
|
251
|
+
var _distributeTextToFit = distributeTextToFit(safeText, introTitleWidth, introTitleHeight, introTitleFontSize),
|
|
252
|
+
introTitleRaw = _distributeTextToFit.lines,
|
|
253
|
+
introTitleFinalSize = _distributeTextToFit.fontSize;
|
|
254
|
+
var introTitle = clampLines(introTitleRaw, introTitleLines);
|
|
255
|
+
var _distributeTextToFit2 = distributeTextToFit(safeText, settledTitleWidth, settledTitleHeight, settledTitleFontSize),
|
|
256
|
+
settledTitleRaw = _distributeTextToFit2.lines,
|
|
257
|
+
settledTitleFinalSize = _distributeTextToFit2.fontSize;
|
|
258
|
+
var settledTitle = clampLines(settledTitleRaw, settledTitleLines);
|
|
259
|
+
var _distributeTextToFit3 = distributeTextToFit(safeFullName, lowerThirdWidth, isLandscape ? 76 : 94, hostNameMaxFontSize),
|
|
260
|
+
hostNameLines = _distributeTextToFit3.lines,
|
|
261
|
+
hostNameSize = _distributeTextToFit3.fontSize;
|
|
262
|
+
var _distributeTextToFit4 = distributeTextToFit(safeTitle, lowerThirdWidth, isLandscape ? 48 : 60, hostRoleMaxFontSize),
|
|
263
|
+
hostRoleLines = _distributeTextToFit4.lines,
|
|
264
|
+
hostRoleSize = _distributeTextToFit4.fontSize;
|
|
265
|
+
var cutawayTextWidth = Math.max(cutawayWidth - 36, 0);
|
|
266
|
+
var _distributeTextToFit5 = distributeTextToFit(safeCollaboratorName, cutawayTextWidth, isLandscape ? 68 : 56, cutawayNameSize),
|
|
267
|
+
guestNameRaw = _distributeTextToFit5.lines,
|
|
268
|
+
guestNameSize = _distributeTextToFit5.fontSize;
|
|
269
|
+
var guestNameLines = clampLines(guestNameRaw, 2);
|
|
270
|
+
var _distributeTextToFit6 = distributeTextToFit(safeCollaboratorTitle, cutawayTextWidth, isLandscape ? 48 : 40, cutawayRoleSize),
|
|
271
|
+
guestRoleRaw = _distributeTextToFit6.lines,
|
|
272
|
+
guestRoleSize = _distributeTextToFit6.fontSize;
|
|
273
|
+
var guestRoleLines = clampLines(guestRoleRaw, isLandscape ? 2 : 1);
|
|
274
|
+
var hostBaseScale = 1.015 + interpolateWithClamp(frame, [0, durationInFrames], [0, 0.02]);
|
|
275
|
+
var cutawayLabel = collaboratorActive ? 'RESPONDING' : 'COMING UP';
|
|
276
|
+
var renderCreatorVideo = function renderCreatorVideo(containerWidth, containerHeight, radius) {
|
|
277
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
278
|
+
url: virtualBgUrl,
|
|
279
|
+
width: "100%",
|
|
280
|
+
height: "100%",
|
|
281
|
+
borderRadius: radius,
|
|
282
|
+
zIndex: 1
|
|
283
|
+
}) : null, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
284
|
+
startFrom: startVideoFrom,
|
|
285
|
+
src: firstVideoFile,
|
|
286
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
287
|
+
containerWidth: containerWidth,
|
|
288
|
+
containerHeight: containerHeight,
|
|
289
|
+
useAveragePosition: true,
|
|
290
|
+
muted: false,
|
|
291
|
+
style: {
|
|
292
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
|
|
293
|
+
}
|
|
294
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
295
|
+
startFrom: startVideoFrom,
|
|
296
|
+
src: firstVideoFile,
|
|
297
|
+
muted: false,
|
|
298
|
+
style: {
|
|
299
|
+
width: '100%',
|
|
300
|
+
height: '100%',
|
|
301
|
+
objectFit: 'cover',
|
|
302
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
|
|
303
|
+
}
|
|
304
|
+
}), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
305
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && firstNoBackgroundVideoUrl,
|
|
306
|
+
width: containerWidth,
|
|
307
|
+
height: containerHeight,
|
|
308
|
+
zIndex: 2
|
|
309
|
+
}), firstNoBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
310
|
+
style: {
|
|
311
|
+
position: 'absolute',
|
|
312
|
+
inset: 0,
|
|
313
|
+
zIndex: 4
|
|
314
|
+
}
|
|
315
|
+
}, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
316
|
+
startFrom: startVideoFrom,
|
|
317
|
+
src: firstNoBackgroundVideoUrl,
|
|
318
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
319
|
+
containerWidth: containerWidth,
|
|
320
|
+
containerHeight: containerHeight,
|
|
321
|
+
useAveragePosition: true,
|
|
322
|
+
muted: true,
|
|
323
|
+
transparent: true,
|
|
324
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
325
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
326
|
+
startFrom: startVideoFrom,
|
|
327
|
+
src: firstNoBackgroundVideoUrl,
|
|
328
|
+
muted: true,
|
|
329
|
+
transparent: true,
|
|
330
|
+
style: {
|
|
331
|
+
width: '100%',
|
|
332
|
+
height: '100%',
|
|
333
|
+
objectFit: 'cover',
|
|
334
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? 'brightness(1.1) contrast(1.15) saturate(1.05)' : undefined
|
|
335
|
+
}
|
|
336
|
+
})) : null);
|
|
337
|
+
};
|
|
338
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
339
|
+
style: {
|
|
340
|
+
width: width,
|
|
341
|
+
height: height,
|
|
342
|
+
overflow: 'hidden',
|
|
343
|
+
backgroundColor: primaryColor || '#0f172a',
|
|
344
|
+
color: textColor,
|
|
345
|
+
fontFamily: bodyFontFamily
|
|
346
|
+
}
|
|
347
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
348
|
+
style: {
|
|
349
|
+
position: 'absolute',
|
|
350
|
+
inset: 0,
|
|
351
|
+
transform: "scale(".concat(hostBaseScale, ")"),
|
|
352
|
+
transformOrigin: 'center',
|
|
353
|
+
filter: creatorActive ? 'saturate(1.04)' : 'brightness(0.92) saturate(0.92)',
|
|
354
|
+
opacity: creatorActive ? 1 : 0.96,
|
|
355
|
+
zIndex: 1
|
|
356
|
+
}
|
|
357
|
+
}, renderCreatorVideo(width, height, 0)), /*#__PURE__*/React.createElement("div", {
|
|
358
|
+
style: {
|
|
359
|
+
position: 'absolute',
|
|
360
|
+
inset: 0,
|
|
361
|
+
zIndex: 2,
|
|
362
|
+
background: isLandscape ? "linear-gradient(100deg, ".concat(withAlpha('#000000', 0.74), " 0%, ").concat(withAlpha('#000000', 0.48), " 34%, ").concat(withAlpha('#000000', 0.12), " 60%, ").concat(withAlpha('#000000', 0.42), " 100%)") : "linear-gradient(180deg, ".concat(withAlpha('#000000', 0.44), " 0%, ").concat(withAlpha('#000000', 0.2), " 26%, ").concat(withAlpha('#000000', 0.2), " 62%, ").concat(withAlpha('#000000', 0.72), " 100%)")
|
|
363
|
+
}
|
|
364
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
365
|
+
style: {
|
|
366
|
+
position: 'absolute',
|
|
367
|
+
inset: 0,
|
|
368
|
+
zIndex: 3,
|
|
369
|
+
background: isLandscape ? "radial-gradient(circle at 84% 30%, ".concat(withAlpha(accent, collaboratorActive ? 0.26 : 0.18), " 0%, ").concat(withAlpha(accent, 0), " 44%)") : "radial-gradient(circle at 72% 26%, ".concat(withAlpha(accent, collaboratorActive ? 0.24 : 0.16), " 0%, ").concat(withAlpha(accent, 0), " 40%)")
|
|
370
|
+
}
|
|
371
|
+
}), hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
372
|
+
style: {
|
|
373
|
+
position: 'absolute',
|
|
374
|
+
top: introTitleTop,
|
|
375
|
+
left: isLandscape ? introTitleLeft : '50%',
|
|
376
|
+
width: introTitleWidth,
|
|
377
|
+
textAlign: isLandscape ? 'left' : 'center',
|
|
378
|
+
opacity: introOpacity,
|
|
379
|
+
transform: "".concat(isLandscape ? '' : 'translateX(-50%) ', "translateY(").concat(introTranslateY, "px)"),
|
|
380
|
+
zIndex: 6
|
|
381
|
+
}
|
|
382
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
383
|
+
style: {
|
|
384
|
+
fontSize: topicFontSize,
|
|
385
|
+
letterSpacing: '0.28em',
|
|
386
|
+
textTransform: 'uppercase',
|
|
387
|
+
color: mutedTextColor,
|
|
388
|
+
marginBottom: 10,
|
|
389
|
+
fontWeight: 600
|
|
390
|
+
}
|
|
391
|
+
}, safeTopicLabel), introTitle.map(function (line, index) {
|
|
392
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
393
|
+
key: "documentary-intro-line-".concat(index),
|
|
394
|
+
style: {
|
|
395
|
+
fontFamily: headlineFontFamily,
|
|
396
|
+
fontSize: introTitleFinalSize,
|
|
397
|
+
lineHeight: 0.96,
|
|
398
|
+
letterSpacing: '-0.03em',
|
|
399
|
+
fontWeight: 500,
|
|
400
|
+
marginBottom: index === introTitle.length - 1 ? 0 : 5,
|
|
401
|
+
textShadow: '0 14px 38px rgba(0, 0, 0, 0.42)'
|
|
402
|
+
}
|
|
403
|
+
}, line);
|
|
404
|
+
})), (hasTitle || safeTopicLabel) && /*#__PURE__*/React.createElement("div", {
|
|
405
|
+
style: {
|
|
406
|
+
position: 'absolute',
|
|
407
|
+
top: settledTitleTop,
|
|
408
|
+
left: settledTitleLeft,
|
|
409
|
+
width: settledTitleWidth,
|
|
410
|
+
opacity: settledOpacity,
|
|
411
|
+
transform: "translateY(".concat(settledTranslateY, "px)"),
|
|
412
|
+
zIndex: 7
|
|
413
|
+
}
|
|
414
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
415
|
+
style: {
|
|
416
|
+
fontSize: topicFontSize,
|
|
417
|
+
letterSpacing: '0.3em',
|
|
418
|
+
textTransform: 'uppercase',
|
|
419
|
+
color: mutedTextColor,
|
|
420
|
+
marginBottom: hasTitle ? 8 : 0,
|
|
421
|
+
fontWeight: 600
|
|
422
|
+
}
|
|
423
|
+
}, safeTopicLabel), settledTitle.map(function (line, index) {
|
|
424
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
425
|
+
key: "documentary-settled-line-".concat(index),
|
|
426
|
+
style: {
|
|
427
|
+
fontFamily: headlineFontFamily,
|
|
428
|
+
fontSize: settledTitleFinalSize,
|
|
429
|
+
lineHeight: 0.98,
|
|
430
|
+
letterSpacing: '-0.025em',
|
|
431
|
+
fontWeight: 500,
|
|
432
|
+
marginBottom: index === settledTitle.length - 1 ? 0 : 2,
|
|
433
|
+
textShadow: '0 10px 26px rgba(0, 0, 0, 0.3)'
|
|
434
|
+
}
|
|
435
|
+
}, line);
|
|
436
|
+
})), hasHostInfo && /*#__PURE__*/React.createElement("div", {
|
|
437
|
+
style: {
|
|
438
|
+
position: 'absolute',
|
|
439
|
+
left: lowerThirdLeft,
|
|
440
|
+
bottom: lowerThirdBottom,
|
|
441
|
+
width: lowerThirdWidth,
|
|
442
|
+
opacity: lowerThirdOpacity,
|
|
443
|
+
transform: "translateY(".concat(lowerThirdTranslateY, "px)"),
|
|
444
|
+
zIndex: 7
|
|
445
|
+
}
|
|
446
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
447
|
+
style: {
|
|
448
|
+
width: isPortrait ? 52 : 44,
|
|
449
|
+
height: 2,
|
|
450
|
+
backgroundColor: accent,
|
|
451
|
+
marginBottom: 12,
|
|
452
|
+
boxShadow: "0 0 18px ".concat(withAlpha(accent, 0.36))
|
|
453
|
+
}
|
|
454
|
+
}), hostNameLines.map(function (line, index) {
|
|
455
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
456
|
+
key: "documentary-host-name-".concat(index),
|
|
457
|
+
style: {
|
|
458
|
+
fontFamily: headlineFontFamily,
|
|
459
|
+
fontSize: hostNameSize,
|
|
460
|
+
lineHeight: 0.98,
|
|
461
|
+
letterSpacing: '-0.02em',
|
|
462
|
+
fontWeight: 500,
|
|
463
|
+
textShadow: '0 12px 28px rgba(0, 0, 0, 0.38)',
|
|
464
|
+
marginBottom: index === hostNameLines.length - 1 ? 0 : 2
|
|
465
|
+
}
|
|
466
|
+
}, line);
|
|
467
|
+
}), safeTitle && /*#__PURE__*/React.createElement("div", {
|
|
468
|
+
style: {
|
|
469
|
+
marginTop: safeFullName ? 6 : 0
|
|
470
|
+
}
|
|
471
|
+
}, hostRoleLines.map(function (line, index) {
|
|
472
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
473
|
+
key: "documentary-host-role-".concat(index),
|
|
474
|
+
style: {
|
|
475
|
+
fontSize: hostRoleSize,
|
|
476
|
+
lineHeight: 1.2,
|
|
477
|
+
color: softTextColor,
|
|
478
|
+
textShadow: '0 12px 28px rgba(0, 0, 0, 0.36)',
|
|
479
|
+
marginBottom: index === hostRoleLines.length - 1 ? 0 : 2
|
|
480
|
+
}
|
|
481
|
+
}, line);
|
|
482
|
+
}))), showCutaway && /*#__PURE__*/React.createElement("div", {
|
|
483
|
+
style: {
|
|
484
|
+
position: 'absolute',
|
|
485
|
+
top: cutawayTop,
|
|
486
|
+
right: cutawayRight - cutawayBleed,
|
|
487
|
+
width: cutawayWidth,
|
|
488
|
+
height: cutawayHeight,
|
|
489
|
+
opacity: cutawayReveal * (collaboratorActive ? 1 : 0.9),
|
|
490
|
+
transform: "translateX(".concat(cutawayTranslateX, "px) scale(").concat(cutawayScale, ") rotate(").concat(isLandscape ? '-1.8deg' : '-0.8deg', ")"),
|
|
491
|
+
transformOrigin: 'center right',
|
|
492
|
+
zIndex: 8
|
|
493
|
+
}
|
|
494
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
495
|
+
style: {
|
|
496
|
+
position: 'absolute',
|
|
497
|
+
inset: 0,
|
|
498
|
+
borderRadius: "".concat(cutawayRadius, "px"),
|
|
499
|
+
overflow: 'hidden',
|
|
500
|
+
border: "1px solid ".concat(withAlpha(textColor, collaboratorActive ? 0.34 : 0.2)),
|
|
501
|
+
boxShadow: '0 24px 50px rgba(0, 0, 0, 0.42)',
|
|
502
|
+
backgroundColor: withAlpha(primaryColor || '#0f172a', 0.64)
|
|
503
|
+
}
|
|
504
|
+
}, hasCollaboratorVideo ? /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
505
|
+
startFrom: startSecondVideoFrom,
|
|
506
|
+
src: secondVideoFile,
|
|
507
|
+
muted: true,
|
|
508
|
+
style: {
|
|
509
|
+
width: '100%',
|
|
510
|
+
height: '100%',
|
|
511
|
+
objectFit: 'cover',
|
|
512
|
+
objectPosition: '50% 18%',
|
|
513
|
+
transform: "scale(".concat(collaboratorActive ? 1.05 : 1.02, ")"),
|
|
514
|
+
filter: collaboratorActive ? 'brightness(1.06) saturate(1.08)' : 'brightness(0.78) saturate(0.82)'
|
|
515
|
+
}
|
|
516
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
517
|
+
style: {
|
|
518
|
+
position: 'absolute',
|
|
519
|
+
inset: 0,
|
|
520
|
+
background: "linear-gradient(135deg, ".concat(withAlpha(accent, 0.25), " 0%, ").concat(withAlpha(primaryColor || '#0f172a', 0.94), " 100%)")
|
|
521
|
+
}
|
|
522
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
523
|
+
style: {
|
|
524
|
+
position: 'absolute',
|
|
525
|
+
inset: 0,
|
|
526
|
+
background: "radial-gradient(ellipse at center, ".concat(withAlpha('#000000', 0), " 35%, ").concat(withAlpha('#000000', 0.66), " 100%)"),
|
|
527
|
+
pointerEvents: 'none'
|
|
528
|
+
}
|
|
529
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
530
|
+
style: {
|
|
531
|
+
position: 'absolute',
|
|
532
|
+
inset: 0,
|
|
533
|
+
background: "linear-gradient(180deg, ".concat(withAlpha('#000000', 0.1), " 0%, ").concat(withAlpha('#000000', 0.74), " 100%)"),
|
|
534
|
+
pointerEvents: 'none'
|
|
535
|
+
}
|
|
536
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
537
|
+
style: {
|
|
538
|
+
position: 'absolute',
|
|
539
|
+
left: 16,
|
|
540
|
+
right: 16,
|
|
541
|
+
top: 14
|
|
542
|
+
}
|
|
543
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
544
|
+
style: {
|
|
545
|
+
width: 38,
|
|
546
|
+
height: 2,
|
|
547
|
+
backgroundColor: accent,
|
|
548
|
+
marginBottom: 8
|
|
549
|
+
}
|
|
550
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
551
|
+
style: {
|
|
552
|
+
fontSize: cutawayLabelSize,
|
|
553
|
+
letterSpacing: '0.24em',
|
|
554
|
+
textTransform: 'uppercase',
|
|
555
|
+
fontWeight: 700,
|
|
556
|
+
color: collaboratorActive ? accent : mutedTextColor
|
|
557
|
+
}
|
|
558
|
+
}, cutawayLabel)), /*#__PURE__*/React.createElement("div", {
|
|
559
|
+
style: {
|
|
560
|
+
position: 'absolute',
|
|
561
|
+
left: 16,
|
|
562
|
+
right: 16,
|
|
563
|
+
bottom: 16
|
|
564
|
+
}
|
|
565
|
+
}, guestNameLines.map(function (line, index) {
|
|
566
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
567
|
+
key: "documentary-guest-name-".concat(index),
|
|
568
|
+
style: {
|
|
569
|
+
fontFamily: headlineFontFamily,
|
|
570
|
+
fontSize: guestNameSize,
|
|
571
|
+
lineHeight: 0.99,
|
|
572
|
+
letterSpacing: '-0.02em',
|
|
573
|
+
fontWeight: 500,
|
|
574
|
+
textShadow: '0 10px 26px rgba(0, 0, 0, 0.48)',
|
|
575
|
+
marginBottom: index === guestNameLines.length - 1 ? 0 : 1
|
|
576
|
+
}
|
|
577
|
+
}, line);
|
|
578
|
+
}), safeCollaboratorTitle && /*#__PURE__*/React.createElement("div", {
|
|
579
|
+
style: {
|
|
580
|
+
marginTop: safeCollaboratorName ? 5 : 0
|
|
581
|
+
}
|
|
582
|
+
}, guestRoleLines.map(function (line, index) {
|
|
583
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
584
|
+
key: "documentary-guest-role-".concat(index),
|
|
585
|
+
style: {
|
|
586
|
+
fontSize: guestRoleSize,
|
|
587
|
+
lineHeight: 1.2,
|
|
588
|
+
color: softTextColor,
|
|
589
|
+
marginBottom: index === guestRoleLines.length - 1 ? 0 : 1
|
|
590
|
+
}
|
|
591
|
+
}, line);
|
|
592
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
593
|
+
style: {
|
|
594
|
+
position: 'absolute',
|
|
595
|
+
inset: framePadding,
|
|
596
|
+
border: "1px solid ".concat(withAlpha(accent, collaboratorActive ? 0.24 : 0.12)),
|
|
597
|
+
opacity: isPortrait ? 0.4 : 0.34,
|
|
598
|
+
pointerEvents: 'none',
|
|
599
|
+
zIndex: 5
|
|
600
|
+
}
|
|
601
|
+
})), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
602
|
+
style: {
|
|
603
|
+
zIndex: 100
|
|
604
|
+
}
|
|
605
|
+
}, children));
|
|
606
|
+
};
|