@zync/zync-screnplay-player 0.1.203 → 0.1.205
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/LottieAnimationGlobal.js +21 -21
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabColdOpen.js +741 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabConversationSpine.js +607 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabDocumentaryInset.js +606 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabRackFocus.js +603 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabStudioSet.js +589 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +26 -10
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +50 -50
- package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +4 -4
- package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -80
- package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +3 -3
- package/dist/screenplay/RemotionRenderer/development.js +164 -2190
- package/dist/screenplay/RemotionRenderer/helpers/convertToSeconds.js +8 -8
- package/dist/screenplay/RemotionRenderer/helpers/faceBasedVideoStyles.js +4 -4
- package/dist/screenplay/RemotionRenderer/helpers/faceCenteredVideoTransforms.js +46 -46
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabColdOpenLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabConversationSpineLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabDocumentaryInsetLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabRackFocusLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabStudioSetLayout.js +22 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +3 -2
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +25 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +51 -51
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +12 -2
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +20 -6
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +20 -20
- package/package.json +47 -47
|
@@ -90,26 +90,27 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
90
90
|
}, {
|
|
91
91
|
key: "toRemotionFragment",
|
|
92
92
|
value: function toRemotionFragment(screenPlaySegment, layout) {
|
|
93
|
-
var _screenPlaySegment$da, _screenPlaySegment$da2, _layout$data, _screenPlaySegment$da3, _toFrames, _screenPlaySegment$
|
|
93
|
+
var _screenPlaySegment$da, _screenPlaySegment$da2, _layout$data, _screenPlaySegment$da3, _screenPlaySegment$da4, _layout$data2, _screenPlaySegment$da5, _toFrames, _screenPlaySegment$da6, _screenPlaySegment$da7;
|
|
94
94
|
var trimLeft = 0;
|
|
95
95
|
if (layout) {
|
|
96
96
|
trimLeft = layout.data.trimLeft || 0;
|
|
97
97
|
}
|
|
98
98
|
var component = toPascalCase(screenPlaySegment.type);
|
|
99
99
|
var inheritedProps = component === "HandoffNametag" ? {
|
|
100
|
-
handoffNametagVariant: (_screenPlaySegment$da = (_screenPlaySegment$da2 = screenPlaySegment.data) === null || _screenPlaySegment$da2 === void 0 ? void 0 : _screenPlaySegment$da2.handoffNametagVariant) !== null && _screenPlaySegment$da !== void 0 ? _screenPlaySegment$da : layout === null || layout === void 0 ? void 0 : (_layout$data = layout.data) === null || _layout$data === void 0 ? void 0 : _layout$data.handoffNametagVariant
|
|
100
|
+
handoffNametagVariant: (_screenPlaySegment$da = (_screenPlaySegment$da2 = screenPlaySegment.data) === null || _screenPlaySegment$da2 === void 0 ? void 0 : _screenPlaySegment$da2.handoffNametagVariant) !== null && _screenPlaySegment$da !== void 0 ? _screenPlaySegment$da : layout === null || layout === void 0 ? void 0 : (_layout$data = layout.data) === null || _layout$data === void 0 ? void 0 : _layout$data.handoffNametagVariant,
|
|
101
|
+
useSquareInLandscapeFirstVideo: (_screenPlaySegment$da3 = (_screenPlaySegment$da4 = screenPlaySegment.data) === null || _screenPlaySegment$da4 === void 0 ? void 0 : _screenPlaySegment$da4.useSquareInLandscapeFirstVideo) !== null && _screenPlaySegment$da3 !== void 0 ? _screenPlaySegment$da3 : layout === null || layout === void 0 ? void 0 : (_layout$data2 = layout.data) === null || _layout$data2 === void 0 ? void 0 : _layout$data2.useSquareInLandscapeFirstVideo
|
|
101
102
|
} : {};
|
|
102
103
|
var from = this.fps * (screenPlaySegment.data.offset - trimLeft) || 0;
|
|
103
104
|
var durationInFrames = toFrames(this.fps * screenPlaySegment.data.duration);
|
|
104
105
|
var to = from + durationInFrames;
|
|
105
106
|
return _objectSpread(_objectSpread(_objectSpread({}, screenPlaySegment.data), inheritedProps), {}, {
|
|
106
107
|
component: component,
|
|
107
|
-
videoUrl: (_screenPlaySegment$
|
|
108
|
-
startVideoFrom: (_toFrames = toFrames(this.fps * ((_screenPlaySegment$
|
|
108
|
+
videoUrl: (_screenPlaySegment$da5 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da5 === void 0 ? void 0 : _screenPlaySegment$da5.videoUrl,
|
|
109
|
+
startVideoFrom: (_toFrames = toFrames(this.fps * ((_screenPlaySegment$da6 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da6 === void 0 ? void 0 : _screenPlaySegment$da6.start), false, true)) !== null && _toFrames !== void 0 ? _toFrames : 0,
|
|
109
110
|
durationInFrames: durationInFrames,
|
|
110
111
|
from: from,
|
|
111
112
|
to: to,
|
|
112
|
-
videoZoom: (_screenPlaySegment$
|
|
113
|
+
videoZoom: (_screenPlaySegment$da7 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da7 === void 0 ? void 0 : _screenPlaySegment$da7.zoom,
|
|
113
114
|
offset: toFrames(this.fps * (screenPlaySegment.data.offset - trimLeft)) || 0,
|
|
114
115
|
theme: screenPlaySegment.theme,
|
|
115
116
|
themeSettings: screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : screenPlaySegment.themeSettings
|
|
@@ -118,20 +119,20 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
118
119
|
}, {
|
|
119
120
|
key: "toRemotionAudioFragment",
|
|
120
121
|
value: function toRemotionAudioFragment(screenPlaySegment) {
|
|
121
|
-
var _screenPlaySegment$
|
|
122
|
+
var _screenPlaySegment$da8, _toFrames2, _screenPlaySegment$da9, _screenPlaySegment$da10, _screenPlaySegment$da11, _screenPlaySegment$da12, _screenPlaySegment$da13, _screenPlaySegment$da14;
|
|
122
123
|
var from = this.fps * screenPlaySegment.data.offset || 0;
|
|
123
124
|
var durationInFrames = toFrames(this.fps * screenPlaySegment.data.duration) || undefined;
|
|
124
125
|
var to = from + durationInFrames;
|
|
125
126
|
return _objectSpread(_objectSpread({}, screenPlaySegment.data), {}, {
|
|
126
127
|
component: toPascalCase(screenPlaySegment.type),
|
|
127
|
-
src: (_screenPlaySegment$
|
|
128
|
-
startAudioFrom: (_toFrames2 = toFrames(this.fps * ((_screenPlaySegment$
|
|
128
|
+
src: (_screenPlaySegment$da8 = screenPlaySegment.data.sourceAudio) === null || _screenPlaySegment$da8 === void 0 ? void 0 : _screenPlaySegment$da8.url,
|
|
129
|
+
startAudioFrom: (_toFrames2 = toFrames(this.fps * ((_screenPlaySegment$da9 = screenPlaySegment.data.sourceAudio) === null || _screenPlaySegment$da9 === void 0 ? void 0 : _screenPlaySegment$da9.start), false, true)) !== null && _toFrames2 !== void 0 ? _toFrames2 : 0,
|
|
129
130
|
durationInFrames: durationInFrames,
|
|
130
131
|
from: from,
|
|
131
132
|
to: to,
|
|
132
133
|
offset: this.fps * screenPlaySegment.data.offset || 0,
|
|
133
|
-
volume: (_screenPlaySegment$
|
|
134
|
-
loop: ((_screenPlaySegment$
|
|
134
|
+
volume: (_screenPlaySegment$da10 = (_screenPlaySegment$da11 = screenPlaySegment.data) === null || _screenPlaySegment$da11 === void 0 ? void 0 : (_screenPlaySegment$da12 = _screenPlaySegment$da11.sourceAudio) === null || _screenPlaySegment$da12 === void 0 ? void 0 : _screenPlaySegment$da12.volume) !== null && _screenPlaySegment$da10 !== void 0 ? _screenPlaySegment$da10 : 1,
|
|
135
|
+
loop: ((_screenPlaySegment$da13 = screenPlaySegment.data) === null || _screenPlaySegment$da13 === void 0 ? void 0 : (_screenPlaySegment$da14 = _screenPlaySegment$da13.sourceAudio) === null || _screenPlaySegment$da14 === void 0 ? void 0 : _screenPlaySegment$da14.loop) || false
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
138
|
}, {
|
|
@@ -163,10 +164,10 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
163
164
|
key: "toRemotionCaptionSegment",
|
|
164
165
|
value: function toRemotionCaptionSegment(screenPlaySegment, screenplayLayout) {
|
|
165
166
|
var _screenplayLayout$dat,
|
|
166
|
-
_screenPlaySegment$
|
|
167
|
+
_screenPlaySegment$da15,
|
|
167
168
|
_this3 = this;
|
|
168
169
|
var trimLeft = (screenplayLayout === null || screenplayLayout === void 0 ? void 0 : (_screenplayLayout$dat = screenplayLayout.data) === null || _screenplayLayout$dat === void 0 ? void 0 : _screenplayLayout$dat.trimLeft) || 0;
|
|
169
|
-
var segmentOffset = Number(screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : (_screenPlaySegment$
|
|
170
|
+
var segmentOffset = Number(screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : (_screenPlaySegment$da15 = screenPlaySegment.data) === null || _screenPlaySegment$da15 === void 0 ? void 0 : _screenPlaySegment$da15.offset);
|
|
170
171
|
var from = Number.isFinite(segmentOffset) ? this.fps * (segmentOffset + trimLeft) : 0;
|
|
171
172
|
var transcripts = screenPlaySegment.data.transcript_text;
|
|
172
173
|
if (!transcripts) {
|
|
@@ -8,9 +8,9 @@ import React, { useEffect, useState } from 'react';
|
|
|
8
8
|
import { delayRender, continueRender, cancelRender } from 'remotion';
|
|
9
9
|
import { Lottie } from '@remotion/lottie';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Convert a HEX color string (e.g. "#ff8800") to the RGBA float array that
|
|
13
|
-
* Lottie expects: [r, g, b, a] where each component is 0‑1.
|
|
11
|
+
/**
|
|
12
|
+
* Convert a HEX color string (e.g. "#ff8800") to the RGBA float array that
|
|
13
|
+
* Lottie expects: [r, g, b, a] where each component is 0‑1.
|
|
14
14
|
*/
|
|
15
15
|
var hexToRGBA = function hexToRGBA(hex) {
|
|
16
16
|
var clean = hex.replace('#', '');
|
|
@@ -25,9 +25,9 @@ var hexToRGBA = function hexToRGBA(hex) {
|
|
|
25
25
|
];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Recursively walks through shape objects and overrides any fill (fl) or
|
|
30
|
-
* stroke (st) color with the provided RGBA array.
|
|
28
|
+
/**
|
|
29
|
+
* Recursively walks through shape objects and overrides any fill (fl) or
|
|
30
|
+
* stroke (st) color with the provided RGBA array.
|
|
31
31
|
*/
|
|
32
32
|
var _applyColor = function applyColor(shapes, rgba) {
|
|
33
33
|
shapes === null || shapes === void 0 ? void 0 : shapes.forEach(function (shape) {
|
|
@@ -40,11 +40,11 @@ var _applyColor = function applyColor(shapes, rgba) {
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* Traverses all layers (top‑level + asset layers) and applies the primary
|
|
45
|
-
* color to every fill / stroke it encounters. This is useful for Lottie files
|
|
46
|
-
* that were exported with a single static color (e.g. white) and do not use
|
|
47
|
-
* layer naming conventions like "PrimaryColor".
|
|
43
|
+
/**
|
|
44
|
+
* Traverses all layers (top‑level + asset layers) and applies the primary
|
|
45
|
+
* color to every fill / stroke it encounters. This is useful for Lottie files
|
|
46
|
+
* that were exported with a single static color (e.g. white) and do not use
|
|
47
|
+
* layer naming conventions like "PrimaryColor".
|
|
48
48
|
*/
|
|
49
49
|
var replaceGlobalColor = function replaceGlobalColor(data, hex) {
|
|
50
50
|
var _data$assets;
|
|
@@ -60,16 +60,16 @@ var replaceGlobalColor = function replaceGlobalColor(data, hex) {
|
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* LottieAnimationGlobal – specialised wrapper to render the provided Lottie
|
|
65
|
-
* (e.g. text‑bubble‑animation.json) while dynamically replacing **all** stroke
|
|
66
|
-
* and fill colors with the supplied `primaryColor`.
|
|
67
|
-
*
|
|
68
|
-
* Props:
|
|
69
|
-
* • animationPath – URL or local path to the json file.
|
|
70
|
-
* • primaryColor – HEX string, defaults to "#ffffff".
|
|
71
|
-
* • autoplay – boolean, whether to start playing immediately.
|
|
72
|
-
* • loop – boolean, whether to loop the animation.
|
|
63
|
+
/**
|
|
64
|
+
* LottieAnimationGlobal – specialised wrapper to render the provided Lottie
|
|
65
|
+
* (e.g. text‑bubble‑animation.json) while dynamically replacing **all** stroke
|
|
66
|
+
* and fill colors with the supplied `primaryColor`.
|
|
67
|
+
*
|
|
68
|
+
* Props:
|
|
69
|
+
* • animationPath – URL or local path to the json file.
|
|
70
|
+
* • primaryColor – HEX string, defaults to "#ffffff".
|
|
71
|
+
* • autoplay – boolean, whether to start playing immediately.
|
|
72
|
+
* • loop – boolean, whether to loop the animation.
|
|
73
73
|
*/
|
|
74
74
|
export var LottieAnimationGlobal = function LottieAnimationGlobal(_ref) {
|
|
75
75
|
var animationPath = _ref.animationPath,
|