@zync/zync-screnplay-player 0.1.209 → 0.1.211
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 +18 -16
- package/dist/screenplay/RemotionRenderer/components/effects/Nametag.js +11 -2
- package/dist/screenplay/RemotionRenderer/components/effects/Title.js +11 -2
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabColdOpen.js +14 -761
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabColdOpenVisual.js +786 -0
- package/dist/screenplay/RemotionRenderer/development.js +24 -1
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/CreatorCollabSplitLayout.js +2 -39
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/creatorCollabProps.js +84 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +1 -1
- package/dist/screenplay/RemotionRenderer/theme/hooks/useThemedComponents.js +6 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/collabintro/Nametag.js +14 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/collabintro/Title.js +19 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
11
11
|
import { screenplaySchema } from "./main/screenplaySchema.js";
|
|
12
12
|
import { LayoutFactory } from "./main/lib/layouts/LayoutFactory.js";
|
|
13
13
|
import { toFrames, toPascalCase } from "./main/lib/Sequence.js";
|
|
14
|
+
import { getCreatorCollabEffectProps } from "./main/lib/layouts/creatorCollabProps.js";
|
|
14
15
|
import { transitionThemes } from "./config.js";
|
|
15
16
|
import { normalizeDisabledTranscripts } from "./helpers/normalizeDisabledTranscripts.js";
|
|
16
17
|
export var RemotionRenderer = /*#__PURE__*/function () {
|
|
@@ -90,12 +91,13 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
90
91
|
}, {
|
|
91
92
|
key: "toRemotionFragment",
|
|
92
93
|
value: function toRemotionFragment(screenPlaySegment, layout) {
|
|
93
|
-
var _screenPlaySegment$da, _screenPlaySegment$da2, _layout$data, _screenPlaySegment$da3, _screenPlaySegment$da4, _layout$data2, _screenPlaySegment$da5, _screenPlaySegment$da6, _layout$data3, _screenPlaySegment$da7, _screenPlaySegment$da8, _layout$data4, _screenPlaySegment$da9, _screenPlaySegment$da10, _layout$data5, _screenPlaySegment$da11,
|
|
94
|
+
var _screenPlaySegment$da, _screenPlaySegment$da2, _layout$data, _screenPlaySegment$da3, _screenPlaySegment$da4, _layout$data2, _screenPlaySegment$da5, _screenPlaySegment$da6, _layout$data3, _screenPlaySegment$da7, _screenPlaySegment$da8, _layout$data4, _screenPlaySegment$da9, _screenPlaySegment$da10, _layout$data5, _screenPlaySegment$da11, _screenPlaySegment$da12, _ref, _screenPlaySegment$da13, _screenPlaySegment$da14, _screenPlaySegment$da15;
|
|
94
95
|
var trimLeft = 0;
|
|
95
96
|
if (layout) {
|
|
96
97
|
trimLeft = layout.data.trimLeft || 0;
|
|
97
98
|
}
|
|
98
99
|
var component = toPascalCase(screenPlaySegment.type);
|
|
100
|
+
var creatorCollabProps = component === "Title" || component === "Nametag" ? getCreatorCollabEffectProps(screenPlaySegment.data, layout === null || layout === void 0 ? void 0 : layout.data, this.fps) : {};
|
|
99
101
|
var inheritedProps = component === "HandoffNametag" ? {
|
|
100
102
|
useSquareInLandscape: (_screenPlaySegment$da = (_screenPlaySegment$da2 = screenPlaySegment.data) === null || _screenPlaySegment$da2 === void 0 ? void 0 : _screenPlaySegment$da2.useSquareInLandscape) !== 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.useSquareInLandscape,
|
|
101
103
|
handoffNametagVariant: (_screenPlaySegment$da3 = (_screenPlaySegment$da4 = screenPlaySegment.data) === null || _screenPlaySegment$da4 === void 0 ? void 0 : _screenPlaySegment$da4.handoffNametagVariant) !== 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.handoffNametagVariant,
|
|
@@ -107,14 +109,14 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
107
109
|
var from = this.fps * (screenPlaySegment.data.offset - trimLeft) || 0;
|
|
108
110
|
var durationInFrames = toFrames(this.fps * screenPlaySegment.data.duration);
|
|
109
111
|
var to = from + durationInFrames;
|
|
110
|
-
return _objectSpread(_objectSpread(_objectSpread({}, screenPlaySegment.data), inheritedProps), {}, {
|
|
112
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, screenPlaySegment.data), creatorCollabProps), inheritedProps), {}, {
|
|
111
113
|
component: component,
|
|
112
|
-
videoUrl: (_screenPlaySegment$da11 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$
|
|
113
|
-
startVideoFrom: (
|
|
114
|
+
videoUrl: (_screenPlaySegment$da11 = (_screenPlaySegment$da12 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da12 === void 0 ? void 0 : _screenPlaySegment$da12.videoUrl) !== null && _screenPlaySegment$da11 !== void 0 ? _screenPlaySegment$da11 : creatorCollabProps.videoUrl,
|
|
115
|
+
startVideoFrom: (_ref = typeof ((_screenPlaySegment$da13 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da13 === void 0 ? void 0 : _screenPlaySegment$da13.start) === "number" ? toFrames(this.fps * screenPlaySegment.data.sourceVideo.start, false, true) : creatorCollabProps.startVideoFrom) !== null && _ref !== void 0 ? _ref : 0,
|
|
114
116
|
durationInFrames: durationInFrames,
|
|
115
117
|
from: from,
|
|
116
118
|
to: to,
|
|
117
|
-
videoZoom: (_screenPlaySegment$
|
|
119
|
+
videoZoom: (_screenPlaySegment$da14 = (_screenPlaySegment$da15 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da15 === void 0 ? void 0 : _screenPlaySegment$da15.zoom) !== null && _screenPlaySegment$da14 !== void 0 ? _screenPlaySegment$da14 : creatorCollabProps.videoZoom,
|
|
118
120
|
offset: toFrames(this.fps * (screenPlaySegment.data.offset - trimLeft)) || 0,
|
|
119
121
|
theme: screenPlaySegment.theme,
|
|
120
122
|
themeSettings: screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : screenPlaySegment.themeSettings
|
|
@@ -123,27 +125,27 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
123
125
|
}, {
|
|
124
126
|
key: "toRemotionAudioFragment",
|
|
125
127
|
value: function toRemotionAudioFragment(screenPlaySegment) {
|
|
126
|
-
var _screenPlaySegment$
|
|
128
|
+
var _screenPlaySegment$da16, _toFrames, _screenPlaySegment$da17, _screenPlaySegment$da18, _screenPlaySegment$da19, _screenPlaySegment$da20, _screenPlaySegment$da21, _screenPlaySegment$da22;
|
|
127
129
|
var from = this.fps * screenPlaySegment.data.offset || 0;
|
|
128
130
|
var durationInFrames = toFrames(this.fps * screenPlaySegment.data.duration) || undefined;
|
|
129
131
|
var to = from + durationInFrames;
|
|
130
132
|
return _objectSpread(_objectSpread({}, screenPlaySegment.data), {}, {
|
|
131
133
|
component: toPascalCase(screenPlaySegment.type),
|
|
132
|
-
src: (_screenPlaySegment$
|
|
133
|
-
startAudioFrom: (
|
|
134
|
+
src: (_screenPlaySegment$da16 = screenPlaySegment.data.sourceAudio) === null || _screenPlaySegment$da16 === void 0 ? void 0 : _screenPlaySegment$da16.url,
|
|
135
|
+
startAudioFrom: (_toFrames = toFrames(this.fps * ((_screenPlaySegment$da17 = screenPlaySegment.data.sourceAudio) === null || _screenPlaySegment$da17 === void 0 ? void 0 : _screenPlaySegment$da17.start), false, true)) !== null && _toFrames !== void 0 ? _toFrames : 0,
|
|
134
136
|
durationInFrames: durationInFrames,
|
|
135
137
|
from: from,
|
|
136
138
|
to: to,
|
|
137
139
|
offset: this.fps * screenPlaySegment.data.offset || 0,
|
|
138
|
-
volume: (_screenPlaySegment$
|
|
139
|
-
loop: ((_screenPlaySegment$
|
|
140
|
+
volume: (_screenPlaySegment$da18 = (_screenPlaySegment$da19 = screenPlaySegment.data) === null || _screenPlaySegment$da19 === void 0 ? void 0 : (_screenPlaySegment$da20 = _screenPlaySegment$da19.sourceAudio) === null || _screenPlaySegment$da20 === void 0 ? void 0 : _screenPlaySegment$da20.volume) !== null && _screenPlaySegment$da18 !== void 0 ? _screenPlaySegment$da18 : 1,
|
|
141
|
+
loop: ((_screenPlaySegment$da21 = screenPlaySegment.data) === null || _screenPlaySegment$da21 === void 0 ? void 0 : (_screenPlaySegment$da22 = _screenPlaySegment$da21.sourceAudio) === null || _screenPlaySegment$da22 === void 0 ? void 0 : _screenPlaySegment$da22.loop) || false
|
|
140
142
|
});
|
|
141
143
|
}
|
|
142
144
|
}, {
|
|
143
145
|
key: "toRemotionSegment",
|
|
144
146
|
value: function toRemotionSegment(screenPlaySegment) {
|
|
145
147
|
var _this2 = this,
|
|
146
|
-
|
|
148
|
+
_ref2,
|
|
147
149
|
_screenPlaySegment$tr;
|
|
148
150
|
var layout = screenPlaySegment.layout,
|
|
149
151
|
_screenPlaySegment$ef = screenPlaySegment.effects,
|
|
@@ -156,7 +158,7 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
156
158
|
}
|
|
157
159
|
return _this2.toRemotionFragment(effect, layout);
|
|
158
160
|
}),
|
|
159
|
-
transitionAfter: (
|
|
161
|
+
transitionAfter: (_ref2 = (_screenPlaySegment$tr = screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : screenPlaySegment.transitionAfter) !== null && _screenPlaySegment$tr !== void 0 ? _screenPlaySegment$tr : screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : screenPlaySegment.__transitionAfter) !== null && _ref2 !== void 0 ? _ref2 : true
|
|
160
162
|
};
|
|
161
163
|
}
|
|
162
164
|
}, {
|
|
@@ -168,10 +170,10 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
168
170
|
key: "toRemotionCaptionSegment",
|
|
169
171
|
value: function toRemotionCaptionSegment(screenPlaySegment, screenplayLayout) {
|
|
170
172
|
var _screenplayLayout$dat,
|
|
171
|
-
_screenPlaySegment$
|
|
173
|
+
_screenPlaySegment$da23,
|
|
172
174
|
_this3 = this;
|
|
173
175
|
var trimLeft = (screenplayLayout === null || screenplayLayout === void 0 ? void 0 : (_screenplayLayout$dat = screenplayLayout.data) === null || _screenplayLayout$dat === void 0 ? void 0 : _screenplayLayout$dat.trimLeft) || 0;
|
|
174
|
-
var segmentOffset = Number(screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : (_screenPlaySegment$
|
|
176
|
+
var segmentOffset = Number(screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : (_screenPlaySegment$da23 = screenPlaySegment.data) === null || _screenPlaySegment$da23 === void 0 ? void 0 : _screenPlaySegment$da23.offset);
|
|
175
177
|
var from = Number.isFinite(segmentOffset) ? this.fps * (segmentOffset + trimLeft) : 0;
|
|
176
178
|
var transcripts = screenPlaySegment.data.transcript_text;
|
|
177
179
|
if (!transcripts) {
|
|
@@ -263,8 +265,8 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
263
265
|
throw new Error("Caption track not found");
|
|
264
266
|
}
|
|
265
267
|
var segments = screenPlayCaptionTrack.segments;
|
|
266
|
-
segments.forEach(function (segment,
|
|
267
|
-
_objectDestructuringEmpty(
|
|
268
|
+
segments.forEach(function (segment, _ref3) {
|
|
269
|
+
_objectDestructuringEmpty(_ref3);
|
|
268
270
|
_this6.captionsVideoTrack.push(_this6.toRemotionCaptionSegment(segment));
|
|
269
271
|
});
|
|
270
272
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AbsoluteFill, Audio } from "remotion";
|
|
2
|
+
import { AbsoluteFill, Audio, useVideoConfig } from "remotion";
|
|
3
3
|
import { useThemedComponents } from "../../theme/hooks/useThemedComponents.js";
|
|
4
4
|
export var Nametag = function Nametag(props) {
|
|
5
|
+
var _props$theme;
|
|
6
|
+
var _useVideoConfig = useVideoConfig(),
|
|
7
|
+
_useVideoConfig$props = _useVideoConfig.props.output,
|
|
8
|
+
_useVideoConfig$props2 = _useVideoConfig$props === void 0 ? {
|
|
9
|
+
theme: window.screenplayProps.output.theme
|
|
10
|
+
} : _useVideoConfig$props,
|
|
11
|
+
_useVideoConfig$props3 = _useVideoConfig$props2.theme,
|
|
12
|
+
outputTheme = _useVideoConfig$props3 === void 0 ? "default" : _useVideoConfig$props3;
|
|
13
|
+
var resolvedTheme = (_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : outputTheme;
|
|
5
14
|
var Nametag = useThemedComponents("Nametag", props.theme);
|
|
6
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
15
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, resolvedTheme !== "none" && resolvedTheme !== "collabintro" && /*#__PURE__*/React.createElement(Audio, {
|
|
7
16
|
src: "https://cdn.zync.ai/assets/static/blip.mp3"
|
|
8
17
|
}), /*#__PURE__*/React.createElement(AbsoluteFill, null, /*#__PURE__*/React.createElement(Nametag, props)));
|
|
9
18
|
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Audio, Sequence } from "remotion";
|
|
2
|
+
import { Audio, Sequence, useVideoConfig } from "remotion";
|
|
3
3
|
import { useThemedComponents } from "../../theme/hooks/useThemedComponents.js";
|
|
4
4
|
export var Title = function Title(props) {
|
|
5
|
+
var _props$theme;
|
|
6
|
+
var _useVideoConfig = useVideoConfig(),
|
|
7
|
+
_useVideoConfig$props = _useVideoConfig.props.output,
|
|
8
|
+
_useVideoConfig$props2 = _useVideoConfig$props === void 0 ? {
|
|
9
|
+
theme: window.screenplayProps.output.theme
|
|
10
|
+
} : _useVideoConfig$props,
|
|
11
|
+
_useVideoConfig$props3 = _useVideoConfig$props2.theme,
|
|
12
|
+
outputTheme = _useVideoConfig$props3 === void 0 ? "default" : _useVideoConfig$props3;
|
|
13
|
+
var resolvedTheme = (_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : outputTheme;
|
|
5
14
|
var Title = useThemedComponents("Title", props.theme);
|
|
6
15
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Sequence, {
|
|
7
16
|
from: 0
|
|
8
|
-
},
|
|
17
|
+
}, resolvedTheme !== "none" && resolvedTheme !== "collabintro" && /*#__PURE__*/React.createElement(Audio, {
|
|
9
18
|
src: "https://cdn.zync.ai/assets/static/ding.mp3",
|
|
10
19
|
volume: 0.25
|
|
11
20
|
})), /*#__PURE__*/React.createElement(Title, props));
|