@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,714 @@
1
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
+ import React from "react";
8
+ import { AbsoluteFill, Audio, Easing, Img, OffthreadVideo, useVideoConfig } from "remotion";
9
+ import { useOrientationBased } from "../../hooks/useOrientationBased.js";
10
+ import { useTimeInterpolate } from "../../hooks/useTimeInterpolate.js";
11
+ import { CHROME_PADDING } from "../../config.js";
12
+ import { useTheme } from "../../theme/hooks/useTheme.js";
13
+ import FaceCenteredVideo from "../utils/FaceCenteredVideo";
14
+ import PausableImg from "../utils/PausableImg";
15
+ import { BlurOverlay } from "../utils/BlurOverlay";
16
+ import { useVirtualBackground } from "../../hooks/useVirtualBackground";
17
+ import { VirtualBackgroundUnderlay } from "../backgrounds/VirtualBackgroundUnderlay";
18
+ var Square = function Square(_ref) {
19
+ var children = _ref.children,
20
+ brollUrl = _ref.brollUrl,
21
+ brollVideoWidthTransition = _ref.brollVideoWidthTransition,
22
+ brollVideoHeightTransition = _ref.brollVideoHeightTransition,
23
+ brollVideoTopTransition = _ref.brollVideoTopTransition,
24
+ brollVideoLeftTransition = _ref.brollVideoLeftTransition,
25
+ mainVideoWidthTransition = _ref.mainVideoWidthTransition,
26
+ mainVideoHeightTransition = _ref.mainVideoHeightTransition,
27
+ mainVideoTopTransition = _ref.mainVideoTopTransition,
28
+ mainVideoLeftTransition = _ref.mainVideoLeftTransition,
29
+ logoUrl = _ref.logoUrl,
30
+ logoLeft = _ref.logoLeft,
31
+ logoTop = _ref.logoTop,
32
+ frameColor = _ref.frameColor,
33
+ startVideoFrom = _ref.startVideoFrom,
34
+ videoUrl = _ref.videoUrl,
35
+ sourceVideoOrientation = _ref.sourceVideoOrientation,
36
+ muted = _ref.muted,
37
+ faceMetadata = _ref.faceMetadata,
38
+ orientation = _ref.orientation,
39
+ noBackgroundVideoUrl = _ref.noBackgroundVideoUrl,
40
+ noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
41
+ showVirtual = _ref.showVirtual,
42
+ virtualBgUrl = _ref.virtualBgUrl;
43
+ var _useVideoConfig = useVideoConfig(),
44
+ width = _useVideoConfig.width,
45
+ height = _useVideoConfig.height;
46
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
47
+ style: {
48
+ backgroundColor: frameColor || "transparent",
49
+ padding: 0,
50
+ isolation: "isolate"
51
+ }
52
+ }, brollUrl && /*#__PURE__*/React.createElement("div", {
53
+ style: {
54
+ position: "absolute",
55
+ overflow: "hidden",
56
+ borderRadius: "20px 20px 0px 0px",
57
+ width: brollVideoWidthTransition,
58
+ height: brollVideoHeightTransition,
59
+ top: brollVideoTopTransition,
60
+ left: brollVideoLeftTransition,
61
+ zIndex: 2
62
+ }
63
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
64
+ src: brollUrl,
65
+ style: {
66
+ height: "100%",
67
+ objectFit: "cover",
68
+ width: "100%"
69
+ },
70
+ muted: true
71
+ })), /*#__PURE__*/React.createElement("div", {
72
+ style: {
73
+ position: "absolute",
74
+ overflow: "hidden",
75
+ borderRadius: "0px 0px 20px 20px",
76
+ width: mainVideoWidthTransition,
77
+ height: mainVideoHeightTransition,
78
+ top: mainVideoTopTransition,
79
+ left: mainVideoLeftTransition,
80
+ zIndex: 1
81
+ }
82
+ }, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
83
+ url: virtualBgUrl,
84
+ top: 0,
85
+ left: 0,
86
+ width: "100%",
87
+ height: "100%",
88
+ borderRadius: "0px 0px 20px 20px",
89
+ zIndex: 1
90
+ }) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
91
+ startFrom: startVideoFrom,
92
+ src: videoUrl,
93
+ transparent: false,
94
+ faceMetadata: faceMetadata,
95
+ containerWidth: mainVideoWidthTransition,
96
+ containerHeight: mainVideoHeightTransition,
97
+ centerHorizontally: false,
98
+ translateY: 100
99
+ }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
100
+ startFrom: startVideoFrom,
101
+ src: videoUrl,
102
+ muted: muted,
103
+ style: {
104
+ height: "100%",
105
+ objectFit: "cover",
106
+ width: "100%",
107
+ objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined,
108
+ filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
109
+ }
110
+ })), /*#__PURE__*/React.createElement(BlurOverlay, {
111
+ show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl,
112
+ width: width,
113
+ height: height,
114
+ zIndex: 1
115
+ }), 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, {
116
+ style: {
117
+ position: "absolute",
118
+ overflow: "hidden",
119
+ borderRadius: "0px 0px 20px 20px",
120
+ width: mainVideoWidthTransition,
121
+ height: mainVideoHeightTransition,
122
+ top: mainVideoTopTransition,
123
+ left: mainVideoLeftTransition,
124
+ zIndex: 9,
125
+ willChange: "transform"
126
+ }
127
+ }, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
128
+ src: noBackgroundVideoUrl,
129
+ startFrom: startVideoFrom,
130
+ containerWidth: mainVideoWidthTransition,
131
+ containerHeight: mainVideoHeightTransition,
132
+ faceMetadata: faceMetadata,
133
+ useAveragePosition: true,
134
+ centerHorizontally: false,
135
+ noBackgroundVideoEffects: noBackgroundVideoEffects,
136
+ transparent: true,
137
+ muted: true,
138
+ translateY: 100
139
+ })) : 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, {
140
+ style: {
141
+ position: "absolute",
142
+ overflow: "hidden",
143
+ borderRadius: "0px 0px 20px 20px",
144
+ width: mainVideoWidthTransition,
145
+ height: mainVideoHeightTransition,
146
+ top: mainVideoTopTransition,
147
+ left: mainVideoLeftTransition,
148
+ zIndex: 9
149
+ }
150
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
151
+ startFrom: startVideoFrom,
152
+ src: noBackgroundVideoUrl,
153
+ muted: true,
154
+ transparent: true,
155
+ style: {
156
+ height: "100%",
157
+ objectFit: "cover",
158
+ width: "100%",
159
+ objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined,
160
+ filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
161
+ }
162
+ })) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
163
+ style: {
164
+ zIndex: 13
165
+ }
166
+ }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
167
+ style: {
168
+ position: "fixed",
169
+ left: logoLeft,
170
+ top: logoTop,
171
+ padding: 20,
172
+ zIndex: 10
173
+ }
174
+ }, /*#__PURE__*/React.createElement(PausableImg, {
175
+ delayRenderTimeoutInMilliseconds: 61000,
176
+ style: {
177
+ width: "225px",
178
+ maxHeight: "auto",
179
+ objectFit: "contain"
180
+ },
181
+ src: logoUrl
182
+ })) : null);
183
+ };
184
+ var Portrait = function Portrait(_ref2) {
185
+ var children = _ref2.children,
186
+ brollUrl = _ref2.brollUrl,
187
+ brollVideoWidthTransition = _ref2.brollVideoWidthTransition,
188
+ brollVideoHeightTransition = _ref2.brollVideoHeightTransition,
189
+ brollVideoTopTransition = _ref2.brollVideoTopTransition,
190
+ brollVideoLeftTransition = _ref2.brollVideoLeftTransition,
191
+ mainVideoWidthTransition = _ref2.mainVideoWidthTransition,
192
+ mainVideoHeightTransition = _ref2.mainVideoHeightTransition,
193
+ mainVideoTopTransition = _ref2.mainVideoTopTransition,
194
+ mainVideoLeftTransition = _ref2.mainVideoLeftTransition,
195
+ logoUrl = _ref2.logoUrl,
196
+ logoLeft = _ref2.logoLeft,
197
+ logoTop = _ref2.logoTop,
198
+ frameColor = _ref2.frameColor,
199
+ startVideoFrom = _ref2.startVideoFrom,
200
+ videoUrl = _ref2.videoUrl,
201
+ sourceVideoOrientation = _ref2.sourceVideoOrientation,
202
+ muted = _ref2.muted,
203
+ orientation = _ref2.orientation,
204
+ faceMetadata = _ref2.faceMetadata,
205
+ noBackgroundVideoUrl = _ref2.noBackgroundVideoUrl,
206
+ noBackgroundVideoEffects = _ref2.noBackgroundVideoEffects,
207
+ showVirtual = _ref2.showVirtual,
208
+ virtualBgUrl = _ref2.virtualBgUrl;
209
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
210
+ style: {
211
+ backgroundColor: frameColor || "transparent",
212
+ padding: 0,
213
+ isolation: "isolate"
214
+ }
215
+ }, brollUrl && /*#__PURE__*/React.createElement("div", {
216
+ style: {
217
+ position: "absolute",
218
+ overflow: "hidden",
219
+ borderRadius: "20px 20px 0px 0px",
220
+ width: brollVideoWidthTransition,
221
+ height: brollVideoHeightTransition,
222
+ top: brollVideoTopTransition,
223
+ left: brollVideoLeftTransition,
224
+ zIndex: 2,
225
+ // Add gradient mask for fade to transparent effect in portrait
226
+ mask: "linear-gradient(to bottom, black 0%, black 60%, transparent 100%)",
227
+ WebkitMask: "linear-gradient(to bottom, black 0%, black 60%, transparent 100%)"
228
+ }
229
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
230
+ src: brollUrl,
231
+ style: {
232
+ height: "100%",
233
+ objectFit: "cover",
234
+ width: "100%"
235
+ },
236
+ muted: true
237
+ })), /*#__PURE__*/React.createElement("div", {
238
+ style: {
239
+ position: "absolute",
240
+ overflow: "hidden",
241
+ borderRadius: "0px 0px 20px 20px",
242
+ width: mainVideoWidthTransition,
243
+ height: mainVideoHeightTransition,
244
+ top: mainVideoTopTransition,
245
+ left: mainVideoLeftTransition,
246
+ zIndex: 1
247
+ }
248
+ }, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
249
+ url: virtualBgUrl,
250
+ top: 0,
251
+ left: 0,
252
+ width: "100%",
253
+ height: "100%",
254
+ borderRadius: "0px 0px 20px 20px",
255
+ zIndex: 1
256
+ }) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
257
+ startFrom: startVideoFrom,
258
+ src: videoUrl,
259
+ transparent: false,
260
+ muted: muted,
261
+ faceMetadata: faceMetadata,
262
+ containerWidth: mainVideoWidthTransition,
263
+ centerHorizontally: false,
264
+ containerHeight: mainVideoHeightTransition,
265
+ containerStyle: {
266
+ filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
267
+ }
268
+ }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
269
+ startFrom: startVideoFrom,
270
+ src: videoUrl,
271
+ muted: muted,
272
+ style: {
273
+ height: "100%",
274
+ objectFit: "cover",
275
+ width: "100%",
276
+ objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined,
277
+ filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
278
+ }
279
+ })), 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, {
280
+ style: {
281
+ padding: frameColor ? CHROME_PADDING : 0,
282
+ isolation: "isolate",
283
+ width: mainVideoWidthTransition,
284
+ height: mainVideoHeightTransition,
285
+ zIndex: 9
286
+ }
287
+ }, /*#__PURE__*/React.createElement("div", {
288
+ style: {
289
+ position: "absolute",
290
+ overflow: "hidden",
291
+ borderRadius: "0px 0px 20px 20px",
292
+ width: mainVideoWidthTransition,
293
+ height: mainVideoHeightTransition,
294
+ top: mainVideoTopTransition,
295
+ left: mainVideoLeftTransition
296
+ }
297
+ }, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
298
+ src: noBackgroundVideoUrl,
299
+ startFrom: startVideoFrom,
300
+ containerWidth: mainVideoWidthTransition,
301
+ containerHeight: mainVideoHeightTransition,
302
+ faceMetadata: faceMetadata,
303
+ centerHorizontally: false,
304
+ noBackgroundVideoEffects: noBackgroundVideoEffects,
305
+ transparent: true,
306
+ muted: true
307
+ }))) : 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, {
308
+ style: {
309
+ backgroundColor: "transparent",
310
+ padding: frameColor ? CHROME_PADDING : 0,
311
+ isolation: "isolate",
312
+ width: mainVideoWidthTransition,
313
+ height: mainVideoHeightTransition,
314
+ zIndex: 9
315
+ }
316
+ }, /*#__PURE__*/React.createElement("div", {
317
+ style: {
318
+ position: "absolute",
319
+ overflow: "hidden",
320
+ borderRadius: "0px 0px 20px 20px",
321
+ width: mainVideoWidthTransition,
322
+ height: mainVideoHeightTransition,
323
+ top: mainVideoTopTransition,
324
+ left: mainVideoLeftTransition
325
+ }
326
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
327
+ startFrom: startVideoFrom,
328
+ src: noBackgroundVideoUrl,
329
+ muted: true,
330
+ transparent: true,
331
+ style: {
332
+ height: "100%",
333
+ objectFit: "cover",
334
+ width: "100%",
335
+ filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined,
336
+ objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined
337
+ }
338
+ }))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
339
+ style: {
340
+ zIndex: 10
341
+ }
342
+ }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
343
+ style: {
344
+ position: "fixed",
345
+ left: logoLeft,
346
+ top: logoTop,
347
+ padding: 20,
348
+ zIndex: 10
349
+ }
350
+ }, /*#__PURE__*/React.createElement(PausableImg, {
351
+ delayRenderTimeoutInMilliseconds: 61000,
352
+ style: {
353
+ width: "225px",
354
+ maxHeight: "auto",
355
+ objectFit: "contain"
356
+ },
357
+ src: logoUrl
358
+ })) : null);
359
+ };
360
+ var Landscape = function Landscape(_ref3) {
361
+ var children = _ref3.children,
362
+ brollUrl = _ref3.brollUrl,
363
+ brollVideoWidthTransition = _ref3.brollVideoWidthTransition,
364
+ brollVideoHeightTransition = _ref3.brollVideoHeightTransition,
365
+ brollVideoTopTransition = _ref3.brollVideoTopTransition,
366
+ brollVideoLeftTransition = _ref3.brollVideoLeftTransition,
367
+ mainVideoWidthTransition = _ref3.mainVideoWidthTransition,
368
+ mainVideoHeightTransition = _ref3.mainVideoHeightTransition,
369
+ mainVideoTopTransition = _ref3.mainVideoTopTransition,
370
+ mainVideoLeftTransition = _ref3.mainVideoLeftTransition,
371
+ logoUrl = _ref3.logoUrl,
372
+ logoLeft = _ref3.logoLeft,
373
+ logoTop = _ref3.logoTop,
374
+ frameColor = _ref3.frameColor,
375
+ startVideoFrom = _ref3.startVideoFrom,
376
+ videoUrl = _ref3.videoUrl,
377
+ sourceVideoOrientation = _ref3.sourceVideoOrientation,
378
+ muted = _ref3.muted,
379
+ faceMetadata = _ref3.faceMetadata,
380
+ noBackgroundVideoEffects = _ref3.noBackgroundVideoEffects,
381
+ noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl,
382
+ showVirtual = _ref3.showVirtual,
383
+ virtualBgUrl = _ref3.virtualBgUrl;
384
+ var _useTheme = useTheme(),
385
+ accentColor = _useTheme.accentColor;
386
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
387
+ style: {
388
+ backgroundColor: frameColor || "transparent",
389
+ padding: 0,
390
+ isolation: "isolate"
391
+ }
392
+ }, brollUrl && /*#__PURE__*/React.createElement("div", {
393
+ style: {
394
+ position: "absolute",
395
+ overflow: "hidden",
396
+ borderRadius: "0px",
397
+ width: brollVideoWidthTransition,
398
+ height: brollVideoHeightTransition,
399
+ top: brollVideoTopTransition,
400
+ left: brollVideoLeftTransition,
401
+ zIndex: 1
402
+ }
403
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
404
+ src: brollUrl,
405
+ style: {
406
+ height: "100%",
407
+ objectFit: "cover",
408
+ width: "100%"
409
+ },
410
+ muted: true
411
+ })), /*#__PURE__*/React.createElement("div", {
412
+ style: {
413
+ position: "absolute",
414
+ overflow: "hidden",
415
+ borderRadius: "20px",
416
+ border: "12px solid ".concat(accentColor),
417
+ width: mainVideoWidthTransition,
418
+ height: mainVideoHeightTransition,
419
+ top: mainVideoTopTransition,
420
+ left: mainVideoLeftTransition,
421
+ zIndex: 2
422
+ }
423
+ }, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
424
+ url: virtualBgUrl,
425
+ top: 0,
426
+ left: 0,
427
+ width: "100%",
428
+ height: "100%",
429
+ borderRadius: "20px",
430
+ zIndex: 1
431
+ }) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
432
+ startFrom: startVideoFrom,
433
+ src: videoUrl,
434
+ transparent: false,
435
+ muted: muted,
436
+ faceMetadata: faceMetadata,
437
+ containerWidth: mainVideoWidthTransition,
438
+ centerHorizontally: false,
439
+ containerHeight: mainVideoHeightTransition,
440
+ containerStyle: {
441
+ filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
442
+ }
443
+ }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
444
+ startFrom: startVideoFrom,
445
+ src: videoUrl,
446
+ muted: muted,
447
+ style: {
448
+ height: "100%",
449
+ objectFit: "cover",
450
+ width: "100%",
451
+ objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined,
452
+ filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
453
+ }
454
+ })), (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl && faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
455
+ style: {
456
+ padding: frameColor ? CHROME_PADDING : 0,
457
+ isolation: "isolate",
458
+ width: mainVideoWidthTransition,
459
+ height: mainVideoHeightTransition,
460
+ zIndex: 9
461
+ }
462
+ }, /*#__PURE__*/React.createElement("div", {
463
+ style: {
464
+ position: "absolute",
465
+ overflow: "hidden",
466
+ borderRadius: "20px",
467
+ border: "12px solid ".concat(accentColor),
468
+ width: mainVideoWidthTransition,
469
+ height: mainVideoHeightTransition,
470
+ top: mainVideoTopTransition,
471
+ left: mainVideoLeftTransition
472
+ }
473
+ }, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
474
+ src: noBackgroundVideoUrl,
475
+ startFrom: startVideoFrom,
476
+ containerWidth: mainVideoWidthTransition,
477
+ containerHeight: mainVideoHeightTransition,
478
+ faceMetadata: faceMetadata,
479
+ centerHorizontally: false,
480
+ noBackgroundVideoEffects: noBackgroundVideoEffects,
481
+ transparent: true,
482
+ muted: true
483
+ }))) : null, (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl && !faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
484
+ style: {
485
+ backgroundColor: "transparent",
486
+ padding: frameColor ? CHROME_PADDING : 0,
487
+ isolation: "isolate",
488
+ width: mainVideoWidthTransition,
489
+ height: mainVideoHeightTransition,
490
+ zIndex: 9
491
+ }
492
+ }, /*#__PURE__*/React.createElement("div", {
493
+ style: {
494
+ position: "absolute",
495
+ overflow: "hidden",
496
+ borderRadius: "20px",
497
+ border: "12px solid ".concat(accentColor),
498
+ width: mainVideoWidthTransition,
499
+ height: mainVideoHeightTransition,
500
+ top: mainVideoTopTransition,
501
+ left: mainVideoLeftTransition
502
+ }
503
+ }, /*#__PURE__*/React.createElement(OffthreadVideo, {
504
+ startFrom: startVideoFrom,
505
+ src: noBackgroundVideoUrl,
506
+ muted: true,
507
+ transparent: true,
508
+ style: {
509
+ height: "100%",
510
+ objectFit: "cover",
511
+ width: "100%",
512
+ filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined,
513
+ objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined
514
+ }
515
+ }))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
516
+ style: {
517
+ zIndex: 10
518
+ }
519
+ }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
520
+ style: {
521
+ position: "fixed",
522
+ left: logoLeft,
523
+ top: logoTop,
524
+ padding: 20,
525
+ zIndex: 10
526
+ }
527
+ }, /*#__PURE__*/React.createElement(PausableImg, {
528
+ delayRenderTimeoutInMilliseconds: 61000,
529
+ style: {
530
+ width: "225px",
531
+ maxHeight: "auto",
532
+ objectFit: "contain"
533
+ },
534
+ src: logoUrl
535
+ })) : null);
536
+ };
537
+
538
+ // Configuration for different orientation split screens
539
+ var BrollSplitScreen = function BrollSplitScreen(_ref4) {
540
+ var videoUrl = _ref4.videoUrl,
541
+ startVideoFrom = _ref4.startVideoFrom,
542
+ brollUrl = _ref4.brollUrl,
543
+ muted = _ref4.muted,
544
+ frameColor = _ref4.frameColor,
545
+ logoUrl = _ref4.logoUrl,
546
+ children = _ref4.children,
547
+ sourceVideoOrientation = _ref4.sourceVideoOrientation,
548
+ _ref4$disableTransiti = _ref4.disableTransitionSounds,
549
+ disableTransitionSounds = _ref4$disableTransiti === void 0 ? false : _ref4$disableTransiti,
550
+ durationInFrames = _ref4.durationInFrames,
551
+ _ref4$accentColor = _ref4.accentColor,
552
+ accentColor = _ref4$accentColor === void 0 ? "#ffffff" : _ref4$accentColor,
553
+ faceMetadata = _ref4.faceMetadata,
554
+ noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl,
555
+ noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects;
556
+ var _useVideoConfig2 = useVideoConfig(),
557
+ width = _useVideoConfig2.width,
558
+ height = _useVideoConfig2.height;
559
+ var _useVirtualBackground = useVirtualBackground(),
560
+ isVirtual = _useVirtualBackground.isVirtual,
561
+ virtualBgUrl = _useVirtualBackground.url;
562
+ var showVirtual = isVirtual && !!noBackgroundVideoUrl;
563
+
564
+ // Convert duration from frames to seconds (assuming 30 fps)
565
+ var durationInSeconds = durationInFrames / 30;
566
+
567
+ // Configure orientation-specific layouts
568
+ var _useOrientationBased = useOrientationBased({
569
+ portrait: {
570
+ // Portrait: Broll on top, main video on bottom (swapped positions)
571
+ mainVideoWidth: width - 2 * CHROME_PADDING,
572
+ mainVideoHeight: (height - 2 * CHROME_PADDING) * 0.66,
573
+ mainVideoTop: CHROME_PADDING + (height - 2 * CHROME_PADDING) * 0.34,
574
+ mainVideoLeft: CHROME_PADDING,
575
+ brollVideoWidth: width - 2 * CHROME_PADDING,
576
+ brollVideoHeight: (height - 2 * CHROME_PADDING) * 0.54,
577
+ brollVideoTop: CHROME_PADDING,
578
+ brollVideoLeft: CHROME_PADDING,
579
+ logoTop: CHROME_PADDING * 2,
580
+ logoLeft: CHROME_PADDING * 2,
581
+ BrollSplitScreenComponent: Portrait
582
+ },
583
+ landscape: {
584
+ // Landscape: Broll fullscreen with portrait video (3:4 aspect ratio) aligned to the right
585
+ mainVideoWidth: (height - 2 * CHROME_PADDING) * (3 / 4),
586
+ // 3:4 aspect ratio based on max height
587
+ mainVideoHeight: height - 2 * CHROME_PADDING,
588
+ mainVideoTop: CHROME_PADDING,
589
+ mainVideoLeft: width - CHROME_PADDING - (height - 2 * CHROME_PADDING) * (3 / 4),
590
+ // Align to right
591
+ brollVideoWidth: width,
592
+ brollVideoHeight: height,
593
+ brollVideoTop: 0,
594
+ brollVideoLeft: 0,
595
+ logoTop: CHROME_PADDING * 2,
596
+ logoLeft: CHROME_PADDING * 2,
597
+ BrollSplitScreenComponent: Landscape
598
+ },
599
+ square: {
600
+ // Square: Broll on top, main video on bottom (swapped positions)
601
+ mainVideoWidth: width - 2 * CHROME_PADDING,
602
+ mainVideoHeight: (height - 2 * CHROME_PADDING) * (faceMetadata ? 0.65 : 0.45),
603
+ mainVideoTop: CHROME_PADDING + (height - 2 * CHROME_PADDING) * (faceMetadata ? 0.35 : 0.55),
604
+ mainVideoLeft: CHROME_PADDING,
605
+ brollVideoWidth: width - 2 * CHROME_PADDING,
606
+ brollVideoHeight: (height - 2 * CHROME_PADDING) * (faceMetadata ? 0.35 : 0.55),
607
+ brollVideoTop: CHROME_PADDING,
608
+ brollVideoLeft: CHROME_PADDING,
609
+ logoTop: CHROME_PADDING * 2,
610
+ logoLeft: CHROME_PADDING * 2,
611
+ BrollSplitScreenComponent: Square
612
+ }
613
+ }),
614
+ BrollSplitScreenComponent = _useOrientationBased.BrollSplitScreenComponent,
615
+ mainVideoWidth = _useOrientationBased.mainVideoWidth,
616
+ mainVideoHeight = _useOrientationBased.mainVideoHeight,
617
+ mainVideoTop = _useOrientationBased.mainVideoTop,
618
+ mainVideoLeft = _useOrientationBased.mainVideoLeft,
619
+ brollVideoWidth = _useOrientationBased.brollVideoWidth,
620
+ brollVideoHeight = _useOrientationBased.brollVideoHeight,
621
+ brollVideoTop = _useOrientationBased.brollVideoTop,
622
+ brollVideoLeft = _useOrientationBased.brollVideoLeft,
623
+ logoTop = _useOrientationBased.logoTop,
624
+ logoLeft = _useOrientationBased.logoLeft,
625
+ orientation = _useOrientationBased.orientation;
626
+ // Transition timing - starting full screen, transitioning to split screen, then back to full screen
627
+ var normalizeTimings = function normalizeTimings(timings) {
628
+ var result = _toConsumableArray(timings);
629
+ for (var i = 1; i < result.length; i++) {
630
+ if (result[i] <= result[i - 1]) {
631
+ result[i] = result[i - 1] + 0.01;
632
+ }
633
+ }
634
+ return result;
635
+ };
636
+ var transitionTimings = normalizeTimings([0, 0.5, durationInSeconds - 0.5, durationInSeconds]); // Start at 0, split at 0.5, return to original at 1.0
637
+
638
+ // Main video transitions
639
+ var mainVideoWidthTransition = useTimeInterpolate(transitionTimings, [width, mainVideoWidth, mainVideoWidth, width], {
640
+ extrapolateRight: "clamp",
641
+ easing: Easing["in"](Easing.quad)
642
+ });
643
+ var mainVideoHeightTransition = useTimeInterpolate(transitionTimings, [height, mainVideoHeight, mainVideoHeight, height], {
644
+ extrapolateRight: "clamp",
645
+ easing: Easing["in"](Easing.quad)
646
+ });
647
+ var mainVideoTopTransition = useTimeInterpolate(transitionTimings, [0, mainVideoTop, mainVideoTop, 0], {
648
+ extrapolateRight: "clamp",
649
+ easing: Easing["in"](Easing.quad)
650
+ });
651
+ var mainVideoLeftTransition = useTimeInterpolate(transitionTimings, [0, mainVideoLeft, mainVideoLeft, 0], {
652
+ extrapolateRight: "clamp",
653
+ easing: Easing["in"](Easing.quad)
654
+ });
655
+
656
+ // Broll video transitions (start offscreen and move into position)
657
+ var brollVideoWidthTransition = useTimeInterpolate(transitionTimings, [brollVideoWidth, brollVideoWidth, brollVideoWidth, brollVideoWidth], {
658
+ extrapolateRight: "clamp",
659
+ easing: Easing["in"](Easing.quad)
660
+ });
661
+ var brollVideoHeightTransition = useTimeInterpolate(transitionTimings, [brollVideoHeight, brollVideoHeight, brollVideoHeight, brollVideoHeight], {
662
+ extrapolateRight: "clamp",
663
+ easing: Easing["in"](Easing.quad)
664
+ });
665
+
666
+ // Broll starting position based on orientation
667
+ var brollStartPosition = orientation === "landscape" ? {
668
+ top: 0,
669
+ left: 0
670
+ } // Already in position for landscape (fullscreen)
671
+ : {
672
+ top: -brollVideoHeight,
673
+ left: brollVideoLeft
674
+ }; // From top for portrait/square
675
+
676
+ var brollVideoTopTransition = useTimeInterpolate(transitionTimings, [brollStartPosition.top, brollVideoTop, brollVideoTop, brollStartPosition.top], {
677
+ extrapolateRight: "clamp",
678
+ easing: Easing["in"](Easing.quad)
679
+ });
680
+ var brollVideoLeftTransition = useTimeInterpolate(transitionTimings, [brollStartPosition.left, brollVideoLeft, brollVideoLeft, brollStartPosition.left], {
681
+ extrapolateRight: "clamp",
682
+ easing: Easing["in"](Easing.quad)
683
+ });
684
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
685
+ src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
686
+ volume: 0.25
687
+ }), /*#__PURE__*/React.createElement(BrollSplitScreenComponent, {
688
+ brollUrl: brollUrl,
689
+ brollVideoWidthTransition: brollVideoWidthTransition,
690
+ brollVideoHeightTransition: brollVideoHeightTransition,
691
+ brollVideoTopTransition: brollVideoTopTransition,
692
+ brollVideoLeftTransition: brollVideoLeftTransition,
693
+ mainVideoWidthTransition: mainVideoWidthTransition,
694
+ mainVideoHeightTransition: mainVideoHeightTransition,
695
+ mainVideoTopTransition: mainVideoTopTransition,
696
+ mainVideoLeftTransition: mainVideoLeftTransition,
697
+ logoUrl: logoUrl,
698
+ frameColor: frameColor,
699
+ orientation: orientation,
700
+ startVideoFrom: startVideoFrom,
701
+ videoUrl: videoUrl,
702
+ sourceVideoOrientation: sourceVideoOrientation,
703
+ logoLeft: logoLeft,
704
+ logoTop: logoTop,
705
+ muted: muted,
706
+ accentColor: accentColor,
707
+ faceMetadata: faceMetadata,
708
+ noBackgroundVideoUrl: noBackgroundVideoUrl,
709
+ noBackgroundVideoEffects: noBackgroundVideoEffects,
710
+ showVirtual: showVirtual,
711
+ virtualBgUrl: virtualBgUrl
712
+ }, children));
713
+ };
714
+ export { BrollSplitScreen };