@zync/zync-screnplay-player 0.1.196 → 0.1.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/screenplay/RemotionRenderer/components/LottieAnimationGlobal.js +21 -21
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabSplit.js +924 -0
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +50 -50
- package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +4 -4
- package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -80
- package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +3 -3
- package/dist/screenplay/RemotionRenderer/development.js +156 -2095
- 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/CreatorCollabSplitLayout.js +68 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +5 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +51 -51
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +4 -2
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +20 -20
- package/dist/screenplay/RemotionRenderer/tracks/Watermark.js +2 -1
- package/package.json +47 -47
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { AbsoluteFill, Easing, interpolate, OffthreadVideo, useCurrentFrame, useVideoConfig } from "remotion";
|
|
9
|
+
import { loadFont } from "@remotion/google-fonts/Poppins";
|
|
10
|
+
import { useOrientationBased } from "../../hooks/useOrientationBased.js";
|
|
11
|
+
import { useTheme } from "../../theme/hooks/useTheme.js";
|
|
12
|
+
import { distributeTextToFit } from "../../theme/themes/default/Sentence/SentenceSimple.helpers.js";
|
|
13
|
+
import FaceCenteredVideo from "../utils/FaceCenteredVideo";
|
|
14
|
+
import { BlurOverlay } from "../utils/BlurOverlay";
|
|
15
|
+
import { CHROME_PADDING } from "../../config.js";
|
|
16
|
+
import { useVirtualBackground } from "../../hooks/useVirtualBackground";
|
|
17
|
+
import { VirtualBackgroundUnderlay } from "../backgrounds/VirtualBackgroundUnderlay";
|
|
18
|
+
var _loadFont = loadFont(),
|
|
19
|
+
fontFamily = _loadFont.fontFamily;
|
|
20
|
+
var withAlpha = function withAlpha(color, alpha) {
|
|
21
|
+
if (!color || typeof color !== "string" || !color.startsWith("#")) {
|
|
22
|
+
return color;
|
|
23
|
+
}
|
|
24
|
+
var hex = color.replace("#", "");
|
|
25
|
+
if (![3, 6].includes(hex.length)) {
|
|
26
|
+
return color;
|
|
27
|
+
}
|
|
28
|
+
var normalizedHex = hex.length === 3 ? hex.split("").map(function (_char) {
|
|
29
|
+
return _char + _char;
|
|
30
|
+
}).join("") : hex;
|
|
31
|
+
var intValue = Number.parseInt(normalizedHex, 16);
|
|
32
|
+
if (Number.isNaN(intValue)) {
|
|
33
|
+
return color;
|
|
34
|
+
}
|
|
35
|
+
var r = intValue >> 16 & 255;
|
|
36
|
+
var g = intValue >> 8 & 255;
|
|
37
|
+
var b = intValue & 255;
|
|
38
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
39
|
+
};
|
|
40
|
+
var sanitizeText = function sanitizeText(value) {
|
|
41
|
+
return typeof value === "string" ? value.trim() : "";
|
|
42
|
+
};
|
|
43
|
+
var getRevealStyle = function getRevealStyle(frame, delayFrames) {
|
|
44
|
+
var distance = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 16;
|
|
45
|
+
var opacity = interpolate(frame, [delayFrames, delayFrames + 12], [0, 1], {
|
|
46
|
+
easing: Easing.out(Easing.ease),
|
|
47
|
+
extrapolateLeft: "clamp",
|
|
48
|
+
extrapolateRight: "clamp"
|
|
49
|
+
});
|
|
50
|
+
var translateY = interpolate(frame, [delayFrames, delayFrames + 12], [distance, 0], {
|
|
51
|
+
easing: Easing.out(Easing.ease),
|
|
52
|
+
extrapolateLeft: "clamp",
|
|
53
|
+
extrapolateRight: "clamp"
|
|
54
|
+
});
|
|
55
|
+
return {
|
|
56
|
+
opacity: opacity,
|
|
57
|
+
transform: "translateY(".concat(translateY, "px)")
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
var clampLines = function clampLines() {
|
|
61
|
+
var lines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
62
|
+
var maxLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
63
|
+
if (lines.length <= maxLines) return lines;
|
|
64
|
+
var trimmed = lines.slice(0, maxLines);
|
|
65
|
+
var last = trimmed[maxLines - 1].trimEnd();
|
|
66
|
+
var shortened = last.length > 3 ? last.slice(0, -3).trimEnd() : last;
|
|
67
|
+
trimmed[maxLines - 1] = "".concat(shortened, "...");
|
|
68
|
+
return trimmed;
|
|
69
|
+
};
|
|
70
|
+
var mergeFilters = function mergeFilters() {
|
|
71
|
+
for (var _len = arguments.length, filters = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
72
|
+
filters[_key] = arguments[_key];
|
|
73
|
+
}
|
|
74
|
+
var merged = filters.filter(function (filter) {
|
|
75
|
+
return Boolean(filter);
|
|
76
|
+
});
|
|
77
|
+
return merged.length ? merged.join(" ") : undefined;
|
|
78
|
+
};
|
|
79
|
+
export var CreatorCollabSplit = function CreatorCollabSplit(_ref) {
|
|
80
|
+
var children = _ref.children,
|
|
81
|
+
text = _ref.text,
|
|
82
|
+
fullName = _ref.fullName,
|
|
83
|
+
title = _ref.title,
|
|
84
|
+
collaboratorName = _ref.collaboratorName,
|
|
85
|
+
collaboratorTitle = _ref.collaboratorTitle,
|
|
86
|
+
topicLabel = _ref.topicLabel,
|
|
87
|
+
activeSpeaker = _ref.activeSpeaker,
|
|
88
|
+
_ref$startVideoFrom = _ref.startVideoFrom,
|
|
89
|
+
startVideoFrom = _ref$startVideoFrom === void 0 ? 0 : _ref$startVideoFrom,
|
|
90
|
+
firstVideoFile = _ref.firstVideoFile,
|
|
91
|
+
_ref$startSecondVideo = _ref.startSecondVideoFrom,
|
|
92
|
+
startSecondVideoFrom = _ref$startSecondVideo === void 0 ? 0 : _ref$startSecondVideo,
|
|
93
|
+
secondVideoFile = _ref.secondVideoFile,
|
|
94
|
+
firstNoBackgroundVideoUrl = _ref.firstNoBackgroundVideoUrl,
|
|
95
|
+
firstNoBackgroundFaceMetadata = _ref.firstNoBackgroundFaceMetadata,
|
|
96
|
+
noBackgroundVideoEffects = _ref.noBackgroundVideoEffects;
|
|
97
|
+
var _useVideoConfig = useVideoConfig(),
|
|
98
|
+
width = _useVideoConfig.width,
|
|
99
|
+
height = _useVideoConfig.height;
|
|
100
|
+
var frame = useCurrentFrame();
|
|
101
|
+
var _useTheme = useTheme(),
|
|
102
|
+
primaryColor = _useTheme.primaryColor,
|
|
103
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
104
|
+
accentColor = _useTheme.accentColor,
|
|
105
|
+
accentContrast = _useTheme.accentContrast;
|
|
106
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
107
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
108
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
109
|
+
var showVirtual = isVirtual && !!firstNoBackgroundVideoUrl;
|
|
110
|
+
var safeText = sanitizeText(text);
|
|
111
|
+
var safeFullName = sanitizeText(fullName);
|
|
112
|
+
var safeTitle = sanitizeText(title);
|
|
113
|
+
var safeCollaboratorName = sanitizeText(collaboratorName);
|
|
114
|
+
var safeCollaboratorTitle = sanitizeText(collaboratorTitle);
|
|
115
|
+
var safeTopicLabel = sanitizeText(topicLabel);
|
|
116
|
+
var speaker = sanitizeText(activeSpeaker).toLowerCase();
|
|
117
|
+
var creatorActive = speaker !== "collaborator";
|
|
118
|
+
var collaboratorActive = speaker === "collaborator";
|
|
119
|
+
var hasTitle = Boolean(safeText);
|
|
120
|
+
var hasCreatorInfo = Boolean(safeFullName || safeTitle);
|
|
121
|
+
var hasCollaboratorText = Boolean(safeCollaboratorName || safeCollaboratorTitle);
|
|
122
|
+
var hasCollaboratorInfo = Boolean(hasCollaboratorText || secondVideoFile);
|
|
123
|
+
var showCollaboratorVideo = Boolean(secondVideoFile);
|
|
124
|
+
var basePadding = CHROME_PADDING + 10;
|
|
125
|
+
var landscapeGap = 36;
|
|
126
|
+
var portraitGap = 24;
|
|
127
|
+
var landscapeContentWidth = width - basePadding * 2;
|
|
128
|
+
var landscapeContentHeight = height - basePadding * 2;
|
|
129
|
+
var landscapeRightWidth = landscapeContentHeight * (4 / 3);
|
|
130
|
+
var landscapeLeftWidth = Math.max(0, landscapeContentWidth - landscapeGap - landscapeRightWidth);
|
|
131
|
+
var portraitContentWidth = width - CHROME_PADDING * 2;
|
|
132
|
+
var portraitContentHeight = height - CHROME_PADDING * 2;
|
|
133
|
+
var portraitVideoHeight = (portraitContentHeight - portraitGap) * 0.6;
|
|
134
|
+
var portraitInfoHeight = (portraitContentHeight - portraitGap) * 0.4;
|
|
135
|
+
var _useOrientationBased = useOrientationBased({
|
|
136
|
+
landscape: {
|
|
137
|
+
layoutDirection: "row",
|
|
138
|
+
padding: basePadding,
|
|
139
|
+
gap: landscapeGap,
|
|
140
|
+
stackGap: 18,
|
|
141
|
+
titleStackGap: 10,
|
|
142
|
+
cardGap: 8,
|
|
143
|
+
infoWidth: landscapeLeftWidth,
|
|
144
|
+
infoHeight: landscapeContentHeight,
|
|
145
|
+
videoWidth: landscapeRightWidth,
|
|
146
|
+
videoHeight: landscapeContentHeight,
|
|
147
|
+
infoPadding: 28,
|
|
148
|
+
cardPadding: 22,
|
|
149
|
+
titleMaxFontSize: 80,
|
|
150
|
+
titleLineHeight: 1.12,
|
|
151
|
+
titleMaxWidth: Math.min(landscapeLeftWidth, 520),
|
|
152
|
+
nameMaxFontSize: 34,
|
|
153
|
+
roleMaxFontSize: 20,
|
|
154
|
+
titleMaxLines: 3,
|
|
155
|
+
previewAspectRatio: 1,
|
|
156
|
+
previewWidth: landscapeLeftWidth,
|
|
157
|
+
previewMaxHeightRatio: 0.55,
|
|
158
|
+
statusFontSize: 14,
|
|
159
|
+
badgeFontSize: 14
|
|
160
|
+
},
|
|
161
|
+
portrait: {
|
|
162
|
+
layoutDirection: "column",
|
|
163
|
+
padding: CHROME_PADDING,
|
|
164
|
+
gap: portraitGap,
|
|
165
|
+
stackGap: 16,
|
|
166
|
+
titleStackGap: 8,
|
|
167
|
+
cardGap: 8,
|
|
168
|
+
infoWidth: portraitContentWidth,
|
|
169
|
+
infoHeight: portraitInfoHeight,
|
|
170
|
+
videoWidth: portraitContentWidth,
|
|
171
|
+
videoHeight: portraitVideoHeight,
|
|
172
|
+
infoPadding: 22,
|
|
173
|
+
cardPadding: 18,
|
|
174
|
+
titleMaxFontSize: 46,
|
|
175
|
+
titleLineHeight: 1.12,
|
|
176
|
+
titleMaxWidth: portraitContentWidth,
|
|
177
|
+
nameMaxFontSize: 60,
|
|
178
|
+
roleMaxFontSize: 40,
|
|
179
|
+
titleMaxLines: 3,
|
|
180
|
+
previewAspectRatio: 1,
|
|
181
|
+
previewWidth: portraitContentWidth,
|
|
182
|
+
previewMaxHeightRatio: 0.55,
|
|
183
|
+
statusFontSize: 24,
|
|
184
|
+
badgeFontSize: 24
|
|
185
|
+
},
|
|
186
|
+
square: {
|
|
187
|
+
layoutDirection: "column",
|
|
188
|
+
padding: CHROME_PADDING,
|
|
189
|
+
gap: portraitGap,
|
|
190
|
+
stackGap: 16,
|
|
191
|
+
titleStackGap: 8,
|
|
192
|
+
cardGap: 8,
|
|
193
|
+
infoWidth: portraitContentWidth,
|
|
194
|
+
infoHeight: portraitInfoHeight,
|
|
195
|
+
videoWidth: portraitContentWidth,
|
|
196
|
+
videoHeight: portraitVideoHeight,
|
|
197
|
+
infoPadding: 22,
|
|
198
|
+
cardPadding: 18,
|
|
199
|
+
titleMaxFontSize: 46,
|
|
200
|
+
titleLineHeight: 1.12,
|
|
201
|
+
titleMaxWidth: portraitContentWidth,
|
|
202
|
+
nameMaxFontSize: 30,
|
|
203
|
+
roleMaxFontSize: 20,
|
|
204
|
+
titleMaxLines: 1,
|
|
205
|
+
previewAspectRatio: 1,
|
|
206
|
+
previewWidth: portraitContentWidth,
|
|
207
|
+
previewMaxHeightRatio: 0.55,
|
|
208
|
+
statusFontSize: 13,
|
|
209
|
+
badgeFontSize: 12
|
|
210
|
+
}
|
|
211
|
+
}),
|
|
212
|
+
orientation = _useOrientationBased.orientation,
|
|
213
|
+
layoutDirection = _useOrientationBased.layoutDirection,
|
|
214
|
+
padding = _useOrientationBased.padding,
|
|
215
|
+
gap = _useOrientationBased.gap,
|
|
216
|
+
stackGap = _useOrientationBased.stackGap,
|
|
217
|
+
titleStackGap = _useOrientationBased.titleStackGap,
|
|
218
|
+
cardGap = _useOrientationBased.cardGap,
|
|
219
|
+
infoWidth = _useOrientationBased.infoWidth,
|
|
220
|
+
infoHeight = _useOrientationBased.infoHeight,
|
|
221
|
+
videoWidth = _useOrientationBased.videoWidth,
|
|
222
|
+
videoHeight = _useOrientationBased.videoHeight,
|
|
223
|
+
infoPadding = _useOrientationBased.infoPadding,
|
|
224
|
+
cardPadding = _useOrientationBased.cardPadding,
|
|
225
|
+
titleMaxFontSize = _useOrientationBased.titleMaxFontSize,
|
|
226
|
+
titleLineHeight = _useOrientationBased.titleLineHeight,
|
|
227
|
+
titleMaxWidth = _useOrientationBased.titleMaxWidth,
|
|
228
|
+
nameMaxFontSize = _useOrientationBased.nameMaxFontSize,
|
|
229
|
+
roleMaxFontSize = _useOrientationBased.roleMaxFontSize,
|
|
230
|
+
titleMaxLines = _useOrientationBased.titleMaxLines,
|
|
231
|
+
previewAspectRatio = _useOrientationBased.previewAspectRatio,
|
|
232
|
+
previewWidth = _useOrientationBased.previewWidth,
|
|
233
|
+
previewMaxHeightRatio = _useOrientationBased.previewMaxHeightRatio,
|
|
234
|
+
statusFontSize = _useOrientationBased.statusFontSize,
|
|
235
|
+
badgeFontSize = _useOrientationBased.badgeFontSize;
|
|
236
|
+
var isLandscape = orientation === "landscape";
|
|
237
|
+
var isPortrait = orientation === "portrait";
|
|
238
|
+
var isSquare = orientation === "square";
|
|
239
|
+
var surfaceRadius = isLandscape ? 28 : 24;
|
|
240
|
+
var columnInTranslate = interpolate(frame, [0, 18], [-40, 0], {
|
|
241
|
+
easing: Easing.out(Easing.cubic),
|
|
242
|
+
extrapolateRight: "clamp"
|
|
243
|
+
});
|
|
244
|
+
var columnOpacity = interpolate(frame, [0, 18], [0, 1], {
|
|
245
|
+
easing: Easing.out(Easing.ease),
|
|
246
|
+
extrapolateRight: "clamp"
|
|
247
|
+
});
|
|
248
|
+
var previewInScale = interpolate(frame, [6, 20], [0.96, 1], {
|
|
249
|
+
easing: Easing.out(Easing.ease),
|
|
250
|
+
extrapolateRight: "clamp"
|
|
251
|
+
});
|
|
252
|
+
var previewInOpacity = interpolate(frame, [6, 20], [0, 1], {
|
|
253
|
+
easing: Easing.out(Easing.ease),
|
|
254
|
+
extrapolateRight: "clamp"
|
|
255
|
+
});
|
|
256
|
+
var shouldCardReveal = isSquare || isPortrait;
|
|
257
|
+
var cardTitleRevealDelay = 0;
|
|
258
|
+
var cardHostRevealDelay = 10;
|
|
259
|
+
var cardFeaturingRevealDelay = 18;
|
|
260
|
+
var cardTitleLineReveal = function cardTitleLineReveal(index) {
|
|
261
|
+
return getRevealStyle(frame, cardTitleRevealDelay + index * 4, 12);
|
|
262
|
+
};
|
|
263
|
+
var cardHostReveal = getRevealStyle(frame, cardHostRevealDelay, 14);
|
|
264
|
+
var cardFeaturingReveal = getRevealStyle(frame, cardFeaturingRevealDelay, 14);
|
|
265
|
+
var titleWidth = Math.min(infoWidth, titleMaxWidth);
|
|
266
|
+
var titleHeight = titleMaxFontSize * titleLineHeight * titleMaxLines;
|
|
267
|
+
var _distributeTextToFit = distributeTextToFit(safeText, titleWidth, titleHeight, titleMaxFontSize),
|
|
268
|
+
titleLines = _distributeTextToFit.lines,
|
|
269
|
+
titleFontSize = _distributeTextToFit.fontSize;
|
|
270
|
+
var clampedTitleLines = clampLines(titleLines, titleMaxLines);
|
|
271
|
+
var _distributeTextToFit2 = distributeTextToFit(safeFullName, infoWidth - infoPadding * 2, 90, nameMaxFontSize),
|
|
272
|
+
creatorNameLines = _distributeTextToFit2.lines,
|
|
273
|
+
creatorNameFontSize = _distributeTextToFit2.fontSize;
|
|
274
|
+
var _distributeTextToFit3 = distributeTextToFit(safeTitle, infoWidth - infoPadding * 2, 70, roleMaxFontSize),
|
|
275
|
+
creatorTitleLines = _distributeTextToFit3.lines,
|
|
276
|
+
creatorTitleFontSize = _distributeTextToFit3.fontSize;
|
|
277
|
+
var _distributeTextToFit4 = distributeTextToFit(safeCollaboratorName, infoWidth - infoPadding * 2, 90, nameMaxFontSize),
|
|
278
|
+
collaboratorNameLines = _distributeTextToFit4.lines,
|
|
279
|
+
collaboratorNameFontSize = _distributeTextToFit4.fontSize;
|
|
280
|
+
var _distributeTextToFit5 = distributeTextToFit(safeCollaboratorTitle, infoWidth - infoPadding * 2, 70, roleMaxFontSize),
|
|
281
|
+
collaboratorTitleLines = _distributeTextToFit5.lines,
|
|
282
|
+
collaboratorTitleFontSize = _distributeTextToFit5.fontSize;
|
|
283
|
+
var cardBackground = withAlpha(primaryColor || "#0f172a", 0.6) || "#0f172a";
|
|
284
|
+
var cardBorder = withAlpha(accentColor || "#ffffff", 0.35) || "#ffffff";
|
|
285
|
+
var textColor = primaryContrast || "#ffffff";
|
|
286
|
+
var subTextColor = withAlpha(textColor, 0.75) || textColor;
|
|
287
|
+
var mutedTextColor = withAlpha(textColor, 0.6) || textColor;
|
|
288
|
+
var ringColor = accentColor || "#ffffff";
|
|
289
|
+
var hostBadgeBackground = withAlpha(ringColor, 0.2) || ringColor;
|
|
290
|
+
var hostBadgeColor = ringColor;
|
|
291
|
+
var featuringBackground = ringColor;
|
|
292
|
+
var featuringColor = accentContrast || primaryColor || "#0f172a";
|
|
293
|
+
var previewMaxHeight = infoHeight * previewMaxHeightRatio;
|
|
294
|
+
var rawPreviewHeight = previewWidth / previewAspectRatio;
|
|
295
|
+
var previewHeight = Math.min(rawPreviewHeight, previewMaxHeight);
|
|
296
|
+
var previewWidthAdjusted = previewHeight * previewAspectRatio;
|
|
297
|
+
var creatorScale = creatorActive ? 1.03 : 1;
|
|
298
|
+
var collaboratorScale = collaboratorActive ? 1.03 : 1;
|
|
299
|
+
var inactiveOpacity = 0.92;
|
|
300
|
+
var inactiveFilter = "saturate(0.85) brightness(0.95)";
|
|
301
|
+
var activeFilter = "saturate(1.05)";
|
|
302
|
+
var creatorFrameWidth = videoWidth;
|
|
303
|
+
var creatorFrameHeight = videoHeight;
|
|
304
|
+
var nowName = safeFullName || "Host";
|
|
305
|
+
var nextName = safeCollaboratorName || "Guest";
|
|
306
|
+
var squareBarHeight = Math.min(height * 0.36, 320);
|
|
307
|
+
var portraitBarHeight = Math.min(height * 0.34, 320);
|
|
308
|
+
var barHeight = isPortrait ? undefined : isSquare ? undefined : Math.min(height * 0.3, 230);
|
|
309
|
+
var barPadding = isPortrait ? 18 : 16;
|
|
310
|
+
var barWidth = width - padding * 2;
|
|
311
|
+
var barTop = isSquare || isPortrait ? padding : undefined;
|
|
312
|
+
var barBottom = isSquare || isPortrait ? undefined : padding;
|
|
313
|
+
var barNameFontSize = isPortrait ? 39 : isSquare ? 20 : 18;
|
|
314
|
+
var barRoleFontSize = isPortrait ? 27 : isSquare ? 14 : 13;
|
|
315
|
+
var cardGridGap = 12;
|
|
316
|
+
var cardColumnWidth = isSquare || isPortrait ? (barWidth - cardGridGap) / 2 : barWidth;
|
|
317
|
+
var squarePipSize = Math.max(84, Math.min(160, squareBarHeight - barPadding * 2 - 24));
|
|
318
|
+
var portraitCardPipHeight = Math.max(96, Math.min(200, portraitBarHeight - barPadding * 2 - 64));
|
|
319
|
+
var portraitCardPipWidth = portraitCardPipHeight;
|
|
320
|
+
var portraitGridPipWidth = Math.min(portraitCardPipWidth, Math.max(72, cardColumnWidth * 0.45));
|
|
321
|
+
var portraitGridPipHeight = portraitGridPipWidth;
|
|
322
|
+
var pipAspectRatio = isPortrait ? 4 / 5 : 1;
|
|
323
|
+
var pipMaxWidth = width * (isPortrait ? 0.36 : 0.34);
|
|
324
|
+
var pipMaxHeight = height * (isPortrait ? 0.28 : 0.3);
|
|
325
|
+
var availablePipHeight = isPortrait ? height - barHeight - padding * 2 : height - padding * 2;
|
|
326
|
+
var pipHeight = Math.max(0, Math.min(pipMaxHeight, availablePipHeight));
|
|
327
|
+
var pipWidth = pipHeight * pipAspectRatio;
|
|
328
|
+
if (pipWidth > pipMaxWidth) {
|
|
329
|
+
pipWidth = pipMaxWidth;
|
|
330
|
+
pipHeight = pipWidth / pipAspectRatio;
|
|
331
|
+
}
|
|
332
|
+
var pipTop = isPortrait ? padding : undefined;
|
|
333
|
+
var pipBottom = isPortrait ? undefined : padding;
|
|
334
|
+
var showBar = hasTitle || hasCreatorInfo || hasCollaboratorText;
|
|
335
|
+
var renderCreatorVideo = function renderCreatorVideo(containerWidth, containerHeight, radius) {
|
|
336
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
337
|
+
url: virtualBgUrl,
|
|
338
|
+
width: "100%",
|
|
339
|
+
height: "100%",
|
|
340
|
+
borderRadius: radius,
|
|
341
|
+
zIndex: 1
|
|
342
|
+
}) : null, creatorActive && isLandscape && /*#__PURE__*/React.createElement("div", {
|
|
343
|
+
style: {
|
|
344
|
+
position: "absolute",
|
|
345
|
+
top: 16,
|
|
346
|
+
left: 16,
|
|
347
|
+
backgroundColor: ringColor,
|
|
348
|
+
color: featuringColor,
|
|
349
|
+
padding: "6px 14px",
|
|
350
|
+
borderRadius: 999,
|
|
351
|
+
fontSize: badgeFontSize,
|
|
352
|
+
fontWeight: 700,
|
|
353
|
+
letterSpacing: "0.08em",
|
|
354
|
+
textTransform: "uppercase",
|
|
355
|
+
zIndex: 6
|
|
356
|
+
}
|
|
357
|
+
}, "Speaking"), !creatorActive && isLandscape && /*#__PURE__*/React.createElement("div", {
|
|
358
|
+
style: {
|
|
359
|
+
position: "absolute",
|
|
360
|
+
top: 16,
|
|
361
|
+
left: 16,
|
|
362
|
+
backgroundColor: withAlpha(primaryColor || "#0f172a", 0.6),
|
|
363
|
+
color: textColor,
|
|
364
|
+
padding: "6px 14px",
|
|
365
|
+
borderRadius: 999,
|
|
366
|
+
fontSize: badgeFontSize,
|
|
367
|
+
fontWeight: 700,
|
|
368
|
+
letterSpacing: "0.08em",
|
|
369
|
+
textTransform: "uppercase",
|
|
370
|
+
zIndex: 6
|
|
371
|
+
}
|
|
372
|
+
}, "Listening"), firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
373
|
+
startFrom: startVideoFrom,
|
|
374
|
+
src: firstVideoFile,
|
|
375
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
376
|
+
containerWidth: containerWidth,
|
|
377
|
+
containerHeight: containerHeight,
|
|
378
|
+
useAveragePosition: true,
|
|
379
|
+
muted: false,
|
|
380
|
+
style: {
|
|
381
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? "brightness(0.7)" : undefined)
|
|
382
|
+
}
|
|
383
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
384
|
+
startFrom: startVideoFrom,
|
|
385
|
+
src: firstVideoFile,
|
|
386
|
+
muted: false,
|
|
387
|
+
style: {
|
|
388
|
+
width: "100%",
|
|
389
|
+
height: "100%",
|
|
390
|
+
objectFit: "cover",
|
|
391
|
+
filter: mergeFilters(!showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && firstNoBackgroundVideoUrl ? "brightness(0.7)" : undefined)
|
|
392
|
+
}
|
|
393
|
+
}), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
394
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && firstNoBackgroundVideoUrl,
|
|
395
|
+
width: containerWidth,
|
|
396
|
+
height: containerHeight,
|
|
397
|
+
zIndex: 2
|
|
398
|
+
}), 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, {
|
|
399
|
+
style: {
|
|
400
|
+
position: "absolute",
|
|
401
|
+
inset: 0,
|
|
402
|
+
zIndex: 4
|
|
403
|
+
}
|
|
404
|
+
}, firstNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
405
|
+
startFrom: startVideoFrom,
|
|
406
|
+
src: firstNoBackgroundVideoUrl,
|
|
407
|
+
faceMetadata: firstNoBackgroundFaceMetadata,
|
|
408
|
+
containerWidth: containerWidth,
|
|
409
|
+
containerHeight: containerHeight,
|
|
410
|
+
useAveragePosition: true,
|
|
411
|
+
muted: true,
|
|
412
|
+
transparent: true,
|
|
413
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
414
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
415
|
+
startFrom: startVideoFrom,
|
|
416
|
+
src: firstNoBackgroundVideoUrl,
|
|
417
|
+
muted: true,
|
|
418
|
+
transparent: true,
|
|
419
|
+
style: {
|
|
420
|
+
width: "100%",
|
|
421
|
+
height: "100%",
|
|
422
|
+
objectFit: "cover",
|
|
423
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
|
|
424
|
+
}
|
|
425
|
+
})) : null);
|
|
426
|
+
};
|
|
427
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
428
|
+
style: {
|
|
429
|
+
width: width,
|
|
430
|
+
height: height,
|
|
431
|
+
backgroundColor: primaryColor || "transparent",
|
|
432
|
+
fontFamily: fontFamily,
|
|
433
|
+
color: textColor
|
|
434
|
+
}
|
|
435
|
+
}, isLandscape ? /*#__PURE__*/React.createElement("div", {
|
|
436
|
+
style: {
|
|
437
|
+
position: "absolute",
|
|
438
|
+
inset: 0,
|
|
439
|
+
display: "flex",
|
|
440
|
+
flexDirection: layoutDirection,
|
|
441
|
+
gap: gap,
|
|
442
|
+
padding: padding,
|
|
443
|
+
alignItems: "stretch",
|
|
444
|
+
justifyContent: "space-between"
|
|
445
|
+
}
|
|
446
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
447
|
+
style: {
|
|
448
|
+
width: infoWidth,
|
|
449
|
+
height: infoHeight,
|
|
450
|
+
display: "flex",
|
|
451
|
+
flexDirection: "column",
|
|
452
|
+
gap: 0,
|
|
453
|
+
transform: isLandscape ? "translateX(".concat(columnInTranslate, "px)") : "translateY(".concat(columnInTranslate, "px)"),
|
|
454
|
+
opacity: columnOpacity
|
|
455
|
+
}
|
|
456
|
+
}, hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
457
|
+
style: {
|
|
458
|
+
maxWidth: titleWidth,
|
|
459
|
+
height: titleHeight
|
|
460
|
+
}
|
|
461
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
462
|
+
style: _objectSpread(_objectSpread({}, getRevealStyle(frame, 0, 8)), {}, {
|
|
463
|
+
fontSize: badgeFontSize,
|
|
464
|
+
letterSpacing: "0.28em",
|
|
465
|
+
textTransform: "uppercase",
|
|
466
|
+
color: mutedTextColor,
|
|
467
|
+
fontWeight: 700,
|
|
468
|
+
marginBottom: 8
|
|
469
|
+
})
|
|
470
|
+
}, safeTopicLabel), clampedTitleLines.map(function (line, index) {
|
|
471
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
472
|
+
key: "title-line-".concat(index),
|
|
473
|
+
style: _objectSpread(_objectSpread({}, getRevealStyle(frame, index * 4 + 2)), {}, {
|
|
474
|
+
marginBottom: index === clampedTitleLines.length - 1 ? 0 : 6
|
|
475
|
+
})
|
|
476
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
477
|
+
style: {
|
|
478
|
+
fontSize: titleFontSize,
|
|
479
|
+
fontWeight: 600,
|
|
480
|
+
lineHeight: titleLineHeight,
|
|
481
|
+
letterSpacing: "0.01em"
|
|
482
|
+
}
|
|
483
|
+
}, line));
|
|
484
|
+
})), (hasCreatorInfo || hasCollaboratorInfo) && /*#__PURE__*/React.createElement("div", {
|
|
485
|
+
style: {
|
|
486
|
+
flex: 1,
|
|
487
|
+
display: "flex",
|
|
488
|
+
flexDirection: "column",
|
|
489
|
+
gap: stackGap,
|
|
490
|
+
marginTop: hasTitle ? titleStackGap : 0
|
|
491
|
+
}
|
|
492
|
+
}, hasCreatorInfo && /*#__PURE__*/React.createElement("div", {
|
|
493
|
+
style: {
|
|
494
|
+
backgroundColor: cardBackground,
|
|
495
|
+
borderRadius: surfaceRadius,
|
|
496
|
+
padding: cardPadding,
|
|
497
|
+
display: "flex",
|
|
498
|
+
flexDirection: "column",
|
|
499
|
+
gap: cardGap,
|
|
500
|
+
border: "1px solid ".concat(cardBorder),
|
|
501
|
+
boxShadow: "0 16px 36px rgba(15, 23, 42, 0.35)"
|
|
502
|
+
}
|
|
503
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
504
|
+
style: _objectSpread(_objectSpread({}, getRevealStyle(frame, 6, 10)), {}, {
|
|
505
|
+
alignSelf: "flex-start",
|
|
506
|
+
backgroundColor: hostBadgeBackground,
|
|
507
|
+
color: hostBadgeColor,
|
|
508
|
+
padding: "5px 12px",
|
|
509
|
+
borderRadius: 999,
|
|
510
|
+
fontSize: badgeFontSize,
|
|
511
|
+
fontWeight: 700,
|
|
512
|
+
letterSpacing: "0.2em",
|
|
513
|
+
textTransform: "uppercase"
|
|
514
|
+
})
|
|
515
|
+
}, "Host"), safeFullName && /*#__PURE__*/React.createElement("div", {
|
|
516
|
+
style: getRevealStyle(frame, 8, 10)
|
|
517
|
+
}, creatorNameLines.map(function (line, index) {
|
|
518
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
519
|
+
key: "creator-name-".concat(index),
|
|
520
|
+
style: {
|
|
521
|
+
fontSize: creatorNameFontSize,
|
|
522
|
+
fontWeight: 700,
|
|
523
|
+
lineHeight: 1.12
|
|
524
|
+
}
|
|
525
|
+
}, line);
|
|
526
|
+
})), safeTitle && /*#__PURE__*/React.createElement("div", {
|
|
527
|
+
style: getRevealStyle(frame, 12, 10)
|
|
528
|
+
}, creatorTitleLines.map(function (line, index) {
|
|
529
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
530
|
+
key: "creator-title-".concat(index),
|
|
531
|
+
style: {
|
|
532
|
+
fontSize: creatorTitleFontSize,
|
|
533
|
+
fontWeight: 500,
|
|
534
|
+
color: subTextColor,
|
|
535
|
+
lineHeight: 1.2,
|
|
536
|
+
marginTop: index === 0 ? 4 : 0
|
|
537
|
+
}
|
|
538
|
+
}, line);
|
|
539
|
+
}))), hasCollaboratorText && /*#__PURE__*/React.createElement("div", {
|
|
540
|
+
style: {
|
|
541
|
+
backgroundColor: cardBackground,
|
|
542
|
+
borderRadius: surfaceRadius,
|
|
543
|
+
padding: cardPadding,
|
|
544
|
+
display: "flex",
|
|
545
|
+
flexDirection: "column",
|
|
546
|
+
gap: cardGap,
|
|
547
|
+
border: "1px solid ".concat(cardBorder),
|
|
548
|
+
boxShadow: "0 16px 36px rgba(15, 23, 42, 0.35)"
|
|
549
|
+
}
|
|
550
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
551
|
+
style: _objectSpread(_objectSpread({}, getRevealStyle(frame, 14, 10)), {}, {
|
|
552
|
+
alignSelf: "flex-start",
|
|
553
|
+
backgroundColor: featuringBackground,
|
|
554
|
+
color: featuringColor,
|
|
555
|
+
padding: "5px 12px",
|
|
556
|
+
borderRadius: 999,
|
|
557
|
+
fontSize: badgeFontSize,
|
|
558
|
+
fontWeight: 700,
|
|
559
|
+
letterSpacing: "0.2em",
|
|
560
|
+
textTransform: "uppercase"
|
|
561
|
+
})
|
|
562
|
+
}, "Featuring"), safeCollaboratorName && /*#__PURE__*/React.createElement("div", {
|
|
563
|
+
style: getRevealStyle(frame, 16, 10)
|
|
564
|
+
}, collaboratorNameLines.map(function (line, index) {
|
|
565
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
566
|
+
key: "collab-name-".concat(index),
|
|
567
|
+
style: {
|
|
568
|
+
fontSize: collaboratorNameFontSize,
|
|
569
|
+
fontWeight: 700,
|
|
570
|
+
lineHeight: 1.12
|
|
571
|
+
}
|
|
572
|
+
}, line);
|
|
573
|
+
})), safeCollaboratorTitle && /*#__PURE__*/React.createElement("div", {
|
|
574
|
+
style: getRevealStyle(frame, 18, 10)
|
|
575
|
+
}, collaboratorTitleLines.map(function (line, index) {
|
|
576
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
577
|
+
key: "collab-title-".concat(index),
|
|
578
|
+
style: {
|
|
579
|
+
fontSize: collaboratorTitleFontSize,
|
|
580
|
+
fontWeight: 500,
|
|
581
|
+
color: subTextColor,
|
|
582
|
+
lineHeight: 1.2,
|
|
583
|
+
marginTop: index === 0 ? 4 : 0
|
|
584
|
+
}
|
|
585
|
+
}, line);
|
|
586
|
+
}))), showCollaboratorVideo && /*#__PURE__*/React.createElement("div", {
|
|
587
|
+
style: {
|
|
588
|
+
opacity: previewInOpacity * (collaboratorActive ? 1 : inactiveOpacity),
|
|
589
|
+
transform: "scale(".concat(previewInScale * collaboratorScale, ")"),
|
|
590
|
+
transformOrigin: "top left",
|
|
591
|
+
filter: collaboratorActive ? activeFilter : inactiveFilter
|
|
592
|
+
}
|
|
593
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
594
|
+
style: {
|
|
595
|
+
width: previewWidthAdjusted,
|
|
596
|
+
height: previewHeight,
|
|
597
|
+
borderRadius: surfaceRadius,
|
|
598
|
+
overflow: "hidden",
|
|
599
|
+
border: collaboratorActive ? "2px solid ".concat(ringColor) : "1px solid ".concat(cardBorder),
|
|
600
|
+
boxShadow: "0 14px 30px rgba(15, 23, 42, 0.35)",
|
|
601
|
+
position: "relative"
|
|
602
|
+
}
|
|
603
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
604
|
+
startFrom: startSecondVideoFrom,
|
|
605
|
+
src: secondVideoFile,
|
|
606
|
+
muted: true,
|
|
607
|
+
style: {
|
|
608
|
+
width: "100%",
|
|
609
|
+
height: "100%",
|
|
610
|
+
objectFit: "cover",
|
|
611
|
+
objectPosition: "50% 20%"
|
|
612
|
+
}
|
|
613
|
+
}), safeCollaboratorName && /*#__PURE__*/React.createElement("div", {
|
|
614
|
+
style: {
|
|
615
|
+
position: "absolute",
|
|
616
|
+
left: 12,
|
|
617
|
+
bottom: 12,
|
|
618
|
+
backgroundColor: withAlpha(primaryColor || "#0f172a", 0.7),
|
|
619
|
+
color: textColor,
|
|
620
|
+
padding: "6px 12px",
|
|
621
|
+
borderRadius: 999,
|
|
622
|
+
fontSize: badgeFontSize,
|
|
623
|
+
fontWeight: 600,
|
|
624
|
+
letterSpacing: "0.02em"
|
|
625
|
+
}
|
|
626
|
+
}, safeCollaboratorName), collaboratorActive && isLandscape && /*#__PURE__*/React.createElement("div", {
|
|
627
|
+
style: {
|
|
628
|
+
position: "absolute",
|
|
629
|
+
top: 12,
|
|
630
|
+
left: 12,
|
|
631
|
+
backgroundColor: ringColor,
|
|
632
|
+
color: featuringColor,
|
|
633
|
+
padding: "4px 10px",
|
|
634
|
+
borderRadius: 999,
|
|
635
|
+
fontSize: badgeFontSize,
|
|
636
|
+
fontWeight: 700,
|
|
637
|
+
letterSpacing: "0.08em",
|
|
638
|
+
textTransform: "uppercase"
|
|
639
|
+
}
|
|
640
|
+
}, "Speaking"))), hasCollaboratorInfo && /*#__PURE__*/React.createElement("div", {
|
|
641
|
+
style: {
|
|
642
|
+
marginTop: "auto",
|
|
643
|
+
color: mutedTextColor,
|
|
644
|
+
fontSize: statusFontSize,
|
|
645
|
+
letterSpacing: "0.08em",
|
|
646
|
+
textTransform: "uppercase",
|
|
647
|
+
display: "flex",
|
|
648
|
+
flexDirection: "column",
|
|
649
|
+
gap: 6
|
|
650
|
+
}
|
|
651
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
652
|
+
style: getRevealStyle(frame, 20, 8)
|
|
653
|
+
}, "Now: ", nowName, " asking"), /*#__PURE__*/React.createElement("div", {
|
|
654
|
+
style: getRevealStyle(frame, 22, 8)
|
|
655
|
+
}, "Next: ", nextName, " answering")))), /*#__PURE__*/React.createElement("div", {
|
|
656
|
+
style: {
|
|
657
|
+
width: videoWidth,
|
|
658
|
+
height: videoHeight,
|
|
659
|
+
position: "relative",
|
|
660
|
+
display: "flex",
|
|
661
|
+
alignItems: "center",
|
|
662
|
+
justifyContent: "center",
|
|
663
|
+
opacity: creatorActive ? 1 : inactiveOpacity
|
|
664
|
+
}
|
|
665
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
666
|
+
style: {
|
|
667
|
+
width: creatorFrameWidth,
|
|
668
|
+
height: creatorFrameHeight,
|
|
669
|
+
position: "relative",
|
|
670
|
+
borderRadius: surfaceRadius,
|
|
671
|
+
overflow: "hidden",
|
|
672
|
+
boxShadow: "0 30px 60px rgba(15, 23, 42, 0.35)",
|
|
673
|
+
border: creatorActive ? "2px solid ".concat(ringColor) : "1px solid ".concat(cardBorder),
|
|
674
|
+
filter: creatorActive ? activeFilter : inactiveFilter,
|
|
675
|
+
transform: "scale(".concat(creatorScale, ")"),
|
|
676
|
+
transformOrigin: "center"
|
|
677
|
+
}
|
|
678
|
+
}, renderCreatorVideo(creatorFrameWidth, creatorFrameHeight, surfaceRadius)))) : /*#__PURE__*/React.createElement("div", {
|
|
679
|
+
style: {
|
|
680
|
+
position: "absolute",
|
|
681
|
+
inset: 0
|
|
682
|
+
}
|
|
683
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
684
|
+
style: {
|
|
685
|
+
position: "absolute",
|
|
686
|
+
inset: 0,
|
|
687
|
+
borderRadius: isSquare ? surfaceRadius : 0,
|
|
688
|
+
overflow: "hidden",
|
|
689
|
+
border: creatorActive ? "2px solid ".concat(ringColor) : "1px solid ".concat(cardBorder),
|
|
690
|
+
opacity: creatorActive ? 1 : inactiveOpacity,
|
|
691
|
+
zIndex: 1
|
|
692
|
+
}
|
|
693
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
694
|
+
style: {
|
|
695
|
+
position: "absolute",
|
|
696
|
+
inset: 0,
|
|
697
|
+
transform: "scale(".concat(creatorScale, ")"),
|
|
698
|
+
transformOrigin: "center",
|
|
699
|
+
filter: creatorActive ? activeFilter : inactiveFilter
|
|
700
|
+
}
|
|
701
|
+
}, renderCreatorVideo(width, height, isSquare ? surfaceRadius : 0))), showCollaboratorVideo && !isSquare && !isPortrait && /*#__PURE__*/React.createElement("div", {
|
|
702
|
+
style: {
|
|
703
|
+
position: "absolute",
|
|
704
|
+
top: pipTop,
|
|
705
|
+
bottom: pipBottom,
|
|
706
|
+
right: padding,
|
|
707
|
+
width: pipWidth,
|
|
708
|
+
height: pipHeight,
|
|
709
|
+
opacity: previewInOpacity * (collaboratorActive ? 1 : inactiveOpacity) * columnOpacity,
|
|
710
|
+
transform: "scale(".concat(previewInScale * collaboratorScale, ")"),
|
|
711
|
+
transformOrigin: "top right",
|
|
712
|
+
zIndex: 5
|
|
713
|
+
}
|
|
714
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
715
|
+
style: {
|
|
716
|
+
width: "100%",
|
|
717
|
+
height: "100%",
|
|
718
|
+
borderRadius: surfaceRadius,
|
|
719
|
+
overflow: "hidden",
|
|
720
|
+
border: collaboratorActive ? "2px solid ".concat(ringColor) : "1px solid ".concat(cardBorder),
|
|
721
|
+
boxShadow: "0 16px 32px rgba(15, 23, 42, 0.35)",
|
|
722
|
+
position: "relative",
|
|
723
|
+
filter: collaboratorActive ? activeFilter : inactiveFilter
|
|
724
|
+
}
|
|
725
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
726
|
+
startFrom: startSecondVideoFrom,
|
|
727
|
+
src: secondVideoFile,
|
|
728
|
+
muted: true,
|
|
729
|
+
style: {
|
|
730
|
+
width: "100%",
|
|
731
|
+
height: "100%",
|
|
732
|
+
objectFit: "cover",
|
|
733
|
+
objectPosition: "50% 20%"
|
|
734
|
+
}
|
|
735
|
+
}), safeCollaboratorName && /*#__PURE__*/React.createElement("div", {
|
|
736
|
+
style: {
|
|
737
|
+
position: "absolute",
|
|
738
|
+
left: 12,
|
|
739
|
+
bottom: 12,
|
|
740
|
+
backgroundColor: withAlpha(primaryColor || "#0f172a", 0.7),
|
|
741
|
+
color: textColor,
|
|
742
|
+
padding: "6px 12px",
|
|
743
|
+
borderRadius: 999,
|
|
744
|
+
fontSize: badgeFontSize,
|
|
745
|
+
fontWeight: 600,
|
|
746
|
+
letterSpacing: "0.02em"
|
|
747
|
+
}
|
|
748
|
+
}, safeCollaboratorName), collaboratorActive && isLandscape ? /*#__PURE__*/React.createElement("div", {
|
|
749
|
+
style: {
|
|
750
|
+
position: "absolute",
|
|
751
|
+
top: 12,
|
|
752
|
+
left: 12,
|
|
753
|
+
backgroundColor: ringColor,
|
|
754
|
+
color: featuringColor,
|
|
755
|
+
padding: "4px 10px",
|
|
756
|
+
borderRadius: 999,
|
|
757
|
+
fontSize: badgeFontSize,
|
|
758
|
+
fontWeight: 700,
|
|
759
|
+
letterSpacing: "0.08em",
|
|
760
|
+
textTransform: "uppercase"
|
|
761
|
+
}
|
|
762
|
+
}, "Speaking") : null)), showBar && /*#__PURE__*/React.createElement("div", {
|
|
763
|
+
style: {
|
|
764
|
+
position: "absolute",
|
|
765
|
+
left: padding,
|
|
766
|
+
right: padding,
|
|
767
|
+
top: barTop,
|
|
768
|
+
bottom: barBottom,
|
|
769
|
+
height: barHeight,
|
|
770
|
+
backgroundColor: cardBackground,
|
|
771
|
+
borderRadius: surfaceRadius,
|
|
772
|
+
padding: barPadding,
|
|
773
|
+
border: "1px solid ".concat(cardBorder),
|
|
774
|
+
boxShadow: "0 16px 36px rgba(15, 23, 42, 0.35)",
|
|
775
|
+
display: "flex",
|
|
776
|
+
flexDirection: "column",
|
|
777
|
+
gap: 10,
|
|
778
|
+
opacity: columnOpacity,
|
|
779
|
+
zIndex: 6
|
|
780
|
+
}
|
|
781
|
+
}, safeTopicLabel && /*#__PURE__*/React.createElement("div", {
|
|
782
|
+
style: {
|
|
783
|
+
fontSize: badgeFontSize,
|
|
784
|
+
letterSpacing: "0.28em",
|
|
785
|
+
textTransform: "uppercase",
|
|
786
|
+
color: mutedTextColor,
|
|
787
|
+
fontWeight: 700
|
|
788
|
+
}
|
|
789
|
+
}, safeTopicLabel), hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
790
|
+
style: {
|
|
791
|
+
maxWidth: barWidth
|
|
792
|
+
}
|
|
793
|
+
}, clampedTitleLines.map(function (line, index) {
|
|
794
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
795
|
+
key: "stacked-title-".concat(index),
|
|
796
|
+
style: _objectSpread(_objectSpread({}, shouldCardReveal ? cardTitleLineReveal(index) : null), {}, {
|
|
797
|
+
fontSize: titleFontSize,
|
|
798
|
+
fontWeight: 600,
|
|
799
|
+
lineHeight: titleLineHeight,
|
|
800
|
+
letterSpacing: "0.01em"
|
|
801
|
+
})
|
|
802
|
+
}, line);
|
|
803
|
+
})), (hasCreatorInfo || hasCollaboratorText || showCollaboratorVideo) && /*#__PURE__*/React.createElement("div", {
|
|
804
|
+
style: {
|
|
805
|
+
display: "grid",
|
|
806
|
+
gridTemplateColumns: isSquare || isPortrait ? "1fr 1fr" : "1fr",
|
|
807
|
+
gap: cardGridGap,
|
|
808
|
+
alignItems: "stretch"
|
|
809
|
+
}
|
|
810
|
+
}, hasCreatorInfo && /*#__PURE__*/React.createElement("div", {
|
|
811
|
+
style: _objectSpread({
|
|
812
|
+
backgroundColor: withAlpha(primaryColor || "#0f172a", 0.35),
|
|
813
|
+
borderRadius: surfaceRadius,
|
|
814
|
+
padding: 14,
|
|
815
|
+
display: "flex",
|
|
816
|
+
flexDirection: "column",
|
|
817
|
+
gap: 6,
|
|
818
|
+
height: "100%",
|
|
819
|
+
justifyContent: "center",
|
|
820
|
+
position: "relative"
|
|
821
|
+
}, shouldCardReveal ? cardHostReveal : null)
|
|
822
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
823
|
+
style: {
|
|
824
|
+
backgroundColor: hostBadgeBackground,
|
|
825
|
+
color: hostBadgeColor,
|
|
826
|
+
padding: "4px 10px",
|
|
827
|
+
borderRadius: 999,
|
|
828
|
+
fontSize: badgeFontSize,
|
|
829
|
+
fontWeight: 700,
|
|
830
|
+
letterSpacing: "0.2em",
|
|
831
|
+
textTransform: "uppercase",
|
|
832
|
+
position: "absolute",
|
|
833
|
+
top: 10,
|
|
834
|
+
left: 10
|
|
835
|
+
}
|
|
836
|
+
}, "Host"), safeFullName && /*#__PURE__*/React.createElement("div", {
|
|
837
|
+
style: {
|
|
838
|
+
fontSize: barNameFontSize,
|
|
839
|
+
fontWeight: 700,
|
|
840
|
+
lineHeight: 1.15
|
|
841
|
+
}
|
|
842
|
+
}, safeFullName), safeTitle && /*#__PURE__*/React.createElement("div", {
|
|
843
|
+
style: {
|
|
844
|
+
fontSize: barRoleFontSize,
|
|
845
|
+
fontWeight: 500,
|
|
846
|
+
color: subTextColor,
|
|
847
|
+
lineHeight: 1.2,
|
|
848
|
+
marginTop: safeFullName ? 4 : 0
|
|
849
|
+
}
|
|
850
|
+
}, safeTitle)), (hasCollaboratorText || showCollaboratorVideo) && /*#__PURE__*/React.createElement("div", {
|
|
851
|
+
style: _objectSpread({
|
|
852
|
+
backgroundColor: withAlpha(primaryColor || "#0f172a", 0.35),
|
|
853
|
+
borderRadius: surfaceRadius,
|
|
854
|
+
padding: 14,
|
|
855
|
+
display: "grid",
|
|
856
|
+
gridTemplateColumns: "1fr auto",
|
|
857
|
+
gap: 12,
|
|
858
|
+
alignItems: "center",
|
|
859
|
+
height: "100%",
|
|
860
|
+
position: "relative"
|
|
861
|
+
}, shouldCardReveal ? cardFeaturingReveal : null)
|
|
862
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
863
|
+
style: {
|
|
864
|
+
display: "flex",
|
|
865
|
+
flexDirection: "column",
|
|
866
|
+
gap: 6,
|
|
867
|
+
justifyContent: "center",
|
|
868
|
+
height: "100%"
|
|
869
|
+
}
|
|
870
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
871
|
+
style: {
|
|
872
|
+
backgroundColor: featuringBackground,
|
|
873
|
+
color: featuringColor,
|
|
874
|
+
padding: "4px 10px",
|
|
875
|
+
borderRadius: 999,
|
|
876
|
+
fontSize: badgeFontSize,
|
|
877
|
+
fontWeight: 700,
|
|
878
|
+
letterSpacing: "0.2em",
|
|
879
|
+
textTransform: "uppercase",
|
|
880
|
+
position: "absolute",
|
|
881
|
+
top: 10,
|
|
882
|
+
left: 10
|
|
883
|
+
}
|
|
884
|
+
}, "Featuring"), safeCollaboratorName && /*#__PURE__*/React.createElement("div", {
|
|
885
|
+
style: {
|
|
886
|
+
fontSize: barNameFontSize,
|
|
887
|
+
fontWeight: 700,
|
|
888
|
+
lineHeight: 1.15
|
|
889
|
+
}
|
|
890
|
+
}, safeCollaboratorName), safeCollaboratorTitle && /*#__PURE__*/React.createElement("div", {
|
|
891
|
+
style: {
|
|
892
|
+
fontSize: barRoleFontSize,
|
|
893
|
+
fontWeight: 500,
|
|
894
|
+
color: subTextColor,
|
|
895
|
+
lineHeight: 1.2,
|
|
896
|
+
marginTop: safeCollaboratorName ? 4 : 0
|
|
897
|
+
}
|
|
898
|
+
}, safeCollaboratorTitle)), showCollaboratorVideo && /*#__PURE__*/React.createElement("div", {
|
|
899
|
+
style: {
|
|
900
|
+
width: isSquare ? squarePipSize : isPortrait ? portraitGridPipWidth : portraitCardPipWidth,
|
|
901
|
+
height: isSquare ? squarePipSize : isPortrait ? portraitGridPipHeight : portraitCardPipHeight,
|
|
902
|
+
borderRadius: surfaceRadius,
|
|
903
|
+
overflow: "hidden",
|
|
904
|
+
border: collaboratorActive ? "2px solid ".concat(ringColor) : "1px solid ".concat(cardBorder),
|
|
905
|
+
boxShadow: "0 12px 24px rgba(15, 23, 42, 0.3)",
|
|
906
|
+
position: "relative",
|
|
907
|
+
filter: collaboratorActive ? activeFilter : inactiveFilter
|
|
908
|
+
}
|
|
909
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
910
|
+
startFrom: startSecondVideoFrom,
|
|
911
|
+
src: secondVideoFile,
|
|
912
|
+
muted: true,
|
|
913
|
+
style: {
|
|
914
|
+
width: "100%",
|
|
915
|
+
height: "100%",
|
|
916
|
+
objectFit: "cover",
|
|
917
|
+
objectPosition: "50% 20%"
|
|
918
|
+
}
|
|
919
|
+
}))))))), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
920
|
+
style: {
|
|
921
|
+
zIndex: 100
|
|
922
|
+
}
|
|
923
|
+
}, children));
|
|
924
|
+
};
|