@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,589 @@
|
|
|
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 CreatorCollabStudioSet = function CreatorCollabStudioSet(_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 safeFullName = sanitizeText(fullName);
|
|
99
|
+
var safeTitle = sanitizeText(title);
|
|
100
|
+
var safeCollaboratorName = sanitizeText(collaboratorName);
|
|
101
|
+
var safeCollaboratorTitle = sanitizeText(collaboratorTitle);
|
|
102
|
+
var safeTopicLabel = sanitizeText(topicLabel);
|
|
103
|
+
var speaker = sanitizeText(activeSpeaker).toLowerCase();
|
|
104
|
+
var creatorActive = speaker !== 'collaborator';
|
|
105
|
+
var collaboratorActive = speaker === 'collaborator';
|
|
106
|
+
var hasTitle = Boolean(safeText);
|
|
107
|
+
var hasCreatorInfo = Boolean(safeFullName || safeTitle);
|
|
108
|
+
var hasCollaboratorInfo = Boolean(secondVideoFile || safeCollaboratorName || safeCollaboratorTitle);
|
|
109
|
+
var _useOrientationBased = useOrientationBased({
|
|
110
|
+
landscape: {
|
|
111
|
+
padding: CHROME_PADDING + 12,
|
|
112
|
+
titleWidth: Math.min(width * 0.46, 680),
|
|
113
|
+
titleHeight: height * 0.28,
|
|
114
|
+
titleMaxFontSize: 88,
|
|
115
|
+
titleTop: height * 0.2,
|
|
116
|
+
titleLeft: CHROME_PADDING + 18,
|
|
117
|
+
titleCentered: false,
|
|
118
|
+
titleLinesMax: 3,
|
|
119
|
+
topicFontSize: 13,
|
|
120
|
+
hostStampTop: CHROME_PADDING + 24,
|
|
121
|
+
hostStampLeft: CHROME_PADDING + 18,
|
|
122
|
+
hostStampWidth: Math.min(width * 0.3, 420),
|
|
123
|
+
hostNameMaxFontSize: 26,
|
|
124
|
+
hostRoleMaxFontSize: 16,
|
|
125
|
+
monitorWidth: Math.min(width * 0.35, 560),
|
|
126
|
+
monitorHeight: Math.min(height * 0.42, 430),
|
|
127
|
+
monitorTop: height * 0.24,
|
|
128
|
+
monitorRight: CHROME_PADDING + 8,
|
|
129
|
+
monitorRadius: 24,
|
|
130
|
+
monitorRotateY: -9,
|
|
131
|
+
monitorRotateX: 3,
|
|
132
|
+
monitorNameMaxFontSize: 28,
|
|
133
|
+
monitorRoleMaxFontSize: 16,
|
|
134
|
+
monitorLabelFontSize: 11,
|
|
135
|
+
cutoutWidth: Math.min(width * 0.44, 700),
|
|
136
|
+
cutoutHeight: Math.min(height * 0.94, 900),
|
|
137
|
+
cutoutBottom: -height * 0.04,
|
|
138
|
+
cutoutLeft: width * 0.04,
|
|
139
|
+
stageFloorHeight: Math.min(height * 0.34, 340)
|
|
140
|
+
},
|
|
141
|
+
portrait: {
|
|
142
|
+
padding: CHROME_PADDING + 6,
|
|
143
|
+
titleWidth: Math.min(width * 0.76, 580),
|
|
144
|
+
titleHeight: height * 0.22,
|
|
145
|
+
titleMaxFontSize: 60,
|
|
146
|
+
titleTop: height * 0.14,
|
|
147
|
+
titleLeft: width / 2,
|
|
148
|
+
titleCentered: true,
|
|
149
|
+
titleLinesMax: 3,
|
|
150
|
+
topicFontSize: 15,
|
|
151
|
+
hostStampTop: CHROME_PADDING + 20,
|
|
152
|
+
hostStampLeft: CHROME_PADDING + 8,
|
|
153
|
+
hostStampWidth: Math.min(width * 0.62, 450),
|
|
154
|
+
hostNameMaxFontSize: 28,
|
|
155
|
+
hostRoleMaxFontSize: 18,
|
|
156
|
+
monitorWidth: Math.min(width * 0.5, 310),
|
|
157
|
+
monitorHeight: Math.min(height * 0.24, 260),
|
|
158
|
+
monitorTop: height * 0.53,
|
|
159
|
+
monitorRight: CHROME_PADDING + 4,
|
|
160
|
+
monitorRadius: 20,
|
|
161
|
+
monitorRotateY: -4,
|
|
162
|
+
monitorRotateX: 1.5,
|
|
163
|
+
monitorNameMaxFontSize: 20,
|
|
164
|
+
monitorRoleMaxFontSize: 13,
|
|
165
|
+
monitorLabelFontSize: 10,
|
|
166
|
+
cutoutWidth: Math.min(width * 0.65, 470),
|
|
167
|
+
cutoutHeight: Math.min(height * 0.7, 640),
|
|
168
|
+
cutoutBottom: -height * 0.02,
|
|
169
|
+
cutoutLeft: -width * 0.04,
|
|
170
|
+
stageFloorHeight: Math.min(height * 0.32, 300)
|
|
171
|
+
},
|
|
172
|
+
square: {
|
|
173
|
+
padding: CHROME_PADDING + 4,
|
|
174
|
+
titleWidth: Math.min(width * 0.74, 500),
|
|
175
|
+
titleHeight: height * 0.2,
|
|
176
|
+
titleMaxFontSize: 52,
|
|
177
|
+
titleTop: height * 0.14,
|
|
178
|
+
titleLeft: width / 2,
|
|
179
|
+
titleCentered: true,
|
|
180
|
+
titleLinesMax: 2,
|
|
181
|
+
topicFontSize: 12,
|
|
182
|
+
hostStampTop: CHROME_PADDING + 10,
|
|
183
|
+
hostStampLeft: CHROME_PADDING + 6,
|
|
184
|
+
hostStampWidth: Math.min(width * 0.54, 360),
|
|
185
|
+
hostNameMaxFontSize: 20,
|
|
186
|
+
hostRoleMaxFontSize: 13,
|
|
187
|
+
monitorWidth: Math.min(width * 0.46, 250),
|
|
188
|
+
monitorHeight: Math.min(height * 0.22, 210),
|
|
189
|
+
monitorTop: height * 0.54,
|
|
190
|
+
monitorRight: CHROME_PADDING + 4,
|
|
191
|
+
monitorRadius: 18,
|
|
192
|
+
monitorRotateY: -4,
|
|
193
|
+
monitorRotateX: 1.2,
|
|
194
|
+
monitorNameMaxFontSize: 16,
|
|
195
|
+
monitorRoleMaxFontSize: 11,
|
|
196
|
+
monitorLabelFontSize: 9,
|
|
197
|
+
cutoutWidth: Math.min(width * 0.6, 390),
|
|
198
|
+
cutoutHeight: Math.min(height * 0.66, 470),
|
|
199
|
+
cutoutBottom: -height * 0.03,
|
|
200
|
+
cutoutLeft: -width * 0.05,
|
|
201
|
+
stageFloorHeight: Math.min(height * 0.3, 230)
|
|
202
|
+
}
|
|
203
|
+
}),
|
|
204
|
+
orientation = _useOrientationBased.orientation,
|
|
205
|
+
padding = _useOrientationBased.padding,
|
|
206
|
+
titleWidth = _useOrientationBased.titleWidth,
|
|
207
|
+
titleHeight = _useOrientationBased.titleHeight,
|
|
208
|
+
titleMaxFontSize = _useOrientationBased.titleMaxFontSize,
|
|
209
|
+
titleTop = _useOrientationBased.titleTop,
|
|
210
|
+
titleLeft = _useOrientationBased.titleLeft,
|
|
211
|
+
titleCentered = _useOrientationBased.titleCentered,
|
|
212
|
+
titleLinesMax = _useOrientationBased.titleLinesMax,
|
|
213
|
+
topicFontSize = _useOrientationBased.topicFontSize,
|
|
214
|
+
hostStampTop = _useOrientationBased.hostStampTop,
|
|
215
|
+
hostStampLeft = _useOrientationBased.hostStampLeft,
|
|
216
|
+
hostStampWidth = _useOrientationBased.hostStampWidth,
|
|
217
|
+
hostNameMaxFontSize = _useOrientationBased.hostNameMaxFontSize,
|
|
218
|
+
hostRoleMaxFontSize = _useOrientationBased.hostRoleMaxFontSize,
|
|
219
|
+
monitorWidth = _useOrientationBased.monitorWidth,
|
|
220
|
+
monitorHeight = _useOrientationBased.monitorHeight,
|
|
221
|
+
monitorTop = _useOrientationBased.monitorTop,
|
|
222
|
+
monitorRight = _useOrientationBased.monitorRight,
|
|
223
|
+
monitorRadius = _useOrientationBased.monitorRadius,
|
|
224
|
+
monitorRotateY = _useOrientationBased.monitorRotateY,
|
|
225
|
+
monitorRotateX = _useOrientationBased.monitorRotateX,
|
|
226
|
+
monitorNameMaxFontSize = _useOrientationBased.monitorNameMaxFontSize,
|
|
227
|
+
monitorRoleMaxFontSize = _useOrientationBased.monitorRoleMaxFontSize,
|
|
228
|
+
monitorLabelFontSize = _useOrientationBased.monitorLabelFontSize,
|
|
229
|
+
cutoutWidth = _useOrientationBased.cutoutWidth,
|
|
230
|
+
cutoutHeight = _useOrientationBased.cutoutHeight,
|
|
231
|
+
cutoutBottom = _useOrientationBased.cutoutBottom,
|
|
232
|
+
cutoutLeft = _useOrientationBased.cutoutLeft,
|
|
233
|
+
stageFloorHeight = _useOrientationBased.stageFloorHeight;
|
|
234
|
+
var isLandscape = orientation === 'landscape';
|
|
235
|
+
var accent = accentColor || '#facc15';
|
|
236
|
+
var textColor = primaryContrast || '#ffffff';
|
|
237
|
+
var softText = withAlpha(textColor, 0.75) || textColor;
|
|
238
|
+
var titleIn = interpolateWithClamp(frame, [0, fps * 0.9], [0, 1]);
|
|
239
|
+
var titleOut = interpolateWithClamp(frame, [fps * 1.8, fps * 2.5], [1, 0]);
|
|
240
|
+
var titleOpacity = titleIn * titleOut;
|
|
241
|
+
var titleTranslateY = interpolateWithClamp(frame, [0, fps * 0.9, fps * 2.5], [24, 0, -20], Easing.out(Easing.cubic));
|
|
242
|
+
var hostStampOpacity = interpolateWithClamp(frame, [fps * 1.1, fps * 1.9], [0, 1]);
|
|
243
|
+
var monitorOpacity = interpolateWithClamp(frame, [fps * 1.8, fps * 2.9], [0, 1]);
|
|
244
|
+
var monitorTranslateX = interpolateWithClamp(frame, [fps * 1.8, fps * 2.9], [42, 0]);
|
|
245
|
+
var monitorDrift = Math.sin(frame / 28) * 3;
|
|
246
|
+
var hostDrift = Math.sin(frame / 52) * 2;
|
|
247
|
+
var longHoldFade = durationInFrames > fps * 8 ? interpolateWithClamp(frame, [Math.min(fps * 7, durationInFrames - fps * 1.6), durationInFrames], [1, 0.68]) : 1;
|
|
248
|
+
var _distributeTextToFit = distributeTextToFit(safeText, titleWidth, titleHeight, titleMaxFontSize),
|
|
249
|
+
titleLinesRaw = _distributeTextToFit.lines,
|
|
250
|
+
titleFontSize = _distributeTextToFit.fontSize;
|
|
251
|
+
var titleLines = clampLines(titleLinesRaw, titleLinesMax);
|
|
252
|
+
var _distributeTextToFit2 = distributeTextToFit(safeFullName, hostStampWidth, isLandscape ? 60 : 66, hostNameMaxFontSize),
|
|
253
|
+
hostNameLines = _distributeTextToFit2.lines,
|
|
254
|
+
hostNameFontSize = _distributeTextToFit2.fontSize;
|
|
255
|
+
var _distributeTextToFit3 = distributeTextToFit(safeTitle, hostStampWidth, isLandscape ? 44 : 50, hostRoleMaxFontSize),
|
|
256
|
+
hostRoleLines = _distributeTextToFit3.lines,
|
|
257
|
+
hostRoleFontSize = _distributeTextToFit3.fontSize;
|
|
258
|
+
var monitorTextWidth = monitorWidth - 36;
|
|
259
|
+
var _distributeTextToFit4 = distributeTextToFit(safeCollaboratorName, monitorTextWidth, isLandscape ? 56 : 48, monitorNameMaxFontSize),
|
|
260
|
+
guestNameLinesRaw = _distributeTextToFit4.lines,
|
|
261
|
+
guestNameFontSize = _distributeTextToFit4.fontSize;
|
|
262
|
+
var guestNameLines = clampLines(guestNameLinesRaw, 2);
|
|
263
|
+
var _distributeTextToFit5 = distributeTextToFit(safeCollaboratorTitle, monitorTextWidth, isLandscape ? 40 : 30, monitorRoleMaxFontSize),
|
|
264
|
+
guestRoleLinesRaw = _distributeTextToFit5.lines,
|
|
265
|
+
guestRoleFontSize = _distributeTextToFit5.fontSize;
|
|
266
|
+
var guestRoleLines = clampLines(guestRoleLinesRaw, 2);
|
|
267
|
+
var monitorFrameFilter = collaboratorActive ? 'brightness(1.06) saturate(1.08)' : 'brightness(0.86) saturate(0.82)';
|
|
268
|
+
var renderCreatorVideo = function renderCreatorVideo(containerWidth, containerHeight, radius) {
|
|
269
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
270
|
+
url: virtualBgUrl,
|
|
271
|
+
width: "100%",
|
|
272
|
+
height: "100%",
|
|
273
|
+
borderRadius: radius,
|
|
274
|
+
zIndex: 1
|
|
275
|
+
}) : null, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
276
|
+
startFrom: startVideoFrom,
|
|
277
|
+
src: firstVideoFile,
|
|
278
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
279
|
+
containerWidth: containerWidth,
|
|
280
|
+
containerHeight: containerHeight,
|
|
281
|
+
useAveragePosition: true,
|
|
282
|
+
muted: false,
|
|
283
|
+
style: {
|
|
284
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
|
|
285
|
+
}
|
|
286
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
287
|
+
startFrom: startVideoFrom,
|
|
288
|
+
src: firstVideoFile,
|
|
289
|
+
muted: false,
|
|
290
|
+
style: {
|
|
291
|
+
width: '100%',
|
|
292
|
+
height: '100%',
|
|
293
|
+
objectFit: 'cover',
|
|
294
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? 'brightness(0.7)' : undefined)
|
|
295
|
+
}
|
|
296
|
+
}), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
297
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && firstNoBackgroundVideoUrl,
|
|
298
|
+
width: containerWidth,
|
|
299
|
+
height: containerHeight,
|
|
300
|
+
zIndex: 2
|
|
301
|
+
}), 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, {
|
|
302
|
+
style: {
|
|
303
|
+
position: 'absolute',
|
|
304
|
+
inset: 0,
|
|
305
|
+
zIndex: 4
|
|
306
|
+
}
|
|
307
|
+
}, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
308
|
+
startFrom: startVideoFrom,
|
|
309
|
+
src: firstNoBackgroundVideoUrl,
|
|
310
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
311
|
+
containerWidth: containerWidth,
|
|
312
|
+
containerHeight: containerHeight,
|
|
313
|
+
useAveragePosition: true,
|
|
314
|
+
muted: true,
|
|
315
|
+
transparent: true,
|
|
316
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
317
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
318
|
+
startFrom: startVideoFrom,
|
|
319
|
+
src: firstNoBackgroundVideoUrl,
|
|
320
|
+
muted: true,
|
|
321
|
+
transparent: true,
|
|
322
|
+
style: {
|
|
323
|
+
width: '100%',
|
|
324
|
+
height: '100%',
|
|
325
|
+
objectFit: 'cover',
|
|
326
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? 'brightness(1.1) contrast(1.15) saturate(1.05)' : undefined
|
|
327
|
+
}
|
|
328
|
+
})) : null);
|
|
329
|
+
};
|
|
330
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
331
|
+
style: {
|
|
332
|
+
backgroundColor: primaryColor || '#111827',
|
|
333
|
+
color: textColor,
|
|
334
|
+
fontFamily: bodyFontFamily,
|
|
335
|
+
overflow: 'hidden'
|
|
336
|
+
}
|
|
337
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
338
|
+
style: {
|
|
339
|
+
position: 'absolute',
|
|
340
|
+
inset: 0,
|
|
341
|
+
transform: "scale(1.035) translateY(".concat(hostDrift, "px)"),
|
|
342
|
+
transformOrigin: 'center',
|
|
343
|
+
filter: creatorActive ? 'saturate(1.03)' : 'brightness(0.9) saturate(0.9)'
|
|
344
|
+
}
|
|
345
|
+
}, renderCreatorVideo(width, height, 0)), /*#__PURE__*/React.createElement("div", {
|
|
346
|
+
style: {
|
|
347
|
+
position: 'absolute',
|
|
348
|
+
inset: 0,
|
|
349
|
+
background: isLandscape ? "linear-gradient(100deg, ".concat(withAlpha('#05070d', 0.82), " 0%, ").concat(withAlpha('#05070d', 0.5), " 34%, ").concat(withAlpha('#05070d', 0.2), " 58%, ").concat(withAlpha('#05070d', 0.62), " 100%)") : "linear-gradient(180deg, ".concat(withAlpha('#05070d', 0.58), " 0%, ").concat(withAlpha('#05070d', 0.28), " 40%, ").concat(withAlpha('#05070d', 0.8), " 100%)"),
|
|
350
|
+
zIndex: 2
|
|
351
|
+
}
|
|
352
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
353
|
+
style: {
|
|
354
|
+
position: 'absolute',
|
|
355
|
+
left: isLandscape ? width * 0.18 : width * 0.5,
|
|
356
|
+
top: isLandscape ? height * 0.36 : height * 0.42,
|
|
357
|
+
width: isLandscape ? width * 0.76 : width * 0.95,
|
|
358
|
+
height: stageFloorHeight,
|
|
359
|
+
transform: "translateX(-50%)",
|
|
360
|
+
borderRadius: '999px',
|
|
361
|
+
background: "radial-gradient(circle at center, ".concat(withAlpha(accent, collaboratorActive ? 0.32 : 0.22), " 0%, ").concat(withAlpha(accent, 0), " 65%)"),
|
|
362
|
+
filter: 'blur(4px)',
|
|
363
|
+
zIndex: 3
|
|
364
|
+
}
|
|
365
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
366
|
+
style: {
|
|
367
|
+
position: 'absolute',
|
|
368
|
+
left: isLandscape ? width * 0.08 : width * 0.22,
|
|
369
|
+
top: isLandscape ? height * 0.14 : height * 0.18,
|
|
370
|
+
width: isLandscape ? width * 0.5 : width * 0.76,
|
|
371
|
+
height: isLandscape ? height * 0.62 : height * 0.42,
|
|
372
|
+
borderRadius: isLandscape ? '48% 52% 54% 46% / 40% 44% 56% 60%' : 28,
|
|
373
|
+
background: "radial-gradient(circle at 28% 38%, ".concat(withAlpha(accent, creatorActive ? 0.2 : 0.11), " 0%, ").concat(withAlpha(accent, 0), " 66%)"),
|
|
374
|
+
filter: 'blur(2px)',
|
|
375
|
+
zIndex: 3
|
|
376
|
+
}
|
|
377
|
+
}), firstNoBackgroundVideoUrl && /*#__PURE__*/React.createElement("div", {
|
|
378
|
+
style: {
|
|
379
|
+
position: 'absolute',
|
|
380
|
+
left: cutoutLeft,
|
|
381
|
+
bottom: cutoutBottom,
|
|
382
|
+
width: cutoutWidth,
|
|
383
|
+
height: cutoutHeight,
|
|
384
|
+
opacity: creatorActive ? 0.96 : 0.86,
|
|
385
|
+
filter: creatorActive ? 'drop-shadow(0 20px 40px rgba(0, 0, 0, 0.42))' : 'drop-shadow(0 20px 36px rgba(0, 0, 0, 0.35)) saturate(0.88)',
|
|
386
|
+
zIndex: 4
|
|
387
|
+
}
|
|
388
|
+
}, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
389
|
+
startFrom: startVideoFrom,
|
|
390
|
+
src: firstNoBackgroundVideoUrl,
|
|
391
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
392
|
+
containerWidth: cutoutWidth,
|
|
393
|
+
containerHeight: cutoutHeight,
|
|
394
|
+
useAveragePosition: true,
|
|
395
|
+
muted: true,
|
|
396
|
+
transparent: true,
|
|
397
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
398
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
399
|
+
startFrom: startVideoFrom,
|
|
400
|
+
src: firstNoBackgroundVideoUrl,
|
|
401
|
+
muted: true,
|
|
402
|
+
transparent: true,
|
|
403
|
+
style: {
|
|
404
|
+
width: '100%',
|
|
405
|
+
height: '100%',
|
|
406
|
+
objectFit: 'contain'
|
|
407
|
+
}
|
|
408
|
+
})), hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
409
|
+
style: {
|
|
410
|
+
position: 'absolute',
|
|
411
|
+
top: titleTop,
|
|
412
|
+
left: titleCentered ? '50%' : titleLeft,
|
|
413
|
+
width: titleWidth,
|
|
414
|
+
textAlign: titleCentered ? 'center' : 'left',
|
|
415
|
+
opacity: titleOpacity,
|
|
416
|
+
transform: "".concat(titleCentered ? 'translateX(-50%) ' : '', "translateY(").concat(titleTranslateY, "px)"),
|
|
417
|
+
zIndex: 7
|
|
418
|
+
}
|
|
419
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
420
|
+
style: {
|
|
421
|
+
fontSize: topicFontSize,
|
|
422
|
+
letterSpacing: '0.28em',
|
|
423
|
+
textTransform: 'uppercase',
|
|
424
|
+
color: withAlpha(textColor, 0.75),
|
|
425
|
+
fontWeight: 600,
|
|
426
|
+
marginBottom: 12
|
|
427
|
+
}
|
|
428
|
+
}, safeTopicLabel), titleLines.map(function (line, index) {
|
|
429
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
430
|
+
key: "studio-title-".concat(index),
|
|
431
|
+
style: {
|
|
432
|
+
fontFamily: headlineFontFamily,
|
|
433
|
+
fontSize: titleFontSize,
|
|
434
|
+
lineHeight: 0.98,
|
|
435
|
+
letterSpacing: '-0.03em',
|
|
436
|
+
fontWeight: 500,
|
|
437
|
+
textShadow: '0 16px 36px rgba(0, 0, 0, 0.42)',
|
|
438
|
+
marginBottom: index === titleLines.length - 1 ? 0 : 4
|
|
439
|
+
}
|
|
440
|
+
}, line);
|
|
441
|
+
})), hasCreatorInfo && /*#__PURE__*/React.createElement("div", {
|
|
442
|
+
style: {
|
|
443
|
+
position: 'absolute',
|
|
444
|
+
top: hostStampTop,
|
|
445
|
+
left: hostStampLeft,
|
|
446
|
+
width: hostStampWidth,
|
|
447
|
+
opacity: hostStampOpacity * longHoldFade,
|
|
448
|
+
transform: "translateY(".concat(interpolateWithClamp(frame, [fps * 1.1, fps * 1.9], [18, 0]), "px)"),
|
|
449
|
+
zIndex: 8
|
|
450
|
+
}
|
|
451
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
452
|
+
style: {
|
|
453
|
+
width: 46,
|
|
454
|
+
height: 2,
|
|
455
|
+
backgroundColor: accent,
|
|
456
|
+
marginBottom: 10
|
|
457
|
+
}
|
|
458
|
+
}), hostNameLines.map(function (line, index) {
|
|
459
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
460
|
+
key: "studio-host-name-".concat(index),
|
|
461
|
+
style: {
|
|
462
|
+
fontFamily: headlineFontFamily,
|
|
463
|
+
fontSize: hostNameFontSize,
|
|
464
|
+
lineHeight: 0.98,
|
|
465
|
+
letterSpacing: '-0.02em',
|
|
466
|
+
fontWeight: 500
|
|
467
|
+
}
|
|
468
|
+
}, line);
|
|
469
|
+
}), safeTitle && /*#__PURE__*/React.createElement("div", {
|
|
470
|
+
style: {
|
|
471
|
+
marginTop: 6
|
|
472
|
+
}
|
|
473
|
+
}, hostRoleLines.map(function (line, index) {
|
|
474
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
475
|
+
key: "studio-host-role-".concat(index),
|
|
476
|
+
style: {
|
|
477
|
+
fontSize: hostRoleFontSize,
|
|
478
|
+
lineHeight: 1.2,
|
|
479
|
+
color: softText,
|
|
480
|
+
fontWeight: 500
|
|
481
|
+
}
|
|
482
|
+
}, line);
|
|
483
|
+
}))), hasCollaboratorInfo && /*#__PURE__*/React.createElement("div", {
|
|
484
|
+
style: {
|
|
485
|
+
position: 'absolute',
|
|
486
|
+
top: monitorTop,
|
|
487
|
+
right: monitorRight,
|
|
488
|
+
width: monitorWidth,
|
|
489
|
+
height: monitorHeight,
|
|
490
|
+
opacity: monitorOpacity,
|
|
491
|
+
transform: "translateX(".concat(monitorTranslateX, "px) translateY(").concat(monitorDrift, "px) perspective(1400px) rotateY(").concat(monitorRotateY, "deg) rotateX(").concat(monitorRotateX, "deg) scale(").concat(collaboratorActive ? 1.02 : 1, ")"),
|
|
492
|
+
transformOrigin: 'center right',
|
|
493
|
+
zIndex: 8
|
|
494
|
+
}
|
|
495
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
496
|
+
style: {
|
|
497
|
+
position: 'absolute',
|
|
498
|
+
inset: 0,
|
|
499
|
+
borderRadius: monitorRadius,
|
|
500
|
+
overflow: 'hidden',
|
|
501
|
+
backgroundColor: withAlpha(primaryColor || '#0f172a', 0.68),
|
|
502
|
+
border: "1px solid ".concat(withAlpha(collaboratorActive ? accent : textColor, collaboratorActive ? 0.75 : 0.22)),
|
|
503
|
+
boxShadow: collaboratorActive ? "0 20px 44px rgba(0, 0, 0, 0.42), 0 0 0 1px ".concat(withAlpha(accent, 0.42)) : '0 18px 40px rgba(0, 0, 0, 0.4)'
|
|
504
|
+
}
|
|
505
|
+
}, secondVideoFile ? /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
506
|
+
startFrom: startSecondVideoFrom,
|
|
507
|
+
src: secondVideoFile,
|
|
508
|
+
muted: true,
|
|
509
|
+
style: {
|
|
510
|
+
width: '100%',
|
|
511
|
+
height: '100%',
|
|
512
|
+
objectFit: 'cover',
|
|
513
|
+
objectPosition: '50% 22%',
|
|
514
|
+
filter: monitorFrameFilter,
|
|
515
|
+
transform: "scale(".concat(collaboratorActive ? 1.05 : 1.01, ")")
|
|
516
|
+
}
|
|
517
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
518
|
+
style: {
|
|
519
|
+
position: 'absolute',
|
|
520
|
+
inset: 0,
|
|
521
|
+
background: "linear-gradient(140deg, ".concat(withAlpha(accent, 0.34), " 0%, ").concat(withAlpha(primaryColor || '#111827', 0.92), " 100%)")
|
|
522
|
+
}
|
|
523
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
524
|
+
style: {
|
|
525
|
+
position: 'absolute',
|
|
526
|
+
inset: 0,
|
|
527
|
+
background: "linear-gradient(180deg, ".concat(withAlpha('#05070d', 0.08), " 0%, ").concat(withAlpha('#05070d', 0.22), " 54%, ").concat(withAlpha('#05070d', 0.82), " 100%)")
|
|
528
|
+
}
|
|
529
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
530
|
+
style: {
|
|
531
|
+
position: 'absolute',
|
|
532
|
+
left: 14,
|
|
533
|
+
right: 14,
|
|
534
|
+
bottom: 14
|
|
535
|
+
}
|
|
536
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
537
|
+
style: {
|
|
538
|
+
display: 'inline-block',
|
|
539
|
+
fontSize: monitorLabelFontSize,
|
|
540
|
+
letterSpacing: '0.24em',
|
|
541
|
+
textTransform: 'uppercase',
|
|
542
|
+
fontWeight: 700,
|
|
543
|
+
padding: '4px 8px',
|
|
544
|
+
borderRadius: 999,
|
|
545
|
+
backgroundColor: collaboratorActive ? withAlpha(accent, 0.22) : withAlpha('#05070d', 0.42),
|
|
546
|
+
color: collaboratorActive ? accent : withAlpha(textColor, 0.76),
|
|
547
|
+
marginBottom: 8
|
|
548
|
+
}
|
|
549
|
+
}, collaboratorActive ? 'On Monitor' : 'Coming Up'), guestNameLines.map(function (line, index) {
|
|
550
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
551
|
+
key: "studio-guest-name-".concat(index),
|
|
552
|
+
style: {
|
|
553
|
+
fontFamily: headlineFontFamily,
|
|
554
|
+
fontSize: guestNameFontSize,
|
|
555
|
+
lineHeight: 0.98,
|
|
556
|
+
letterSpacing: '-0.02em',
|
|
557
|
+
fontWeight: 500,
|
|
558
|
+
textShadow: '0 10px 24px rgba(0, 0, 0, 0.42)'
|
|
559
|
+
}
|
|
560
|
+
}, line);
|
|
561
|
+
}), safeCollaboratorTitle && /*#__PURE__*/React.createElement("div", {
|
|
562
|
+
style: {
|
|
563
|
+
marginTop: 4
|
|
564
|
+
}
|
|
565
|
+
}, guestRoleLines.map(function (line, index) {
|
|
566
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
567
|
+
key: "studio-guest-role-".concat(index),
|
|
568
|
+
style: {
|
|
569
|
+
fontSize: guestRoleFontSize,
|
|
570
|
+
lineHeight: 1.2,
|
|
571
|
+
color: withAlpha(textColor, 0.8),
|
|
572
|
+
fontWeight: 500
|
|
573
|
+
}
|
|
574
|
+
}, line);
|
|
575
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
576
|
+
style: {
|
|
577
|
+
position: 'absolute',
|
|
578
|
+
inset: padding,
|
|
579
|
+
border: "1px solid ".concat(withAlpha(accent, collaboratorActive ? 0.3 : 0.16)),
|
|
580
|
+
pointerEvents: 'none',
|
|
581
|
+
zIndex: 6,
|
|
582
|
+
opacity: 0.45
|
|
583
|
+
}
|
|
584
|
+
})), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
585
|
+
style: {
|
|
586
|
+
zIndex: 100
|
|
587
|
+
}
|
|
588
|
+
}, children));
|
|
589
|
+
};
|
|
@@ -10,6 +10,7 @@ var TOTAL_X_PADDING = 20;
|
|
|
10
10
|
var GAP_BETWEEN_VIDEOS = 5;
|
|
11
11
|
var MIN_HANDOFF_OVERLAP = 0.5;
|
|
12
12
|
export var Handoff = function Handoff(_ref) {
|
|
13
|
+
var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
|
|
13
14
|
var startFirstVideoFrom = _ref.startFirstVideoFrom,
|
|
14
15
|
startSecondVideoFrom = _ref.startSecondVideoFrom,
|
|
15
16
|
firstVideoFile = _ref.firstVideoFile,
|
|
@@ -22,11 +23,18 @@ export var Handoff = function Handoff(_ref) {
|
|
|
22
23
|
secondNoBackgroundVideoUrl = _ref.secondNoBackgroundVideoUrl,
|
|
23
24
|
secondNoBackgroundFaceMetadata = _ref.secondNoBackgroundFaceMetadata,
|
|
24
25
|
noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
|
|
25
|
-
handoffOverlapSeconds = _ref.handoffOverlapSeconds
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
handoffOverlapSeconds = _ref.handoffOverlapSeconds,
|
|
27
|
+
_ref$useSquareInLands = _ref.useSquareInLandscapeFirstVideo,
|
|
28
|
+
useSquareInLandscapeFirstVideo = _ref$useSquareInLands === void 0 ? false : _ref$useSquareInLands;
|
|
29
|
+
var videoConfig = useVideoConfig();
|
|
30
|
+
var width = videoConfig.width,
|
|
31
|
+
height = videoConfig.height,
|
|
32
|
+
fps = videoConfig.fps,
|
|
33
|
+
_videoConfig$props = videoConfig.props,
|
|
34
|
+
compositionProps = _videoConfig$props === void 0 ? {} : _videoConfig$props;
|
|
35
|
+
var outputOrientation = (compositionProps === null || compositionProps === void 0 ? void 0 : (_compositionProps$out = compositionProps.output) === null || _compositionProps$out === void 0 ? void 0 : _compositionProps$out.orientation) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : (_window$screenplayPro2 = _window$screenplayPro.output) === null || _window$screenplayPro2 === void 0 ? void 0 : _window$screenplayPro2.orientation : undefined);
|
|
36
|
+
var shouldUseSquareInLandscapeFirstVideo = Boolean(useSquareInLandscapeFirstVideo) && outputOrientation === "landscape";
|
|
37
|
+
var squareSize = 1080;
|
|
30
38
|
var frame = useCurrentFrame();
|
|
31
39
|
var _useTheme = useTheme(),
|
|
32
40
|
primaryColor = _useTheme.primaryColor;
|
|
@@ -68,6 +76,10 @@ export var Handoff = function Handoff(_ref) {
|
|
|
68
76
|
var secondVideoWidth = useTimeInterpolate(inputRangeInSeconds, secondTargetVideoWidths, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
69
77
|
var firstVideoHeight = useTimeInterpolate(inputRangeInSeconds, firstTargetVideoHeights, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
70
78
|
var secondVideoHeight = useTimeInterpolate(inputRangeInSeconds, secondTargetVideoHeights, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
79
|
+
var firstRenderVideoWidth = shouldUseSquareInLandscapeFirstVideo ? Math.min(firstVideoWidth, squareSize) : firstVideoWidth;
|
|
80
|
+
var firstRenderVideoHeight = shouldUseSquareInLandscapeFirstVideo ? Math.min(firstVideoHeight, squareSize) : firstVideoHeight;
|
|
81
|
+
var firstVideoCenteredOffsetX = shouldUseSquareInLandscapeFirstVideo ? Math.max(0, (width - TOTAL_X_PADDING - firstRenderVideoWidth) / 2) : 0;
|
|
82
|
+
var firstVideoTranslateX = useTimeInterpolate(inputRangeInSeconds, [firstVideoCenteredOffsetX, 0, 0, 0], DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
71
83
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
72
84
|
style: {
|
|
73
85
|
width: width,
|
|
@@ -90,24 +102,28 @@ export var Handoff = function Handoff(_ref) {
|
|
|
90
102
|
}, /*#__PURE__*/React.createElement(Freeze, {
|
|
91
103
|
frame: firstVideoDurationInFrames,
|
|
92
104
|
active: frame >= firstVideoDurationInFrames
|
|
105
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
style: {
|
|
107
|
+
transform: "translateX(".concat(firstVideoTranslateX, "px)")
|
|
108
|
+
}
|
|
93
109
|
}, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
94
110
|
startFrom: startFirstVideoFrom,
|
|
95
111
|
src: firstVideoFile,
|
|
96
112
|
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
97
113
|
aspectRatio: orientation,
|
|
98
|
-
containerWidth:
|
|
99
|
-
containerHeight:
|
|
114
|
+
containerWidth: firstRenderVideoWidth,
|
|
115
|
+
containerHeight: firstRenderVideoHeight,
|
|
100
116
|
useAveragePosition: true
|
|
101
117
|
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
102
118
|
startFrom: startFirstVideoFrom,
|
|
103
119
|
src: firstVideoFile,
|
|
104
120
|
style: {
|
|
105
|
-
height:
|
|
121
|
+
height: firstRenderVideoHeight,
|
|
106
122
|
objectFit: "cover",
|
|
107
|
-
width:
|
|
123
|
+
width: firstRenderVideoWidth,
|
|
108
124
|
borderRadius: "40px"
|
|
109
125
|
}
|
|
110
|
-
})), /*#__PURE__*/React.createElement(Sequence, {
|
|
126
|
+
}))), /*#__PURE__*/React.createElement(Sequence, {
|
|
111
127
|
from: delayInFrames,
|
|
112
128
|
layout: "none"
|
|
113
129
|
}, secondNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|