@zync/zync-screnplay-player 0.1.208 → 0.1.210

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.
@@ -1,765 +1,18 @@
1
+ var _excluded = ["children"];
2
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
5
  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
- import { useSafeZoneInsets } from '../utils/SafeZones';
14
- var _loadHeadlineFont = loadHeadlineFont(),
15
- headlineFontFamily = _loadHeadlineFont.fontFamily;
16
- var _loadBodyFont = loadBodyFont(),
17
- bodyFontFamily = _loadBodyFont.fontFamily;
18
- var withAlpha = function withAlpha(color, alpha) {
19
- if (!color || typeof color !== 'string' || !color.startsWith('#')) {
20
- return color;
21
- }
22
- var hex = color.replace('#', '');
23
- if (![3, 6].includes(hex.length)) {
24
- return color;
25
- }
26
- var normalizedHex = hex.length === 3 ? hex.split('').map(function (_char) {
27
- return _char + _char;
28
- }).join('') : hex;
29
- var intValue = Number.parseInt(normalizedHex, 16);
30
- if (Number.isNaN(intValue)) {
31
- return color;
32
- }
33
- var r = intValue >> 16 & 255;
34
- var g = intValue >> 8 & 255;
35
- var b = intValue & 255;
36
- return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
37
- };
38
- var sanitizeText = function sanitizeText(value) {
39
- return typeof value === 'string' ? value.trim() : '';
40
- };
41
- var clampLines = function clampLines() {
42
- var lines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
43
- var maxLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
44
- if (lines.length <= maxLines) return lines;
45
- var trimmed = lines.slice(0, maxLines);
46
- var last = trimmed[maxLines - 1].trimEnd();
47
- var shortened = last.length > 3 ? last.slice(0, -3).trimEnd() : last;
48
- trimmed[maxLines - 1] = "".concat(shortened, "...");
49
- return trimmed;
50
- };
51
- var mergeFilters = function mergeFilters() {
52
- for (var _len = arguments.length, filters = new Array(_len), _key = 0; _key < _len; _key++) {
53
- filters[_key] = arguments[_key];
54
- }
55
- var merged = filters.filter(Boolean);
56
- return merged.length ? merged.join(' ') : undefined;
57
- };
58
- var interpolateWithClamp = function interpolateWithClamp(frame, inputRange, outputRange) {
59
- var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Easing.out(Easing.ease);
60
- return interpolate(frame, inputRange, outputRange, {
61
- easing: easing,
62
- extrapolateLeft: 'clamp',
63
- extrapolateRight: 'clamp'
64
- });
65
- };
6
+ import { CreatorCollabColdOpenVisual } from './CreatorCollabColdOpenVisual.jsx';
66
7
  export var CreatorCollabColdOpen = function CreatorCollabColdOpen(_ref) {
67
8
  var children = _ref.children,
68
- text = _ref.text,
69
- fullName = _ref.fullName,
70
- title = _ref.title,
71
- collaboratorName = _ref.collaboratorName,
72
- collaboratorTitle = _ref.collaboratorTitle,
73
- topicLabel = _ref.topicLabel,
74
- activeSpeaker = _ref.activeSpeaker,
75
- _ref$startVideoFrom = _ref.startVideoFrom,
76
- startVideoFrom = _ref$startVideoFrom === void 0 ? 0 : _ref$startVideoFrom,
77
- firstVideoFile = _ref.firstVideoFile,
78
- _ref$startSecondVideo = _ref.startSecondVideoFrom,
79
- startSecondVideoFrom = _ref$startSecondVideo === void 0 ? 0 : _ref$startSecondVideo,
80
- secondVideoFile = _ref.secondVideoFile,
81
- firstNoBackgroundVideoUrl = _ref.firstNoBackgroundVideoUrl,
82
- firstNoBackgroundFaceMetadata = _ref.firstNoBackgroundFaceMetadata,
83
- noBackgroundVideoEffects = _ref.noBackgroundVideoEffects;
84
- var _useVideoConfig = useVideoConfig(),
85
- width = _useVideoConfig.width,
86
- height = _useVideoConfig.height,
87
- fps = _useVideoConfig.fps,
88
- durationInFrames = _useVideoConfig.durationInFrames;
89
- var frame = useCurrentFrame();
90
- var _useTheme = useTheme(),
91
- primaryColor = _useTheme.primaryColor,
92
- primaryContrast = _useTheme.primaryContrast,
93
- accentColor = _useTheme.accentColor,
94
- accentContrast = _useTheme.accentContrast;
95
- var _useVirtualBackground = useVirtualBackground(),
96
- isVirtual = _useVirtualBackground.isVirtual,
97
- virtualBgUrl = _useVirtualBackground.url;
98
- var _useSafeZoneInsets = useSafeZoneInsets(),
99
- insetTop = _useSafeZoneInsets.insetTop,
100
- insetLeft = _useSafeZoneInsets.insetLeft,
101
- insetRight = _useSafeZoneInsets.insetRight,
102
- insetBottom = _useSafeZoneInsets.insetBottom;
103
- var showVirtual = isVirtual && !!firstNoBackgroundVideoUrl;
104
- var safeText = sanitizeText(text);
105
- var safeFullName = sanitizeText(fullName);
106
- var safeTitle = sanitizeText(title);
107
- var safeCollaboratorName = sanitizeText(collaboratorName);
108
- var safeCollaboratorTitle = sanitizeText(collaboratorTitle);
109
- var safeTopicLabel = sanitizeText(topicLabel);
110
- var speaker = sanitizeText(activeSpeaker).toLowerCase();
111
- var creatorActive = speaker !== 'collaborator';
112
- var collaboratorActive = speaker === 'collaborator';
113
- var hasTitle = Boolean(safeText);
114
- var hasCreatorInfo = Boolean(safeFullName || safeTitle);
115
- var hasCollaboratorText = Boolean(safeCollaboratorName || safeCollaboratorTitle);
116
- var showCollaboratorVideo = Boolean(secondVideoFile);
117
- var shouldShowResponderTease = Boolean(showCollaboratorVideo || hasCollaboratorText);
118
- var _useOrientationBased = useOrientationBased({
119
- landscape: {
120
- padding: CHROME_PADDING + 12,
121
- introTitleMaxWidth: Math.min(width * 0.56, 820),
122
- introTitleMaxHeight: height * 0.32,
123
- introTitleMaxFontSize: 98,
124
- introTitleTop: height * 0.23,
125
- introTitleLeft: CHROME_PADDING + 12,
126
- introTitleCentered: false,
127
- introTitleMaxLines: 3,
128
- compactTitleMaxWidth: Math.min(width * 0.36, 560),
129
- compactTitleMaxHeight: 120,
130
- compactTitleMaxFontSize: 38,
131
- compactTitleTop: CHROME_PADDING + 12,
132
- compactTitleLeft: CHROME_PADDING + 12,
133
- compactTitleCentered: false,
134
- compactTitleMaxLines: 2,
135
- topicFontSize: 13,
136
- lowerThirdLeft: CHROME_PADDING + 12,
137
- lowerThirdBottom: 118,
138
- lowerThirdMaxWidth: Math.min(width * 0.34, 520),
139
- lowerThirdNameMaxFontSize: 34,
140
- lowerThirdRoleMaxFontSize: 20,
141
- previewWidth: Math.min(width * 0.264, 352),
142
- previewHeight: Math.min(width * 0.264, 352) * 16 / 9,
143
- previewTop: height * 0.14,
144
- previewRight: 0,
145
- previewBleed: 0,
146
- previewRadius: 32,
147
- previewPadding: 22,
148
- previewLabelFontSize: 13,
149
- previewNameMaxFontSize: 30,
150
- previewRoleMaxFontSize: 16,
151
- previewTitleMaxLines: 2
152
- },
153
- portrait: {
154
- padding: CHROME_PADDING + 4,
155
- introTitleMaxWidth: Math.min(width * 0.82, 680),
156
- introTitleMaxHeight: height * 0.23,
157
- introTitleMaxFontSize: 68,
158
- introTitleTop: height * 0.18,
159
- introTitleLeft: width / 2,
160
- introTitleCentered: true,
161
- introTitleMaxLines: 3,
162
- compactTitleMaxWidth: Math.min(width * 0.76, 620),
163
- compactTitleMaxHeight: 130,
164
- compactTitleMaxFontSize: 44,
165
- compactTitleTop: CHROME_PADDING + 18,
166
- compactTitleLeft: CHROME_PADDING + 6,
167
- compactTitleCentered: false,
168
- compactTitleMaxLines: 2,
169
- topicFontSize: 17,
170
- lowerThirdLeft: CHROME_PADDING + 6,
171
- lowerThirdBottom: 342,
172
- lowerThirdMaxWidth: Math.min(width * 0.7, 620),
173
- lowerThirdNameMaxFontSize: 48,
174
- lowerThirdRoleMaxFontSize: 28,
175
- previewWidth: Math.min(width * 0.44, 320),
176
- previewHeight: Math.min(height * 0.44, 460),
177
- previewTop: CHROME_PADDING + 72,
178
- previewRight: 0,
179
- previewBleed: Math.min(14, width * 0.02),
180
- previewRadius: 28,
181
- previewPadding: 20,
182
- previewLabelFontSize: 14,
183
- previewNameMaxFontSize: 37,
184
- previewRoleMaxFontSize: 18,
185
- previewTitleMaxLines: 2
186
- },
187
- square: {
188
- padding: CHROME_PADDING + 4,
189
- introTitleMaxWidth: Math.min(width * 0.78, 620),
190
- introTitleMaxHeight: height * 0.22,
191
- introTitleMaxFontSize: 60,
192
- introTitleTop: height * 0.19,
193
- introTitleLeft: width / 2,
194
- introTitleCentered: true,
195
- introTitleMaxLines: 2,
196
- compactTitleMaxWidth: Math.min(width * 0.74, 540),
197
- compactTitleMaxHeight: 108,
198
- compactTitleMaxFontSize: 36,
199
- compactTitleTop: CHROME_PADDING + 12,
200
- compactTitleLeft: CHROME_PADDING + 4,
201
- compactTitleCentered: false,
202
- compactTitleMaxLines: 1,
203
- topicFontSize: 13,
204
- lowerThirdLeft: CHROME_PADDING + 4,
205
- lowerThirdBottom: 210,
206
- lowerThirdMaxWidth: Math.min(width * 0.62, 440),
207
- lowerThirdNameMaxFontSize: 34,
208
- lowerThirdRoleMaxFontSize: 20,
209
- previewWidth: Math.min(width * 0.34, 230),
210
- previewHeight: Math.min(height * 0.37, 270),
211
- previewTop: CHROME_PADDING + 64,
212
- previewRight: 0,
213
- previewBleed: Math.min(12, width * 0.02),
214
- previewRadius: 24,
215
- previewPadding: 18,
216
- previewLabelFontSize: 13,
217
- previewNameMaxFontSize: 24,
218
- previewRoleMaxFontSize: 14,
219
- previewTitleMaxLines: 1
220
- }
221
- }),
222
- orientation = _useOrientationBased.orientation,
223
- padding = _useOrientationBased.padding,
224
- introTitleMaxWidth = _useOrientationBased.introTitleMaxWidth,
225
- introTitleMaxHeight = _useOrientationBased.introTitleMaxHeight,
226
- introTitleMaxFontSize = _useOrientationBased.introTitleMaxFontSize,
227
- introTitleTop = _useOrientationBased.introTitleTop,
228
- introTitleLeft = _useOrientationBased.introTitleLeft,
229
- introTitleCentered = _useOrientationBased.introTitleCentered,
230
- introTitleMaxLines = _useOrientationBased.introTitleMaxLines,
231
- compactTitleMaxWidth = _useOrientationBased.compactTitleMaxWidth,
232
- compactTitleMaxHeight = _useOrientationBased.compactTitleMaxHeight,
233
- compactTitleMaxFontSize = _useOrientationBased.compactTitleMaxFontSize,
234
- compactTitleTop = _useOrientationBased.compactTitleTop,
235
- compactTitleLeft = _useOrientationBased.compactTitleLeft,
236
- compactTitleCentered = _useOrientationBased.compactTitleCentered,
237
- compactTitleMaxLines = _useOrientationBased.compactTitleMaxLines,
238
- topicFontSize = _useOrientationBased.topicFontSize,
239
- lowerThirdLeft = _useOrientationBased.lowerThirdLeft,
240
- lowerThirdBottom = _useOrientationBased.lowerThirdBottom,
241
- lowerThirdMaxWidth = _useOrientationBased.lowerThirdMaxWidth,
242
- lowerThirdNameMaxFontSize = _useOrientationBased.lowerThirdNameMaxFontSize,
243
- lowerThirdRoleMaxFontSize = _useOrientationBased.lowerThirdRoleMaxFontSize,
244
- previewWidth = _useOrientationBased.previewWidth,
245
- previewHeight = _useOrientationBased.previewHeight,
246
- previewTop = _useOrientationBased.previewTop,
247
- previewRight = _useOrientationBased.previewRight,
248
- previewBleed = _useOrientationBased.previewBleed,
249
- previewRadius = _useOrientationBased.previewRadius,
250
- previewPadding = _useOrientationBased.previewPadding,
251
- previewLabelFontSize = _useOrientationBased.previewLabelFontSize,
252
- previewNameMaxFontSize = _useOrientationBased.previewNameMaxFontSize,
253
- previewRoleMaxFontSize = _useOrientationBased.previewRoleMaxFontSize,
254
- previewTitleMaxLines = _useOrientationBased.previewTitleMaxLines;
255
- var isLandscape = orientation === 'landscape';
256
- var isPortrait = orientation === 'portrait';
257
- var isSquare = orientation === 'square';
258
- var titleRevealEnd = fps * 0.95;
259
- var titleExitStart = fps * 1.75;
260
- var titleExitEnd = fps * 2.5;
261
- var lowerThirdEnterStart = fps * 1.1;
262
- var lowerThirdEnterEnd = fps * 1.85;
263
- var previewEnterStart = fps * 1.8;
264
- var previewEnterEnd = fps * 2.9;
265
- var compactTitleEnterStart = isSquare ? 0 : fps * 2.1;
266
- var compactTitleEnterEnd = isSquare ? fps * 0.65 : fps * 3.0;
267
- var longHoldFadeStart = Math.min(durationInFrames - fps * 1.5, fps * 6);
268
- var longHoldFadeEnd = Math.min(durationInFrames - fps * 0.6, fps * 7.4);
269
- var textColor = primaryContrast || '#ffffff';
270
- var accent = accentColor || '#f7d774';
271
- var accentTextColor = accentContrast || primaryColor || '#111827';
272
- var softTextColor = withAlpha(textColor, 0.78) || textColor;
273
- var subtleTextColor = withAlpha(textColor, 0.58) || textColor;
274
- var titleShadow = '0 18px 48px rgba(0, 0, 0, 0.38)';
275
- var lowerThirdShadow = '0 14px 32px rgba(0, 0, 0, 0.28)';
276
- var previewShadow = '0 22px 48px rgba(0, 0, 0, 0.34)';
277
- var _distributeTextToFit = distributeTextToFit(safeText, introTitleMaxWidth, introTitleMaxHeight, introTitleMaxFontSize),
278
- introTitleLinesRaw = _distributeTextToFit.lines,
279
- introTitleFontSize = _distributeTextToFit.fontSize;
280
- var introTitleLines = clampLines(introTitleLinesRaw, introTitleMaxLines);
281
- var introTitleLineMaskHeight = Math.ceil(introTitleFontSize * 1.12);
282
- var _distributeTextToFit2 = distributeTextToFit(safeText, compactTitleMaxWidth, compactTitleMaxHeight, compactTitleMaxFontSize),
283
- compactTitleLinesRaw = _distributeTextToFit2.lines,
284
- compactTitleFontSize = _distributeTextToFit2.fontSize;
285
- var compactTitleLines = clampLines(compactTitleLinesRaw, compactTitleMaxLines);
286
- var _distributeTextToFit3 = distributeTextToFit(safeFullName, lowerThirdMaxWidth, isLandscape ? 78 : 94, lowerThirdNameMaxFontSize),
287
- hostNameLines = _distributeTextToFit3.lines,
288
- hostNameFontSize = _distributeTextToFit3.fontSize;
289
- var _distributeTextToFit4 = distributeTextToFit(safeTitle, lowerThirdMaxWidth, isLandscape ? 48 : 64, lowerThirdRoleMaxFontSize),
290
- hostRoleLines = _distributeTextToFit4.lines,
291
- hostRoleFontSize = _distributeTextToFit4.fontSize;
292
- var previewTextWidth = Math.max(previewWidth - previewPadding * 2, 0);
293
- var _distributeTextToFit5 = distributeTextToFit(safeCollaboratorName, previewTextWidth, isLandscape ? 64 : 58, previewNameMaxFontSize),
294
- collaboratorNameLinesRaw = _distributeTextToFit5.lines,
295
- collaboratorNameFontSize = _distributeTextToFit5.fontSize;
296
- var collaboratorNameLines = clampLines(collaboratorNameLinesRaw, isLandscape ? 2 : 2);
297
- var _distributeTextToFit6 = distributeTextToFit(safeCollaboratorTitle, previewTextWidth, isLandscape ? 48 : 42, previewRoleMaxFontSize),
298
- collaboratorRoleLinesRaw = _distributeTextToFit6.lines,
299
- collaboratorRoleFontSize = _distributeTextToFit6.fontSize;
300
- var collaboratorRoleLines = clampLines(collaboratorRoleLinesRaw, previewTitleMaxLines);
301
- var introTitleOpacity = isLandscape ? 1 : 0;
302
- var introTitleTranslateY = 0;
303
- var introTitleScale = 1;
304
- var holdOpacity = durationInFrames > fps * 8 ? interpolateWithClamp(frame, [longHoldFadeStart, longHoldFadeEnd], [1, 0.72]) : 1;
305
- var compactOpacity = isLandscape ? 0 : holdOpacity;
306
- var compactTranslateY = 0;
307
- var compactPlateRightInset = interpolateWithClamp(frame, [compactTitleEnterStart, compactTitleEnterStart + 5, compactTitleEnterStart + 9], [100, -4, 0], Easing.out(Easing.cubic));
308
- var compactTopicEnterStart = compactTitleEnterStart + 3;
309
- var compactTopicOpacity = interpolateWithClamp(frame, [compactTopicEnterStart, compactTopicEnterStart + 4], [0, 1]);
310
- var compactTopicTranslateY = interpolateWithClamp(frame, [compactTopicEnterStart, compactTopicEnterStart + 4, compactTopicEnterStart + 8], [10, -2, 0], Easing.out(Easing.cubic));
311
- var compactTopicScale = interpolateWithClamp(frame, [compactTopicEnterStart, compactTopicEnterStart + 4, compactTopicEnterStart + 8], [0.96, 1.03, 1], Easing.out(Easing.cubic));
312
- var lowerThirdSustain = durationInFrames > fps * 8 ? interpolateWithClamp(frame, [fps * 5.4, fps * 7.4], [1, 0.45]) : 1;
313
- var lowerThirdRuleScaleX = interpolateWithClamp(frame, [lowerThirdEnterStart, lowerThirdEnterStart + 5, lowerThirdEnterStart + 9], [0, 1.08, 1], Easing.out(Easing.cubic));
314
- var lowerThirdRuleOpacity = interpolateWithClamp(frame, [lowerThirdEnterStart, lowerThirdEnterStart + 4], [0, 1]) * lowerThirdSustain;
315
- var lowerThirdNameOpacity = interpolateWithClamp(frame, [lowerThirdEnterStart + 3, lowerThirdEnterEnd], [0, 1]) * lowerThirdSustain;
316
- var lowerThirdNameTranslateY = interpolateWithClamp(frame, [lowerThirdEnterStart + 3, lowerThirdEnterStart + 9, lowerThirdEnterEnd], [18, -4, 0], Easing.out(Easing.cubic));
317
- var lowerThirdRoleOpacity = interpolateWithClamp(frame, [lowerThirdEnterStart + 7, lowerThirdEnterEnd + 2], [0, 1]) * lowerThirdSustain;
318
- var lowerThirdRoleTranslateY = interpolateWithClamp(frame, [lowerThirdEnterStart + 7, lowerThirdEnterStart + 12, lowerThirdEnterEnd + 2], [14, -2, 0], Easing.out(Easing.cubic));
319
- var previewReveal = interpolateWithClamp(frame, [previewEnterStart, previewEnterEnd], [0, 1]);
320
- var previewTranslateX = interpolateWithClamp(frame, [previewEnterStart, previewEnterEnd], [26, 0], Easing.out(Easing.cubic));
321
- var previewScaleIn = interpolateWithClamp(frame, [previewEnterStart, previewEnterStart + 7, previewEnterEnd], [0.94, 1.03, 1], Easing.out(Easing.cubic));
322
- var previewRevealWidth = interpolateWithClamp(frame, [previewEnterStart, previewEnterStart + 10], [0, previewWidth], Easing.out(Easing.cubic));
323
- var previewLabelEnterStart = previewEnterStart + 3;
324
- var previewLabelOpacity = interpolateWithClamp(frame, [previewLabelEnterStart, previewLabelEnterStart + 4], [0, 1]);
325
- var previewLabelTranslateY = interpolateWithClamp(frame, [previewLabelEnterStart, previewLabelEnterStart + 4, previewLabelEnterStart + 10], [-10, 2, 0], Easing.out(Easing.cubic));
326
- var previewLabelScale = interpolateWithClamp(frame, [previewLabelEnterStart, previewLabelEnterStart + 4, previewLabelEnterStart + 10], [0.9, 1.08, 1], Easing.out(Easing.cubic));
327
- var slowPreviewDrift = Math.sin(frame / 30) * (isLandscape ? 4 : 3);
328
- var slowHostScale = 1.02 + interpolateWithClamp(frame, [0, durationInFrames], [0, 0.025]);
329
- var backgroundOverlayOpacity = collaboratorActive ? 0.72 : 0.62;
330
- var previewVisualScale = previewScaleIn * (collaboratorActive ? 1.03 : 0.99);
331
- var previewOpacity = previewReveal * (collaboratorActive ? 1 : 0.92);
332
- var previewLabel = collaboratorActive ? 'RESPONDING' : 'NEXT UP';
333
- var previewLabelDisplayFontSize = Math.round(previewLabelFontSize * 2.3);
334
- var previewEnterOvershoot = 28;
335
- var previewFilter = collaboratorActive ? 'brightness(1.03) saturate(1.06)' : isLandscape ? 'brightness(1) saturate(1)' : 'brightness(0.84) saturate(0.88)';
336
- var creatorFrameFilter = creatorActive ? 'saturate(1.03)' : 'brightness(0.92) saturate(0.92)';
337
- var previewRadiusValue = isLandscape ? "".concat(previewRadius, "px 0 0 ").concat(previewRadius, "px") : "".concat(previewRadius, "px");
338
- var showHostRole = Boolean(safeTitle && !isPortrait);
339
- var showCollaboratorRole = Boolean(safeCollaboratorTitle && !isPortrait);
340
- var settledTitleNeedsPlate = !isLandscape;
341
- var compactPlateRadius = settledTitleNeedsPlate ? isPortrait ? 8 : 6 : 0;
342
- var compactPlatePadding = settledTitleNeedsPlate ? isPortrait ? '24px 24px 20px' : '22px 22px 18px' : 0;
343
- var compactPlateRuleWidth = isPortrait ? 56 : 44;
344
- var introTitleSafeTop = Math.max(introTitleTop, insetTop + 16);
345
- var introTitleSafeLeft = introTitleCentered ? '50%' : Math.max(introTitleLeft, insetLeft + 12);
346
- var compactTitleSafeTop = Math.max(compactTitleTop, insetTop + (isPortrait ? 18 : isLandscape ? 12 : 12));
347
- var compactTitleSafeLeft = compactTitleCentered ? '50%' : Math.max(compactTitleLeft, insetLeft + (isPortrait ? 8 : isLandscape ? 12 : 6));
348
- var lowerThirdSafeLeft = Math.max(lowerThirdLeft, insetLeft + (isPortrait ? 8 : isLandscape ? 12 : 6));
349
- var lowerThirdSafeBottom = Math.max(lowerThirdBottom, insetBottom + (isPortrait ? 24 : 18));
350
- var previewSafeTop = Math.max(previewTop, insetTop + previewLabelDisplayFontSize + 22);
351
- var previewSafeRight = Math.max(previewRight - previewBleed, insetRight) + previewEnterOvershoot;
352
- var chromeInsets = {
353
- top: Math.max(padding, insetTop),
354
- left: Math.max(padding, insetLeft),
355
- right: Math.max(padding, insetRight),
356
- bottom: Math.max(padding, insetBottom)
357
- };
358
- var renderCreatorVideo = function renderCreatorVideo(containerWidth, containerHeight, radius) {
359
- return /*#__PURE__*/React.createElement(React.Fragment, null, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
360
- url: virtualBgUrl,
361
- width: "100%",
362
- height: "100%",
363
- borderRadius: radius,
364
- zIndex: 1
365
- }) : null, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
366
- startFrom: startVideoFrom,
367
- src: firstVideoFile,
368
- faceMetadata: firstNoBackgroundFaceMetadata,
369
- containerWidth: containerWidth,
370
- containerHeight: containerHeight,
371
- useAveragePosition: true,
372
- muted: false,
373
- style: {
374
- filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
375
- }
376
- }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
377
- startFrom: startVideoFrom,
378
- src: firstVideoFile,
379
- muted: false,
380
- style: {
381
- width: '100%',
382
- height: '100%',
383
- objectFit: 'cover',
384
- filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
385
- }
386
- }), /*#__PURE__*/React.createElement(BlurOverlay, {
387
- show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && firstNoBackgroundVideoUrl,
388
- width: containerWidth,
389
- height: containerHeight,
390
- zIndex: 2
391
- }), 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, {
392
- style: {
393
- position: 'absolute',
394
- inset: 0,
395
- zIndex: 4
396
- }
397
- }, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
398
- startFrom: startVideoFrom,
399
- src: firstNoBackgroundVideoUrl,
400
- faceMetadata: firstNoBackgroundFaceMetadata,
401
- containerWidth: containerWidth,
402
- containerHeight: containerHeight,
403
- useAveragePosition: true,
404
- muted: true,
405
- transparent: true,
406
- noBackgroundVideoEffects: noBackgroundVideoEffects
407
- }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
408
- startFrom: startVideoFrom,
409
- src: firstNoBackgroundVideoUrl,
410
- muted: true,
411
- transparent: true,
412
- style: {
413
- width: '100%',
414
- height: '100%',
415
- objectFit: 'cover',
416
- filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? 'brightness(1.1) contrast(1.15) saturate(1.05)' : undefined
417
- }
418
- })) : null);
419
- };
420
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
421
- style: {
422
- width: width,
423
- height: height,
424
- backgroundColor: primaryColor || '#0f172a',
425
- color: textColor,
426
- fontFamily: bodyFontFamily,
427
- overflow: 'hidden'
428
- }
429
- }, /*#__PURE__*/React.createElement("div", {
430
- style: {
431
- position: 'absolute',
432
- inset: 0,
433
- transform: "scale(".concat(slowHostScale, ")"),
434
- transformOrigin: 'center',
435
- filter: creatorFrameFilter,
436
- opacity: creatorActive ? 1 : 0.96
437
- }
438
- }, renderCreatorVideo(width, height, 0)), /*#__PURE__*/React.createElement("div", {
439
- style: {
440
- position: 'absolute',
441
- inset: 0,
442
- background: isLandscape ? "linear-gradient(90deg, ".concat(withAlpha('#000000', 0.78), " 0%, ").concat(withAlpha('#000000', 0.5), " 28%, ").concat(withAlpha('#000000', 0.18), " 58%, ").concat(withAlpha('#000000', 0.58), " 100%)") : "linear-gradient(90deg, ".concat(withAlpha('#000000', 0.34), " 0%, ").concat(withAlpha('#000000', 0.16), " 24%, ").concat(withAlpha('#000000', 0), " 46%), linear-gradient(180deg, ").concat(withAlpha('#000000', 0.52), " 0%, ").concat(withAlpha('#000000', 0.2), " 24%, ").concat(withAlpha('#000000', 0.26), " 58%, ").concat(withAlpha('#000000', 0.82), " 100%)"),
443
- opacity: backgroundOverlayOpacity,
444
- zIndex: 2
445
- }
446
- }), /*#__PURE__*/React.createElement("div", {
447
- style: {
448
- position: 'absolute',
449
- inset: 0,
450
- background: isLandscape ? "linear-gradient(105deg, ".concat(withAlpha('#000000', collaboratorActive ? 0.22 : 0.12), " 0%, ").concat(withAlpha('#000000', 0), " 42%, ").concat(withAlpha('#000000', collaboratorActive ? 0.32 : 0.2), " 100%)") : "radial-gradient(circle at 82% 24%, ".concat(withAlpha('#000000', collaboratorActive ? 0.26 : 0.16), " 0%, ").concat(withAlpha('#000000', 0), " 38%)"),
451
- zIndex: 3
452
- }
453
- }), hasTitle && /*#__PURE__*/React.createElement("div", {
454
- style: {
455
- position: 'absolute',
456
- top: introTitleSafeTop,
457
- left: introTitleSafeLeft,
458
- width: introTitleMaxWidth,
459
- opacity: introTitleOpacity,
460
- transform: "".concat(introTitleCentered ? 'translateX(-50%) ' : '', "translateY(").concat(introTitleTranslateY, "px) scale(").concat(introTitleScale, ")"),
461
- textAlign: introTitleCentered ? 'center' : 'left',
462
- zIndex: 7
463
- }
464
- }, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
465
- style: {
466
- fontSize: topicFontSize,
467
- letterSpacing: '0.28em',
468
- textTransform: 'uppercase',
469
- color: withAlpha(textColor, 0.72),
470
- marginBottom: 12,
471
- fontWeight: 600,
472
- opacity: interpolateWithClamp(frame, [0, 6], [0, 1]),
473
- transform: "translateY(".concat(interpolateWithClamp(frame, [0, 8], [10, 0]), "px)")
474
- }
475
- }, safeTopicLabel), introTitleLines.map(function (line, index) {
476
- return /*#__PURE__*/React.createElement("div", {
477
- key: "intro-title-line-".concat(index),
478
- style: {
479
- height: introTitleLineMaskHeight,
480
- overflow: 'hidden',
481
- marginBottom: index === introTitleLines.length - 1 ? 0 : 6
482
- }
483
- }, /*#__PURE__*/React.createElement("div", {
484
- style: {
485
- fontFamily: headlineFontFamily,
486
- fontSize: introTitleFontSize,
487
- lineHeight: 0.97,
488
- fontWeight: 500,
489
- letterSpacing: '-0.03em',
490
- textShadow: titleShadow,
491
- opacity: interpolateWithClamp(frame, [index * 3, index * 3 + 4], [0, 1]),
492
- transform: "translateY(".concat(interpolateWithClamp(frame, [index * 3, index * 3 + 7, index * 3 + 12], [Math.round(introTitleFontSize * 0.62), -4, 0], Easing.out(Easing.cubic)), "px) scale(").concat(interpolateWithClamp(frame, [index * 3, index * 3 + 7, index * 3 + 12], [0.98, 1.02, 1], Easing.out(Easing.cubic)), ")"),
493
- transformOrigin: 'left center'
494
- }
495
- }, line));
496
- })), !isLandscape && (safeTopicLabel || hasTitle) && /*#__PURE__*/React.createElement("div", {
497
- style: {
498
- position: 'absolute',
499
- top: compactTitleSafeTop,
500
- left: compactTitleSafeLeft,
501
- width: compactTitleMaxWidth,
502
- opacity: compactOpacity,
503
- transform: "".concat(compactTitleCentered ? 'translateX(-50%) ' : '', "translateY(").concat(compactTranslateY, "px)"),
504
- textAlign: compactTitleCentered ? 'center' : 'left',
505
- zIndex: 8
506
- }
507
- }, /*#__PURE__*/React.createElement("div", {
508
- style: {
509
- position: 'relative',
510
- display: 'inline-flex',
511
- flexDirection: 'column',
512
- alignItems: compactTitleCentered ? 'center' : 'flex-start',
513
- width: settledTitleNeedsPlate ? 'fit-content' : '100%',
514
- maxWidth: '100%',
515
- padding: compactPlatePadding,
516
- borderRadius: compactPlateRadius,
517
- background: settledTitleNeedsPlate ? "linear-gradient(180deg, ".concat(withAlpha('#000000', 0.7), " 0%, ").concat(withAlpha('#000000', 0.42), " 100%)") : 'transparent',
518
- boxShadow: settledTitleNeedsPlate ? '0 18px 36px rgba(0, 0, 0, 0.22)' : undefined,
519
- backdropFilter: settledTitleNeedsPlate ? 'blur(14px)' : undefined,
520
- border: settledTitleNeedsPlate ? "1px solid ".concat(withAlpha(textColor, 0.08)) : undefined,
521
- clipPath: settledTitleNeedsPlate ? "inset(0 ".concat(compactPlateRightInset, "% 0 0 round ").concat(compactPlateRadius, "px)") : undefined
522
- }
523
- }, settledTitleNeedsPlate && /*#__PURE__*/React.createElement("div", {
524
- style: {
525
- position: 'absolute',
526
- top: 12,
527
- left: 18,
528
- width: compactPlateRuleWidth,
529
- height: 3,
530
- backgroundColor: accent
531
- }
532
- }), safeTopicLabel && /*#__PURE__*/React.createElement("div", {
533
- style: {
534
- fontSize: topicFontSize,
535
- letterSpacing: '0.3em',
536
- textTransform: 'uppercase',
537
- color: subtleTextColor,
538
- fontWeight: 600,
539
- marginBottom: hasTitle ? 12 : 0,
540
- marginTop: settledTitleNeedsPlate ? 8 : 0,
541
- opacity: compactTopicOpacity,
542
- transform: "translateY(".concat(compactTopicTranslateY, "px) scale(").concat(compactTopicScale, ")"),
543
- transformOrigin: 'left center'
544
- }
545
- }, safeTopicLabel), compactTitleLines.map(function (line, index) {
546
- return /*#__PURE__*/React.createElement("div", {
547
- key: "compact-title-line-".concat(index),
548
- style: {
549
- height: Math.ceil(compactTitleFontSize * 1.02),
550
- overflow: 'hidden',
551
- marginBottom: index === compactTitleLines.length - 1 ? 0 : 2
552
- }
553
- }, /*#__PURE__*/React.createElement("div", {
554
- style: {
555
- fontFamily: headlineFontFamily,
556
- fontSize: compactTitleFontSize,
557
- lineHeight: 1,
558
- fontWeight: 500,
559
- letterSpacing: '-0.025em',
560
- textShadow: '0 10px 24px rgba(0, 0, 0, 0.28)',
561
- color: textColor,
562
- opacity: interpolateWithClamp(frame, [compactTitleEnterStart + 5 + index * 2, compactTitleEnterStart + 9 + index * 2], [0, 0.94]),
563
- transform: "translateY(".concat(interpolateWithClamp(frame, [compactTitleEnterStart + 5 + index * 2, compactTitleEnterStart + 9 + index * 2, compactTitleEnterStart + 13 + index * 2], [Math.round(compactTitleFontSize * 0.5), -3, 0], Easing.out(Easing.cubic)), "px) scale(").concat(interpolateWithClamp(frame, [compactTitleEnterStart + 5 + index * 2, compactTitleEnterStart + 9 + index * 2, compactTitleEnterStart + 13 + index * 2], [0.98, 1.02, 1], Easing.out(Easing.cubic)), ")"),
564
- transformOrigin: 'left center'
565
- }
566
- }, line));
567
- }))), hasCreatorInfo && /*#__PURE__*/React.createElement("div", {
568
- style: {
569
- position: 'absolute',
570
- left: lowerThirdSafeLeft,
571
- bottom: lowerThirdSafeBottom,
572
- width: lowerThirdMaxWidth,
573
- zIndex: 7
574
- }
575
- }, /*#__PURE__*/React.createElement("div", {
576
- style: {
577
- width: isPortrait ? 52 : 44,
578
- height: 2,
579
- backgroundColor: accent,
580
- marginBottom: 14,
581
- boxShadow: "0 0 20px ".concat(withAlpha(accent, 0.34)),
582
- opacity: lowerThirdRuleOpacity,
583
- transform: "scaleX(".concat(lowerThirdRuleScaleX, ")"),
584
- transformOrigin: 'left center'
585
- }
586
- }), /*#__PURE__*/React.createElement("div", {
587
- style: {
588
- opacity: lowerThirdNameOpacity,
589
- transform: "translateY(".concat(lowerThirdNameTranslateY, "px)")
590
- }
591
- }, hostNameLines.map(function (line, index) {
592
- return /*#__PURE__*/React.createElement("div", {
593
- key: "host-name-".concat(index),
594
- style: {
595
- fontFamily: headlineFontFamily,
596
- fontSize: hostNameFontSize,
597
- lineHeight: 0.98,
598
- fontWeight: 500,
599
- letterSpacing: '-0.02em',
600
- textShadow: lowerThirdShadow,
601
- marginBottom: index === hostNameLines.length - 1 && !showHostRole ? 0 : 2
602
- }
603
- }, line);
604
- })), showHostRole && /*#__PURE__*/React.createElement("div", {
605
- style: {
606
- marginTop: safeFullName ? 6 : 0,
607
- opacity: lowerThirdRoleOpacity,
608
- transform: "translateY(".concat(lowerThirdRoleTranslateY, "px)")
609
- }
610
- }, hostRoleLines.map(function (line, index) {
611
- return /*#__PURE__*/React.createElement("div", {
612
- key: "host-role-".concat(index),
613
- style: {
614
- fontSize: hostRoleFontSize,
615
- lineHeight: 1.18,
616
- fontWeight: 500,
617
- color: softTextColor,
618
- textShadow: lowerThirdShadow,
619
- marginBottom: index === hostRoleLines.length - 1 ? 0 : 2
620
- }
621
- }, line);
622
- }))), shouldShowResponderTease && /*#__PURE__*/React.createElement("div", {
623
- style: {
624
- position: 'absolute',
625
- top: previewSafeTop,
626
- right: previewSafeRight,
627
- width: previewWidth,
628
- height: previewHeight,
629
- opacity: previewOpacity,
630
- transform: "translateX(".concat(previewTranslateX, "px) translateY(").concat(slowPreviewDrift, "px) scale(").concat(previewVisualScale, ")"),
631
- transformOrigin: isLandscape ? 'center right' : 'top right',
632
- zIndex: 7
633
- }
634
- }, /*#__PURE__*/React.createElement("div", {
635
- style: {
636
- position: 'absolute',
637
- top: -(previewLabelDisplayFontSize + 12),
638
- left: previewPadding,
639
- zIndex: 3,
640
- opacity: previewLabelOpacity,
641
- transform: "translateY(".concat(previewLabelTranslateY, "px) scale(").concat(previewLabelScale, ")"),
642
- transformOrigin: 'left bottom'
643
- }
644
- }, /*#__PURE__*/React.createElement("div", {
645
- style: {
646
- fontSize: previewLabelDisplayFontSize,
647
- fontWeight: 700,
648
- letterSpacing: '0.18em',
649
- textTransform: 'uppercase',
650
- color: accent,
651
- textShadow: '0 10px 20px rgba(0, 0, 0, 0.45)',
652
- lineHeight: 1
653
- }
654
- }, previewLabel)), /*#__PURE__*/React.createElement("div", {
655
- style: {
656
- position: 'absolute',
657
- top: 0,
658
- right: 0,
659
- bottom: 0,
660
- width: previewRevealWidth,
661
- borderRadius: previewRadiusValue,
662
- overflow: 'hidden'
663
- }
664
- }, /*#__PURE__*/React.createElement("div", {
665
- style: {
666
- position: 'absolute',
667
- top: 0,
668
- right: 0,
669
- bottom: 0,
670
- width: previewWidth,
671
- borderRadius: previewRadiusValue,
672
- overflow: 'hidden',
673
- boxShadow: previewShadow,
674
- backgroundColor: withAlpha(primaryColor || '#0f172a', 0.62)
675
- }
676
- }, showCollaboratorVideo ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(OffthreadVideo, {
677
- startFrom: startSecondVideoFrom,
678
- src: secondVideoFile,
679
- muted: true,
680
- style: {
681
- width: '100%',
682
- height: '100%',
683
- objectFit: 'cover',
684
- objectPosition: '50% 20%',
685
- filter: previewFilter,
686
- transform: "scale(".concat(collaboratorActive ? 1.06 : 1.02, ")")
687
- }
688
- }), /*#__PURE__*/React.createElement("div", {
689
- style: {
690
- position: 'absolute',
691
- inset: 0,
692
- background: "linear-gradient(180deg, ".concat(withAlpha('#000000', 0), " 0%, ").concat(withAlpha('#000000', 0.08), " 42%, ").concat(withAlpha('#000000', 0.8), " 100%)")
693
- }
694
- })) : /*#__PURE__*/React.createElement("div", {
695
- style: {
696
- position: 'absolute',
697
- inset: 0,
698
- background: "linear-gradient(180deg, ".concat(withAlpha('#000000', 0.18), " 0%, ").concat(withAlpha('#0f172a', 0.92), " 100%)")
699
- }
700
- }), /*#__PURE__*/React.createElement("div", {
701
- style: {
702
- position: 'absolute',
703
- top: 0,
704
- left: 0,
705
- bottom: 0,
706
- width: 4,
707
- backgroundColor: accent,
708
- opacity: collaboratorActive ? 1 : 0.72,
709
- borderTopLeftRadius: previewRadius,
710
- borderBottomLeftRadius: previewRadius
711
- }
712
- }), /*#__PURE__*/React.createElement("div", {
713
- style: {
714
- position: 'absolute',
715
- left: previewPadding,
716
- right: previewPadding,
717
- bottom: previewPadding
718
- }
719
- }, collaboratorNameLines.map(function (line, index) {
720
- return /*#__PURE__*/React.createElement("div", {
721
- key: "collaborator-name-".concat(index),
722
- style: {
723
- fontFamily: headlineFontFamily,
724
- fontSize: collaboratorNameFontSize,
725
- lineHeight: 0.98,
726
- fontWeight: 500,
727
- letterSpacing: '-0.02em',
728
- color: textColor,
729
- textShadow: '0 12px 26px rgba(0, 0, 0, 0.42)',
730
- marginBottom: index === collaboratorNameLines.length - 1 && !showCollaboratorRole ? 0 : 2
731
- }
732
- }, line);
733
- }), showCollaboratorRole && /*#__PURE__*/React.createElement("div", {
734
- style: {
735
- marginTop: safeCollaboratorName ? 6 : 0
736
- }
737
- }, collaboratorRoleLines.map(function (line, index) {
738
- return /*#__PURE__*/React.createElement("div", {
739
- key: "collaborator-role-".concat(index),
740
- style: {
741
- fontSize: collaboratorRoleFontSize,
742
- lineHeight: 1.2,
743
- fontWeight: 500,
744
- color: withAlpha(textColor, 0.8),
745
- marginBottom: index === collaboratorRoleLines.length - 1 ? 0 : 2
746
- }
747
- }, line);
748
- })))))), /*#__PURE__*/React.createElement("div", {
749
- style: {
750
- position: 'absolute',
751
- top: chromeInsets.top,
752
- left: chromeInsets.left,
753
- right: chromeInsets.right,
754
- bottom: chromeInsets.bottom,
755
- border: "1px solid ".concat(withAlpha(collaboratorActive ? accent : textColor, collaboratorActive ? 0.22 : 0.08)),
756
- pointerEvents: 'none',
757
- zIndex: 6,
758
- opacity: isPortrait ? 0.4 : 0.32
759
- }
760
- })), /*#__PURE__*/React.createElement(AbsoluteFill, {
761
- style: {
762
- zIndex: 100
763
- }
764
- }, children));
9
+ props = _objectWithoutProperties(_ref, _excluded);
10
+ return /*#__PURE__*/React.createElement(CreatorCollabColdOpenVisual, _extends({}, props, {
11
+ renderChildren: true,
12
+ showBackground: true,
13
+ showTitleElements: true,
14
+ showPreview: true,
15
+ showLowerThird: true,
16
+ showChrome: true
17
+ }), children);
765
18
  };