@zync/zync-screnplay-player 0.1.203 → 0.1.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +13 -12
- package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +26 -10
- package/dist/screenplay/RemotionRenderer/development.js +786 -1737
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +3 -2
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +20 -6
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ export var HandoffLayout = /*#__PURE__*/function (_Layout) {
|
|
|
27
27
|
return _createClass(HandoffLayout, [{
|
|
28
28
|
key: "getVideoProps",
|
|
29
29
|
value: function getVideoProps(props) {
|
|
30
|
-
var _props$data$sourceVid, _props$data, _props$data2, _props$data3, _props$data4, _props$data5, _props$data6, _props$data6$firstNoB, _props$data7, _props$data7$firstNoB, _props$data8, _props$data9, _props$data10, _props$data11, _props$data11$secondN, _props$data12, _props$data12$secondN, _props$data$sourceVid2, _props$data$sourceVid3, _props$data13;
|
|
30
|
+
var _props$data$sourceVid, _props$data, _props$data2, _props$data3, _props$data4, _props$data5, _props$data6, _props$data6$firstNoB, _props$data7, _props$data7$firstNoB, _props$data8, _props$data9, _props$data10, _props$data11, _props$data11$secondN, _props$data12, _props$data12$secondN, _props$data$sourceVid2, _props$data$sourceVid3, _props$data13, _props$data14;
|
|
31
31
|
var sourceVideoOrientation = getVideoOrientation((_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.aspectRatio);
|
|
32
32
|
this.props = {
|
|
33
33
|
startFirstVideoFrom: toFrames(this.fps * (((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.startFirstVideoFrom) + (((_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : _props$data2.trimLeft) || 0)), true) || 0,
|
|
@@ -43,8 +43,9 @@ export var HandoffLayout = /*#__PURE__*/function (_Layout) {
|
|
|
43
43
|
videoUrl: (_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.videoUrl,
|
|
44
44
|
sourceVideoOrientation: sourceVideoOrientation,
|
|
45
45
|
videoZoom: ((_props$data$sourceVid3 = props.data.sourceVideo) === null || _props$data$sourceVid3 === void 0 ? void 0 : _props$data$sourceVid3.zoom) || 1,
|
|
46
|
+
useSquareInLandscapeFirstVideo: ((_props$data13 = props.data) === null || _props$data13 === void 0 ? void 0 : _props$data13.useSquareInLandscapeFirstVideo) || false,
|
|
46
47
|
text: props.data.text,
|
|
47
|
-
handoffOverlapSeconds: ((_props$
|
|
48
|
+
handoffOverlapSeconds: ((_props$data14 = props.data) === null || _props$data14 === void 0 ? void 0 : _props$data14.handoffOverlapSeconds) || 0
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
}]);
|
|
@@ -156,17 +156,23 @@ var HighlightLines = function HighlightLines(_ref3) {
|
|
|
156
156
|
}));
|
|
157
157
|
};
|
|
158
158
|
export var HandoffNametag = function HandoffNametag(_ref4) {
|
|
159
|
+
var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
|
|
159
160
|
var pictureUrl = _ref4.pictureUrl,
|
|
160
161
|
fullName = _ref4.fullName,
|
|
161
162
|
title = _ref4.title,
|
|
162
163
|
alignment = _ref4.alignment,
|
|
163
164
|
duration = _ref4.duration,
|
|
164
165
|
_ref4$handoffNametagV = _ref4.handoffNametagVariant,
|
|
165
|
-
handoffNametagVariant = _ref4$handoffNametagV === void 0 ? HANDOFF_NAMETAG_VARIANTS.BOXED : _ref4$handoffNametagV
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
handoffNametagVariant = _ref4$handoffNametagV === void 0 ? HANDOFF_NAMETAG_VARIANTS.BOXED : _ref4$handoffNametagV,
|
|
167
|
+
_ref4$useSquareInLand = _ref4.useSquareInLandscapeFirstVideo,
|
|
168
|
+
useSquareInLandscapeFirstVideo = _ref4$useSquareInLand === void 0 ? false : _ref4$useSquareInLand;
|
|
169
|
+
var videoConfig = useVideoConfig();
|
|
170
|
+
var fps = videoConfig.fps,
|
|
171
|
+
width = videoConfig.width,
|
|
172
|
+
height = videoConfig.height,
|
|
173
|
+
_videoConfig$props = videoConfig.props,
|
|
174
|
+
compositionProps = _videoConfig$props === void 0 ? {} : _videoConfig$props;
|
|
175
|
+
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);
|
|
170
176
|
var _useTheme = useTheme(),
|
|
171
177
|
primaryColor = _useTheme.primaryColor,
|
|
172
178
|
primaryContrast = _useTheme.primaryContrast,
|
|
@@ -257,6 +263,14 @@ export var HandoffNametag = function HandoffNametag(_ref4) {
|
|
|
257
263
|
var initialsFontSize = Math.max(Math.round(mediaBaseSize * 0.45), 22);
|
|
258
264
|
var contentAlignItems = lineJustifyContent[alignment] === "flex-end" ? "flex-end" : "flex-start";
|
|
259
265
|
var staticContainerTop = containerTop === null || containerTop === void 0 ? void 0 : containerTop[alignment];
|
|
266
|
+
var baseContainerLeft = containerLeft === null || containerLeft === void 0 ? void 0 : containerLeft[alignment];
|
|
267
|
+
var shouldShiftFirstLeftInLandscape = Boolean(useSquareInLandscapeFirstVideo) && outputOrientation === "landscape" && alignment === "first-left" && typeof baseContainerLeft === "number";
|
|
268
|
+
var centerAlignedLeft = (width - textContainerWidth) / 2;
|
|
269
|
+
var initialLeftOffset = 60;
|
|
270
|
+
var initialStartLeft = centerAlignedLeft - initialLeftOffset;
|
|
271
|
+
var holdCenteredFrames = 3.2 * fps;
|
|
272
|
+
var slideLeftFrames = 0.5 * fps;
|
|
273
|
+
var containerLeftPosition = shouldShiftFirstLeftInLandscape ? interpolate(frame, [0, holdCenteredFrames, holdCenteredFrames + slideLeftFrames], [initialStartLeft, initialStartLeft, baseContainerLeft], DEFAULT_TIME_INTERPOLATE_OPTIONS) : baseContainerLeft;
|
|
260
274
|
var _getTypewriterState = getTypewriterState({
|
|
261
275
|
frame: frame,
|
|
262
276
|
fps: fps,
|
|
@@ -292,7 +306,7 @@ export var HandoffNametag = function HandoffNametag(_ref4) {
|
|
|
292
306
|
style: {
|
|
293
307
|
position: "absolute",
|
|
294
308
|
top: staticContainerTop,
|
|
295
|
-
left:
|
|
309
|
+
left: containerLeftPosition,
|
|
296
310
|
right: containerRight[alignment],
|
|
297
311
|
bottom: typeof staticContainerTop === "number" ? undefined : containerBottom,
|
|
298
312
|
borderRadius: "10px",
|