@zync/zync-screnplay-player 0.1.187
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/ZyncScreenplayPlayer.js +35 -0
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +54 -0
- package/dist/index.js +4 -0
- package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +281 -0
- package/dist/screenplay/RemotionRenderer/Root.js +22 -0
- package/dist/screenplay/RemotionRenderer/components/LottieAnimationGlobal.js +116 -0
- package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackground.js +26 -0
- package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackgroundUnderlay.js +41 -0
- package/dist/screenplay/RemotionRenderer/components/captions/CaptionSimple.js +12 -0
- package/dist/screenplay/RemotionRenderer/components/effects/BrollFullscreen.js +27 -0
- package/dist/screenplay/RemotionRenderer/components/effects/GlitchText.js +22 -0
- package/dist/screenplay/RemotionRenderer/components/effects/HandoffNametag.js +7 -0
- package/dist/screenplay/RemotionRenderer/components/effects/LottieAnimation.js +64 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Nametag.js +9 -0
- package/dist/screenplay/RemotionRenderer/components/effects/PhraseRainbowEffect.js +34 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Sentence.js +50 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Title.js +12 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollGreenScreen.js +742 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollSplitScreen.js +714 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollStudioBackdrop.js +620 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/DynamicTriangle.js +618 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +161 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/IntroVideo.js +1330 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/KeyPointOverlayDepth.js +397 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Keyword.js +539 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/KeywordStudioBackdrop.js +714 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStill.js +381 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillFullScreen.js +178 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreen.js +568 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreenV2.js +731 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillStudioBackdrop.js +588 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrame.js +183 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameBroll.js +181 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameSentence.js +17 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameZoomCut.js +13 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/TextWithVideo.js +373 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/quote-bubble-animation.json +1 -0
- package/dist/screenplay/RemotionRenderer/components/utils/BlurOverlay.js +19 -0
- package/dist/screenplay/RemotionRenderer/components/utils/ChromaKeyedVideo.js +59 -0
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +562 -0
- package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +124 -0
- package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -0
- package/dist/screenplay/RemotionRenderer/components/utils/SafeZones.js +69 -0
- package/dist/screenplay/RemotionRenderer/components/utils/StretchText.js +124 -0
- package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +66 -0
- package/dist/screenplay/RemotionRenderer/config.js +8 -0
- package/dist/screenplay/RemotionRenderer/development.js +1370 -0
- package/dist/screenplay/RemotionRenderer/helpers/cleanFacemetadata.js +29 -0
- package/dist/screenplay/RemotionRenderer/helpers/convertToSeconds.js +14 -0
- package/dist/screenplay/RemotionRenderer/helpers/faceBasedVideoStyles.js +212 -0
- package/dist/screenplay/RemotionRenderer/helpers/faceCenteredVideoTransforms.js +468 -0
- package/dist/screenplay/RemotionRenderer/helpers/getContrastColor.js +15 -0
- package/dist/screenplay/RemotionRenderer/helpers/getVideoOrientation.js +21 -0
- package/dist/screenplay/RemotionRenderer/helpers/hexToRgb.js +48 -0
- package/dist/screenplay/RemotionRenderer/hooks/useLottieReplaceColor.js +45 -0
- package/dist/screenplay/RemotionRenderer/hooks/useOrientationBased.js +29 -0
- package/dist/screenplay/RemotionRenderer/hooks/useTimeInterpolate.js +54 -0
- package/dist/screenplay/RemotionRenderer/hooks/useVirtualBackground.js +38 -0
- package/dist/screenplay/RemotionRenderer/index.js +3 -0
- package/dist/screenplay/RemotionRenderer/main/lib/Sequence.js +76 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/DefaultLayout.js +72 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/DynamicTriangleLayout.js +54 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +50 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/IntroVideoLayout.js +33 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/KeywordLayout.js +36 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +68 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/MotionStillLayout.js +36 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/SimpleFrameLayout.js +43 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/TextWithVideoLayout.js +52 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +92 -0
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +91 -0
- package/dist/screenplay/RemotionRenderer/theme/config.js +8 -0
- package/dist/screenplay/RemotionRenderer/theme/hooks/useTheme.js +24 -0
- package/dist/screenplay/RemotionRenderer/theme/hooks/useThemedComponents.js +101 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldNameTag.js +147 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldSentence.js +138 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldTitle.js +136 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColor.js +67 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorInverse.js +67 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorShadow.js +66 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionElegant.js +134 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionEmphasis.js +122 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionPunctuated.js +84 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBoom.js +88 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBubble.js +91 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordPopup.js +118 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/DefaultCaption.js +62 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag/handoffNametagConfig.js +59 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +173 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Nametag.js +129 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentence.js +20 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentenceDefault.js +29 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/SentenceSimple.helpers.js +61 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence.js +86 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Title.js +112 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/constants.js +1 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Nametag.js +134 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Sentence.js +49 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Title.js +108 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/animations.js +30 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/config.js +9 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchNametag.js +252 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchSentence.js +156 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchTitle.js +142 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/DisplacedText.js +66 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/GlitchAnimatedLine.js +38 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/SplitSentence.js +80 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/helpers.js +32 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/none/Nametag.js +3 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/none/Title.js +3 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullNametag.js +165 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullSentence.js +94 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullTitle.js +98 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/sentence.js +92 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/title.js +119 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Nametag.js +122 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsCaption.js +93 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsSentence.js +76 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Title.js +90 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/shared.js +62 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Nametag.js +145 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/SportsBounceSentence.js +148 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Title.js +160 -0
- package/dist/screenplay/RemotionRenderer/tracks/AudioTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/CaptionsVideoTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/DynamicVideoComposition.js +31 -0
- package/dist/screenplay/RemotionRenderer/tracks/EffectsVideoTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +141 -0
- package/dist/screenplay/RemotionRenderer/tracks/Soundtrack.js +16 -0
- package/dist/screenplay/RemotionRenderer/tracks/Watermark.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/transitions/GlitchOne.js +92 -0
- package/package.json +45 -0
|
@@ -0,0 +1,1330 @@
|
|
|
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, Audio, Img, useVideoConfig, spring, useCurrentFrame, useVideoConfig as useVideoConfigForFps, OffthreadVideo } from "remotion";
|
|
9
|
+
import { LottieAnimationGlobal } from "../LottieAnimationGlobal";
|
|
10
|
+
import { loadFont } from "@remotion/google-fonts/Oswald";
|
|
11
|
+
import { useOrientationBased } from "../../hooks/useOrientationBased.js";
|
|
12
|
+
import { CHROME_PADDING } from "../../config.js";
|
|
13
|
+
import { distributeTextToFit } from "../../theme/themes/default/Sentence/SentenceSimple.helpers.js";
|
|
14
|
+
import { useTheme } from "../../theme/hooks/useTheme.js";
|
|
15
|
+
import PausableImg from "../utils/PausableImg";
|
|
16
|
+
import FaceCenteredVideo from "../utils/FaceCenteredVideo";
|
|
17
|
+
import { BlurOverlay } from "../utils/BlurOverlay";
|
|
18
|
+
import { useVirtualBackground } from "../../hooks/useVirtualBackground";
|
|
19
|
+
import { VirtualBackgroundUnderlay } from "../backgrounds/VirtualBackgroundUnderlay";
|
|
20
|
+
var _loadFont = loadFont(),
|
|
21
|
+
fontFamily = _loadFont.fontFamily;
|
|
22
|
+
var Landscape = function Landscape(_ref) {
|
|
23
|
+
var children = _ref.children,
|
|
24
|
+
videoUrl = _ref.videoUrl,
|
|
25
|
+
startVideoFrom = _ref.startVideoFrom,
|
|
26
|
+
sentenceText = _ref.sentenceText,
|
|
27
|
+
sentenceTextTwo = _ref.sentenceTextTwo,
|
|
28
|
+
logoUrl = _ref.logoUrl,
|
|
29
|
+
logoLeft = _ref.logoLeft,
|
|
30
|
+
logoTop = _ref.logoTop,
|
|
31
|
+
logoRight = _ref.logoRight,
|
|
32
|
+
videoWidth = _ref.videoWidth,
|
|
33
|
+
videoHeight = _ref.videoHeight,
|
|
34
|
+
videoTop = _ref.videoTop,
|
|
35
|
+
videoLeft = _ref.videoLeft,
|
|
36
|
+
durationInFrames = _ref.durationInFrames,
|
|
37
|
+
muted = _ref.muted,
|
|
38
|
+
faceMetadata = _ref.faceMetadata,
|
|
39
|
+
noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
|
|
40
|
+
noBackgroundVideoUrl = _ref.noBackgroundVideoUrl,
|
|
41
|
+
showVirtual = _ref.showVirtual,
|
|
42
|
+
virtualBgUrl = _ref.virtualBgUrl;
|
|
43
|
+
var frame = useCurrentFrame();
|
|
44
|
+
var _useVideoConfigForFps = useVideoConfigForFps(),
|
|
45
|
+
fps = _useVideoConfigForFps.fps;
|
|
46
|
+
var _useVideoConfig = useVideoConfig(),
|
|
47
|
+
screenWidth = _useVideoConfig.width;
|
|
48
|
+
var _useTheme = useTheme(),
|
|
49
|
+
accentColor = _useTheme.accentColor,
|
|
50
|
+
accentContrast = _useTheme.accentContrast;
|
|
51
|
+
|
|
52
|
+
// Spring animation for entrance (slide in from left)
|
|
53
|
+
var entranceSpring = spring({
|
|
54
|
+
frame: frame,
|
|
55
|
+
fps: fps,
|
|
56
|
+
config: {
|
|
57
|
+
damping: 15,
|
|
58
|
+
stiffness: 100,
|
|
59
|
+
mass: 1
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Calculate when exit animation should start (30 frames before end)
|
|
64
|
+
var exitStartFrame = durationInFrames - 30;
|
|
65
|
+
|
|
66
|
+
// Calculate when text fade-out should start (15 frames before exit)
|
|
67
|
+
var fadeOutStartFrame = exitStartFrame - 15;
|
|
68
|
+
|
|
69
|
+
// Spring animation for text fade-out
|
|
70
|
+
var fadeOutSpring = spring({
|
|
71
|
+
frame: frame - fadeOutStartFrame,
|
|
72
|
+
fps: fps,
|
|
73
|
+
config: {
|
|
74
|
+
damping: 20,
|
|
75
|
+
stiffness: 150,
|
|
76
|
+
mass: 0.8
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// Spring animation for exit (slide out to left)
|
|
81
|
+
var exitSpring = spring({
|
|
82
|
+
frame: frame - exitStartFrame,
|
|
83
|
+
fps: fps,
|
|
84
|
+
config: {
|
|
85
|
+
damping: 15,
|
|
86
|
+
stiffness: 100,
|
|
87
|
+
mass: 1
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Combine entrance and exit animations
|
|
92
|
+
var isExiting = frame >= exitStartFrame;
|
|
93
|
+
var slideProgress = isExiting ? 1 - exitSpring : entranceSpring;
|
|
94
|
+
|
|
95
|
+
// Calculate text opacity (fade out before exit)
|
|
96
|
+
var isFadingOut = frame >= fadeOutStartFrame;
|
|
97
|
+
var textOpacity = isFadingOut ? 1 - fadeOutSpring : 1;
|
|
98
|
+
|
|
99
|
+
// Background slide animation: starts at -800px, slides to -150px, then back to -800px
|
|
100
|
+
var animatedTranslateX = -150 + (1 - slideProgress) * -650; // -800px when slideProgress = 0, -150px when slideProgress = 1
|
|
101
|
+
|
|
102
|
+
// Video animations: start full screen, transition to split, then back to full screen
|
|
103
|
+
var animatedVideoWidth = videoWidth + (1 - slideProgress) * (screenWidth - videoWidth);
|
|
104
|
+
var animatedVideoLeft = videoLeft - (1 - slideProgress) * videoLeft;
|
|
105
|
+
|
|
106
|
+
// Animated text lines for sentenceText
|
|
107
|
+
var _useVideoConfig2 = useVideoConfig(),
|
|
108
|
+
screenHeight = _useVideoConfig2.height;
|
|
109
|
+
var maxFontSize = 6.5 * 16; // Convert rem to px (6.5rem * 16px/rem)
|
|
110
|
+
var maxWidth = screenWidth * 0.9;
|
|
111
|
+
var maxHeight = screenHeight;
|
|
112
|
+
var _distributeTextToFit = distributeTextToFit(sentenceText, maxWidth, maxHeight, maxFontSize),
|
|
113
|
+
textLines = _distributeTextToFit.lines,
|
|
114
|
+
calculatedFontSize = _distributeTextToFit.fontSize;
|
|
115
|
+
var renderAnimatedLines = function renderAnimatedLines(lines) {
|
|
116
|
+
var baseDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;
|
|
117
|
+
return lines.map(function (line, lineIndex) {
|
|
118
|
+
var lineAnimation = spring({
|
|
119
|
+
frame: frame - baseDelay - lineIndex * 8,
|
|
120
|
+
// Stagger each line by 8 frames
|
|
121
|
+
fps: fps,
|
|
122
|
+
config: {
|
|
123
|
+
damping: 15,
|
|
124
|
+
stiffness: 120,
|
|
125
|
+
mass: 1
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var opacity = lineAnimation;
|
|
129
|
+
var translateY = (1 - lineAnimation) * 15; // Slide from top
|
|
130
|
+
|
|
131
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
key: lineIndex,
|
|
133
|
+
style: {
|
|
134
|
+
opacity: opacity,
|
|
135
|
+
transform: "translateY(".concat(translateY, "px)"),
|
|
136
|
+
lineHeight: calculatedFontSize * 1.2 / 16 + "rem"
|
|
137
|
+
}
|
|
138
|
+
}, line);
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// Divider line animation - starts after text lines finish
|
|
143
|
+
var dividerStartFrame = 15 + textLines.length * 8 + 5; // 5 frame buffer after last line
|
|
144
|
+
var dividerAnimation = spring({
|
|
145
|
+
frame: frame - dividerStartFrame,
|
|
146
|
+
fps: fps,
|
|
147
|
+
config: {
|
|
148
|
+
damping: 15,
|
|
149
|
+
stiffness: 150,
|
|
150
|
+
mass: 0.8
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// Character animation for sentenceTextTwo
|
|
155
|
+
var renderAnimatedText = function renderAnimatedText(text) {
|
|
156
|
+
var baseDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
|
|
157
|
+
return text.split("").map(function (_char, index) {
|
|
158
|
+
var charAnimation = spring({
|
|
159
|
+
frame: frame - baseDelay - index * 3,
|
|
160
|
+
// Stagger each character by 3 frames
|
|
161
|
+
fps: fps,
|
|
162
|
+
config: {
|
|
163
|
+
damping: 12,
|
|
164
|
+
stiffness: 200,
|
|
165
|
+
mass: 0.8
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
var opacity = charAnimation;
|
|
169
|
+
var translateX = (1 - charAnimation) * 15; // Slide from right
|
|
170
|
+
|
|
171
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
172
|
+
key: index,
|
|
173
|
+
style: {
|
|
174
|
+
opacity: opacity,
|
|
175
|
+
transform: "translateX(".concat(translateX, "px)"),
|
|
176
|
+
display: "inline-block"
|
|
177
|
+
}
|
|
178
|
+
}, _char === " " ? "\xA0" : _char, " ");
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
var logoPositionStyles = logoRight !== undefined && logoRight !== null ? {
|
|
182
|
+
right: logoRight
|
|
183
|
+
} : {
|
|
184
|
+
left: logoLeft
|
|
185
|
+
};
|
|
186
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
187
|
+
style: {
|
|
188
|
+
padding: 0,
|
|
189
|
+
isolation: "isolate"
|
|
190
|
+
}
|
|
191
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
style: {
|
|
193
|
+
position: "absolute",
|
|
194
|
+
left: 0,
|
|
195
|
+
top: 0,
|
|
196
|
+
width: "100%",
|
|
197
|
+
height: "100%",
|
|
198
|
+
zIndex: 11
|
|
199
|
+
}
|
|
200
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
201
|
+
style: {
|
|
202
|
+
position: "absolute",
|
|
203
|
+
left: 0,
|
|
204
|
+
top: 0,
|
|
205
|
+
width: "50%",
|
|
206
|
+
height: "100%",
|
|
207
|
+
transform: "scale(2) rotate(20deg) translateY(-100px) translateX(".concat(animatedTranslateX, "px)"),
|
|
208
|
+
backgroundColor: "white",
|
|
209
|
+
zIndex: 1
|
|
210
|
+
}
|
|
211
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
212
|
+
style: {
|
|
213
|
+
position: "absolute",
|
|
214
|
+
inset: "15px",
|
|
215
|
+
backgroundColor: accentColor,
|
|
216
|
+
opacity: 0.2,
|
|
217
|
+
zIndex: 1
|
|
218
|
+
}
|
|
219
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
style: {
|
|
221
|
+
position: "absolute",
|
|
222
|
+
inset: "30px",
|
|
223
|
+
backgroundColor: accentColor,
|
|
224
|
+
opacity: 0.4,
|
|
225
|
+
zIndex: 1
|
|
226
|
+
}
|
|
227
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
228
|
+
style: {
|
|
229
|
+
position: "absolute",
|
|
230
|
+
inset: "45px",
|
|
231
|
+
backgroundColor: accentColor,
|
|
232
|
+
opacity: 0.6,
|
|
233
|
+
zIndex: 1
|
|
234
|
+
}
|
|
235
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
236
|
+
style: {
|
|
237
|
+
position: "absolute",
|
|
238
|
+
inset: "60px",
|
|
239
|
+
backgroundColor: accentColor,
|
|
240
|
+
opacity: 0.8,
|
|
241
|
+
zIndex: 1
|
|
242
|
+
}
|
|
243
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
244
|
+
style: {
|
|
245
|
+
position: "absolute",
|
|
246
|
+
inset: "75px",
|
|
247
|
+
backgroundColor: accentColor,
|
|
248
|
+
zIndex: 1
|
|
249
|
+
}
|
|
250
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
251
|
+
style: {
|
|
252
|
+
position: "absolute",
|
|
253
|
+
left: CHROME_PADDING * 2,
|
|
254
|
+
top: CHROME_PADDING * 2,
|
|
255
|
+
width: 120,
|
|
256
|
+
height: 120,
|
|
257
|
+
display: "flex",
|
|
258
|
+
alignItems: "center",
|
|
259
|
+
justifyContent: "center",
|
|
260
|
+
zIndex: 11,
|
|
261
|
+
opacity: textOpacity
|
|
262
|
+
}
|
|
263
|
+
}, /*#__PURE__*/React.createElement(LottieAnimationGlobal, {
|
|
264
|
+
animationPath: "https://storage.googleapis.com/zync-media/assets/lottie/introvideo/animation.json",
|
|
265
|
+
autoplay: true,
|
|
266
|
+
loop: false,
|
|
267
|
+
primaryColor: accentContrast
|
|
268
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
269
|
+
style: {
|
|
270
|
+
position: "absolute",
|
|
271
|
+
left: CHROME_PADDING * 2,
|
|
272
|
+
right: CHROME_PADDING,
|
|
273
|
+
top: screenHeight * 0.15,
|
|
274
|
+
zIndex: 5,
|
|
275
|
+
opacity: textOpacity
|
|
276
|
+
}
|
|
277
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
278
|
+
style: {
|
|
279
|
+
fontSize: calculatedFontSize / 16 + "rem",
|
|
280
|
+
fontWeight: "normal",
|
|
281
|
+
color: accentContrast,
|
|
282
|
+
lineHeight: "1.1",
|
|
283
|
+
margin: 0,
|
|
284
|
+
marginBottom: "2rem",
|
|
285
|
+
fontFamily: fontFamily
|
|
286
|
+
}
|
|
287
|
+
}, renderAnimatedLines(textLines, 15)), /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
style: {
|
|
289
|
+
width: "80px",
|
|
290
|
+
height: "10px",
|
|
291
|
+
backgroundColor: accentContrast,
|
|
292
|
+
marginBottom: "0.5rem",
|
|
293
|
+
marginTop: "7.5rem",
|
|
294
|
+
opacity: dividerAnimation,
|
|
295
|
+
transform: "translateY(".concat((1 - dividerAnimation) * 10, "px)")
|
|
296
|
+
}
|
|
297
|
+
}), /*#__PURE__*/React.createElement("h2", {
|
|
298
|
+
style: {
|
|
299
|
+
fontSize: "4rem",
|
|
300
|
+
fontWeight: "500",
|
|
301
|
+
color: accentContrast,
|
|
302
|
+
margin: 0,
|
|
303
|
+
fontFamily: fontFamily,
|
|
304
|
+
textTransform: "uppercase",
|
|
305
|
+
letterSpacing: "0.05em"
|
|
306
|
+
}
|
|
307
|
+
}, renderAnimatedText(sentenceTextTwo, dividerStartFrame + 10)))), /*#__PURE__*/React.createElement("div", {
|
|
308
|
+
style: {
|
|
309
|
+
position: "absolute",
|
|
310
|
+
borderRadius: "0px",
|
|
311
|
+
width: animatedVideoWidth,
|
|
312
|
+
height: "100%",
|
|
313
|
+
top: 0,
|
|
314
|
+
left: 0,
|
|
315
|
+
transform: "translateX(".concat(animatedVideoLeft, "px)"),
|
|
316
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
|
|
317
|
+
}
|
|
318
|
+
}, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
319
|
+
url: virtualBgUrl,
|
|
320
|
+
top: 0,
|
|
321
|
+
left: 0,
|
|
322
|
+
width: "100%",
|
|
323
|
+
height: "100%",
|
|
324
|
+
zIndex: 1
|
|
325
|
+
}) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
326
|
+
src: videoUrl,
|
|
327
|
+
startFrom: startVideoFrom,
|
|
328
|
+
muted: muted,
|
|
329
|
+
faceMetadata: faceMetadata,
|
|
330
|
+
containerWidth: animatedVideoWidth,
|
|
331
|
+
containerHeight: screenHeight,
|
|
332
|
+
useAveragePosition: true,
|
|
333
|
+
centerHorizontally: false
|
|
334
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
335
|
+
src: videoUrl,
|
|
336
|
+
startFrom: startVideoFrom,
|
|
337
|
+
muted: muted,
|
|
338
|
+
style: {
|
|
339
|
+
objectFit: "cover",
|
|
340
|
+
width: "100%",
|
|
341
|
+
height: "100%"
|
|
342
|
+
}
|
|
343
|
+
})), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
344
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl,
|
|
345
|
+
width: screenWidth,
|
|
346
|
+
height: screenHeight,
|
|
347
|
+
zIndex: 1
|
|
348
|
+
}), noBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
349
|
+
style: {
|
|
350
|
+
isolation: "isolate",
|
|
351
|
+
width: screenWidth,
|
|
352
|
+
height: "100%",
|
|
353
|
+
zIndex: 9
|
|
354
|
+
}
|
|
355
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
356
|
+
style: {
|
|
357
|
+
position: "absolute",
|
|
358
|
+
borderRadius: "0px",
|
|
359
|
+
width: animatedVideoWidth,
|
|
360
|
+
height: "100%",
|
|
361
|
+
top: 0,
|
|
362
|
+
left: 0,
|
|
363
|
+
transform: "translateX(".concat(animatedVideoLeft, "px)")
|
|
364
|
+
}
|
|
365
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
366
|
+
src: noBackgroundVideoUrl,
|
|
367
|
+
startFrom: startVideoFrom,
|
|
368
|
+
muted: true,
|
|
369
|
+
transparent: true,
|
|
370
|
+
faceMetadata: faceMetadata,
|
|
371
|
+
containerWidth: animatedVideoWidth,
|
|
372
|
+
containerHeight: screenHeight,
|
|
373
|
+
useAveragePosition: true,
|
|
374
|
+
centerHorizontally: false,
|
|
375
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
376
|
+
}))) : null, noBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && !faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
377
|
+
style: {
|
|
378
|
+
backgroundColor: "transparent",
|
|
379
|
+
isolation: "isolate",
|
|
380
|
+
width: screenWidth,
|
|
381
|
+
height: "100%",
|
|
382
|
+
zIndex: 9
|
|
383
|
+
}
|
|
384
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
385
|
+
style: {
|
|
386
|
+
position: "absolute",
|
|
387
|
+
borderRadius: "0px",
|
|
388
|
+
width: animatedVideoWidth,
|
|
389
|
+
height: "100%",
|
|
390
|
+
top: 0,
|
|
391
|
+
left: 0,
|
|
392
|
+
transform: "translateX(".concat(animatedVideoLeft, "px)")
|
|
393
|
+
}
|
|
394
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
395
|
+
src: noBackgroundVideoUrl,
|
|
396
|
+
startFrom: startVideoFrom,
|
|
397
|
+
muted: true,
|
|
398
|
+
transparent: true,
|
|
399
|
+
style: {
|
|
400
|
+
objectFit: "cover",
|
|
401
|
+
width: "100%",
|
|
402
|
+
height: "100%",
|
|
403
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
|
|
404
|
+
}
|
|
405
|
+
}))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
406
|
+
style: {
|
|
407
|
+
zIndex: 20
|
|
408
|
+
}
|
|
409
|
+
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
410
|
+
style: _objectSpread({
|
|
411
|
+
position: "fixed",
|
|
412
|
+
top: logoTop,
|
|
413
|
+
padding: 20,
|
|
414
|
+
zIndex: 10
|
|
415
|
+
}, logoPositionStyles)
|
|
416
|
+
}, /*#__PURE__*/React.createElement(PausableImg, {
|
|
417
|
+
delayRenderTimeoutInMilliseconds: 61000,
|
|
418
|
+
style: {
|
|
419
|
+
width: "225px",
|
|
420
|
+
maxHeight: "auto",
|
|
421
|
+
objectFit: "contain"
|
|
422
|
+
},
|
|
423
|
+
src: logoUrl
|
|
424
|
+
})) : null);
|
|
425
|
+
};
|
|
426
|
+
var Portrait = function Portrait(_ref2) {
|
|
427
|
+
var children = _ref2.children,
|
|
428
|
+
videoUrl = _ref2.videoUrl,
|
|
429
|
+
startVideoFrom = _ref2.startVideoFrom,
|
|
430
|
+
sourceVideoOrientation = _ref2.sourceVideoOrientation,
|
|
431
|
+
sentenceText = _ref2.sentenceText,
|
|
432
|
+
sentenceTextTwo = _ref2.sentenceTextTwo,
|
|
433
|
+
logoUrl = _ref2.logoUrl,
|
|
434
|
+
logoLeft = _ref2.logoLeft,
|
|
435
|
+
logoTop = _ref2.logoTop,
|
|
436
|
+
logoRight = _ref2.logoRight,
|
|
437
|
+
videoWidth = _ref2.videoWidth,
|
|
438
|
+
videoHeight = _ref2.videoHeight,
|
|
439
|
+
videoTop = _ref2.videoTop,
|
|
440
|
+
videoLeft = _ref2.videoLeft,
|
|
441
|
+
backgroundHeight = _ref2.backgroundHeight,
|
|
442
|
+
durationInFrames = _ref2.durationInFrames,
|
|
443
|
+
muted = _ref2.muted,
|
|
444
|
+
faceMetadata = _ref2.faceMetadata,
|
|
445
|
+
noBackgroundVideoEffects = _ref2.noBackgroundVideoEffects,
|
|
446
|
+
noBackgroundVideoUrl = _ref2.noBackgroundVideoUrl,
|
|
447
|
+
showVirtual = _ref2.showVirtual,
|
|
448
|
+
virtualBgUrl = _ref2.virtualBgUrl;
|
|
449
|
+
var frame = useCurrentFrame();
|
|
450
|
+
var _useVideoConfigForFps2 = useVideoConfigForFps(),
|
|
451
|
+
fps = _useVideoConfigForFps2.fps;
|
|
452
|
+
var _useVideoConfigForFps3 = useVideoConfigForFps(),
|
|
453
|
+
screenWidth = _useVideoConfigForFps3.width,
|
|
454
|
+
screenHeight = _useVideoConfigForFps3.height;
|
|
455
|
+
|
|
456
|
+
// Spring animation for entrance (slide in from left)
|
|
457
|
+
var entranceSpring = spring({
|
|
458
|
+
frame: frame,
|
|
459
|
+
fps: fps,
|
|
460
|
+
config: {
|
|
461
|
+
damping: 15,
|
|
462
|
+
stiffness: 100,
|
|
463
|
+
mass: 1
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
// Calculate when exit animation should start (30 frames before end)
|
|
468
|
+
var exitStartFrame = durationInFrames - 30;
|
|
469
|
+
|
|
470
|
+
// Calculate when text fade-out should start (15 frames before exit)
|
|
471
|
+
var fadeOutStartFrame = exitStartFrame - 15;
|
|
472
|
+
|
|
473
|
+
// Spring animation for text fade-out
|
|
474
|
+
var fadeOutSpring = spring({
|
|
475
|
+
frame: frame - fadeOutStartFrame,
|
|
476
|
+
fps: fps,
|
|
477
|
+
config: {
|
|
478
|
+
damping: 20,
|
|
479
|
+
stiffness: 150,
|
|
480
|
+
mass: 0.8
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
// Spring animation for exit (slide out to left)
|
|
485
|
+
var exitSpring = spring({
|
|
486
|
+
frame: frame - exitStartFrame,
|
|
487
|
+
fps: fps,
|
|
488
|
+
config: {
|
|
489
|
+
damping: 15,
|
|
490
|
+
stiffness: 100,
|
|
491
|
+
mass: 1
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
// Combine entrance and exit animations
|
|
496
|
+
var isExiting = frame >= exitStartFrame;
|
|
497
|
+
var slideProgress = isExiting ? 1 - exitSpring : entranceSpring;
|
|
498
|
+
|
|
499
|
+
// Calculate text opacity (fade out before exit)
|
|
500
|
+
var isFadingOut = frame >= fadeOutStartFrame;
|
|
501
|
+
var textOpacity = isFadingOut ? 1 - fadeOutSpring : 1;
|
|
502
|
+
|
|
503
|
+
// Background slide animation: starts at -450px, slides to -50px, then back to -450px
|
|
504
|
+
var animatedTranslateX = -50 + (1 - slideProgress) * -400; // -450px when slideProgress = 0, -50px when slideProgress = 1
|
|
505
|
+
|
|
506
|
+
// Video animations: start full screen, transition to bottom half, then back to full screen
|
|
507
|
+
var animatedVideoHeight = screenHeight - slideProgress * screenHeight * 0.5; // 100% when slideProgress = 0, 50% when slideProgress = 1
|
|
508
|
+
|
|
509
|
+
// Background animations: start off-screen top, transition to top half, then back off-screen
|
|
510
|
+
var animatedBackgroundTranslateY = -screenHeight * 0.5 + slideProgress * screenHeight * 0.5; // -50% when slideProgress = 0, 0% when slideProgress = 1
|
|
511
|
+
|
|
512
|
+
var _useTheme2 = useTheme(),
|
|
513
|
+
accentColor = _useTheme2.accentColor,
|
|
514
|
+
accentContrast = _useTheme2.accentContrast;
|
|
515
|
+
|
|
516
|
+
// Animated text lines for sentenceText
|
|
517
|
+
var _distributeTextToFit2 = distributeTextToFit(sentenceText, screenWidth, screenHeight * 0.4, 5.5 * 16 // Convert rem to px (2.5rem * 16px/rem)
|
|
518
|
+
),
|
|
519
|
+
textLines = _distributeTextToFit2.lines,
|
|
520
|
+
calculatedFontSize = _distributeTextToFit2.fontSize;
|
|
521
|
+
var renderAnimatedLines = function renderAnimatedLines(lines) {
|
|
522
|
+
var baseDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;
|
|
523
|
+
return lines.map(function (line, lineIndex) {
|
|
524
|
+
var lineAnimation = spring({
|
|
525
|
+
frame: frame - baseDelay - lineIndex * 8,
|
|
526
|
+
// Stagger each line by 8 frames
|
|
527
|
+
fps: fps,
|
|
528
|
+
config: {
|
|
529
|
+
damping: 15,
|
|
530
|
+
stiffness: 120,
|
|
531
|
+
mass: 1
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
var opacity = lineAnimation;
|
|
535
|
+
var translateY = (1 - lineAnimation) * 15; // Slide from top
|
|
536
|
+
|
|
537
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
538
|
+
key: lineIndex,
|
|
539
|
+
style: {
|
|
540
|
+
opacity: opacity,
|
|
541
|
+
transform: "translateY(".concat(translateY, "px)"),
|
|
542
|
+
lineHeight: calculatedFontSize * 1.6 / 16 + "rem"
|
|
543
|
+
}
|
|
544
|
+
}, line);
|
|
545
|
+
});
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
// Divider line animation - starts after text lines finish
|
|
549
|
+
var dividerStartFrame = 15 + textLines.length * 8 + 5; // 5 frame buffer after last line
|
|
550
|
+
var dividerAnimation = spring({
|
|
551
|
+
frame: frame - dividerStartFrame,
|
|
552
|
+
fps: fps,
|
|
553
|
+
config: {
|
|
554
|
+
damping: 15,
|
|
555
|
+
stiffness: 150,
|
|
556
|
+
mass: 0.8
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// Character animation for sentenceTextTwo
|
|
561
|
+
var renderAnimatedText = function renderAnimatedText(text) {
|
|
562
|
+
var baseDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
|
|
563
|
+
return text.split("").map(function (_char2, index) {
|
|
564
|
+
var charAnimation = spring({
|
|
565
|
+
frame: frame - baseDelay - index * 3,
|
|
566
|
+
// Stagger each character by 3 frames
|
|
567
|
+
fps: fps,
|
|
568
|
+
config: {
|
|
569
|
+
damping: 12,
|
|
570
|
+
stiffness: 200,
|
|
571
|
+
mass: 0.8
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
var opacity = charAnimation;
|
|
575
|
+
var translateX = (1 - charAnimation) * 15; // Slide from right
|
|
576
|
+
|
|
577
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
578
|
+
key: index,
|
|
579
|
+
style: {
|
|
580
|
+
opacity: opacity,
|
|
581
|
+
transform: "translateX(".concat(translateX, "px)"),
|
|
582
|
+
display: "inline-block"
|
|
583
|
+
}
|
|
584
|
+
}, _char2 === " " ? "\xA0" : _char2, " ");
|
|
585
|
+
});
|
|
586
|
+
};
|
|
587
|
+
var logoPositionStyles = logoRight !== undefined && logoRight !== null ? {
|
|
588
|
+
right: logoRight
|
|
589
|
+
} : {
|
|
590
|
+
left: logoLeft
|
|
591
|
+
};
|
|
592
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
593
|
+
style: {
|
|
594
|
+
backgroundColor: "transparent",
|
|
595
|
+
padding: 0,
|
|
596
|
+
isolation: "isolate"
|
|
597
|
+
}
|
|
598
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
599
|
+
style: {
|
|
600
|
+
position: "absolute",
|
|
601
|
+
top: 0,
|
|
602
|
+
left: 0,
|
|
603
|
+
width: "100%",
|
|
604
|
+
height: "50%",
|
|
605
|
+
transform: "translateY(".concat(animatedBackgroundTranslateY, "px)"),
|
|
606
|
+
backgroundColor: "white",
|
|
607
|
+
zIndex: 2
|
|
608
|
+
}
|
|
609
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
610
|
+
style: {
|
|
611
|
+
position: "absolute",
|
|
612
|
+
inset: "0 0 50px 0",
|
|
613
|
+
backgroundColor: accentColor,
|
|
614
|
+
opacity: 0.2,
|
|
615
|
+
zIndex: 1
|
|
616
|
+
}
|
|
617
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
618
|
+
style: {
|
|
619
|
+
position: "absolute",
|
|
620
|
+
inset: "0 0 100px 0",
|
|
621
|
+
backgroundColor: accentColor,
|
|
622
|
+
opacity: 0.4,
|
|
623
|
+
zIndex: 1
|
|
624
|
+
}
|
|
625
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
626
|
+
style: {
|
|
627
|
+
position: "absolute",
|
|
628
|
+
inset: "0 0 150px 0",
|
|
629
|
+
backgroundColor: accentColor,
|
|
630
|
+
opacity: 0.6,
|
|
631
|
+
zIndex: 1
|
|
632
|
+
}
|
|
633
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
634
|
+
style: {
|
|
635
|
+
position: "absolute",
|
|
636
|
+
inset: "0 0 200px 0",
|
|
637
|
+
backgroundColor: accentColor,
|
|
638
|
+
opacity: 0.8,
|
|
639
|
+
zIndex: 1
|
|
640
|
+
}
|
|
641
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
642
|
+
style: {
|
|
643
|
+
position: "absolute",
|
|
644
|
+
inset: "0 0 250px 0",
|
|
645
|
+
backgroundColor: accentColor,
|
|
646
|
+
zIndex: 1
|
|
647
|
+
}
|
|
648
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
649
|
+
style: {
|
|
650
|
+
position: "absolute",
|
|
651
|
+
left: CHROME_PADDING * 2,
|
|
652
|
+
top: CHROME_PADDING * 2,
|
|
653
|
+
width: 120,
|
|
654
|
+
height: 120,
|
|
655
|
+
display: "flex",
|
|
656
|
+
alignItems: "center",
|
|
657
|
+
justifyContent: "center",
|
|
658
|
+
zIndex: 3,
|
|
659
|
+
opacity: textOpacity
|
|
660
|
+
}
|
|
661
|
+
}, /*#__PURE__*/React.createElement(LottieAnimationGlobal, {
|
|
662
|
+
animationPath: "https://storage.googleapis.com/zync-media/assets/lottie/introvideo/animation.json",
|
|
663
|
+
autoplay: true,
|
|
664
|
+
loop: false,
|
|
665
|
+
primaryColor: accentContrast
|
|
666
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
667
|
+
style: {
|
|
668
|
+
position: "absolute",
|
|
669
|
+
left: CHROME_PADDING * 2,
|
|
670
|
+
right: CHROME_PADDING,
|
|
671
|
+
top: 0,
|
|
672
|
+
height: "50%",
|
|
673
|
+
display: "flex",
|
|
674
|
+
flexDirection: "column",
|
|
675
|
+
justifyContent: "center",
|
|
676
|
+
zIndex: 3,
|
|
677
|
+
opacity: textOpacity
|
|
678
|
+
}
|
|
679
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
680
|
+
style: {
|
|
681
|
+
fontSize: calculatedFontSize / 16 + "rem",
|
|
682
|
+
fontWeight: "normal",
|
|
683
|
+
color: accentContrast,
|
|
684
|
+
lineHeight: "1.1",
|
|
685
|
+
margin: 0,
|
|
686
|
+
marginBottom: "2rem",
|
|
687
|
+
fontFamily: fontFamily
|
|
688
|
+
}
|
|
689
|
+
}, renderAnimatedLines(textLines, 15)), /*#__PURE__*/React.createElement("div", {
|
|
690
|
+
style: {
|
|
691
|
+
width: "80px",
|
|
692
|
+
height: "10px",
|
|
693
|
+
backgroundColor: accentContrast,
|
|
694
|
+
marginBottom: "0.5rem",
|
|
695
|
+
marginTop: "2rem",
|
|
696
|
+
opacity: dividerAnimation,
|
|
697
|
+
transform: "translateY(".concat((1 - dividerAnimation) * 10, "px)")
|
|
698
|
+
}
|
|
699
|
+
}), /*#__PURE__*/React.createElement("h2", {
|
|
700
|
+
style: {
|
|
701
|
+
fontSize: "4rem",
|
|
702
|
+
fontWeight: "500",
|
|
703
|
+
color: accentContrast,
|
|
704
|
+
margin: 0,
|
|
705
|
+
fontFamily: fontFamily,
|
|
706
|
+
textTransform: "uppercase",
|
|
707
|
+
letterSpacing: "0.05em"
|
|
708
|
+
}
|
|
709
|
+
}, renderAnimatedText(sentenceTextTwo, dividerStartFrame + 10))), /*#__PURE__*/React.createElement("div", {
|
|
710
|
+
style: {
|
|
711
|
+
position: "absolute",
|
|
712
|
+
bottom: 0,
|
|
713
|
+
left: 0,
|
|
714
|
+
borderRadius: "0px",
|
|
715
|
+
width: "100%",
|
|
716
|
+
height: "".concat(animatedVideoHeight, "px"),
|
|
717
|
+
zIndex: 1,
|
|
718
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
|
|
719
|
+
}
|
|
720
|
+
}, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
721
|
+
url: virtualBgUrl,
|
|
722
|
+
top: 0,
|
|
723
|
+
left: 0,
|
|
724
|
+
width: "100%",
|
|
725
|
+
height: "100%",
|
|
726
|
+
zIndex: 1
|
|
727
|
+
}) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
728
|
+
src: videoUrl,
|
|
729
|
+
startFrom: startVideoFrom,
|
|
730
|
+
muted: muted,
|
|
731
|
+
faceMetadata: faceMetadata,
|
|
732
|
+
containerWidth: screenWidth,
|
|
733
|
+
containerHeight: animatedVideoHeight,
|
|
734
|
+
useAveragePosition: true,
|
|
735
|
+
centerHorizontally: false
|
|
736
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
737
|
+
src: videoUrl,
|
|
738
|
+
startFrom: startVideoFrom,
|
|
739
|
+
muted: muted,
|
|
740
|
+
style: {
|
|
741
|
+
objectFit: "cover",
|
|
742
|
+
height: "100%",
|
|
743
|
+
aspectRatio: "16/9",
|
|
744
|
+
transform: "translateX(-50%)",
|
|
745
|
+
left: "50%",
|
|
746
|
+
position: "relative"
|
|
747
|
+
}
|
|
748
|
+
})), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
749
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl,
|
|
750
|
+
width: screenWidth,
|
|
751
|
+
height: screenHeight,
|
|
752
|
+
zIndex: 1
|
|
753
|
+
}), noBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
754
|
+
style: {
|
|
755
|
+
isolation: "isolate",
|
|
756
|
+
width: screenWidth,
|
|
757
|
+
height: screenHeight,
|
|
758
|
+
zIndex: 9
|
|
759
|
+
}
|
|
760
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
761
|
+
style: {
|
|
762
|
+
position: "absolute",
|
|
763
|
+
bottom: 0,
|
|
764
|
+
left: 0,
|
|
765
|
+
borderRadius: "0px",
|
|
766
|
+
width: "100%",
|
|
767
|
+
height: "".concat(animatedVideoHeight, "px")
|
|
768
|
+
}
|
|
769
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
770
|
+
src: noBackgroundVideoUrl,
|
|
771
|
+
startFrom: startVideoFrom,
|
|
772
|
+
muted: true,
|
|
773
|
+
transparent: true,
|
|
774
|
+
faceMetadata: faceMetadata,
|
|
775
|
+
containerWidth: screenWidth,
|
|
776
|
+
containerHeight: animatedVideoHeight,
|
|
777
|
+
useAveragePosition: true,
|
|
778
|
+
centerHorizontally: false,
|
|
779
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
780
|
+
}))) : null, noBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && !faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
781
|
+
style: {
|
|
782
|
+
backgroundColor: "transparent",
|
|
783
|
+
isolation: "isolate",
|
|
784
|
+
width: screenWidth,
|
|
785
|
+
height: screenHeight,
|
|
786
|
+
zIndex: 9
|
|
787
|
+
}
|
|
788
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
789
|
+
style: {
|
|
790
|
+
position: "absolute",
|
|
791
|
+
bottom: 0,
|
|
792
|
+
left: 0,
|
|
793
|
+
borderRadius: "0px",
|
|
794
|
+
width: "100%",
|
|
795
|
+
height: "".concat(animatedVideoHeight, "px")
|
|
796
|
+
}
|
|
797
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
798
|
+
src: noBackgroundVideoUrl,
|
|
799
|
+
startFrom: startVideoFrom,
|
|
800
|
+
muted: true,
|
|
801
|
+
transparent: true,
|
|
802
|
+
style: {
|
|
803
|
+
objectFit: "cover",
|
|
804
|
+
height: "100%",
|
|
805
|
+
aspectRatio: "16/9",
|
|
806
|
+
transform: "translateX(-50%)",
|
|
807
|
+
left: "50%",
|
|
808
|
+
position: "relative",
|
|
809
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
|
|
810
|
+
}
|
|
811
|
+
}))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
812
|
+
style: {
|
|
813
|
+
zIndex: 20
|
|
814
|
+
}
|
|
815
|
+
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
816
|
+
style: _objectSpread({
|
|
817
|
+
position: "fixed",
|
|
818
|
+
top: logoTop,
|
|
819
|
+
padding: 20,
|
|
820
|
+
zIndex: 10
|
|
821
|
+
}, logoPositionStyles)
|
|
822
|
+
}, /*#__PURE__*/React.createElement(PausableImg, {
|
|
823
|
+
delayRenderTimeoutInMilliseconds: 61000,
|
|
824
|
+
style: {
|
|
825
|
+
width: "225px",
|
|
826
|
+
maxHeight: "auto",
|
|
827
|
+
objectFit: "contain"
|
|
828
|
+
},
|
|
829
|
+
src: logoUrl
|
|
830
|
+
})) : null);
|
|
831
|
+
};
|
|
832
|
+
var Square = function Square(_ref3) {
|
|
833
|
+
var children = _ref3.children,
|
|
834
|
+
videoUrl = _ref3.videoUrl,
|
|
835
|
+
startVideoFrom = _ref3.startVideoFrom,
|
|
836
|
+
sentenceText = _ref3.sentenceText,
|
|
837
|
+
sentenceTextTwo = _ref3.sentenceTextTwo,
|
|
838
|
+
durationInFrames = _ref3.durationInFrames,
|
|
839
|
+
muted = _ref3.muted,
|
|
840
|
+
faceMetadata = _ref3.faceMetadata,
|
|
841
|
+
noBackgroundVideoEffects = _ref3.noBackgroundVideoEffects,
|
|
842
|
+
noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl,
|
|
843
|
+
logoUrl = _ref3.logoUrl,
|
|
844
|
+
logoLeft = _ref3.logoLeft,
|
|
845
|
+
logoTop = _ref3.logoTop,
|
|
846
|
+
logoRight = _ref3.logoRight,
|
|
847
|
+
virtualBgUrl = _ref3.virtualBgUrl,
|
|
848
|
+
showVirtual = _ref3.showVirtual;
|
|
849
|
+
var frame = useCurrentFrame();
|
|
850
|
+
var _useVideoConfigForFps4 = useVideoConfigForFps(),
|
|
851
|
+
fps = _useVideoConfigForFps4.fps;
|
|
852
|
+
var _useVideoConfig3 = useVideoConfig(),
|
|
853
|
+
screenWidth = _useVideoConfig3.width;
|
|
854
|
+
var _useTheme3 = useTheme(),
|
|
855
|
+
accentColor = _useTheme3.accentColor,
|
|
856
|
+
accentContrast = _useTheme3.accentContrast;
|
|
857
|
+
|
|
858
|
+
// Spring animation for entrance (slide in from left)
|
|
859
|
+
var entranceSpring = spring({
|
|
860
|
+
frame: frame,
|
|
861
|
+
fps: fps,
|
|
862
|
+
config: {
|
|
863
|
+
damping: 15,
|
|
864
|
+
stiffness: 100,
|
|
865
|
+
mass: 1
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
|
|
869
|
+
// Calculate when exit animation should start (30 frames before end)
|
|
870
|
+
var exitStartFrame = durationInFrames - 30;
|
|
871
|
+
|
|
872
|
+
// Calculate when text fade-out should start (15 frames before exit)
|
|
873
|
+
var fadeOutStartFrame = exitStartFrame - 15;
|
|
874
|
+
|
|
875
|
+
// Spring animation for text fade-out
|
|
876
|
+
var fadeOutSpring = spring({
|
|
877
|
+
frame: frame - fadeOutStartFrame,
|
|
878
|
+
fps: fps,
|
|
879
|
+
config: {
|
|
880
|
+
damping: 20,
|
|
881
|
+
stiffness: 150,
|
|
882
|
+
mass: 0.8
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
|
|
886
|
+
// Spring animation for exit (slide out to left)
|
|
887
|
+
var exitSpring = spring({
|
|
888
|
+
frame: frame - exitStartFrame,
|
|
889
|
+
fps: fps,
|
|
890
|
+
config: {
|
|
891
|
+
damping: 15,
|
|
892
|
+
stiffness: 100,
|
|
893
|
+
mass: 1
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
// Combine entrance and exit animations
|
|
898
|
+
var isExiting = frame >= exitStartFrame;
|
|
899
|
+
var slideProgress = isExiting ? 1 - exitSpring : entranceSpring;
|
|
900
|
+
|
|
901
|
+
// Calculate text opacity (fade out before exit)
|
|
902
|
+
var isFadingOut = frame >= fadeOutStartFrame;
|
|
903
|
+
var textOpacity = isFadingOut ? 1 - fadeOutSpring : 1;
|
|
904
|
+
|
|
905
|
+
// Background slide animation: starts at -800px, slides to -150px, then back to -800px
|
|
906
|
+
var animatedTranslateX = -150 + (1 - slideProgress) * -650; // -800px when slideProgress = 0, -150px when slideProgress = 1
|
|
907
|
+
|
|
908
|
+
// Video animations: start full screen, transition to translate right, then back to full screen
|
|
909
|
+
var animatedVideoTranslateX = slideProgress * (screenWidth * 0.25); // 0px when slideProgress = 0, 50% screen width when slideProgress = 1
|
|
910
|
+
|
|
911
|
+
// Animated text lines for sentenceText
|
|
912
|
+
var _useVideoConfig4 = useVideoConfig(),
|
|
913
|
+
screenHeight = _useVideoConfig4.height;
|
|
914
|
+
var maxFontSize = 4.5 * 16; // Convert rem to px (6.5rem * 16px/rem)
|
|
915
|
+
var maxWidth = screenWidth * 0.6;
|
|
916
|
+
var maxHeight = screenHeight;
|
|
917
|
+
var _distributeTextToFit3 = distributeTextToFit(sentenceText, maxWidth, maxHeight, maxFontSize),
|
|
918
|
+
textLines = _distributeTextToFit3.lines,
|
|
919
|
+
calculatedFontSize = _distributeTextToFit3.fontSize;
|
|
920
|
+
var renderAnimatedLines = function renderAnimatedLines(lines) {
|
|
921
|
+
var baseDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;
|
|
922
|
+
return lines.map(function (line, lineIndex) {
|
|
923
|
+
var lineAnimation = spring({
|
|
924
|
+
frame: frame - baseDelay - lineIndex * 8,
|
|
925
|
+
// Stagger each line by 8 frames
|
|
926
|
+
fps: fps,
|
|
927
|
+
config: {
|
|
928
|
+
damping: 15,
|
|
929
|
+
stiffness: 120,
|
|
930
|
+
mass: 1
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
var opacity = lineAnimation;
|
|
934
|
+
var translateY = (1 - lineAnimation) * 15; // Slide from top
|
|
935
|
+
|
|
936
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
937
|
+
key: lineIndex,
|
|
938
|
+
style: {
|
|
939
|
+
opacity: opacity,
|
|
940
|
+
transform: "translateY(".concat(translateY, "px)"),
|
|
941
|
+
lineHeight: calculatedFontSize * 1.2 / 16 + "rem"
|
|
942
|
+
}
|
|
943
|
+
}, line);
|
|
944
|
+
});
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
// Divider line animation - starts after text lines finish
|
|
948
|
+
var dividerStartFrame = 15 + textLines.length * 8 + 5; // 5 frame buffer after last line
|
|
949
|
+
var dividerAnimation = spring({
|
|
950
|
+
frame: frame - dividerStartFrame,
|
|
951
|
+
fps: fps,
|
|
952
|
+
config: {
|
|
953
|
+
damping: 15,
|
|
954
|
+
stiffness: 150,
|
|
955
|
+
mass: 0.8
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
var _distributeTextToFit4 = distributeTextToFit(sentenceTextTwo, screenWidth * 0.25, screenHeight, 3 * 16),
|
|
959
|
+
fontSize = _distributeTextToFit4.fontSize;
|
|
960
|
+
|
|
961
|
+
// Character animation for sentenceTextTwo
|
|
962
|
+
var renderAnimatedText = function renderAnimatedText(text) {
|
|
963
|
+
var baseDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
|
|
964
|
+
return text.split("").map(function (_char3, index) {
|
|
965
|
+
var charAnimation = spring({
|
|
966
|
+
frame: frame - baseDelay - index * 3,
|
|
967
|
+
// Stagger each character by 3 frames
|
|
968
|
+
fps: fps,
|
|
969
|
+
config: {
|
|
970
|
+
damping: 12,
|
|
971
|
+
stiffness: 200,
|
|
972
|
+
mass: 0.8
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
var opacity = charAnimation;
|
|
976
|
+
var translateX = (1 - charAnimation) * 15; // Slide from right
|
|
977
|
+
|
|
978
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
979
|
+
key: index,
|
|
980
|
+
style: {
|
|
981
|
+
opacity: opacity,
|
|
982
|
+
transform: "translateX(".concat(translateX, "px)"),
|
|
983
|
+
display: "inline-block"
|
|
984
|
+
}
|
|
985
|
+
}, _char3 === " " ? "\xA0" : _char3, " ");
|
|
986
|
+
});
|
|
987
|
+
};
|
|
988
|
+
var logoPositionStyles = logoRight !== undefined && logoRight !== null ? {
|
|
989
|
+
right: logoRight
|
|
990
|
+
} : {
|
|
991
|
+
left: logoLeft
|
|
992
|
+
};
|
|
993
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
994
|
+
style: {
|
|
995
|
+
padding: 0,
|
|
996
|
+
isolation: "isolate"
|
|
997
|
+
}
|
|
998
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
999
|
+
style: {
|
|
1000
|
+
position: "absolute",
|
|
1001
|
+
left: 0,
|
|
1002
|
+
top: 0,
|
|
1003
|
+
width: "100%",
|
|
1004
|
+
height: "100%",
|
|
1005
|
+
zIndex: 10
|
|
1006
|
+
}
|
|
1007
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1008
|
+
style: {
|
|
1009
|
+
position: "absolute",
|
|
1010
|
+
left: 0,
|
|
1011
|
+
top: 0,
|
|
1012
|
+
width: "50%",
|
|
1013
|
+
height: "100%",
|
|
1014
|
+
transform: "scale(2) rotate(22.5deg) translateY(-50px) translateX(".concat(animatedTranslateX, "px)"),
|
|
1015
|
+
backgroundColor: "white",
|
|
1016
|
+
zIndex: 1
|
|
1017
|
+
}
|
|
1018
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1019
|
+
style: {
|
|
1020
|
+
position: "absolute",
|
|
1021
|
+
inset: "10px",
|
|
1022
|
+
backgroundColor: accentColor,
|
|
1023
|
+
opacity: 0.2,
|
|
1024
|
+
zIndex: 1
|
|
1025
|
+
}
|
|
1026
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1027
|
+
style: {
|
|
1028
|
+
position: "absolute",
|
|
1029
|
+
inset: "20px",
|
|
1030
|
+
backgroundColor: accentColor,
|
|
1031
|
+
opacity: 0.4,
|
|
1032
|
+
zIndex: 1
|
|
1033
|
+
}
|
|
1034
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1035
|
+
style: {
|
|
1036
|
+
position: "absolute",
|
|
1037
|
+
inset: "30px",
|
|
1038
|
+
backgroundColor: accentColor,
|
|
1039
|
+
opacity: 0.6,
|
|
1040
|
+
zIndex: 1
|
|
1041
|
+
}
|
|
1042
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1043
|
+
style: {
|
|
1044
|
+
position: "absolute",
|
|
1045
|
+
inset: "40px",
|
|
1046
|
+
backgroundColor: accentColor,
|
|
1047
|
+
opacity: 0.8,
|
|
1048
|
+
zIndex: 1
|
|
1049
|
+
}
|
|
1050
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1051
|
+
style: {
|
|
1052
|
+
position: "absolute",
|
|
1053
|
+
inset: "50px",
|
|
1054
|
+
backgroundColor: accentColor,
|
|
1055
|
+
zIndex: 1
|
|
1056
|
+
}
|
|
1057
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1058
|
+
style: {
|
|
1059
|
+
position: "absolute",
|
|
1060
|
+
left: CHROME_PADDING * 2,
|
|
1061
|
+
top: CHROME_PADDING * 2,
|
|
1062
|
+
width: 120,
|
|
1063
|
+
height: 120,
|
|
1064
|
+
display: "flex",
|
|
1065
|
+
alignItems: "center",
|
|
1066
|
+
justifyContent: "center",
|
|
1067
|
+
zIndex: 2,
|
|
1068
|
+
opacity: textOpacity
|
|
1069
|
+
}
|
|
1070
|
+
}, /*#__PURE__*/React.createElement(LottieAnimationGlobal, {
|
|
1071
|
+
animationPath: "https://storage.googleapis.com/zync-media/assets/lottie/introvideo/animation.json",
|
|
1072
|
+
autoplay: true,
|
|
1073
|
+
loop: false,
|
|
1074
|
+
primaryColor: accentContrast
|
|
1075
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1076
|
+
style: {
|
|
1077
|
+
position: "absolute",
|
|
1078
|
+
left: CHROME_PADDING * 2,
|
|
1079
|
+
right: CHROME_PADDING,
|
|
1080
|
+
top: screenHeight * 0.2,
|
|
1081
|
+
zIndex: 2,
|
|
1082
|
+
opacity: textOpacity
|
|
1083
|
+
}
|
|
1084
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
1085
|
+
style: {
|
|
1086
|
+
fontSize: calculatedFontSize / 16 + "rem",
|
|
1087
|
+
fontWeight: "normal",
|
|
1088
|
+
color: accentContrast,
|
|
1089
|
+
lineHeight: "1.1",
|
|
1090
|
+
margin: 0,
|
|
1091
|
+
marginBottom: "2rem",
|
|
1092
|
+
fontFamily: fontFamily
|
|
1093
|
+
}
|
|
1094
|
+
}, renderAnimatedLines(textLines, 15)), /*#__PURE__*/React.createElement("div", {
|
|
1095
|
+
style: {
|
|
1096
|
+
width: "80px",
|
|
1097
|
+
height: "10px",
|
|
1098
|
+
backgroundColor: accentContrast,
|
|
1099
|
+
marginBottom: "0.5rem",
|
|
1100
|
+
marginTop: "7.5rem",
|
|
1101
|
+
opacity: dividerAnimation,
|
|
1102
|
+
transform: "translateY(".concat((1 - dividerAnimation) * 10, "px)")
|
|
1103
|
+
}
|
|
1104
|
+
}), /*#__PURE__*/React.createElement("h2", {
|
|
1105
|
+
style: {
|
|
1106
|
+
fontSize: fontSize,
|
|
1107
|
+
fontWeight: "500",
|
|
1108
|
+
color: accentContrast,
|
|
1109
|
+
margin: 0,
|
|
1110
|
+
fontFamily: fontFamily,
|
|
1111
|
+
textTransform: "uppercase",
|
|
1112
|
+
letterSpacing: "0.05em"
|
|
1113
|
+
}
|
|
1114
|
+
}, renderAnimatedText(sentenceTextTwo, dividerStartFrame + 10)))), /*#__PURE__*/React.createElement("div", {
|
|
1115
|
+
style: {
|
|
1116
|
+
position: "absolute",
|
|
1117
|
+
borderRadius: "0px",
|
|
1118
|
+
width: "100%",
|
|
1119
|
+
height: "100%",
|
|
1120
|
+
top: 0,
|
|
1121
|
+
left: 0,
|
|
1122
|
+
transform: "translateX(".concat(animatedVideoTranslateX, "px)"),
|
|
1123
|
+
isolation: "isolate",
|
|
1124
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
|
|
1125
|
+
}
|
|
1126
|
+
}, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
1127
|
+
url: virtualBgUrl,
|
|
1128
|
+
top: 0,
|
|
1129
|
+
left: 0,
|
|
1130
|
+
width: "100%",
|
|
1131
|
+
height: "100%",
|
|
1132
|
+
zIndex: 1
|
|
1133
|
+
}) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
1134
|
+
src: videoUrl,
|
|
1135
|
+
startFrom: startVideoFrom,
|
|
1136
|
+
muted: muted,
|
|
1137
|
+
faceMetadata: faceMetadata,
|
|
1138
|
+
containerWidth: screenWidth,
|
|
1139
|
+
containerHeight: screenWidth,
|
|
1140
|
+
useAveragePosition: true,
|
|
1141
|
+
centerHorizontally: false
|
|
1142
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
1143
|
+
src: videoUrl,
|
|
1144
|
+
startFrom: startVideoFrom,
|
|
1145
|
+
muted: muted,
|
|
1146
|
+
style: {
|
|
1147
|
+
objectFit: "cover",
|
|
1148
|
+
width: "100%",
|
|
1149
|
+
height: "100%"
|
|
1150
|
+
}
|
|
1151
|
+
})), noBackgroundVideoUrl && (noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
1152
|
+
style: {
|
|
1153
|
+
isolation: "isolate",
|
|
1154
|
+
width: screenWidth,
|
|
1155
|
+
height: screenWidth,
|
|
1156
|
+
zIndex: 9
|
|
1157
|
+
}
|
|
1158
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1159
|
+
style: {
|
|
1160
|
+
position: "absolute",
|
|
1161
|
+
borderRadius: "0px",
|
|
1162
|
+
width: "100%",
|
|
1163
|
+
height: "100%",
|
|
1164
|
+
top: 0,
|
|
1165
|
+
left: 0,
|
|
1166
|
+
transform: "translateX(".concat(animatedVideoTranslateX, "px)")
|
|
1167
|
+
}
|
|
1168
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
1169
|
+
src: noBackgroundVideoUrl,
|
|
1170
|
+
startFrom: startVideoFrom,
|
|
1171
|
+
muted: true,
|
|
1172
|
+
transparent: true,
|
|
1173
|
+
faceMetadata: faceMetadata,
|
|
1174
|
+
containerWidth: screenWidth,
|
|
1175
|
+
containerHeight: screenWidth,
|
|
1176
|
+
useAveragePosition: true,
|
|
1177
|
+
centerHorizontally: false,
|
|
1178
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
1179
|
+
}))) : null, noBackgroundVideoUrl && (noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && !faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
1180
|
+
style: {
|
|
1181
|
+
backgroundColor: "transparent",
|
|
1182
|
+
isolation: "isolate",
|
|
1183
|
+
width: screenWidth,
|
|
1184
|
+
height: screenWidth,
|
|
1185
|
+
zIndex: 9
|
|
1186
|
+
}
|
|
1187
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1188
|
+
style: {
|
|
1189
|
+
position: "absolute",
|
|
1190
|
+
borderRadius: "0px",
|
|
1191
|
+
width: "100%",
|
|
1192
|
+
height: "100%",
|
|
1193
|
+
top: 0,
|
|
1194
|
+
left: 0,
|
|
1195
|
+
transform: "translateX(".concat(animatedVideoTranslateX, "px)")
|
|
1196
|
+
}
|
|
1197
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
1198
|
+
src: noBackgroundVideoUrl,
|
|
1199
|
+
startFrom: startVideoFrom,
|
|
1200
|
+
muted: true,
|
|
1201
|
+
transparent: true,
|
|
1202
|
+
style: {
|
|
1203
|
+
objectFit: "cover",
|
|
1204
|
+
width: "100%",
|
|
1205
|
+
height: "100%",
|
|
1206
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
|
|
1207
|
+
}
|
|
1208
|
+
}))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
1209
|
+
style: {
|
|
1210
|
+
zIndex: 20
|
|
1211
|
+
}
|
|
1212
|
+
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
1213
|
+
style: _objectSpread({
|
|
1214
|
+
position: "fixed",
|
|
1215
|
+
top: logoTop,
|
|
1216
|
+
padding: 20,
|
|
1217
|
+
zIndex: 20
|
|
1218
|
+
}, logoPositionStyles)
|
|
1219
|
+
}, /*#__PURE__*/React.createElement(PausableImg, {
|
|
1220
|
+
delayRenderTimeoutInMilliseconds: 61000,
|
|
1221
|
+
style: {
|
|
1222
|
+
width: "225px",
|
|
1223
|
+
maxHeight: "auto",
|
|
1224
|
+
objectFit: "contain"
|
|
1225
|
+
},
|
|
1226
|
+
src: logoUrl
|
|
1227
|
+
})) : null);
|
|
1228
|
+
};
|
|
1229
|
+
var IntroVideo = function IntroVideo(_ref4) {
|
|
1230
|
+
var videoUrl = _ref4.videoUrl,
|
|
1231
|
+
startVideoFrom = _ref4.startVideoFrom,
|
|
1232
|
+
_ref4$sentenceText = _ref4.sentenceText,
|
|
1233
|
+
sentenceText = _ref4$sentenceText === void 0 ? "" : _ref4$sentenceText,
|
|
1234
|
+
_ref4$sentenceTextTwo = _ref4.sentenceTextTwo,
|
|
1235
|
+
sentenceTextTwo = _ref4$sentenceTextTwo === void 0 ? "John Smith" : _ref4$sentenceTextTwo,
|
|
1236
|
+
logoUrl = _ref4.logoUrl,
|
|
1237
|
+
children = _ref4.children,
|
|
1238
|
+
sourceVideoOrientation = _ref4.sourceVideoOrientation,
|
|
1239
|
+
_ref4$disableTransiti = _ref4.disableTransitionSounds,
|
|
1240
|
+
disableTransitionSounds = _ref4$disableTransiti === void 0 ? false : _ref4$disableTransiti,
|
|
1241
|
+
durationInFrames = _ref4.durationInFrames,
|
|
1242
|
+
muted = _ref4.muted,
|
|
1243
|
+
faceMetadata = _ref4.faceMetadata,
|
|
1244
|
+
noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
|
|
1245
|
+
noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl;
|
|
1246
|
+
var _useVideoConfig5 = useVideoConfig(),
|
|
1247
|
+
width = _useVideoConfig5.width,
|
|
1248
|
+
height = _useVideoConfig5.height;
|
|
1249
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
1250
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
1251
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
1252
|
+
var showVirtual = isVirtual && !!noBackgroundVideoUrl;
|
|
1253
|
+
|
|
1254
|
+
// Configure orientation-specific layouts
|
|
1255
|
+
var _useOrientationBased = useOrientationBased({
|
|
1256
|
+
portrait: {
|
|
1257
|
+
// Portrait: Orange background on top, video on bottom
|
|
1258
|
+
videoWidth: width - 2 * CHROME_PADDING,
|
|
1259
|
+
videoHeight: height * 0.5,
|
|
1260
|
+
videoTop: height * 0.5 + CHROME_PADDING,
|
|
1261
|
+
videoLeft: CHROME_PADDING,
|
|
1262
|
+
backgroundHeight: height * 0.5,
|
|
1263
|
+
logoTop: CHROME_PADDING,
|
|
1264
|
+
logoRight: CHROME_PADDING,
|
|
1265
|
+
IntroVideoComponent: Portrait
|
|
1266
|
+
},
|
|
1267
|
+
landscape: {
|
|
1268
|
+
// Landscape: Orange background on left, video on right
|
|
1269
|
+
videoWidth: width * 0.5,
|
|
1270
|
+
videoHeight: height,
|
|
1271
|
+
videoTop: 0,
|
|
1272
|
+
videoLeft: width * 0.5,
|
|
1273
|
+
backgroundWidth: width * 0.5,
|
|
1274
|
+
logoTop: CHROME_PADDING,
|
|
1275
|
+
logoRight: CHROME_PADDING,
|
|
1276
|
+
IntroVideoComponent: Landscape
|
|
1277
|
+
},
|
|
1278
|
+
square: {
|
|
1279
|
+
// Square: Orange background on left, video on right
|
|
1280
|
+
videoWidth: width * 0.5 - CHROME_PADDING,
|
|
1281
|
+
videoHeight: height - 2 * CHROME_PADDING,
|
|
1282
|
+
videoTop: CHROME_PADDING,
|
|
1283
|
+
videoLeft: width * 0.5 + CHROME_PADDING / 2,
|
|
1284
|
+
backgroundWidth: width * 0.5,
|
|
1285
|
+
logoTop: CHROME_PADDING,
|
|
1286
|
+
logoRight: CHROME_PADDING,
|
|
1287
|
+
IntroVideoComponent: Square
|
|
1288
|
+
}
|
|
1289
|
+
}),
|
|
1290
|
+
IntroVideoComponent = _useOrientationBased.IntroVideoComponent,
|
|
1291
|
+
videoWidth = _useOrientationBased.videoWidth,
|
|
1292
|
+
videoHeight = _useOrientationBased.videoHeight,
|
|
1293
|
+
videoTop = _useOrientationBased.videoTop,
|
|
1294
|
+
videoLeft = _useOrientationBased.videoLeft,
|
|
1295
|
+
backgroundWidth = _useOrientationBased.backgroundWidth,
|
|
1296
|
+
backgroundHeight = _useOrientationBased.backgroundHeight,
|
|
1297
|
+
logoTop = _useOrientationBased.logoTop,
|
|
1298
|
+
logoLeft = _useOrientationBased.logoLeft,
|
|
1299
|
+
logoRight = _useOrientationBased.logoRight,
|
|
1300
|
+
orientation = _useOrientationBased.orientation;
|
|
1301
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
|
|
1302
|
+
src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
|
|
1303
|
+
volume: 0.25
|
|
1304
|
+
}), /*#__PURE__*/React.createElement(IntroVideoComponent, {
|
|
1305
|
+
videoUrl: videoUrl,
|
|
1306
|
+
startVideoFrom: startVideoFrom,
|
|
1307
|
+
sourceVideoOrientation: sourceVideoOrientation,
|
|
1308
|
+
sentenceText: sentenceText,
|
|
1309
|
+
sentenceTextTwo: sentenceTextTwo,
|
|
1310
|
+
logoUrl: logoUrl,
|
|
1311
|
+
logoLeft: logoLeft,
|
|
1312
|
+
logoTop: logoTop,
|
|
1313
|
+
logoRight: logoRight,
|
|
1314
|
+
videoWidth: videoWidth,
|
|
1315
|
+
videoHeight: videoHeight,
|
|
1316
|
+
videoTop: videoTop,
|
|
1317
|
+
videoLeft: videoLeft,
|
|
1318
|
+
backgroundWidth: backgroundWidth,
|
|
1319
|
+
backgroundHeight: backgroundHeight,
|
|
1320
|
+
orientation: orientation,
|
|
1321
|
+
durationInFrames: durationInFrames,
|
|
1322
|
+
muted: muted,
|
|
1323
|
+
faceMetadata: faceMetadata,
|
|
1324
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects,
|
|
1325
|
+
noBackgroundVideoUrl: noBackgroundVideoUrl,
|
|
1326
|
+
showVirtual: showVirtual,
|
|
1327
|
+
virtualBgUrl: virtualBgUrl
|
|
1328
|
+
}, children));
|
|
1329
|
+
};
|
|
1330
|
+
export { IntroVideo };
|