@zync/zync-screnplay-player 0.1.204 → 0.1.206

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 (33) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +17 -14
  3. package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabColdOpen.js +741 -0
  4. package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabConversationSpine.js +607 -0
  5. package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabDocumentaryInset.js +606 -0
  6. package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabRackFocus.js +603 -0
  7. package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabStudioSet.js +589 -0
  8. package/dist/screenplay/RemotionRenderer/components/layouts/DynamicTriangle.js +36 -6
  9. package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +17 -6
  10. package/dist/screenplay/RemotionRenderer/components/layouts/IntroVideo.js +45 -8
  11. package/dist/screenplay/RemotionRenderer/components/layouts/Keyword.js +42 -9
  12. package/dist/screenplay/RemotionRenderer/components/layouts/KeywordStudioBackdrop.js +47 -10
  13. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStill.js +42 -9
  14. package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillStudioBackdrop.js +46 -9
  15. package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrame.js +21 -12
  16. package/dist/screenplay/RemotionRenderer/components/layouts/TextWithVideo.js +41 -8
  17. package/dist/screenplay/RemotionRenderer/development.js +164 -1239
  18. package/dist/screenplay/RemotionRenderer/hooks/useOrientationBased.js +7 -3
  19. package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabColdOpenLayout.js +22 -0
  20. package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabConversationSpineLayout.js +22 -0
  21. package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabDocumentaryInsetLayout.js +22 -0
  22. package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabRackFocusLayout.js +22 -0
  23. package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabStudioSetLayout.js +22 -0
  24. package/dist/screenplay/RemotionRenderer/main/lib/layouts/DefaultLayout.js +2 -1
  25. package/dist/screenplay/RemotionRenderer/main/lib/layouts/DynamicTriangleLayout.js +3 -2
  26. package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +3 -2
  27. package/dist/screenplay/RemotionRenderer/main/lib/layouts/IntroVideoLayout.js +3 -1
  28. package/dist/screenplay/RemotionRenderer/main/lib/layouts/KeywordLayout.js +3 -2
  29. package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +25 -0
  30. package/dist/screenplay/RemotionRenderer/main/lib/layouts/MotionStillLayout.js +3 -2
  31. package/dist/screenplay/RemotionRenderer/main/lib/layouts/TextWithVideoLayout.js +3 -2
  32. package/dist/screenplay/RemotionRenderer/registeredComponents.js +10 -0
  33. package/package.json +1 -1
@@ -25,7 +25,9 @@ export var Handoff = function Handoff(_ref) {
25
25
  noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
26
26
  handoffOverlapSeconds = _ref.handoffOverlapSeconds,
27
27
  _ref$useSquareInLands = _ref.useSquareInLandscapeFirstVideo,
28
- useSquareInLandscapeFirstVideo = _ref$useSquareInLands === void 0 ? false : _ref$useSquareInLands;
28
+ useSquareInLandscapeFirstVideo = _ref$useSquareInLands === void 0 ? false : _ref$useSquareInLands,
29
+ _ref$useSquareInLands2 = _ref.useSquareInLandscapeSecondVideo,
30
+ useSquareInLandscapeSecondVideo = _ref$useSquareInLands2 === void 0 ? false : _ref$useSquareInLands2;
29
31
  var videoConfig = useVideoConfig();
30
32
  var width = videoConfig.width,
31
33
  height = videoConfig.height,
@@ -34,6 +36,7 @@ export var Handoff = function Handoff(_ref) {
34
36
  compositionProps = _videoConfig$props === void 0 ? {} : _videoConfig$props;
35
37
  var outputOrientation = (compositionProps === null || compositionProps === void 0 ? void 0 : (_compositionProps$out = compositionProps.output) === null || _compositionProps$out === void 0 ? void 0 : _compositionProps$out.orientation) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : (_window$screenplayPro2 = _window$screenplayPro.output) === null || _window$screenplayPro2 === void 0 ? void 0 : _window$screenplayPro2.orientation : undefined);
36
38
  var shouldUseSquareInLandscapeFirstVideo = Boolean(useSquareInLandscapeFirstVideo) && outputOrientation === "landscape";
39
+ var shouldUseSquareInLandscapeSecondVideo = Boolean(useSquareInLandscapeSecondVideo) && outputOrientation === "landscape";
37
40
  var squareSize = 1080;
38
41
  var frame = useCurrentFrame();
39
42
  var _useTheme = useTheme(),
@@ -80,6 +83,10 @@ export var Handoff = function Handoff(_ref) {
80
83
  var firstRenderVideoHeight = shouldUseSquareInLandscapeFirstVideo ? Math.min(firstVideoHeight, squareSize) : firstVideoHeight;
81
84
  var firstVideoCenteredOffsetX = shouldUseSquareInLandscapeFirstVideo ? Math.max(0, (width - TOTAL_X_PADDING - firstRenderVideoWidth) / 2) : 0;
82
85
  var firstVideoTranslateX = useTimeInterpolate(inputRangeInSeconds, [firstVideoCenteredOffsetX, 0, 0, 0], DEFAULT_TIME_INTERPOLATE_OPTIONS);
86
+ var secondRenderVideoWidth = shouldUseSquareInLandscapeSecondVideo ? Math.min(secondVideoWidth, squareSize) : secondVideoWidth;
87
+ var secondRenderVideoHeight = shouldUseSquareInLandscapeSecondVideo ? Math.min(secondVideoHeight, squareSize) : secondVideoHeight;
88
+ var secondVideoCenteredOffsetX = shouldUseSquareInLandscapeSecondVideo ? Math.max(0, (width - TOTAL_X_PADDING - secondRenderVideoWidth) / 2) : 0;
89
+ var secondVideoTranslateX = useTimeInterpolate(inputRangeInSeconds, [secondVideoCenteredOffsetX, 0, 0, 0], DEFAULT_TIME_INTERPOLATE_OPTIONS);
83
90
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
84
91
  style: {
85
92
  width: width,
@@ -126,24 +133,28 @@ export var Handoff = function Handoff(_ref) {
126
133
  }))), /*#__PURE__*/React.createElement(Sequence, {
127
134
  from: delayInFrames,
128
135
  layout: "none"
136
+ }, /*#__PURE__*/React.createElement("div", {
137
+ style: {
138
+ transform: "translateX(".concat(secondVideoTranslateX, "px)")
139
+ }
129
140
  }, secondNoBackgroundFaceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
130
141
  startFrom: startSecondVideoFrom,
131
142
  src: secondVideoFile,
132
143
  faceMetadata: secondNoBackgroundFaceMetadata,
133
144
  aspectRatio: orientation,
134
- containerWidth: secondVideoWidth,
135
- containerHeight: secondVideoHeight,
145
+ containerWidth: secondRenderVideoWidth,
146
+ containerHeight: secondRenderVideoHeight,
136
147
  useAveragePosition: true
137
148
  }) : /*#__PURE__*/React.createElement(OffthreadVideo, {
138
149
  startFrom: startSecondVideoFrom,
139
150
  src: secondVideoFile,
140
151
  style: {
141
- height: secondVideoHeight,
152
+ height: secondRenderVideoHeight,
142
153
  objectFit: "cover",
143
- width: secondVideoWidth,
154
+ width: secondRenderVideoWidth,
144
155
  borderRadius: "40px"
145
156
  }
146
- }))), /*#__PURE__*/React.createElement(BlurOverlay, {
157
+ })))), /*#__PURE__*/React.createElement(BlurOverlay, {
147
158
  show: (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && (firstNoBackgroundVideoUrl || secondNoBackgroundVideoUrl),
148
159
  width: width,
149
160
  height: height,
@@ -30,6 +30,8 @@ var Landscape = function Landscape(_ref) {
30
30
  logoLeft = _ref.logoLeft,
31
31
  logoTop = _ref.logoTop,
32
32
  logoRight = _ref.logoRight,
33
+ _ref$logoPosition = _ref.logoPosition,
34
+ logoPosition = _ref$logoPosition === void 0 ? "fixed" : _ref$logoPosition,
33
35
  videoWidth = _ref.videoWidth,
34
36
  videoHeight = _ref.videoHeight,
35
37
  videoTop = _ref.videoTop,
@@ -409,7 +411,7 @@ var Landscape = function Landscape(_ref) {
409
411
  }
410
412
  }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
411
413
  style: _objectSpread({
412
- position: "fixed",
414
+ position: logoPosition,
413
415
  top: logoTop,
414
416
  padding: 20,
415
417
  zIndex: 10
@@ -436,6 +438,8 @@ var Portrait = function Portrait(_ref2) {
436
438
  logoLeft = _ref2.logoLeft,
437
439
  logoTop = _ref2.logoTop,
438
440
  logoRight = _ref2.logoRight,
441
+ _ref2$logoPosition = _ref2.logoPosition,
442
+ logoPosition = _ref2$logoPosition === void 0 ? "fixed" : _ref2$logoPosition,
439
443
  videoWidth = _ref2.videoWidth,
440
444
  videoHeight = _ref2.videoHeight,
441
445
  videoTop = _ref2.videoTop,
@@ -816,7 +820,7 @@ var Portrait = function Portrait(_ref2) {
816
820
  }
817
821
  }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
818
822
  style: _objectSpread({
819
- position: "fixed",
823
+ position: logoPosition,
820
824
  top: logoTop,
821
825
  padding: 20,
822
826
  zIndex: 10
@@ -846,6 +850,8 @@ var Square = function Square(_ref3) {
846
850
  logoUrl = _ref3.logoUrl,
847
851
  logoLeft = _ref3.logoLeft,
848
852
  logoTop = _ref3.logoTop,
853
+ _ref3$logoPosition = _ref3.logoPosition,
854
+ logoPosition = _ref3$logoPosition === void 0 ? "fixed" : _ref3$logoPosition,
849
855
  logoRight = _ref3.logoRight,
850
856
  virtualBgUrl = _ref3.virtualBgUrl,
851
857
  showVirtual = _ref3.showVirtual;
@@ -1214,7 +1220,7 @@ var Square = function Square(_ref3) {
1214
1220
  }
1215
1221
  }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
1216
1222
  style: _objectSpread({
1217
- position: "fixed",
1223
+ position: logoPosition,
1218
1224
  top: logoTop,
1219
1225
  padding: 20,
1220
1226
  zIndex: 20
@@ -1230,6 +1236,7 @@ var Square = function Square(_ref3) {
1230
1236
  })) : null);
1231
1237
  };
1232
1238
  var IntroVideo = function IntroVideo(_ref4) {
1239
+ var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
1233
1240
  var videoUrl = _ref4.videoUrl,
1234
1241
  startVideoFrom = _ref4.startVideoFrom,
1235
1242
  _ref4$sentenceText = _ref4.sentenceText,
@@ -1245,10 +1252,21 @@ var IntroVideo = function IntroVideo(_ref4) {
1245
1252
  muted = _ref4.muted,
1246
1253
  faceMetadata = _ref4.faceMetadata,
1247
1254
  noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
1248
- noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl;
1255
+ noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl,
1256
+ _ref4$useSquareInLand = _ref4.useSquareInLandscape,
1257
+ useSquareInLandscape = _ref4$useSquareInLand === void 0 ? false : _ref4$useSquareInLand;
1249
1258
  var _useVideoConfig5 = useVideoConfig(),
1250
- width = _useVideoConfig5.width,
1251
- height = _useVideoConfig5.height;
1259
+ outputWidth = _useVideoConfig5.width,
1260
+ outputHeight = _useVideoConfig5.height,
1261
+ _useVideoConfig5$prop = _useVideoConfig5.props,
1262
+ compositionProps = _useVideoConfig5$prop === void 0 ? {} : _useVideoConfig5$prop;
1263
+ var outputOrientation = (compositionProps === null || compositionProps === void 0 ? void 0 : (_compositionProps$out = compositionProps.output) === null || _compositionProps$out === void 0 ? void 0 : _compositionProps$out.orientation) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : (_window$screenplayPro2 = _window$screenplayPro.output) === null || _window$screenplayPro2 === void 0 ? void 0 : _window$screenplayPro2.orientation : undefined);
1264
+ var shouldUseSquareInLandscape = Boolean(useSquareInLandscape) && outputOrientation === "landscape";
1265
+ var squareSize = 1080;
1266
+ var width = shouldUseSquareInLandscape ? squareSize : outputWidth;
1267
+ var height = shouldUseSquareInLandscape ? squareSize : outputHeight;
1268
+ var renderOffsetX = shouldUseSquareInLandscape ? (outputWidth - squareSize) / 2 : 0;
1269
+ var orientationOverride = shouldUseSquareInLandscape ? "square" : undefined;
1252
1270
  var _useVirtualBackground = useVirtualBackground(),
1253
1271
  isVirtual = _useVirtualBackground.isVirtual,
1254
1272
  virtualBgUrl = _useVirtualBackground.url;
@@ -1289,7 +1307,7 @@ var IntroVideo = function IntroVideo(_ref4) {
1289
1307
  logoRight: CHROME_PADDING,
1290
1308
  IntroVideoComponent: Square
1291
1309
  }
1292
- }),
1310
+ }, orientationOverride),
1293
1311
  IntroVideoComponent = _useOrientationBased.IntroVideoComponent,
1294
1312
  videoWidth = _useOrientationBased.videoWidth,
1295
1313
  videoHeight = _useOrientationBased.videoHeight,
@@ -1301,7 +1319,7 @@ var IntroVideo = function IntroVideo(_ref4) {
1301
1319
  logoLeft = _useOrientationBased.logoLeft,
1302
1320
  logoRight = _useOrientationBased.logoRight,
1303
1321
  orientation = _useOrientationBased.orientation;
1304
- return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
1322
+ var content = /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
1305
1323
  src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
1306
1324
  volume: 0.25
1307
1325
  }), /*#__PURE__*/React.createElement(IntroVideoComponent, {
@@ -1314,6 +1332,7 @@ var IntroVideo = function IntroVideo(_ref4) {
1314
1332
  logoLeft: logoLeft,
1315
1333
  logoTop: logoTop,
1316
1334
  logoRight: logoRight,
1335
+ logoPosition: shouldUseSquareInLandscape ? "absolute" : "fixed",
1317
1336
  videoWidth: videoWidth,
1318
1337
  videoHeight: videoHeight,
1319
1338
  videoTop: videoTop,
@@ -1329,5 +1348,23 @@ var IntroVideo = function IntroVideo(_ref4) {
1329
1348
  showVirtual: showVirtual,
1330
1349
  virtualBgUrl: virtualBgUrl
1331
1350
  }, children));
1351
+ if (!shouldUseSquareInLandscape) {
1352
+ return content;
1353
+ }
1354
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
1355
+ style: {
1356
+ width: outputWidth,
1357
+ height: outputHeight,
1358
+ backgroundColor: "black"
1359
+ }
1360
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, {
1361
+ style: {
1362
+ width: width,
1363
+ height: height,
1364
+ left: renderOffsetX,
1365
+ top: 0,
1366
+ overflow: "hidden"
1367
+ }
1368
+ }, content));
1332
1369
  };
1333
1370
  export { IntroVideo };
@@ -27,10 +27,12 @@ var Logo = function Logo(_ref) {
27
27
  var logoUrl = _ref.logoUrl,
28
28
  top = _ref.top,
29
29
  left = _ref.left,
30
- right = _ref.right;
30
+ right = _ref.right,
31
+ _ref$position = _ref.position,
32
+ position = _ref$position === void 0 ? "fixed" : _ref$position;
31
33
  return logoUrl ? /*#__PURE__*/React.createElement("div", {
32
34
  style: {
33
- position: "fixed",
35
+ position: position,
34
36
  zIndex: 11,
35
37
  top: top,
36
38
  left: left,
@@ -166,6 +168,7 @@ var RotatingWordsContainer = /*#__PURE__*/React.memo(function (_ref3) {
166
168
  })));
167
169
  });
168
170
  var KeywordComponent = function KeywordComponent(_ref4) {
171
+ var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
169
172
  var startVideoFrom = _ref4.startVideoFrom,
170
173
  videoUrl = _ref4.videoUrl,
171
174
  logoUrl = _ref4.logoUrl,
@@ -181,11 +184,22 @@ var KeywordComponent = function KeywordComponent(_ref4) {
181
184
  faceMetadata = _ref4.faceMetadata,
182
185
  muted = _ref4.muted,
183
186
  noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
184
- noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl;
187
+ noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl,
188
+ _ref4$useSquareInLand = _ref4.useSquareInLandscape,
189
+ useSquareInLandscape = _ref4$useSquareInLand === void 0 ? false : _ref4$useSquareInLand;
185
190
  var _useVideoConfig = useVideoConfig(),
186
- width = _useVideoConfig.width,
187
- height = _useVideoConfig.height,
188
- fps = _useVideoConfig.fps;
191
+ outputWidth = _useVideoConfig.width,
192
+ outputHeight = _useVideoConfig.height,
193
+ fps = _useVideoConfig.fps,
194
+ _useVideoConfig$props = _useVideoConfig.props,
195
+ compositionProps = _useVideoConfig$props === void 0 ? {} : _useVideoConfig$props;
196
+ var outputOrientation = (compositionProps === null || compositionProps === void 0 ? void 0 : (_compositionProps$out = compositionProps.output) === null || _compositionProps$out === void 0 ? void 0 : _compositionProps$out.orientation) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : (_window$screenplayPro2 = _window$screenplayPro.output) === null || _window$screenplayPro2 === void 0 ? void 0 : _window$screenplayPro2.orientation : undefined);
197
+ var shouldUseSquareInLandscape = Boolean(useSquareInLandscape) && outputOrientation === "landscape";
198
+ var squareSize = 1080;
199
+ var width = shouldUseSquareInLandscape ? squareSize : outputWidth;
200
+ var height = shouldUseSquareInLandscape ? squareSize : outputHeight;
201
+ var renderOffsetX = shouldUseSquareInLandscape ? (outputWidth - squareSize) / 2 : 0;
202
+ var orientationOverride = shouldUseSquareInLandscape ? "square" : undefined;
189
203
  var frame = useCurrentFrame();
190
204
  var _useVirtualBackground = useVirtualBackground(),
191
205
  isVirtual = _useVirtualBackground.isVirtual,
@@ -234,7 +248,7 @@ var KeywordComponent = function KeywordComponent(_ref4) {
234
248
  logoRight: stylesByVariant[variant].logoRight,
235
249
  flowDirection: "row-reverse"
236
250
  }
237
- }),
251
+ }, orientationOverride),
238
252
  imageContainerOutputRange = _useOrientationBased.imageContainerOutputRange,
239
253
  containerWidth = _useOrientationBased.containerWidth,
240
254
  targetVideoWidth = _useOrientationBased.targetVideoWidth,
@@ -271,7 +285,7 @@ var KeywordComponent = function KeywordComponent(_ref4) {
271
285
  var imageContainerTranslate = imageContainerOutputRange[0] + (imageContainerOutputRange[1] - imageContainerOutputRange[0]) * easedProgress;
272
286
  var videoWidth = width + (targetVideoWidth - width) * easedProgress;
273
287
  var videoHeight = height + (targetVideoHeight - height) * easedProgress;
274
- return /*#__PURE__*/React.createElement(AbsoluteFill, {
288
+ var content = /*#__PURE__*/React.createElement(AbsoluteFill, {
275
289
  style: {
276
290
  isolation: "isolate",
277
291
  width: width,
@@ -310,7 +324,8 @@ var KeywordComponent = function KeywordComponent(_ref4) {
310
324
  logoUrl: logoUrl,
311
325
  top: logoTop,
312
326
  left: logoLeft,
313
- right: logoRight
327
+ right: logoRight,
328
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed"
314
329
  }), /*#__PURE__*/React.createElement("div", {
315
330
  style: {
316
331
  display: "flex",
@@ -507,6 +522,24 @@ var KeywordComponent = function KeywordComponent(_ref4) {
507
522
  zIndex: 10
508
523
  }
509
524
  }, children));
525
+ if (!shouldUseSquareInLandscape) {
526
+ return content;
527
+ }
528
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
529
+ style: {
530
+ width: outputWidth,
531
+ height: outputHeight,
532
+ backgroundColor: "black"
533
+ }
534
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, {
535
+ style: {
536
+ width: width,
537
+ height: height,
538
+ left: renderOffsetX,
539
+ top: 0,
540
+ overflow: "hidden"
541
+ }
542
+ }, content));
510
543
  };
511
544
  export var Keyword = function Keyword(props) {
512
545
  var _useTheme = useTheme(),
@@ -149,7 +149,8 @@ var RotatingWordsContainer = /*#__PURE__*/React.memo(function (_ref4) {
149
149
  words = _ref4$words === void 0 ? [] : _ref4$words,
150
150
  cloudMargins = _ref4.cloudMargins,
151
151
  cloudMinDistancePct = _ref4.cloudMinDistancePct,
152
- cloudSpreadDurationSeconds = _ref4.cloudSpreadDurationSeconds;
152
+ cloudSpreadDurationSeconds = _ref4.cloudSpreadDurationSeconds,
153
+ orientationOverride = _ref4.orientationOverride;
153
154
  var frame = useCurrentFrame();
154
155
  var _useVideoConfig2 = useVideoConfig(),
155
156
  fps = _useVideoConfig2.fps,
@@ -159,7 +160,7 @@ var RotatingWordsContainer = /*#__PURE__*/React.memo(function (_ref4) {
159
160
  portrait: {},
160
161
  landscape: {},
161
162
  square: {}
162
- }),
163
+ }, orientationOverride),
163
164
  orientation = _useOrientationBased.orientation;
164
165
  var isWide = orientation === "landscape";
165
166
 
@@ -448,11 +449,14 @@ var BackdropFrame = function BackdropFrame(_ref5) {
448
449
  logoUrl = _ref5.logoUrl,
449
450
  logoLeft = _ref5.logoLeft,
450
451
  logoTop = _ref5.logoTop,
452
+ _ref5$logoPosition = _ref5.logoPosition,
453
+ logoPosition = _ref5$logoPosition === void 0 ? "fixed" : _ref5$logoPosition,
451
454
  frameColor = _ref5.frameColor,
452
455
  words = _ref5.words,
453
456
  cloudMargins = _ref5.cloudMargins,
454
457
  cloudMinDistancePct = _ref5.cloudMinDistancePct,
455
458
  cloudSpreadDurationSeconds = _ref5.cloudSpreadDurationSeconds,
459
+ orientationOverride = _ref5.orientationOverride,
456
460
  _ref5$containerInset = _ref5.containerInset,
457
461
  containerInset = _ref5$containerInset === void 0 ? {
458
462
  top: 0.1,
@@ -547,7 +551,8 @@ var BackdropFrame = function BackdropFrame(_ref5) {
547
551
  words: words,
548
552
  cloudMargins: cloudMargins,
549
553
  cloudMinDistancePct: cloudMinDistancePct,
550
- cloudSpreadDurationSeconds: cloudSpreadDurationSeconds
554
+ cloudSpreadDurationSeconds: cloudSpreadDurationSeconds,
555
+ orientationOverride: orientationOverride
551
556
  }), /*#__PURE__*/React.createElement("div", {
552
557
  style: {
553
558
  position: "absolute",
@@ -595,7 +600,7 @@ var BackdropFrame = function BackdropFrame(_ref5) {
595
600
  }
596
601
  }, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
597
602
  style: {
598
- position: "fixed",
603
+ position: logoPosition,
599
604
  left: logoLeft,
600
605
  top: logoTop,
601
606
  padding: 20,
@@ -612,6 +617,7 @@ var BackdropFrame = function BackdropFrame(_ref5) {
612
617
  })) : null);
613
618
  };
614
619
  var KeywordStudioBackdrop = function KeywordStudioBackdrop(_ref6) {
620
+ var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
615
621
  var videoUrl = _ref6.videoUrl,
616
622
  startVideoFrom = _ref6.startVideoFrom,
617
623
  _ref6$words = _ref6.words,
@@ -629,11 +635,22 @@ var KeywordStudioBackdrop = function KeywordStudioBackdrop(_ref6) {
629
635
  noBackgroundVideoEffects = _ref6.noBackgroundVideoEffects,
630
636
  cloudMargins = _ref6.cloudMargins,
631
637
  cloudMinDistancePct = _ref6.cloudMinDistancePct,
632
- cloudSpreadDurationSeconds = _ref6.cloudSpreadDurationSeconds;
638
+ cloudSpreadDurationSeconds = _ref6.cloudSpreadDurationSeconds,
639
+ _ref6$useSquareInLand = _ref6.useSquareInLandscape,
640
+ useSquareInLandscape = _ref6$useSquareInLand === void 0 ? false : _ref6$useSquareInLand;
633
641
  var _useVideoConfig3 = useVideoConfig(),
634
- width = _useVideoConfig3.width,
635
- height = _useVideoConfig3.height,
636
- fps = _useVideoConfig3.fps;
642
+ outputWidth = _useVideoConfig3.width,
643
+ outputHeight = _useVideoConfig3.height,
644
+ fps = _useVideoConfig3.fps,
645
+ _useVideoConfig3$prop = _useVideoConfig3.props,
646
+ compositionProps = _useVideoConfig3$prop === void 0 ? {} : _useVideoConfig3$prop;
647
+ var outputOrientation = (compositionProps === null || compositionProps === void 0 ? void 0 : (_compositionProps$out = compositionProps.output) === null || _compositionProps$out === void 0 ? void 0 : _compositionProps$out.orientation) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : (_window$screenplayPro2 = _window$screenplayPro.output) === null || _window$screenplayPro2 === void 0 ? void 0 : _window$screenplayPro2.orientation : undefined);
648
+ var shouldUseSquareInLandscape = Boolean(useSquareInLandscape) && outputOrientation === "landscape";
649
+ var squareSize = 1080;
650
+ var width = shouldUseSquareInLandscape ? squareSize : outputWidth;
651
+ var height = shouldUseSquareInLandscape ? squareSize : outputHeight;
652
+ var renderOffsetX = shouldUseSquareInLandscape ? (outputWidth - squareSize) / 2 : 0;
653
+ var orientationOverride = shouldUseSquareInLandscape ? "square" : undefined;
637
654
  var frame = useCurrentFrame();
638
655
  var _useVirtualBackground = useVirtualBackground(),
639
656
  isVirtual = _useVirtualBackground.isVirtual,
@@ -652,7 +669,7 @@ var KeywordStudioBackdrop = function KeywordStudioBackdrop(_ref6) {
652
669
  logoTop: CHROME_PADDING * 2,
653
670
  logoLeft: CHROME_PADDING * 2
654
671
  }
655
- }),
672
+ }, orientationOverride),
656
673
  logoTop = _useOrientationBased2.logoTop,
657
674
  logoLeft = _useOrientationBased2.logoLeft;
658
675
 
@@ -686,7 +703,7 @@ var KeywordStudioBackdrop = function KeywordStudioBackdrop(_ref6) {
686
703
  } else {
687
704
  backdropProgress = 1;
688
705
  }
689
- return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
706
+ var content = /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
690
707
  src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
691
708
  volume: 0.25
692
709
  }), /*#__PURE__*/React.createElement(BackdropFrame, {
@@ -701,14 +718,34 @@ var KeywordStudioBackdrop = function KeywordStudioBackdrop(_ref6) {
701
718
  logoUrl: logoUrl,
702
719
  logoLeft: logoLeft,
703
720
  logoTop: logoTop,
721
+ logoPosition: shouldUseSquareInLandscape ? "absolute" : "fixed",
704
722
  frameColor: frameColor,
705
723
  words: words,
706
724
  cloudMargins: cloudMargins,
707
725
  cloudMinDistancePct: cloudMinDistancePct,
708
726
  cloudSpreadDurationSeconds: cloudSpreadDurationSeconds,
727
+ orientationOverride: orientationOverride,
709
728
  backdropProgress: backdropProgress,
710
729
  showVirtual: showVirtual,
711
730
  virtualBgUrl: virtualBgUrl
712
731
  }, children));
732
+ if (!shouldUseSquareInLandscape) {
733
+ return content;
734
+ }
735
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
736
+ style: {
737
+ width: outputWidth,
738
+ height: outputHeight,
739
+ backgroundColor: "black"
740
+ }
741
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, {
742
+ style: {
743
+ width: width,
744
+ height: height,
745
+ left: renderOffsetX,
746
+ top: 0,
747
+ overflow: "hidden"
748
+ }
749
+ }, content));
713
750
  };
714
751
  export { KeywordStudioBackdrop };
@@ -28,10 +28,12 @@ var Logo = function Logo(_ref) {
28
28
  var logoUrl = _ref.logoUrl,
29
29
  top = _ref.top,
30
30
  left = _ref.left,
31
- right = _ref.right;
31
+ right = _ref.right,
32
+ _ref$position = _ref.position,
33
+ position = _ref$position === void 0 ? "fixed" : _ref$position;
32
34
  return logoUrl ? /*#__PURE__*/React.createElement("div", {
33
35
  style: {
34
- position: "fixed",
36
+ position: position,
35
37
  zIndex: 1,
36
38
  top: top,
37
39
  left: left,
@@ -80,6 +82,7 @@ export var PanningImage = function PanningImage(_ref2) {
80
82
  }));
81
83
  };
82
84
  var MotionStillComponent = function MotionStillComponent(_ref3) {
85
+ var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
83
86
  var startVideoFrom = _ref3.startVideoFrom,
84
87
  videoUrl = _ref3.videoUrl,
85
88
  logoUrl = _ref3.logoUrl,
@@ -94,11 +97,22 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
94
97
  faceMetadata = _ref3.faceMetadata,
95
98
  muted = _ref3.muted,
96
99
  noBackgroundVideoEffects = _ref3.noBackgroundVideoEffects,
97
- noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl;
100
+ noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl,
101
+ _ref3$useSquareInLand = _ref3.useSquareInLandscape,
102
+ useSquareInLandscape = _ref3$useSquareInLand === void 0 ? false : _ref3$useSquareInLand;
98
103
  var _useVideoConfig = useVideoConfig(),
99
- width = _useVideoConfig.width,
100
- height = _useVideoConfig.height,
101
- fps = _useVideoConfig.fps;
104
+ outputWidth = _useVideoConfig.width,
105
+ outputHeight = _useVideoConfig.height,
106
+ fps = _useVideoConfig.fps,
107
+ _useVideoConfig$props = _useVideoConfig.props,
108
+ compositionProps = _useVideoConfig$props === void 0 ? {} : _useVideoConfig$props;
109
+ var outputOrientation = (compositionProps === null || compositionProps === void 0 ? void 0 : (_compositionProps$out = compositionProps.output) === null || _compositionProps$out === void 0 ? void 0 : _compositionProps$out.orientation) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : (_window$screenplayPro2 = _window$screenplayPro.output) === null || _window$screenplayPro2 === void 0 ? void 0 : _window$screenplayPro2.orientation : undefined);
110
+ var shouldUseSquareInLandscape = Boolean(useSquareInLandscape) && outputOrientation === "landscape";
111
+ var squareSize = 1080;
112
+ var width = shouldUseSquareInLandscape ? squareSize : outputWidth;
113
+ var height = shouldUseSquareInLandscape ? squareSize : outputHeight;
114
+ var renderOffsetX = shouldUseSquareInLandscape ? (outputWidth - squareSize) / 2 : 0;
115
+ var orientationOverride = shouldUseSquareInLandscape ? "square" : undefined;
102
116
  var frame = useCurrentFrame();
103
117
  var _useVirtualBackground = useVirtualBackground(),
104
118
  isVirtual = _useVirtualBackground.isVirtual,
@@ -144,7 +158,7 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
144
158
  logoRight: stylesByVariant[variant].logoRight,
145
159
  flowDirection: "row-reverse"
146
160
  }
147
- }),
161
+ }, orientationOverride),
148
162
  imageContainerOutputRange = _useOrientationBased.imageContainerOutputRange,
149
163
  targetVideoWidth = _useOrientationBased.targetVideoWidth,
150
164
  targetVideoHeight = _useOrientationBased.targetVideoHeight,
@@ -180,7 +194,7 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
180
194
  var imageContainerTranslate = imageContainerOutputRange[0] + (imageContainerOutputRange[1] - imageContainerOutputRange[0]) * easedProgress;
181
195
  var videoWidth = width + (targetVideoWidth - width) * easedProgress;
182
196
  var videoHeight = height + (targetVideoHeight - height) * easedProgress;
183
- return /*#__PURE__*/React.createElement(AbsoluteFill, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
197
+ var content = /*#__PURE__*/React.createElement(AbsoluteFill, null, /*#__PURE__*/React.createElement(AbsoluteFill, {
184
198
  style: {
185
199
  width: width,
186
200
  height: height,
@@ -220,7 +234,8 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
220
234
  logoUrl: logoUrl,
221
235
  top: logoTop,
222
236
  left: logoLeft,
223
- right: logoRight
237
+ right: logoRight,
238
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed"
224
239
  }), /*#__PURE__*/React.createElement("div", {
225
240
  style: {
226
241
  display: "flex",
@@ -359,6 +374,24 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
359
374
  zIndex: 20
360
375
  }
361
376
  }, children));
377
+ if (!shouldUseSquareInLandscape) {
378
+ return content;
379
+ }
380
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
381
+ style: {
382
+ width: outputWidth,
383
+ height: outputHeight,
384
+ backgroundColor: "black"
385
+ }
386
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, {
387
+ style: {
388
+ width: width,
389
+ height: height,
390
+ left: renderOffsetX,
391
+ top: 0,
392
+ overflow: "hidden"
393
+ }
394
+ }, content));
362
395
  };
363
396
  export var MotionStill = function MotionStill(props) {
364
397
  var _useTheme = useTheme(),