@zync/zync-screnplay-player 0.1.203 → 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/RemotionRenderer.js +13 -12
- 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/layouts/Handoff.js +26 -10
- 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 -2190
- 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/HandoffLayout.js +3 -2
- 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/theme/themes/default/HandoffNametag.js +20 -6
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +20 -20
- package/package.json +47 -47
|
@@ -0,0 +1,607 @@
|
|
|
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 CreatorCollabConversationSpine = function CreatorCollabConversationSpine(_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
|
+
var frame = useCurrentFrame();
|
|
88
|
+
var _useTheme = useTheme(),
|
|
89
|
+
primaryColor = _useTheme.primaryColor,
|
|
90
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
91
|
+
accentColor = _useTheme.accentColor;
|
|
92
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
93
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
94
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
95
|
+
var showVirtual = isVirtual && !!firstNoBackgroundVideoUrl;
|
|
96
|
+
var safeText = sanitizeText(text);
|
|
97
|
+
var safeFullName = sanitizeText(fullName);
|
|
98
|
+
var safeTitle = sanitizeText(title);
|
|
99
|
+
var safeCollaboratorName = sanitizeText(collaboratorName);
|
|
100
|
+
var safeCollaboratorTitle = sanitizeText(collaboratorTitle);
|
|
101
|
+
var safeTopicLabel = sanitizeText(topicLabel);
|
|
102
|
+
var speaker = sanitizeText(activeSpeaker).toLowerCase();
|
|
103
|
+
var creatorActive = speaker !== 'collaborator';
|
|
104
|
+
var collaboratorActive = speaker === 'collaborator';
|
|
105
|
+
var hasTitle = Boolean(safeText);
|
|
106
|
+
var hasCreatorInfo = Boolean(safeFullName || safeTitle);
|
|
107
|
+
var hasCollaboratorInfo = Boolean(secondVideoFile || safeCollaboratorName || safeCollaboratorTitle);
|
|
108
|
+
var _useOrientationBased = useOrientationBased({
|
|
109
|
+
landscape: {
|
|
110
|
+
padding: CHROME_PADDING + 10,
|
|
111
|
+
introTitleWidth: Math.min(width * 0.52, 770),
|
|
112
|
+
introTitleHeight: height * 0.26,
|
|
113
|
+
introTitleMaxFontSize: 90,
|
|
114
|
+
introTitleTop: height * 0.22,
|
|
115
|
+
introTitleLeft: CHROME_PADDING + 20,
|
|
116
|
+
introTitleCentered: false,
|
|
117
|
+
introTitleMaxLines: 3,
|
|
118
|
+
compactTitleTop: CHROME_PADDING + 16,
|
|
119
|
+
compactTitleLeft: CHROME_PADDING + 20,
|
|
120
|
+
compactTitleWidth: Math.min(width * 0.32, 520),
|
|
121
|
+
compactTitleMaxFontSize: 34,
|
|
122
|
+
compactTitleMaxLines: 2,
|
|
123
|
+
topicFontSize: 12,
|
|
124
|
+
hostInfoTop: CHROME_PADDING + 72,
|
|
125
|
+
hostInfoLeft: CHROME_PADDING + 20,
|
|
126
|
+
hostInfoWidth: Math.min(width * 0.28, 410),
|
|
127
|
+
hostNameMaxFontSize: 24,
|
|
128
|
+
hostRoleMaxFontSize: 15,
|
|
129
|
+
spineAxis: 'vertical',
|
|
130
|
+
spineTop: CHROME_PADDING + 14,
|
|
131
|
+
spineLeft: undefined,
|
|
132
|
+
spineRight: CHROME_PADDING + 4,
|
|
133
|
+
spineWidth: Math.min(width * 0.15, 186),
|
|
134
|
+
spineHeight: height - (CHROME_PADDING + 14) * 2,
|
|
135
|
+
previewWidth: Math.min(width * 0.12, 150),
|
|
136
|
+
previewHeight: Math.min(height * 0.28, 240),
|
|
137
|
+
previewTop: Math.min(height * 0.24, 240),
|
|
138
|
+
previewLeft: 18,
|
|
139
|
+
previewLabelFontSize: 10,
|
|
140
|
+
guestNameMaxFontSize: 18,
|
|
141
|
+
guestRoleMaxFontSize: 12
|
|
142
|
+
},
|
|
143
|
+
portrait: {
|
|
144
|
+
padding: CHROME_PADDING + 6,
|
|
145
|
+
introTitleWidth: Math.min(width * 0.78, 600),
|
|
146
|
+
introTitleHeight: height * 0.22,
|
|
147
|
+
introTitleMaxFontSize: 64,
|
|
148
|
+
introTitleTop: height * 0.2,
|
|
149
|
+
introTitleLeft: width / 2,
|
|
150
|
+
introTitleCentered: true,
|
|
151
|
+
introTitleMaxLines: 3,
|
|
152
|
+
compactTitleTop: CHROME_PADDING + 20,
|
|
153
|
+
compactTitleLeft: CHROME_PADDING + 10,
|
|
154
|
+
compactTitleWidth: Math.min(width * 0.58, 420),
|
|
155
|
+
compactTitleMaxFontSize: 28,
|
|
156
|
+
compactTitleMaxLines: 2,
|
|
157
|
+
topicFontSize: 13,
|
|
158
|
+
hostInfoTop: CHROME_PADDING + 88,
|
|
159
|
+
hostInfoLeft: CHROME_PADDING + 10,
|
|
160
|
+
hostInfoWidth: Math.min(width * 0.54, 360),
|
|
161
|
+
hostNameMaxFontSize: 22,
|
|
162
|
+
hostRoleMaxFontSize: 14,
|
|
163
|
+
spineAxis: 'horizontal',
|
|
164
|
+
spineTop: CHROME_PADDING + 8,
|
|
165
|
+
spineLeft: CHROME_PADDING + 8,
|
|
166
|
+
spineRight: undefined,
|
|
167
|
+
spineWidth: width - (CHROME_PADDING + 8) * 2,
|
|
168
|
+
spineHeight: Math.min(height * 0.15, 152),
|
|
169
|
+
previewWidth: Math.min(width * 0.36, 250),
|
|
170
|
+
previewHeight: Math.min(height * 0.12, 116),
|
|
171
|
+
previewTop: 18,
|
|
172
|
+
previewLeft: undefined,
|
|
173
|
+
previewLabelFontSize: 10,
|
|
174
|
+
guestNameMaxFontSize: 18,
|
|
175
|
+
guestRoleMaxFontSize: 11
|
|
176
|
+
},
|
|
177
|
+
square: {
|
|
178
|
+
padding: CHROME_PADDING + 4,
|
|
179
|
+
introTitleWidth: Math.min(width * 0.76, 500),
|
|
180
|
+
introTitleHeight: height * 0.18,
|
|
181
|
+
introTitleMaxFontSize: 52,
|
|
182
|
+
introTitleTop: height * 0.2,
|
|
183
|
+
introTitleLeft: width / 2,
|
|
184
|
+
introTitleCentered: true,
|
|
185
|
+
introTitleMaxLines: 2,
|
|
186
|
+
compactTitleTop: CHROME_PADDING + 14,
|
|
187
|
+
compactTitleLeft: CHROME_PADDING + 8,
|
|
188
|
+
compactTitleWidth: Math.min(width * 0.56, 360),
|
|
189
|
+
compactTitleMaxFontSize: 24,
|
|
190
|
+
compactTitleMaxLines: 1,
|
|
191
|
+
topicFontSize: 11,
|
|
192
|
+
hostInfoTop: CHROME_PADDING + 66,
|
|
193
|
+
hostInfoLeft: CHROME_PADDING + 8,
|
|
194
|
+
hostInfoWidth: Math.min(width * 0.5, 320),
|
|
195
|
+
hostNameMaxFontSize: 18,
|
|
196
|
+
hostRoleMaxFontSize: 12,
|
|
197
|
+
spineAxis: 'horizontal',
|
|
198
|
+
spineTop: CHROME_PADDING + 6,
|
|
199
|
+
spineLeft: CHROME_PADDING + 6,
|
|
200
|
+
spineRight: undefined,
|
|
201
|
+
spineWidth: width - (CHROME_PADDING + 6) * 2,
|
|
202
|
+
spineHeight: Math.min(height * 0.14, 110),
|
|
203
|
+
previewWidth: Math.min(width * 0.32, 190),
|
|
204
|
+
previewHeight: Math.min(height * 0.1, 84),
|
|
205
|
+
previewTop: 13,
|
|
206
|
+
previewLeft: undefined,
|
|
207
|
+
previewLabelFontSize: 9,
|
|
208
|
+
guestNameMaxFontSize: 14,
|
|
209
|
+
guestRoleMaxFontSize: 10
|
|
210
|
+
}
|
|
211
|
+
}),
|
|
212
|
+
orientation = _useOrientationBased.orientation,
|
|
213
|
+
padding = _useOrientationBased.padding,
|
|
214
|
+
introTitleWidth = _useOrientationBased.introTitleWidth,
|
|
215
|
+
introTitleHeight = _useOrientationBased.introTitleHeight,
|
|
216
|
+
introTitleMaxFontSize = _useOrientationBased.introTitleMaxFontSize,
|
|
217
|
+
introTitleTop = _useOrientationBased.introTitleTop,
|
|
218
|
+
introTitleLeft = _useOrientationBased.introTitleLeft,
|
|
219
|
+
introTitleCentered = _useOrientationBased.introTitleCentered,
|
|
220
|
+
introTitleMaxLines = _useOrientationBased.introTitleMaxLines,
|
|
221
|
+
compactTitleTop = _useOrientationBased.compactTitleTop,
|
|
222
|
+
compactTitleLeft = _useOrientationBased.compactTitleLeft,
|
|
223
|
+
compactTitleWidth = _useOrientationBased.compactTitleWidth,
|
|
224
|
+
compactTitleMaxFontSize = _useOrientationBased.compactTitleMaxFontSize,
|
|
225
|
+
compactTitleMaxLines = _useOrientationBased.compactTitleMaxLines,
|
|
226
|
+
topicFontSize = _useOrientationBased.topicFontSize,
|
|
227
|
+
hostInfoTop = _useOrientationBased.hostInfoTop,
|
|
228
|
+
hostInfoLeft = _useOrientationBased.hostInfoLeft,
|
|
229
|
+
hostInfoWidth = _useOrientationBased.hostInfoWidth,
|
|
230
|
+
hostNameMaxFontSize = _useOrientationBased.hostNameMaxFontSize,
|
|
231
|
+
hostRoleMaxFontSize = _useOrientationBased.hostRoleMaxFontSize,
|
|
232
|
+
spineAxis = _useOrientationBased.spineAxis,
|
|
233
|
+
spineTop = _useOrientationBased.spineTop,
|
|
234
|
+
spineLeft = _useOrientationBased.spineLeft,
|
|
235
|
+
spineRight = _useOrientationBased.spineRight,
|
|
236
|
+
spineWidth = _useOrientationBased.spineWidth,
|
|
237
|
+
spineHeight = _useOrientationBased.spineHeight,
|
|
238
|
+
previewWidth = _useOrientationBased.previewWidth,
|
|
239
|
+
previewHeight = _useOrientationBased.previewHeight,
|
|
240
|
+
previewTop = _useOrientationBased.previewTop,
|
|
241
|
+
previewLeft = _useOrientationBased.previewLeft,
|
|
242
|
+
previewLabelFontSize = _useOrientationBased.previewLabelFontSize,
|
|
243
|
+
guestNameMaxFontSize = _useOrientationBased.guestNameMaxFontSize,
|
|
244
|
+
guestRoleMaxFontSize = _useOrientationBased.guestRoleMaxFontSize;
|
|
245
|
+
var isVerticalSpine = spineAxis === 'vertical';
|
|
246
|
+
var accent = accentColor || '#38bdf8';
|
|
247
|
+
var textColor = primaryContrast || '#ffffff';
|
|
248
|
+
var introOpacity = interpolateWithClamp(frame, [0, fps * 0.9], [0, 1]) * interpolateWithClamp(frame, [fps * 1.85, fps * 2.6], [1, 0]);
|
|
249
|
+
var introTranslateY = interpolateWithClamp(frame, [0, fps * 0.9, fps * 2.6], [24, 0, -18], Easing.out(Easing.cubic));
|
|
250
|
+
var compactOpacity = interpolateWithClamp(frame, [fps * 2.05, fps * 2.9], [0, 1]);
|
|
251
|
+
var hostInfoOpacity = interpolateWithClamp(frame, [fps * 1.25, fps * 2.05], [0, 1]);
|
|
252
|
+
var spineReveal = interpolateWithClamp(frame, [fps * 1.9, fps * 2.95], [0, 1]);
|
|
253
|
+
var spineShift = interpolateWithClamp(frame, [fps * 1.9, fps * 2.95], [isVerticalSpine ? 44 : 22, 0]);
|
|
254
|
+
var titleLinesFit = distributeTextToFit(safeText, introTitleWidth, introTitleHeight, introTitleMaxFontSize);
|
|
255
|
+
var introTitleLines = clampLines(titleLinesFit.lines, introTitleMaxLines);
|
|
256
|
+
var compactTitleFit = distributeTextToFit(safeText, compactTitleWidth, 76, compactTitleMaxFontSize);
|
|
257
|
+
var compactTitleLines = clampLines(compactTitleFit.lines, compactTitleMaxLines);
|
|
258
|
+
var hostNameFit = distributeTextToFit(safeFullName, hostInfoWidth, 54, hostNameMaxFontSize);
|
|
259
|
+
var hostNameLines = clampLines(hostNameFit.lines, 2);
|
|
260
|
+
var hostRoleFit = distributeTextToFit(safeTitle, hostInfoWidth, 34, hostRoleMaxFontSize);
|
|
261
|
+
var hostRoleLines = clampLines(hostRoleFit.lines, 2);
|
|
262
|
+
var guestTextWidth = isVerticalSpine ? spineWidth - 36 : spineWidth - previewWidth - 74;
|
|
263
|
+
var guestNameFit = distributeTextToFit(safeCollaboratorName, Math.max(guestTextWidth, 120), isVerticalSpine ? 54 : 40, guestNameMaxFontSize);
|
|
264
|
+
var guestNameLines = clampLines(guestNameFit.lines, isVerticalSpine ? 2 : 1);
|
|
265
|
+
var guestRoleFit = distributeTextToFit(safeCollaboratorTitle, Math.max(guestTextWidth, 120), isVerticalSpine ? 38 : 28, guestRoleMaxFontSize);
|
|
266
|
+
var guestRoleLines = clampLines(guestRoleFit.lines, 2);
|
|
267
|
+
var previewPulse = 1 + Math.sin(frame / 22) * 0.015;
|
|
268
|
+
var holeCount = isVerticalSpine ? 14 : 16;
|
|
269
|
+
var renderCreatorVideo = function renderCreatorVideo(containerWidth, containerHeight, radius) {
|
|
270
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
271
|
+
url: virtualBgUrl,
|
|
272
|
+
width: "100%",
|
|
273
|
+
height: "100%",
|
|
274
|
+
borderRadius: radius,
|
|
275
|
+
zIndex: 1
|
|
276
|
+
}) : null, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
277
|
+
startFrom: startVideoFrom,
|
|
278
|
+
src: firstVideoFile,
|
|
279
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
280
|
+
containerWidth: containerWidth,
|
|
281
|
+
containerHeight: containerHeight,
|
|
282
|
+
useAveragePosition: true,
|
|
283
|
+
muted: false,
|
|
284
|
+
style: {
|
|
285
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
|
|
286
|
+
}
|
|
287
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
288
|
+
startFrom: startVideoFrom,
|
|
289
|
+
src: firstVideoFile,
|
|
290
|
+
muted: false,
|
|
291
|
+
style: {
|
|
292
|
+
width: '100%',
|
|
293
|
+
height: '100%',
|
|
294
|
+
objectFit: 'cover',
|
|
295
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
|
|
296
|
+
}
|
|
297
|
+
}), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
298
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && firstNoBackgroundVideoUrl,
|
|
299
|
+
width: containerWidth,
|
|
300
|
+
height: containerHeight,
|
|
301
|
+
zIndex: 2
|
|
302
|
+
}), 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, {
|
|
303
|
+
style: {
|
|
304
|
+
position: 'absolute',
|
|
305
|
+
inset: 0,
|
|
306
|
+
zIndex: 4
|
|
307
|
+
}
|
|
308
|
+
}, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
309
|
+
startFrom: startVideoFrom,
|
|
310
|
+
src: firstNoBackgroundVideoUrl,
|
|
311
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
312
|
+
containerWidth: containerWidth,
|
|
313
|
+
containerHeight: containerHeight,
|
|
314
|
+
useAveragePosition: true,
|
|
315
|
+
muted: true,
|
|
316
|
+
transparent: true,
|
|
317
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
318
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
319
|
+
startFrom: startVideoFrom,
|
|
320
|
+
src: firstNoBackgroundVideoUrl,
|
|
321
|
+
muted: true,
|
|
322
|
+
transparent: true,
|
|
323
|
+
style: {
|
|
324
|
+
width: '100%',
|
|
325
|
+
height: '100%',
|
|
326
|
+
objectFit: 'cover',
|
|
327
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? 'brightness(1.1) contrast(1.15) saturate(1.05)' : undefined
|
|
328
|
+
}
|
|
329
|
+
})) : null);
|
|
330
|
+
};
|
|
331
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
332
|
+
style: {
|
|
333
|
+
backgroundColor: primaryColor || '#0f172a',
|
|
334
|
+
color: textColor,
|
|
335
|
+
fontFamily: bodyFontFamily,
|
|
336
|
+
overflow: 'hidden'
|
|
337
|
+
}
|
|
338
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
339
|
+
style: {
|
|
340
|
+
position: 'absolute',
|
|
341
|
+
inset: 0,
|
|
342
|
+
transform: "scale(1.03) translateY(".concat(Math.sin(frame / 54) * 2, "px)"),
|
|
343
|
+
filter: creatorActive ? 'saturate(1.02)' : 'brightness(0.9) saturate(0.88)'
|
|
344
|
+
}
|
|
345
|
+
}, renderCreatorVideo(width, height, 0)), /*#__PURE__*/React.createElement("div", {
|
|
346
|
+
style: {
|
|
347
|
+
position: 'absolute',
|
|
348
|
+
inset: 0,
|
|
349
|
+
background: isVerticalSpine ? "linear-gradient(96deg, ".concat(withAlpha('#030712', 0.82), " 0%, ").concat(withAlpha('#030712', 0.46), " 30%, ").concat(withAlpha('#030712', 0.16), " 52%, ").concat(withAlpha('#030712', 0.7), " 100%)") : "linear-gradient(180deg, ".concat(withAlpha('#030712', 0.7), " 0%, ").concat(withAlpha('#030712', 0.2), " 34%, ").concat(withAlpha('#030712', 0.8), " 100%)"),
|
|
350
|
+
zIndex: 2
|
|
351
|
+
}
|
|
352
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
353
|
+
style: {
|
|
354
|
+
position: 'absolute',
|
|
355
|
+
inset: 0,
|
|
356
|
+
background: isVerticalSpine ? "radial-gradient(circle at 84% 38%, ".concat(withAlpha(accent, collaboratorActive ? 0.34 : 0.2), " 0%, ").concat(withAlpha(accent, 0), " 42%)") : "linear-gradient(130deg, ".concat(withAlpha(accent, collaboratorActive ? 0.26 : 0.14), " 0%, ").concat(withAlpha(accent, 0), " 44%)"),
|
|
357
|
+
zIndex: 3
|
|
358
|
+
}
|
|
359
|
+
}), hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
360
|
+
style: {
|
|
361
|
+
position: 'absolute',
|
|
362
|
+
top: introTitleTop,
|
|
363
|
+
left: introTitleCentered ? '50%' : introTitleLeft,
|
|
364
|
+
width: introTitleWidth,
|
|
365
|
+
textAlign: introTitleCentered ? 'center' : 'left',
|
|
366
|
+
opacity: introOpacity,
|
|
367
|
+
transform: "".concat(introTitleCentered ? 'translateX(-50%) ' : '', "translateY(").concat(introTranslateY, "px)"),
|
|
368
|
+
zIndex: 7
|
|
369
|
+
}
|
|
370
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
371
|
+
style: {
|
|
372
|
+
fontSize: topicFontSize,
|
|
373
|
+
letterSpacing: '0.28em',
|
|
374
|
+
textTransform: 'uppercase',
|
|
375
|
+
fontWeight: 600,
|
|
376
|
+
color: withAlpha(textColor, 0.76),
|
|
377
|
+
marginBottom: 10
|
|
378
|
+
}
|
|
379
|
+
}, safeTopicLabel), introTitleLines.map(function (line, index) {
|
|
380
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
381
|
+
key: "conversation-spine-title-".concat(index),
|
|
382
|
+
style: {
|
|
383
|
+
fontFamily: headlineFontFamily,
|
|
384
|
+
fontSize: titleLinesFit.fontSize,
|
|
385
|
+
lineHeight: 0.98,
|
|
386
|
+
letterSpacing: '-0.03em',
|
|
387
|
+
fontWeight: 500,
|
|
388
|
+
textShadow: '0 16px 34px rgba(0, 0, 0, 0.42)',
|
|
389
|
+
marginBottom: index === introTitleLines.length - 1 ? 0 : 4
|
|
390
|
+
}
|
|
391
|
+
}, line);
|
|
392
|
+
})), (safeTopicLabel || hasTitle) && /*#__PURE__*/React.createElement("div", {
|
|
393
|
+
style: {
|
|
394
|
+
position: 'absolute',
|
|
395
|
+
top: compactTitleTop,
|
|
396
|
+
left: compactTitleLeft,
|
|
397
|
+
width: compactTitleWidth,
|
|
398
|
+
opacity: compactOpacity,
|
|
399
|
+
transform: "translateY(".concat(interpolateWithClamp(frame, [fps * 2.05, fps * 2.9], [16, 0]), "px)"),
|
|
400
|
+
zIndex: 8
|
|
401
|
+
}
|
|
402
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
403
|
+
style: {
|
|
404
|
+
fontSize: topicFontSize,
|
|
405
|
+
letterSpacing: '0.24em',
|
|
406
|
+
textTransform: 'uppercase',
|
|
407
|
+
color: withAlpha(textColor, 0.65),
|
|
408
|
+
fontWeight: 600,
|
|
409
|
+
marginBottom: 6
|
|
410
|
+
}
|
|
411
|
+
}, safeTopicLabel), compactTitleLines.map(function (line, index) {
|
|
412
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
413
|
+
key: "conversation-compact-".concat(index),
|
|
414
|
+
style: {
|
|
415
|
+
fontFamily: headlineFontFamily,
|
|
416
|
+
fontSize: compactTitleFit.fontSize,
|
|
417
|
+
lineHeight: 1,
|
|
418
|
+
letterSpacing: '-0.02em',
|
|
419
|
+
fontWeight: 500,
|
|
420
|
+
textShadow: '0 10px 26px rgba(0, 0, 0, 0.4)'
|
|
421
|
+
}
|
|
422
|
+
}, line);
|
|
423
|
+
})), hasCreatorInfo && /*#__PURE__*/React.createElement("div", {
|
|
424
|
+
style: {
|
|
425
|
+
position: 'absolute',
|
|
426
|
+
top: hostInfoTop,
|
|
427
|
+
left: hostInfoLeft,
|
|
428
|
+
width: hostInfoWidth,
|
|
429
|
+
opacity: hostInfoOpacity,
|
|
430
|
+
transform: "translateY(".concat(interpolateWithClamp(frame, [fps * 1.25, fps * 2.05], [16, 0]), "px)"),
|
|
431
|
+
zIndex: 8
|
|
432
|
+
}
|
|
433
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
434
|
+
style: {
|
|
435
|
+
width: 42,
|
|
436
|
+
height: 2,
|
|
437
|
+
backgroundColor: withAlpha(accent, 0.82),
|
|
438
|
+
marginBottom: 8
|
|
439
|
+
}
|
|
440
|
+
}), hostNameLines.map(function (line, index) {
|
|
441
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
442
|
+
key: "conversation-host-name-".concat(index),
|
|
443
|
+
style: {
|
|
444
|
+
fontFamily: headlineFontFamily,
|
|
445
|
+
fontSize: hostNameFit.fontSize,
|
|
446
|
+
lineHeight: 1,
|
|
447
|
+
letterSpacing: '-0.02em',
|
|
448
|
+
fontWeight: 500
|
|
449
|
+
}
|
|
450
|
+
}, line);
|
|
451
|
+
}), safeTitle && /*#__PURE__*/React.createElement("div", {
|
|
452
|
+
style: {
|
|
453
|
+
marginTop: 4
|
|
454
|
+
}
|
|
455
|
+
}, hostRoleLines.map(function (line, index) {
|
|
456
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
457
|
+
key: "conversation-host-role-".concat(index),
|
|
458
|
+
style: {
|
|
459
|
+
fontSize: hostRoleFit.fontSize,
|
|
460
|
+
lineHeight: 1.2,
|
|
461
|
+
color: withAlpha(textColor, 0.78),
|
|
462
|
+
fontWeight: 500
|
|
463
|
+
}
|
|
464
|
+
}, line);
|
|
465
|
+
}))), hasCollaboratorInfo && /*#__PURE__*/React.createElement("div", {
|
|
466
|
+
style: {
|
|
467
|
+
position: 'absolute',
|
|
468
|
+
top: spineTop,
|
|
469
|
+
left: spineLeft,
|
|
470
|
+
right: spineRight,
|
|
471
|
+
width: spineWidth,
|
|
472
|
+
height: spineHeight,
|
|
473
|
+
opacity: spineReveal,
|
|
474
|
+
transform: isVerticalSpine ? "translateX(".concat(spineShift, "px) scale(").concat(collaboratorActive ? 1.02 : 1, ")") : "translateY(".concat(spineShift, "px) scale(").concat(collaboratorActive ? 1.02 : 1, ")"),
|
|
475
|
+
zIndex: 8
|
|
476
|
+
}
|
|
477
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
478
|
+
style: {
|
|
479
|
+
position: 'absolute',
|
|
480
|
+
inset: 0,
|
|
481
|
+
borderRadius: isVerticalSpine ? 28 : 20,
|
|
482
|
+
backgroundColor: withAlpha('#020617', 0.62),
|
|
483
|
+
border: "1px solid ".concat(withAlpha(collaboratorActive ? accent : textColor, collaboratorActive ? 0.72 : 0.22)),
|
|
484
|
+
boxShadow: collaboratorActive ? "0 22px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px ".concat(withAlpha(accent, 0.36)) : '0 18px 36px rgba(0, 0, 0, 0.42)',
|
|
485
|
+
overflow: 'hidden'
|
|
486
|
+
}
|
|
487
|
+
}, Array.from({
|
|
488
|
+
length: holeCount
|
|
489
|
+
}).map(function (_, index) {
|
|
490
|
+
var progress = holeCount === 1 ? 0 : index / (holeCount - 1);
|
|
491
|
+
var holeSize = isVerticalSpine ? 5 : 4;
|
|
492
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
493
|
+
key: "spine-hole-".concat(index)
|
|
494
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
495
|
+
style: {
|
|
496
|
+
position: 'absolute',
|
|
497
|
+
width: holeSize,
|
|
498
|
+
height: holeSize,
|
|
499
|
+
borderRadius: '50%',
|
|
500
|
+
backgroundColor: withAlpha('#000000', 0.32),
|
|
501
|
+
left: isVerticalSpine ? 6 : progress * (spineWidth - holeSize),
|
|
502
|
+
top: isVerticalSpine ? progress * (spineHeight - holeSize) : 6
|
|
503
|
+
}
|
|
504
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
505
|
+
style: {
|
|
506
|
+
position: 'absolute',
|
|
507
|
+
width: holeSize,
|
|
508
|
+
height: holeSize,
|
|
509
|
+
borderRadius: '50%',
|
|
510
|
+
backgroundColor: withAlpha('#000000', 0.32),
|
|
511
|
+
left: isVerticalSpine ? spineWidth - holeSize - 6 : progress * (spineWidth - holeSize),
|
|
512
|
+
top: isVerticalSpine ? progress * (spineHeight - holeSize) : spineHeight - holeSize - 6
|
|
513
|
+
}
|
|
514
|
+
}));
|
|
515
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
516
|
+
style: {
|
|
517
|
+
position: 'absolute',
|
|
518
|
+
left: isVerticalSpine ? 16 : 14,
|
|
519
|
+
top: 12,
|
|
520
|
+
fontSize: previewLabelFontSize,
|
|
521
|
+
letterSpacing: '0.26em',
|
|
522
|
+
textTransform: 'uppercase',
|
|
523
|
+
fontWeight: 700,
|
|
524
|
+
color: collaboratorActive ? accent : withAlpha(textColor, 0.75)
|
|
525
|
+
}
|
|
526
|
+
}, collaboratorActive ? 'Now' : 'Next Frame'), /*#__PURE__*/React.createElement("div", {
|
|
527
|
+
style: {
|
|
528
|
+
position: 'absolute',
|
|
529
|
+
top: isVerticalSpine ? previewTop : previewTop,
|
|
530
|
+
left: isVerticalSpine ? previewLeft : spineWidth - previewWidth - 16,
|
|
531
|
+
width: previewWidth,
|
|
532
|
+
height: previewHeight,
|
|
533
|
+
borderRadius: isVerticalSpine ? 14 : 12,
|
|
534
|
+
overflow: 'hidden',
|
|
535
|
+
border: "1px solid ".concat(withAlpha(collaboratorActive ? accent : textColor, collaboratorActive ? 0.64 : 0.25)),
|
|
536
|
+
transform: "scale(".concat(previewPulse, ")")
|
|
537
|
+
}
|
|
538
|
+
}, secondVideoFile ? /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
539
|
+
startFrom: startSecondVideoFrom,
|
|
540
|
+
src: secondVideoFile,
|
|
541
|
+
muted: true,
|
|
542
|
+
style: {
|
|
543
|
+
width: '100%',
|
|
544
|
+
height: '100%',
|
|
545
|
+
objectFit: 'cover',
|
|
546
|
+
objectPosition: '50% 20%',
|
|
547
|
+
filter: collaboratorActive ? 'brightness(1.06) saturate(1.08)' : 'brightness(0.84) saturate(0.84)'
|
|
548
|
+
}
|
|
549
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
550
|
+
style: {
|
|
551
|
+
position: 'absolute',
|
|
552
|
+
inset: 0,
|
|
553
|
+
background: "linear-gradient(120deg, ".concat(withAlpha(accent, 0.26), " 0%, ").concat(withAlpha(primaryColor || '#0f172a', 0.9), " 100%)")
|
|
554
|
+
}
|
|
555
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
556
|
+
style: {
|
|
557
|
+
position: 'absolute',
|
|
558
|
+
inset: 0,
|
|
559
|
+
background: "linear-gradient(180deg, ".concat(withAlpha('#000000', 0.08), " 0%, ").concat(withAlpha('#000000', 0.68), " 100%)")
|
|
560
|
+
}
|
|
561
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
562
|
+
style: {
|
|
563
|
+
position: 'absolute',
|
|
564
|
+
left: isVerticalSpine ? 16 : 16,
|
|
565
|
+
right: isVerticalSpine ? 16 : previewWidth + 30,
|
|
566
|
+
bottom: isVerticalSpine ? 16 : 14
|
|
567
|
+
}
|
|
568
|
+
}, guestNameLines.map(function (line, index) {
|
|
569
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
570
|
+
key: "spine-guest-name-".concat(index),
|
|
571
|
+
style: {
|
|
572
|
+
fontFamily: headlineFontFamily,
|
|
573
|
+
fontSize: guestNameFit.fontSize,
|
|
574
|
+
lineHeight: 1,
|
|
575
|
+
letterSpacing: '-0.02em',
|
|
576
|
+
fontWeight: 500
|
|
577
|
+
}
|
|
578
|
+
}, line);
|
|
579
|
+
}), safeCollaboratorTitle && /*#__PURE__*/React.createElement("div", {
|
|
580
|
+
style: {
|
|
581
|
+
marginTop: 4
|
|
582
|
+
}
|
|
583
|
+
}, guestRoleLines.map(function (line, index) {
|
|
584
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
585
|
+
key: "spine-guest-role-".concat(index),
|
|
586
|
+
style: {
|
|
587
|
+
fontSize: guestRoleFit.fontSize,
|
|
588
|
+
lineHeight: 1.2,
|
|
589
|
+
color: withAlpha(textColor, 0.76),
|
|
590
|
+
fontWeight: 500
|
|
591
|
+
}
|
|
592
|
+
}, line);
|
|
593
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
594
|
+
style: {
|
|
595
|
+
position: 'absolute',
|
|
596
|
+
inset: padding,
|
|
597
|
+
border: "1px solid ".concat(withAlpha(collaboratorActive ? accent : textColor, collaboratorActive ? 0.24 : 0.1)),
|
|
598
|
+
opacity: 0.4,
|
|
599
|
+
pointerEvents: 'none',
|
|
600
|
+
zIndex: 6
|
|
601
|
+
}
|
|
602
|
+
})), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
603
|
+
style: {
|
|
604
|
+
zIndex: 100
|
|
605
|
+
}
|
|
606
|
+
}, children));
|
|
607
|
+
};
|