@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.
Files changed (133) hide show
  1. package/dist/ZyncScreenplayPlayer.js +35 -0
  2. package/dist/bundle.js +2 -0
  3. package/dist/bundle.js.LICENSE.txt +54 -0
  4. package/dist/index.js +4 -0
  5. package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +281 -0
  6. package/dist/screenplay/RemotionRenderer/Root.js +22 -0
  7. package/dist/screenplay/RemotionRenderer/components/LottieAnimationGlobal.js +116 -0
  8. package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackground.js +26 -0
  9. package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackgroundUnderlay.js +41 -0
  10. package/dist/screenplay/RemotionRenderer/components/captions/CaptionSimple.js +12 -0
  11. package/dist/screenplay/RemotionRenderer/components/effects/BrollFullscreen.js +27 -0
  12. package/dist/screenplay/RemotionRenderer/components/effects/GlitchText.js +22 -0
  13. package/dist/screenplay/RemotionRenderer/components/effects/HandoffNametag.js +7 -0
  14. package/dist/screenplay/RemotionRenderer/components/effects/LottieAnimation.js +64 -0
  15. package/dist/screenplay/RemotionRenderer/components/effects/Nametag.js +9 -0
  16. package/dist/screenplay/RemotionRenderer/components/effects/PhraseRainbowEffect.js +34 -0
  17. package/dist/screenplay/RemotionRenderer/components/effects/Sentence.js +50 -0
  18. package/dist/screenplay/RemotionRenderer/components/effects/Title.js +12 -0
  19. package/dist/screenplay/RemotionRenderer/components/layouts/BrollGreenScreen.js +742 -0
  20. package/dist/screenplay/RemotionRenderer/components/layouts/BrollSplitScreen.js +714 -0
  21. package/dist/screenplay/RemotionRenderer/components/layouts/BrollStudioBackdrop.js +620 -0
  22. package/dist/screenplay/RemotionRenderer/components/layouts/DynamicTriangle.js +618 -0
  23. package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +161 -0
  24. package/dist/screenplay/RemotionRenderer/components/layouts/IntroVideo.js +1330 -0
  25. package/dist/screenplay/RemotionRenderer/components/layouts/KeyPointOverlayDepth.js +397 -0
  26. package/dist/screenplay/RemotionRenderer/components/layouts/Keyword.js +539 -0
  27. package/dist/screenplay/RemotionRenderer/components/layouts/KeywordStudioBackdrop.js +714 -0
  28. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStill.js +381 -0
  29. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillFullScreen.js +178 -0
  30. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreen.js +568 -0
  31. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreenV2.js +731 -0
  32. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillStudioBackdrop.js +588 -0
  33. package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrame.js +183 -0
  34. package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameBroll.js +181 -0
  35. package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameSentence.js +17 -0
  36. package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameZoomCut.js +13 -0
  37. package/dist/screenplay/RemotionRenderer/components/layouts/TextWithVideo.js +373 -0
  38. package/dist/screenplay/RemotionRenderer/components/layouts/quote-bubble-animation.json +1 -0
  39. package/dist/screenplay/RemotionRenderer/components/utils/BlurOverlay.js +19 -0
  40. package/dist/screenplay/RemotionRenderer/components/utils/ChromaKeyedVideo.js +59 -0
  41. package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +562 -0
  42. package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +124 -0
  43. package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -0
  44. package/dist/screenplay/RemotionRenderer/components/utils/SafeZones.js +69 -0
  45. package/dist/screenplay/RemotionRenderer/components/utils/StretchText.js +124 -0
  46. package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +66 -0
  47. package/dist/screenplay/RemotionRenderer/config.js +8 -0
  48. package/dist/screenplay/RemotionRenderer/development.js +1370 -0
  49. package/dist/screenplay/RemotionRenderer/helpers/cleanFacemetadata.js +29 -0
  50. package/dist/screenplay/RemotionRenderer/helpers/convertToSeconds.js +14 -0
  51. package/dist/screenplay/RemotionRenderer/helpers/faceBasedVideoStyles.js +212 -0
  52. package/dist/screenplay/RemotionRenderer/helpers/faceCenteredVideoTransforms.js +468 -0
  53. package/dist/screenplay/RemotionRenderer/helpers/getContrastColor.js +15 -0
  54. package/dist/screenplay/RemotionRenderer/helpers/getVideoOrientation.js +21 -0
  55. package/dist/screenplay/RemotionRenderer/helpers/hexToRgb.js +48 -0
  56. package/dist/screenplay/RemotionRenderer/hooks/useLottieReplaceColor.js +45 -0
  57. package/dist/screenplay/RemotionRenderer/hooks/useOrientationBased.js +29 -0
  58. package/dist/screenplay/RemotionRenderer/hooks/useTimeInterpolate.js +54 -0
  59. package/dist/screenplay/RemotionRenderer/hooks/useVirtualBackground.js +38 -0
  60. package/dist/screenplay/RemotionRenderer/index.js +3 -0
  61. package/dist/screenplay/RemotionRenderer/main/lib/Sequence.js +76 -0
  62. package/dist/screenplay/RemotionRenderer/main/lib/layouts/DefaultLayout.js +72 -0
  63. package/dist/screenplay/RemotionRenderer/main/lib/layouts/DynamicTriangleLayout.js +54 -0
  64. package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +50 -0
  65. package/dist/screenplay/RemotionRenderer/main/lib/layouts/IntroVideoLayout.js +33 -0
  66. package/dist/screenplay/RemotionRenderer/main/lib/layouts/KeywordLayout.js +36 -0
  67. package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +68 -0
  68. package/dist/screenplay/RemotionRenderer/main/lib/layouts/MotionStillLayout.js +36 -0
  69. package/dist/screenplay/RemotionRenderer/main/lib/layouts/SimpleFrameLayout.js +43 -0
  70. package/dist/screenplay/RemotionRenderer/main/lib/layouts/TextWithVideoLayout.js +52 -0
  71. package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +92 -0
  72. package/dist/screenplay/RemotionRenderer/registeredComponents.js +91 -0
  73. package/dist/screenplay/RemotionRenderer/theme/config.js +8 -0
  74. package/dist/screenplay/RemotionRenderer/theme/hooks/useTheme.js +24 -0
  75. package/dist/screenplay/RemotionRenderer/theme/hooks/useThemedComponents.js +101 -0
  76. package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldNameTag.js +147 -0
  77. package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldSentence.js +138 -0
  78. package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldTitle.js +136 -0
  79. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColor.js +67 -0
  80. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorInverse.js +67 -0
  81. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorShadow.js +66 -0
  82. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionElegant.js +134 -0
  83. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionEmphasis.js +122 -0
  84. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionPunctuated.js +84 -0
  85. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBoom.js +88 -0
  86. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBubble.js +91 -0
  87. package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordPopup.js +118 -0
  88. package/dist/screenplay/RemotionRenderer/theme/themes/default/DefaultCaption.js +62 -0
  89. package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag/handoffNametagConfig.js +59 -0
  90. package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +173 -0
  91. package/dist/screenplay/RemotionRenderer/theme/themes/default/Nametag.js +129 -0
  92. package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentence.js +20 -0
  93. package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentenceDefault.js +29 -0
  94. package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/SentenceSimple.helpers.js +61 -0
  95. package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence.js +86 -0
  96. package/dist/screenplay/RemotionRenderer/theme/themes/default/Title.js +112 -0
  97. package/dist/screenplay/RemotionRenderer/theme/themes/default/constants.js +1 -0
  98. package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Nametag.js +134 -0
  99. package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Sentence.js +49 -0
  100. package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Title.js +108 -0
  101. package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/animations.js +30 -0
  102. package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/config.js +9 -0
  103. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchNametag.js +252 -0
  104. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchSentence.js +156 -0
  105. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchTitle.js +142 -0
  106. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/DisplacedText.js +66 -0
  107. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/GlitchAnimatedLine.js +38 -0
  108. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/SplitSentence.js +80 -0
  109. package/dist/screenplay/RemotionRenderer/theme/themes/glitch/helpers.js +32 -0
  110. package/dist/screenplay/RemotionRenderer/theme/themes/none/Nametag.js +3 -0
  111. package/dist/screenplay/RemotionRenderer/theme/themes/none/Title.js +3 -0
  112. package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullNametag.js +165 -0
  113. package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullSentence.js +94 -0
  114. package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullTitle.js +98 -0
  115. package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/sentence.js +92 -0
  116. package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/title.js +119 -0
  117. package/dist/screenplay/RemotionRenderer/theme/themes/sports/Nametag.js +122 -0
  118. package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsCaption.js +93 -0
  119. package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsSentence.js +76 -0
  120. package/dist/screenplay/RemotionRenderer/theme/themes/sports/Title.js +90 -0
  121. package/dist/screenplay/RemotionRenderer/theme/themes/sports/shared.js +62 -0
  122. package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Nametag.js +145 -0
  123. package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/SportsBounceSentence.js +148 -0
  124. package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Title.js +160 -0
  125. package/dist/screenplay/RemotionRenderer/tracks/AudioTrack.js +23 -0
  126. package/dist/screenplay/RemotionRenderer/tracks/CaptionsVideoTrack.js +23 -0
  127. package/dist/screenplay/RemotionRenderer/tracks/DynamicVideoComposition.js +31 -0
  128. package/dist/screenplay/RemotionRenderer/tracks/EffectsVideoTrack.js +23 -0
  129. package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +141 -0
  130. package/dist/screenplay/RemotionRenderer/tracks/Soundtrack.js +16 -0
  131. package/dist/screenplay/RemotionRenderer/tracks/Watermark.js +23 -0
  132. package/dist/screenplay/RemotionRenderer/tracks/transitions/GlitchOne.js +92 -0
  133. package/package.json +45 -0
@@ -0,0 +1,618 @@
1
+ import React from "react";
2
+ import { AbsoluteFill, OffthreadVideo, Audio, useVideoConfig, useCurrentFrame, Easing, interpolate } from "remotion";
3
+ import { useTimeInterpolate } from "../../hooks/useTimeInterpolate.js";
4
+ import { useOrientationBased } from "../../hooks/useOrientationBased.js";
5
+ import { distributeTextToFit } from "../../theme/themes/default/Sentence/SentenceSimple.helpers";
6
+ import { loadFont } from "@remotion/google-fonts/Kanit";
7
+ import { useTheme } from "../../theme/hooks/useTheme";
8
+ import { BlurOverlay } from "../utils/BlurOverlay";
9
+ import { useVirtualBackground } from "../../hooks/useVirtualBackground";
10
+ import { VirtualBackgroundUnderlay } from "../backgrounds/VirtualBackgroundUnderlay";
11
+ import FaceCenteredVideo from "../utils/FaceCenteredVideo";
12
+ var _loadFont = loadFont(),
13
+ fontFamily = _loadFont.fontFamily;
14
+ export var DynamicTriangle = function DynamicTriangle(_ref) {
15
+ var children = _ref.children,
16
+ videoUrl = _ref.videoUrl,
17
+ startVideoFrom = _ref.startVideoFrom,
18
+ durationInFrames = _ref.durationInFrames,
19
+ muted = _ref.muted,
20
+ frameColor = _ref.frameColor,
21
+ _ref$disableTransitio = _ref.disableTransitionSounds,
22
+ disableTransitionSounds = _ref$disableTransitio === void 0 ? false : _ref$disableTransitio,
23
+ _ref$triangleSize = _ref.triangleSize,
24
+ defaultTriangleSize = _ref$triangleSize === void 0 ? 600 : _ref$triangleSize,
25
+ _ref$triangleColor = _ref.triangleColor,
26
+ triangleColor = _ref$triangleColor === void 0 ? "#00FF7F" : _ref$triangleColor,
27
+ _ref$triangleBorderWi = _ref.triangleBorderWidth,
28
+ defaultTriangleBorderWidth = _ref$triangleBorderWi === void 0 ? 60 : _ref$triangleBorderWi,
29
+ _ref$borderRadius = _ref.borderRadius,
30
+ defaultBorderRadius = _ref$borderRadius === void 0 ? 80 : _ref$borderRadius,
31
+ sentenceText = _ref.sentenceText,
32
+ noBackgroundVideoUrl = _ref.noBackgroundVideoUrl,
33
+ noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
34
+ faceMetadata = _ref.faceMetadata;
35
+ var _useVideoConfig = useVideoConfig(),
36
+ width = _useVideoConfig.width,
37
+ height = _useVideoConfig.height,
38
+ fps = _useVideoConfig.fps;
39
+ var frame = useCurrentFrame();
40
+ var _useVirtualBackground = useVirtualBackground(),
41
+ isVirtual = _useVirtualBackground.isVirtual,
42
+ virtualBgUrl = _useVirtualBackground.url;
43
+ var showVirtual = isVirtual && !!noBackgroundVideoUrl;
44
+ var _useTheme = useTheme(),
45
+ primaryColor = _useTheme.primaryColor,
46
+ accentColor = _useTheme.accentColor,
47
+ accentContrast = _useTheme.accentContrast,
48
+ primaryContrast = _useTheme.primaryContrast;
49
+
50
+ // Get orientation-specific configurations
51
+ var orientationConfig = useOrientationBased({
52
+ landscape: {
53
+ triangleSize: defaultTriangleSize,
54
+ triangleBorderWidth: defaultTriangleBorderWidth,
55
+ borderRadius: defaultBorderRadius,
56
+ startRotation: 165,
57
+ endRotation: 290,
58
+ maskStartScale: 10,
59
+ maskEndScale: 2.5,
60
+ // Orientation-specific easing configuration
61
+ easings: {
62
+ enter: {
63
+ rotation: Easing.inOut(Easing.quad),
64
+ position: Easing.inOut(Easing.ease),
65
+ mask: Easing.inOut(Easing.cubic),
66
+ video: Easing.inOut(Easing.cubic)
67
+ },
68
+ exit: {
69
+ rotation: Easing.out(Easing.cubic),
70
+ position: Easing.out(Easing.cubic),
71
+ mask: Easing.out(Easing.cubic),
72
+ // Square: make video slightly faster than triangle on exit
73
+ video: Easing.out(Easing.exp)
74
+ }
75
+ },
76
+ // Exit lead for video vs. triangle (seconds)
77
+ videoExitLeadSeconds: 0,
78
+ // Exit duration for video easing window (seconds)
79
+ videoExitDurationSeconds: 1.5,
80
+ // X positions for animation
81
+ xStartPos: width / 8 * 3 + 150,
82
+ xEndPos: width / 4 * 3 + 250,
83
+ // Y positions for animation (static in landscape)
84
+ yStartPos: height / 2.25,
85
+ yEndPos: height / 2.25,
86
+ // Video offset
87
+ videoOffsetStart: 0,
88
+ videoOffsetEnd: 48,
89
+ videoOffsetExit: -80,
90
+ videoOffsetYStart: 0,
91
+ videoOffsetYEnd: 0,
92
+ videoOffsetYExit: 0,
93
+ textContainerWidth: width / 2 - 250,
94
+ textContainerHeight: height
95
+ },
96
+ square: {
97
+ triangleSize: 450,
98
+ triangleBorderWidth: 50,
99
+ borderRadius: 70,
100
+ startRotation: 0,
101
+ endRotation: 195,
102
+ maskStartScale: 8,
103
+ maskEndScale: 2.2,
104
+ // Orientation-specific easing configuration
105
+ easings: {
106
+ enter: {
107
+ rotation: Easing.inOut(Easing.quad),
108
+ position: Easing.inOut(Easing.ease),
109
+ mask: Easing.inOut(Easing.cubic),
110
+ video: Easing.inOut(Easing.cubic)
111
+ },
112
+ exit: {
113
+ rotation: Easing.out(Easing.cubic),
114
+ position: Easing.out(Easing.cubic),
115
+ mask: Easing.out(Easing.cubic),
116
+ // Square: keep video slightly faster but smoother than triangle
117
+ video: Easing.out(Easing.cubic)
118
+ }
119
+ },
120
+ // Make video exit start slightly earlier than triangle
121
+ videoExitLeadSeconds: 0.05,
122
+ // Make video exit complete faster than triangle
123
+ videoExitDurationSeconds: 1.2,
124
+ // X positions - center to bottom-right
125
+ xStartPos: width / 2,
126
+ xEndPos: width - 300,
127
+ // Y positions - center to bottom
128
+ yStartPos: height / 2,
129
+ yEndPos: height - 150,
130
+ // Video offset
131
+ videoOffsetStart: 0,
132
+ videoOffsetEnd: 30,
133
+ videoOffsetExit: 0,
134
+ videoOffsetYStart: 0,
135
+ videoOffsetYEnd: 40,
136
+ videoOffsetYExit: 0,
137
+ textContainerWidth: width - 200,
138
+ textContainerHeight: height * 0.35
139
+ },
140
+ portrait: {
141
+ triangleSize: 650,
142
+ triangleBorderWidth: 45,
143
+ borderRadius: 65,
144
+ startRotation: 10,
145
+ endRotation: 195,
146
+ maskStartScale: 10,
147
+ maskEndScale: 2.8,
148
+ // Orientation-specific easing configuration
149
+ easings: {
150
+ enter: {
151
+ rotation: Easing.inOut(Easing.quad),
152
+ position: Easing.inOut(Easing.ease),
153
+ mask: Easing.inOut(Easing.cubic),
154
+ video: Easing.inOut(Easing.cubic)
155
+ },
156
+ exit: {
157
+ rotation: Easing.out(Easing.cubic),
158
+ position: Easing.out(Easing.cubic),
159
+ mask: Easing.out(Easing.cubic),
160
+ video: Easing.out(Easing.cubic)
161
+ }
162
+ },
163
+ // Make video exit start slightly earlier than triangle
164
+ videoExitLeadSeconds: 0.1,
165
+ // Make video exit complete faster than triangle
166
+ videoExitDurationSeconds: 0.9,
167
+ // X positions - stay centered
168
+ xStartPos: width / 2,
169
+ xEndPos: width / 2,
170
+ // Y positions - top to bottom
171
+ yStartPos: 400,
172
+ yEndPos: height - 200,
173
+ // Video offset
174
+ videoOffsetStart: 0,
175
+ videoOffsetEnd: 0,
176
+ videoOffsetExit: 0,
177
+ videoOffsetYStart: 0,
178
+ videoOffsetYEnd: 40,
179
+ videoOffsetYExit: 0,
180
+ textContainerWidth: width - 200,
181
+ textContainerHeight: height * 0.4
182
+ }
183
+ });
184
+
185
+ // Extract values from orientation config
186
+ var triangleSize = orientationConfig.triangleSize,
187
+ triangleBorderWidth = orientationConfig.triangleBorderWidth,
188
+ borderRadius = orientationConfig.borderRadius,
189
+ startRotation = orientationConfig.startRotation,
190
+ endRotation = orientationConfig.endRotation,
191
+ maskStartScale = orientationConfig.maskStartScale,
192
+ maskEndScale = orientationConfig.maskEndScale,
193
+ easings = orientationConfig.easings,
194
+ videoExitLeadSeconds = orientationConfig.videoExitLeadSeconds,
195
+ videoExitDurationSeconds = orientationConfig.videoExitDurationSeconds,
196
+ xStartPos = orientationConfig.xStartPos,
197
+ xEndPos = orientationConfig.xEndPos,
198
+ yStartPos = orientationConfig.yStartPos,
199
+ yEndPos = orientationConfig.yEndPos,
200
+ videoOffsetStart = orientationConfig.videoOffsetStart,
201
+ videoOffsetEnd = orientationConfig.videoOffsetEnd,
202
+ videoOffsetExit = orientationConfig.videoOffsetExit,
203
+ videoOffsetYStart = orientationConfig.videoOffsetYStart,
204
+ videoOffsetYEnd = orientationConfig.videoOffsetYEnd,
205
+ videoOffsetYExit = orientationConfig.videoOffsetYExit,
206
+ textContainerWidth = orientationConfig.textContainerWidth,
207
+ textContainerHeight = orientationConfig.textContainerHeight;
208
+ var maskAnimationDuration = 1.5;
209
+ var enterAnimationDuration = 1.25;
210
+ var hasFiniteDuration = Number.isFinite(durationInFrames);
211
+ var durationInSeconds = hasFiniteDuration && durationInFrames > 0 ? durationInFrames / fps : null;
212
+ var canAnimateExit = typeof durationInSeconds === "number" && durationInSeconds - maskAnimationDuration >= enterAnimationDuration;
213
+
214
+ // Calculate exit animation start time to match maskAnimationDuration
215
+ var exitStartTime = canAnimateExit ? durationInSeconds - maskAnimationDuration : null;
216
+ var exitStartFrame = typeof exitStartTime === "number" ? exitStartTime * fps : null;
217
+ var isExiting = Boolean(canAnimateExit && exitStartFrame !== null && frame >= exitStartFrame);
218
+
219
+ // Video-specific exit start with optional lead (square/portrait)
220
+ var potentialVideoExitStart = exitStartTime && typeof videoExitLeadSeconds === "number" ? exitStartTime - videoExitLeadSeconds : exitStartTime;
221
+ var videoExitStartTime = canAnimateExit && typeof potentialVideoExitStart === "number" ? Math.max(0, potentialVideoExitStart) : null;
222
+ var potentialVideoExitEnd = canAnimateExit && typeof videoExitDurationSeconds === "number" && typeof videoExitStartTime === "number" && typeof durationInSeconds === "number" ? Math.min(videoExitStartTime + videoExitDurationSeconds, durationInSeconds) : durationInSeconds;
223
+ var canAnimateVideoExit = canAnimateExit && typeof videoExitStartTime === "number" && typeof potentialVideoExitEnd === "number" && potentialVideoExitEnd > videoExitStartTime;
224
+ var videoExitEndTime = canAnimateVideoExit ? potentialVideoExitEnd : null;
225
+ var videoExitStartFrame = canAnimateVideoExit && typeof videoExitStartTime === "number" ? videoExitStartTime * fps : null;
226
+ var isExitingVideo = Boolean(canAnimateVideoExit && videoExitStartFrame !== null && frame >= videoExitStartFrame);
227
+
228
+ // Calculate rotation with interpolation for smoothness (including exit)
229
+ var rotation = useTimeInterpolate(canAnimateExit && typeof durationInSeconds === "number" ? [0, enterAnimationDuration, exitStartTime, durationInSeconds] : [0, enterAnimationDuration], canAnimateExit && typeof durationInSeconds === "number" ? [startRotation, endRotation, endRotation, startRotation + 10] // Magic 10 to avoid rotation glitches
230
+ : [startRotation, endRotation], {
231
+ extrapolateRight: "clamp",
232
+ extrapolateLeft: "clamp",
233
+ easing: isExiting ? easings.exit.rotation : easings.enter.rotation
234
+ });
235
+
236
+ // Calculate X position with easing (including exit)
237
+ var xPosition = useTimeInterpolate(canAnimateExit && typeof durationInSeconds === "number" ? [0, enterAnimationDuration, exitStartTime, durationInSeconds] : [0, enterAnimationDuration], canAnimateExit && typeof durationInSeconds === "number" ? [xStartPos, xEndPos, xEndPos, xStartPos] : [xStartPos, xEndPos], {
238
+ extrapolateRight: "clamp",
239
+ extrapolateLeft: "clamp",
240
+ easing: isExiting ? easings.exit.position : easings.enter.position
241
+ });
242
+
243
+ // Calculate Y position with easing (including exit) - now animated for portrait/square
244
+ var yPosition = useTimeInterpolate(canAnimateExit && typeof durationInSeconds === "number" ? [0, enterAnimationDuration, exitStartTime, durationInSeconds] : [0, enterAnimationDuration], canAnimateExit && typeof durationInSeconds === "number" ? [yStartPos, yEndPos, yEndPos, yStartPos] : [yStartPos, yEndPos], {
245
+ extrapolateRight: "clamp",
246
+ extrapolateLeft: "clamp",
247
+ easing: isExiting ? easings.exit.position : easings.enter.position
248
+ });
249
+
250
+ // Calculate position with easing for video component only (including exit)
251
+ var xPositionVideo = useTimeInterpolate(canAnimateVideoExit && typeof videoExitStartTime === "number" && typeof videoExitEndTime === "number" ? [0.8, enterAnimationDuration, videoExitStartTime, videoExitEndTime] : [0.8, enterAnimationDuration], canAnimateVideoExit && typeof videoExitStartTime === "number" && typeof videoExitEndTime === "number" ? [videoOffsetStart, videoOffsetEnd, videoOffsetEnd, videoOffsetExit] : [videoOffsetStart, videoOffsetEnd], {
252
+ extrapolateRight: "clamp",
253
+ extrapolateLeft: "clamp",
254
+ easing: isExitingVideo ? easings.exit.video : easings.enter.video
255
+ });
256
+
257
+ // Calculate position with easing for video component only (including exit)
258
+ var yPositionVideo = useTimeInterpolate(canAnimateVideoExit && typeof videoExitStartTime === "number" && typeof videoExitEndTime === "number" ? [0.8, enterAnimationDuration, videoExitStartTime, videoExitEndTime] : [0.8, enterAnimationDuration], canAnimateVideoExit && typeof videoExitStartTime === "number" && typeof videoExitEndTime === "number" ? [videoOffsetYStart, videoOffsetYEnd, videoOffsetYEnd, videoOffsetYExit] : [videoOffsetYStart, videoOffsetYEnd], {
259
+ extrapolateRight: "clamp",
260
+ extrapolateLeft: "clamp",
261
+ easing: isExitingVideo ? easings.exit.video : easings.enter.video
262
+ });
263
+
264
+ // Mask scale interpolation for animated reveal/hide effect (including exit)
265
+ var maskScale = useTimeInterpolate(canAnimateExit && typeof durationInSeconds === "number" ? [0, maskAnimationDuration, exitStartTime, durationInSeconds] : [0, maskAnimationDuration], canAnimateExit && typeof durationInSeconds === "number" ? [maskStartScale, maskEndScale, maskEndScale, maskStartScale] : [maskStartScale, maskEndScale], {
266
+ extrapolateRight: "clamp",
267
+ extrapolateLeft: "clamp",
268
+ easing: isExiting ? easings.exit.mask : easings.enter.mask
269
+ });
270
+
271
+ // Calculate the triangle path points with animated scale
272
+ // For very large scales, cap the actual size to prevent calculation issues
273
+ // but still allow the visual effect by ensuring the triangle covers the viewport
274
+ var effectiveScale = Math.min(maskScale, 10); // Cap at 10x for calculations
275
+ var scaledTriangleSize = triangleSize * effectiveScale;
276
+ var triangleHalfSize = scaledTriangleSize / 2;
277
+ var triangleHeight = scaledTriangleSize * Math.sqrt(3) / 2;
278
+
279
+ // If scale is very large, we want the triangle to cover the entire viewport
280
+ var isFullCoverage = maskScale > 5;
281
+
282
+ // Calculate super rounded corner positions for a smooth rounded triangle
283
+ // Use a much larger default radius for very rounded corners like in the example
284
+ // For very large scales, maintain proportional radius
285
+ var radius = Math.min(borderRadius || 80, scaledTriangleSize * 0.35) * effectiveScale; // Scale radius with effective scale
286
+
287
+ // Triangle vertices
288
+ var topX = width / 2;
289
+ var topY = height / 2 - triangleHeight / 2;
290
+ var leftX = width / 2 - triangleHalfSize;
291
+ var leftY = height / 2 + triangleHeight / 2;
292
+ var rightX = width / 2 + triangleHalfSize;
293
+ var rightY = height / 2 + triangleHeight / 2;
294
+
295
+ // For super rounded corners, we'll create arcs between shortened edges
296
+ // Calculate how much to shorten each edge based on the radius
297
+ var insetRatio = radius / (scaledTriangleSize * 0.5);
298
+
299
+ // Calculate points along each edge, inset by the radius
300
+ // These will be where our straight edges end and curves begin
301
+
302
+ // Top vertex to right vertex edge
303
+ var topRightStartX = topX + (rightX - topX) * insetRatio;
304
+ var topRightStartY = topY + (rightY - topY) * insetRatio;
305
+ var topRightEndX = rightX - (rightX - topX) * insetRatio;
306
+ var topRightEndY = rightY - (rightY - topY) * insetRatio;
307
+
308
+ // Right vertex to left vertex edge
309
+ var rightLeftStartX = rightX + (leftX - rightX) * insetRatio;
310
+ var rightLeftStartY = rightY + (leftY - rightY) * insetRatio;
311
+ var rightLeftEndX = leftX - (leftX - rightX) * insetRatio;
312
+ var rightLeftEndY = leftY - (leftY - rightY) * insetRatio;
313
+
314
+ // Left vertex to top vertex edge
315
+ var leftTopStartX = leftX + (topX - leftX) * insetRatio;
316
+ var leftTopStartY = leftY + (topY - leftY) * insetRatio;
317
+ var leftTopEndX = topX - (topX - leftX) * insetRatio;
318
+ var leftTopEndY = topY - (topY - leftY) * insetRatio;
319
+
320
+ // Create SVG path using quadratic bezier curves with vertices as control points
321
+ // This creates smooth, circular-like corners
322
+ // For very large scales, create a path that covers the entire viewport
323
+ var trianglePath = isFullCoverage && maskScale > 10 ? "M 0,0 L ".concat(width, ",0 L ").concat(width, ",").concat(height, " L 0,").concat(height, " Z") // Full rectangle for extreme scales
324
+ : "\n M ".concat(leftTopEndX, ", ").concat(leftTopEndY, "\n Q ").concat(topX, ", ").concat(topY, " ").concat(topRightStartX, ", ").concat(topRightStartY, "\n L ").concat(topRightEndX, ", ").concat(topRightEndY, "\n Q ").concat(rightX, ", ").concat(rightY, " ").concat(rightLeftStartX, ", ").concat(rightLeftStartY, "\n L ").concat(rightLeftEndX, ", ").concat(rightLeftEndY, "\n Q ").concat(leftX, ", ").concat(leftY, " ").concat(leftTopStartX, ", ").concat(leftTopStartY, "\n Z\n ");
325
+
326
+ // Create multiple stacked triangles for the layered border effect
327
+ // We'll create 3 layers with different sizes and opacities
328
+ var stackedTriangles = [];
329
+ var numberOfLayers = 3;
330
+ for (var i = 0; i < numberOfLayers; i++) {
331
+ // Each layer gets progressively larger and scales with mask
332
+ var layerScale = 1 + triangleBorderWidth * (i + 1) / triangleSize;
333
+ var layerTriangleSize = triangleSize * layerScale * effectiveScale; // Apply effective scale
334
+ var layerTriangleHalfSize = layerTriangleSize / 2;
335
+ var layerTriangleHeight = layerTriangleSize * Math.sqrt(3) / 2;
336
+
337
+ // Layer triangle vertices
338
+ var layerTopX = width / 2;
339
+ var layerTopY = height / 2 - layerTriangleHeight / 2;
340
+ var layerLeftX = width / 2 - layerTriangleHalfSize;
341
+ var layerLeftY = height / 2 + layerTriangleHeight / 2;
342
+ var layerRightX = width / 2 + layerTriangleHalfSize;
343
+ var layerRightY = height / 2 + layerTriangleHeight / 2;
344
+
345
+ // Calculate rounded corners for this layer
346
+ var layerRadius = radius * layerScale; // Radius already includes effective scale
347
+ var layerInsetRatio = layerRadius / (layerTriangleSize * 0.5);
348
+
349
+ // Layer triangle path points
350
+ var layerTopRightStartX = layerTopX + (layerRightX - layerTopX) * layerInsetRatio;
351
+ var layerTopRightStartY = layerTopY + (layerRightY - layerTopY) * layerInsetRatio;
352
+ var layerTopRightEndX = layerRightX - (layerRightX - layerTopX) * layerInsetRatio;
353
+ var layerTopRightEndY = layerRightY - (layerRightY - layerTopY) * layerInsetRatio;
354
+ var layerRightLeftStartX = layerRightX + (layerLeftX - layerRightX) * layerInsetRatio;
355
+ var layerRightLeftStartY = layerRightY + (layerLeftY - layerRightY) * layerInsetRatio;
356
+ var layerRightLeftEndX = layerLeftX - (layerLeftX - layerRightX) * layerInsetRatio;
357
+ var layerRightLeftEndY = layerLeftY - (layerLeftY - layerRightY) * layerInsetRatio;
358
+ var layerLeftTopStartX = layerLeftX + (layerTopX - layerLeftX) * layerInsetRatio;
359
+ var layerLeftTopStartY = layerLeftY + (layerTopY - layerLeftY) * layerInsetRatio;
360
+ var layerLeftTopEndX = layerTopX - (layerTopX - layerLeftX) * layerInsetRatio;
361
+ var layerLeftTopEndY = layerTopY - (layerTopY - layerLeftY) * layerInsetRatio;
362
+
363
+ // Create the layer triangle path
364
+ var layerPath = "\n M ".concat(layerLeftTopEndX, ", ").concat(layerLeftTopEndY, "\n Q ").concat(layerTopX, ", ").concat(layerTopY, " ").concat(layerTopRightStartX, ", ").concat(layerTopRightStartY, "\n L ").concat(layerTopRightEndX, ", ").concat(layerTopRightEndY, "\n Q ").concat(layerRightX, ", ").concat(layerRightY, " ").concat(layerRightLeftStartX, ", ").concat(layerRightLeftStartY, "\n L ").concat(layerRightLeftEndX, ", ").concat(layerRightLeftEndY, "\n Q ").concat(layerLeftX, ", ").concat(layerLeftY, " ").concat(layerLeftTopStartX, ", ").concat(layerLeftTopStartY, "\n Z\n ");
365
+
366
+ // Calculate opacity - outer layers are more transparent
367
+ var opacity = 0.6 - i * 0.2; // Results in 0.6, 0.4, 0.2 for 3 layers
368
+
369
+ stackedTriangles.push({
370
+ path: layerPath,
371
+ opacity: opacity,
372
+ index: i
373
+ });
374
+ }
375
+ var _distributeTextToFit = distributeTextToFit(sentenceText, textContainerWidth, textContainerHeight, 120),
376
+ lines = _distributeTextToFit.lines,
377
+ fontSize = _distributeTextToFit.fontSize;
378
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
379
+ src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
380
+ volume: 0.25
381
+ }), /*#__PURE__*/React.createElement(AbsoluteFill, {
382
+ style: {
383
+ zIndex: -1
384
+ }
385
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
386
+ style: {
387
+ width: width,
388
+ height: height,
389
+ objectFit: "cover",
390
+ position: "relative"
391
+ },
392
+ src: "https://storage.googleapis.com/ai-recorder-media-assets/media/production/dynamic_triangle_background.mp4"
393
+ })), /*#__PURE__*/React.createElement(AbsoluteFill, {
394
+ style: {
395
+ isolation: "isolate"
396
+ }
397
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, null, function () {
398
+ // Exit animation starts 1.5 seconds (45 frames at 30fps) before the end
399
+ var textExitStartFrame = hasFiniteDuration ? durationInFrames - 80 : null;
400
+ var textExitEndFrame = hasFiniteDuration ? durationInFrames - 60 : null;
401
+ var canAnimateTextExit = typeof textExitStartFrame === "number" && typeof textExitEndFrame === "number" && textExitStartFrame >= 0 && textExitEndFrame > textExitStartFrame;
402
+
403
+ // Calculate exit animation values
404
+ var exitOpacity = canAnimateTextExit ? interpolate(frame, [0, textExitStartFrame, textExitEndFrame], [1, 1, 0], {
405
+ extrapolateLeft: "clamp",
406
+ extrapolateRight: "clamp",
407
+ easing: Easing["in"](Easing.cubic)
408
+ }) : 1;
409
+ var exitTranslateY = canAnimateTextExit ? interpolate(frame, [0, textExitStartFrame, textExitEndFrame], [0, 0, -fontSize], {
410
+ extrapolateLeft: "clamp",
411
+ extrapolateRight: "clamp",
412
+ easing: Easing["in"](Easing.cubic)
413
+ }) : 0;
414
+ return /*#__PURE__*/React.createElement("div", {
415
+ style: {
416
+ paddingLeft: "100px",
417
+ paddingTop: "100px",
418
+ opacity: exitOpacity,
419
+ transform: "translateY(".concat(exitTranslateY, "px)"),
420
+ zIndex: 1
421
+ }
422
+ }, lines.map(function (line, lineIndex) {
423
+ // Split the line into words for individual animation
424
+ var words = line.split(" ");
425
+
426
+ // Calculate total words before this line for delay calculation
427
+ var wordsBeforeThisLine = 0;
428
+ for (var _i = 0; _i < lineIndex; _i++) {
429
+ wordsBeforeThisLine += lines[_i].split(" ").length;
430
+ }
431
+ return /*#__PURE__*/React.createElement("p", {
432
+ key: lineIndex,
433
+ style: {
434
+ fontFamily: fontFamily,
435
+ fontStyle: "italic",
436
+ fontSize: fontSize,
437
+ fontWeight: 600,
438
+ margin: 0,
439
+ color: "#ffffff",
440
+ lineHeight: "1",
441
+ display: "flex",
442
+ flexWrap: "wrap",
443
+ gap: "0.3em",
444
+ zIndex: 1,
445
+ position: "relative"
446
+ }
447
+ }, words.map(function (word, wordIndex) {
448
+ // Animation starts at frame 45 (1.5 seconds at 30fps)
449
+ var animationStartFrame = 45;
450
+ // Delay between words (3 frames = 0.1 seconds at 30fps)
451
+ var wordDelay = 3;
452
+ // Duration of each word animation (15 frames = 0.5 seconds at 30fps)
453
+ var animationDuration = 15;
454
+
455
+ // Calculate this word's global index
456
+ var globalWordIndex = wordsBeforeThisLine + wordIndex;
457
+
458
+ // Calculate when this specific word starts animating
459
+ var wordStartFrame = animationStartFrame + globalWordIndex * wordDelay;
460
+ var wordEndFrame = wordStartFrame + animationDuration;
461
+ var canAnimateWord = !hasFiniteDuration || durationInFrames > wordEndFrame;
462
+
463
+ // Calculate interpolation values
464
+ var opacity = canAnimateWord ? interpolate(frame, [wordStartFrame, wordEndFrame], [0, 1], {
465
+ extrapolateLeft: "clamp",
466
+ extrapolateRight: "clamp",
467
+ easing: Easing.out(Easing.cubic)
468
+ }) : 1;
469
+ var translateY = canAnimateWord ? interpolate(frame, [wordStartFrame, wordEndFrame], [50, 0], {
470
+ extrapolateLeft: "clamp",
471
+ extrapolateRight: "clamp",
472
+ easing: Easing.out(Easing.cubic)
473
+ }) : 0;
474
+ return /*#__PURE__*/React.createElement("span", {
475
+ key: wordIndex,
476
+ style: {
477
+ opacity: opacity,
478
+ transform: "translateY(".concat(translateY, "%)"),
479
+ display: "inline-block"
480
+ }
481
+ }, word);
482
+ }));
483
+ }));
484
+ }()), /*#__PURE__*/React.createElement("div", {
485
+ style: {
486
+ width: "100%",
487
+ height: "100%",
488
+ clipPath: "url(#triangleClip)",
489
+ display: "flex",
490
+ justifyContent: "end",
491
+ alignItems: "end"
492
+ }
493
+ }, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
494
+ startFrom: startVideoFrom,
495
+ src: videoUrl,
496
+ muted: muted,
497
+ containerWidth: (100 - xPositionVideo) / 100 * width,
498
+ containerHeight: (100 - yPositionVideo) / 100 * height,
499
+ style: {
500
+ width: "100%",
501
+ height: "100%",
502
+ objectFit: "cover",
503
+ transformOrigin: "center center",
504
+ filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
505
+ }
506
+ }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
507
+ startFrom: startVideoFrom,
508
+ src: videoUrl,
509
+ muted: muted,
510
+ style: {
511
+ width: "".concat(100 - xPositionVideo, "%"),
512
+ height: "".concat(100 - yPositionVideo, "%"),
513
+ objectFit: "cover",
514
+ transformOrigin: "center center",
515
+ filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
516
+ }
517
+ })), /*#__PURE__*/React.createElement("svg", {
518
+ width: width,
519
+ height: height,
520
+ style: {
521
+ position: "absolute",
522
+ top: 0,
523
+ left: 0,
524
+ pointerEvents: "none",
525
+ zIndex: 1
526
+ }
527
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
528
+ id: "triangleClip"
529
+ }, /*#__PURE__*/React.createElement("path", {
530
+ d: trianglePath,
531
+ transform: "\n translate(".concat(xPosition, ", ").concat(yPosition, ")\n rotate(-").concat(rotation, " )\n translate(-").concat(width / 2, ", -").concat(height / 2, ")\n ")
532
+ })), stackedTriangles.map(function (layer, index) {
533
+ // For each layer, create a mask that shows this layer but cuts out the previous (smaller) layer
534
+ var prevPath = index === 0 ? trianglePath : stackedTriangles[index - 1].path;
535
+ return /*#__PURE__*/React.createElement("mask", {
536
+ key: "mask-".concat(index),
537
+ id: "layerMask-".concat(index)
538
+ }, /*#__PURE__*/React.createElement("rect", {
539
+ width: width,
540
+ height: height,
541
+ fill: "black"
542
+ }), /*#__PURE__*/React.createElement("path", {
543
+ d: layer.path,
544
+ fill: "white",
545
+ transform: "\n translate(".concat(xPosition, ", ").concat(yPosition, ")\n rotate(-").concat(rotation, ")\n translate(-").concat(width / 2, ", -").concat(height / 2, ")\n ")
546
+ }), /*#__PURE__*/React.createElement("path", {
547
+ d: prevPath,
548
+ fill: "black",
549
+ transform: "\n translate(".concat(xPosition, ", ").concat(yPosition, ")\n rotate(-").concat(rotation, ")\n translate(-").concat(width / 2, ", -").concat(height / 2, ")\n ")
550
+ }));
551
+ })), stackedTriangles.map(function (layer, index) {
552
+ return /*#__PURE__*/React.createElement("rect", {
553
+ key: "layer-".concat(index),
554
+ width: width,
555
+ height: height,
556
+ fill: accentColor,
557
+ fillOpacity: layer.opacity,
558
+ mask: "url(#layerMask-".concat(index, ")")
559
+ });
560
+ })), noBackgroundVideoUrl && (showVirtual || (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.facePop) || (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundDim) || (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur)) && /*#__PURE__*/React.createElement("div", {
561
+ style: {
562
+ position: "absolute",
563
+ inset: 0,
564
+ clipPath: "url(#triangleClip)",
565
+ overflow: "hidden",
566
+ pointerEvents: "none",
567
+ display: "flex",
568
+ justifyContent: "end",
569
+ alignItems: "end",
570
+ objectFit: "cover",
571
+ transformOrigin: "center center"
572
+ }
573
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, null, /*#__PURE__*/React.createElement(BlurOverlay, {
574
+ show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl,
575
+ width: width,
576
+ height: height,
577
+ zIndex: 0
578
+ })), showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
579
+ url: virtualBgUrl,
580
+ left: "".concat(xPositionVideo, "%"),
581
+ top: "".concat(yPositionVideo, "%"),
582
+ width: "".concat(100 - xPositionVideo, "%"),
583
+ height: "".concat(100 - yPositionVideo, "%"),
584
+ zIndex: 0,
585
+ zoom: 1.02
586
+ }) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
587
+ startFrom: startVideoFrom,
588
+ src: noBackgroundVideoUrl,
589
+ muted: true,
590
+ transparent: true,
591
+ containerWidth: (100 - xPositionVideo) / 100 * width,
592
+ containerHeight: (100 - yPositionVideo) / 100 * height,
593
+ style: {
594
+ zIndex: 5,
595
+ width: "100%",
596
+ height: "100%",
597
+ objectFit: "cover",
598
+ transformOrigin: "center center",
599
+ filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
600
+ }
601
+ }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
602
+ startFrom: startVideoFrom,
603
+ src: noBackgroundVideoUrl,
604
+ muted: true,
605
+ transparent: true,
606
+ style: {
607
+ zIndex: 5,
608
+ width: "".concat(100 - xPositionVideo, "%"),
609
+ height: "".concat(100 - yPositionVideo, "%"),
610
+ objectFit: "cover",
611
+ filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
612
+ }
613
+ })), /*#__PURE__*/React.createElement(AbsoluteFill, {
614
+ style: {
615
+ zIndex: 14
616
+ }
617
+ }, children)));
618
+ };