@zync/zync-screnplay-player 0.1.212 → 0.1.214
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.
|
@@ -16,6 +16,7 @@ var Square = function Square(_ref) {
|
|
|
16
16
|
logoUrl = _ref.logoUrl,
|
|
17
17
|
logoLeft = _ref.logoLeft,
|
|
18
18
|
logoTop = _ref.logoTop,
|
|
19
|
+
logoPosition = _ref.logoPosition,
|
|
19
20
|
frameColor = _ref.frameColor,
|
|
20
21
|
startVideoFrom = _ref.startVideoFrom,
|
|
21
22
|
noBackgroundVideoUrl = _ref.noBackgroundVideoUrl,
|
|
@@ -164,7 +165,7 @@ var Square = function Square(_ref) {
|
|
|
164
165
|
}
|
|
165
166
|
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
166
167
|
style: {
|
|
167
|
-
position: "fixed",
|
|
168
|
+
position: logoPosition || "fixed",
|
|
168
169
|
left: logoLeft,
|
|
169
170
|
top: logoTop,
|
|
170
171
|
padding: 20,
|
|
@@ -189,6 +190,7 @@ var Portrait = function Portrait(_ref2) {
|
|
|
189
190
|
logoUrl = _ref2.logoUrl,
|
|
190
191
|
logoLeft = _ref2.logoLeft,
|
|
191
192
|
logoTop = _ref2.logoTop,
|
|
193
|
+
logoPosition = _ref2.logoPosition,
|
|
192
194
|
frameColor = _ref2.frameColor,
|
|
193
195
|
startVideoFrom = _ref2.startVideoFrom,
|
|
194
196
|
noBackgroundVideoUrl = _ref2.noBackgroundVideoUrl,
|
|
@@ -334,7 +336,7 @@ var Portrait = function Portrait(_ref2) {
|
|
|
334
336
|
}
|
|
335
337
|
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
336
338
|
style: {
|
|
337
|
-
position: "fixed",
|
|
339
|
+
position: logoPosition || "fixed",
|
|
338
340
|
left: logoLeft,
|
|
339
341
|
top: logoTop,
|
|
340
342
|
padding: 20,
|
|
@@ -359,6 +361,7 @@ var Landscape = function Landscape(_ref3) {
|
|
|
359
361
|
logoUrl = _ref3.logoUrl,
|
|
360
362
|
logoLeft = _ref3.logoLeft,
|
|
361
363
|
logoTop = _ref3.logoTop,
|
|
364
|
+
logoPosition = _ref3.logoPosition,
|
|
362
365
|
frameColor = _ref3.frameColor,
|
|
363
366
|
startVideoFrom = _ref3.startVideoFrom,
|
|
364
367
|
noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl,
|
|
@@ -501,7 +504,7 @@ var Landscape = function Landscape(_ref3) {
|
|
|
501
504
|
}
|
|
502
505
|
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
503
506
|
style: {
|
|
504
|
-
position: "fixed",
|
|
507
|
+
position: logoPosition || "fixed",
|
|
505
508
|
left: logoLeft,
|
|
506
509
|
top: logoTop,
|
|
507
510
|
padding: 20,
|
|
@@ -518,6 +521,7 @@ var Landscape = function Landscape(_ref3) {
|
|
|
518
521
|
})) : null);
|
|
519
522
|
};
|
|
520
523
|
var BrollStudioBackdrop = function BrollStudioBackdrop(_ref4) {
|
|
524
|
+
var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
|
|
521
525
|
var videoUrl = _ref4.videoUrl,
|
|
522
526
|
startVideoFrom = _ref4.startVideoFrom,
|
|
523
527
|
brollUrl = _ref4.brollUrl,
|
|
@@ -530,11 +534,22 @@ var BrollStudioBackdrop = function BrollStudioBackdrop(_ref4) {
|
|
|
530
534
|
noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl,
|
|
531
535
|
durationInFrames = _ref4.durationInFrames,
|
|
532
536
|
faceMetadata = _ref4.faceMetadata,
|
|
533
|
-
noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects
|
|
537
|
+
noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
|
|
538
|
+
_ref4$useSquareInLand = _ref4.useSquareInLandscape,
|
|
539
|
+
useSquareInLandscape = _ref4$useSquareInLand === void 0 ? false : _ref4$useSquareInLand;
|
|
534
540
|
var _useVideoConfig = useVideoConfig(),
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
fps = _useVideoConfig.fps
|
|
541
|
+
outputWidth = _useVideoConfig.width,
|
|
542
|
+
outputHeight = _useVideoConfig.height,
|
|
543
|
+
fps = _useVideoConfig.fps,
|
|
544
|
+
_useVideoConfig$props = _useVideoConfig.props,
|
|
545
|
+
compositionProps = _useVideoConfig$props === void 0 ? {} : _useVideoConfig$props;
|
|
546
|
+
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);
|
|
547
|
+
var shouldUseSquareInLandscape = Boolean(useSquareInLandscape) && outputOrientation === "landscape";
|
|
548
|
+
var squareSize = 1080;
|
|
549
|
+
var width = shouldUseSquareInLandscape ? squareSize : outputWidth;
|
|
550
|
+
var height = shouldUseSquareInLandscape ? squareSize : outputHeight;
|
|
551
|
+
var renderOffsetX = shouldUseSquareInLandscape ? (outputWidth - squareSize) / 2 : 0;
|
|
552
|
+
var orientationOverride = shouldUseSquareInLandscape ? "square" : undefined;
|
|
538
553
|
var frame = useCurrentFrame();
|
|
539
554
|
var _useVirtualBackground = useVirtualBackground(),
|
|
540
555
|
isVirtual = _useVirtualBackground.isVirtual,
|
|
@@ -557,7 +572,7 @@ var BrollStudioBackdrop = function BrollStudioBackdrop(_ref4) {
|
|
|
557
572
|
logoLeft: CHROME_PADDING * 2,
|
|
558
573
|
BrollStudioBackdropComponent: Square
|
|
559
574
|
}
|
|
560
|
-
}),
|
|
575
|
+
}, orientationOverride),
|
|
561
576
|
BrollStudioBackdropComponent = _useOrientationBased.BrollStudioBackdropComponent,
|
|
562
577
|
logoTop = _useOrientationBased.logoTop,
|
|
563
578
|
logoLeft = _useOrientationBased.logoLeft;
|
|
@@ -595,7 +610,7 @@ var BrollStudioBackdrop = function BrollStudioBackdrop(_ref4) {
|
|
|
595
610
|
// Middle section - fully visible
|
|
596
611
|
brollSpringProgress = 1;
|
|
597
612
|
}
|
|
598
|
-
|
|
613
|
+
var content = /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
|
|
599
614
|
src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
|
|
600
615
|
volume: 0.25
|
|
601
616
|
}), /*#__PURE__*/React.createElement(BrollStudioBackdropComponent, {
|
|
@@ -610,11 +625,30 @@ var BrollStudioBackdrop = function BrollStudioBackdrop(_ref4) {
|
|
|
610
625
|
sourceVideoOrientation: sourceVideoOrientation,
|
|
611
626
|
logoLeft: logoLeft,
|
|
612
627
|
logoTop: logoTop,
|
|
628
|
+
logoPosition: shouldUseSquareInLandscape ? "absolute" : "fixed",
|
|
613
629
|
videoUrl: videoUrl,
|
|
614
630
|
faceMetadata: faceMetadata,
|
|
615
631
|
noBackgroundVideoEffects: noBackgroundVideoEffects,
|
|
616
632
|
showVirtual: showVirtual,
|
|
617
633
|
virtualBgUrl: virtualBgUrl
|
|
618
634
|
}, children));
|
|
635
|
+
if (!shouldUseSquareInLandscape) {
|
|
636
|
+
return content;
|
|
637
|
+
}
|
|
638
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
639
|
+
style: {
|
|
640
|
+
width: outputWidth,
|
|
641
|
+
height: outputHeight,
|
|
642
|
+
backgroundColor: "black"
|
|
643
|
+
}
|
|
644
|
+
}, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
645
|
+
style: {
|
|
646
|
+
width: width,
|
|
647
|
+
height: height,
|
|
648
|
+
left: renderOffsetX,
|
|
649
|
+
top: 0,
|
|
650
|
+
overflow: "hidden"
|
|
651
|
+
}
|
|
652
|
+
}, content));
|
|
619
653
|
};
|
|
620
654
|
export { BrollStudioBackdrop };
|
|
@@ -167,7 +167,9 @@ export var HandoffNametag = function HandoffNametag(_ref4) {
|
|
|
167
167
|
_ref4$useSquareInLand = _ref4.useSquareInLandscapeFirstVideo,
|
|
168
168
|
useSquareInLandscapeFirstVideo = _ref4$useSquareInLand === void 0 ? false : _ref4$useSquareInLand,
|
|
169
169
|
_ref4$useSquareInLand2 = _ref4.useSquareInLandscapeSecondVideo,
|
|
170
|
-
useSquareInLandscapeSecondVideo = _ref4$useSquareInLand2 === void 0 ? false : _ref4$useSquareInLand2
|
|
170
|
+
useSquareInLandscapeSecondVideo = _ref4$useSquareInLand2 === void 0 ? false : _ref4$useSquareInLand2,
|
|
171
|
+
_ref4$noShift = _ref4.noShift,
|
|
172
|
+
noShift = _ref4$noShift === void 0 ? false : _ref4$noShift;
|
|
171
173
|
var videoConfig = useVideoConfig();
|
|
172
174
|
var fps = videoConfig.fps,
|
|
173
175
|
width = videoConfig.width,
|
|
@@ -273,7 +275,7 @@ export var HandoffNametag = function HandoffNametag(_ref4) {
|
|
|
273
275
|
var holdCenteredFrames = 3.2 * fps;
|
|
274
276
|
var slideLeftFrames = 0.5 * fps;
|
|
275
277
|
var containerLeftPosition = shouldShiftFirstLeftInLandscape ? interpolate(frame, [0, holdCenteredFrames, holdCenteredFrames + slideLeftFrames], [initialStartLeft, initialStartLeft, baseContainerLeft], DEFAULT_TIME_INTERPOLATE_OPTIONS) : baseContainerLeft;
|
|
276
|
-
var shouldShiftSecondLeftInLandscape = Boolean(useSquareInLandscapeSecondVideo) && outputOrientation === "landscape" && (alignment === null || alignment === void 0 ? void 0 : alignment.startsWith("second"));
|
|
278
|
+
var shouldShiftSecondLeftInLandscape = Boolean(useSquareInLandscapeSecondVideo) && !Boolean(noShift) && outputOrientation === "landscape" && (alignment === null || alignment === void 0 ? void 0 : alignment.startsWith("second"));
|
|
277
279
|
var secondSlideStartFrames = 2.5 * fps;
|
|
278
280
|
var secondSlideDistance = -380;
|
|
279
281
|
var secondContainerTranslateX = shouldShiftSecondLeftInLandscape ? interpolate(frame, [0, secondSlideStartFrames, secondSlideStartFrames + slideLeftFrames], [0, 0, secondSlideDistance], DEFAULT_TIME_INTERPOLATE_OPTIONS) : 0;
|