@zync/zync-screnplay-player 0.1.196 → 0.1.197
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/components/LottieAnimationGlobal.js +21 -21
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabSplit.js +930 -0
- 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 +176 -2130
- 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/CreatorCollabSplitLayout.js +68 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +5 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +51 -51
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +4 -2
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +20 -20
- package/dist/screenplay/RemotionRenderer/tracks/Watermark.js +2 -1
- package/package.json +47 -47
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts seconds and a portion of frames to a numeric value of seconds.
|
|
3
|
-
*
|
|
4
|
-
* @param {number} seconds - The number of full seconds.
|
|
5
|
-
* @param {number} nthFrame - The current frame within the second.
|
|
6
|
-
* @param {number} delayInSeconds - Optional delay that adds up to the calculation
|
|
7
|
-
* @param {number} frameRate - The frame rate (frames per second).
|
|
8
|
-
* @return {number} The total time in seconds (with decimals for frames).
|
|
1
|
+
/**
|
|
2
|
+
* Converts seconds and a portion of frames to a numeric value of seconds.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} seconds - The number of full seconds.
|
|
5
|
+
* @param {number} nthFrame - The current frame within the second.
|
|
6
|
+
* @param {number} delayInSeconds - Optional delay that adds up to the calculation
|
|
7
|
+
* @param {number} frameRate - The frame rate (frames per second).
|
|
8
|
+
* @return {number} The total time in seconds (with decimals for frames).
|
|
9
9
|
*/
|
|
10
10
|
export var convertToSeconds = function convertToSeconds(seconds, nthFrame) {
|
|
11
11
|
var delayInSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -4,10 +4,10 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
-
/**
|
|
8
|
-
* Calculate video styles based on face detection metadata
|
|
9
|
-
* This helper adjusts video positioning and transform origin to center faces in the viewport
|
|
10
|
-
* when zooming, accounting for objectFit: "cover" behavior
|
|
7
|
+
/**
|
|
8
|
+
* Calculate video styles based on face detection metadata
|
|
9
|
+
* This helper adjusts video positioning and transform origin to center faces in the viewport
|
|
10
|
+
* when zooming, accounting for objectFit: "cover" behavior
|
|
11
11
|
*/
|
|
12
12
|
export var getFaceBasedVideoStyles = function getFaceBasedVideoStyles(_ref) {
|
|
13
13
|
var faceMetadata = _ref.faceMetadata,
|
|
@@ -4,33 +4,33 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
/**
|
|
8
|
-
* Face-Centered Video Transform Calculator
|
|
9
|
-
*
|
|
10
|
-
* This helper calculates transform origin and positioning to ensure a video is ALWAYS
|
|
11
|
-
* centered on a person's face, regardless of aspect ratio (landscape, square, portrait).
|
|
12
|
-
*
|
|
13
|
-
* Key features:
|
|
14
|
-
* - Converts absolute face coordinates to relative values
|
|
15
|
-
* - Handles different target aspect ratios (1920x1080, 1080x1080, 1080x1920)
|
|
16
|
-
* - Provides smooth interpolation between frames
|
|
17
|
-
* - Calculates optimal scale and positioning for face centering
|
|
7
|
+
/**
|
|
8
|
+
* Face-Centered Video Transform Calculator
|
|
9
|
+
*
|
|
10
|
+
* This helper calculates transform origin and positioning to ensure a video is ALWAYS
|
|
11
|
+
* centered on a person's face, regardless of aspect ratio (landscape, square, portrait).
|
|
12
|
+
*
|
|
13
|
+
* Key features:
|
|
14
|
+
* - Converts absolute face coordinates to relative values
|
|
15
|
+
* - Handles different target aspect ratios (1920x1080, 1080x1080, 1080x1920)
|
|
16
|
+
* - Provides smooth interpolation between frames
|
|
17
|
+
* - Calculates optimal scale and positioning for face centering
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { useCurrentFrame } from "remotion";
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* Calculate face-centered video transforms
|
|
24
|
-
* @param {Object} params - Configuration object
|
|
25
|
-
* @param {Object} params.faceMetadata - Face detection metadata
|
|
26
|
-
* @param {number} params.targetWidth - Target video width (1920 for landscape, 1080 for square/portrait)
|
|
27
|
-
* @param {number} params.targetHeight - Target video height (1080 for landscape/square, 1920 for portrait)
|
|
28
|
-
* @param {number} params.currentFrame - Current frame number (optional, will use useCurrentFrame if not provided)
|
|
29
|
-
* @param {boolean} params.enableInterpolation - Whether to interpolate between frames
|
|
30
|
-
* @param {number} params.faceScale - Scale factor for face area (1.0 = face fills frame, 0.5 = face takes half frame)
|
|
31
|
-
* @param {boolean} params.useAveragePosition - Whether to use average face position for entire video duration
|
|
32
|
-
* @param {boolean} params.centerHorizontally - Whether to only center horizontally (X axis), not vertically (Y axis)
|
|
33
|
-
* @returns {Object} Transform styles and debug info
|
|
22
|
+
/**
|
|
23
|
+
* Calculate face-centered video transforms
|
|
24
|
+
* @param {Object} params - Configuration object
|
|
25
|
+
* @param {Object} params.faceMetadata - Face detection metadata
|
|
26
|
+
* @param {number} params.targetWidth - Target video width (1920 for landscape, 1080 for square/portrait)
|
|
27
|
+
* @param {number} params.targetHeight - Target video height (1080 for landscape/square, 1920 for portrait)
|
|
28
|
+
* @param {number} params.currentFrame - Current frame number (optional, will use useCurrentFrame if not provided)
|
|
29
|
+
* @param {boolean} params.enableInterpolation - Whether to interpolate between frames
|
|
30
|
+
* @param {number} params.faceScale - Scale factor for face area (1.0 = face fills frame, 0.5 = face takes half frame)
|
|
31
|
+
* @param {boolean} params.useAveragePosition - Whether to use average face position for entire video duration
|
|
32
|
+
* @param {boolean} params.centerHorizontally - Whether to only center horizontally (X axis), not vertically (Y axis)
|
|
33
|
+
* @returns {Object} Transform styles and debug info
|
|
34
34
|
*/
|
|
35
35
|
export var calculateFaceCenteredTransforms = function calculateFaceCenteredTransforms(_ref) {
|
|
36
36
|
var _faceMetadata$metadat, _faceMetadata$metadat2;
|
|
@@ -173,10 +173,10 @@ export var calculateFaceCenteredTransforms = function calculateFaceCenteredTrans
|
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
175
|
|
|
176
|
-
/**
|
|
177
|
-
* Calculate average face position from all frames with face data
|
|
178
|
-
* @param {Array} frames - Array of frame data
|
|
179
|
-
* @returns {Object|null} Average face data or null if no face data available
|
|
176
|
+
/**
|
|
177
|
+
* Calculate average face position from all frames with face data
|
|
178
|
+
* @param {Array} frames - Array of frame data
|
|
179
|
+
* @returns {Object|null} Average face data or null if no face data available
|
|
180
180
|
*/
|
|
181
181
|
function getAverageFaceData(frames) {
|
|
182
182
|
if (!frames || frames.length === 0) return null;
|
|
@@ -225,8 +225,8 @@ function getAverageFaceData(frames) {
|
|
|
225
225
|
return averageFaceData;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
/**
|
|
229
|
-
* Get face data for a specific frame with optional interpolation
|
|
228
|
+
/**
|
|
229
|
+
* Get face data for a specific frame with optional interpolation
|
|
230
230
|
*/
|
|
231
231
|
function getFaceDataForFrame(frames, targetFrame, enableInterpolation) {
|
|
232
232
|
if (!frames || frames.length === 0) return null;
|
|
@@ -285,8 +285,8 @@ function getFaceDataForFrame(frames, targetFrame, enableInterpolation) {
|
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
/**
|
|
289
|
-
* Preset configurations for common aspect ratios
|
|
288
|
+
/**
|
|
289
|
+
* Preset configurations for common aspect ratios
|
|
290
290
|
*/
|
|
291
291
|
export var ASPECT_RATIO_PRESETS = {
|
|
292
292
|
LANDSCAPE: {
|
|
@@ -303,17 +303,17 @@ export var ASPECT_RATIO_PRESETS = {
|
|
|
303
303
|
}
|
|
304
304
|
};
|
|
305
305
|
|
|
306
|
-
/**
|
|
307
|
-
* Calculate face-centered object-position values
|
|
308
|
-
* @param {Object} params - Configuration object
|
|
309
|
-
* @param {Object} params.faceMetadata - Face detection metadata
|
|
310
|
-
* @param {number} params.targetWidth - Target video width (1920 for landscape, 1080 for square/portrait)
|
|
311
|
-
* @param {number} params.targetHeight - Target video height (1080 for landscape/square, 1920 for portrait)
|
|
312
|
-
* @param {number} params.currentFrame - Current frame number (optional, will use useCurrentFrame if not provided)
|
|
313
|
-
* @param {boolean} params.enableInterpolation - Whether to interpolate between frames
|
|
314
|
-
* @param {boolean} params.useAveragePosition - Whether to use average face position for entire video duration
|
|
315
|
-
* @param {boolean} params.centerHorizontally - Whether to only center horizontally (X axis), not vertically (Y axis)
|
|
316
|
-
* @returns {Object} Object-position styles and debug info
|
|
306
|
+
/**
|
|
307
|
+
* Calculate face-centered object-position values
|
|
308
|
+
* @param {Object} params - Configuration object
|
|
309
|
+
* @param {Object} params.faceMetadata - Face detection metadata
|
|
310
|
+
* @param {number} params.targetWidth - Target video width (1920 for landscape, 1080 for square/portrait)
|
|
311
|
+
* @param {number} params.targetHeight - Target video height (1080 for landscape/square, 1920 for portrait)
|
|
312
|
+
* @param {number} params.currentFrame - Current frame number (optional, will use useCurrentFrame if not provided)
|
|
313
|
+
* @param {boolean} params.enableInterpolation - Whether to interpolate between frames
|
|
314
|
+
* @param {boolean} params.useAveragePosition - Whether to use average face position for entire video duration
|
|
315
|
+
* @param {boolean} params.centerHorizontally - Whether to only center horizontally (X axis), not vertically (Y axis)
|
|
316
|
+
* @returns {Object} Object-position styles and debug info
|
|
317
317
|
*/
|
|
318
318
|
export var calculateFaceCenteredObjectPosition = function calculateFaceCenteredObjectPosition(_ref2) {
|
|
319
319
|
var _faceMetadata$metadat4, _faceMetadata$metadat5;
|
|
@@ -435,8 +435,8 @@ export var calculateFaceCenteredObjectPosition = function calculateFaceCenteredO
|
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
437
|
|
|
438
|
-
/**
|
|
439
|
-
* Helper function to get transforms for specific aspect ratios
|
|
438
|
+
/**
|
|
439
|
+
* Helper function to get transforms for specific aspect ratios
|
|
440
440
|
*/
|
|
441
441
|
export var getFaceCenteredTransformsForAspectRatio = function getFaceCenteredTransformsForAspectRatio(aspectRatio, faceMetadata) {
|
|
442
442
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -451,8 +451,8 @@ export var getFaceCenteredTransformsForAspectRatio = function getFaceCenteredTra
|
|
|
451
451
|
}, options));
|
|
452
452
|
};
|
|
453
453
|
|
|
454
|
-
/**
|
|
455
|
-
* Helper function to get object-position for specific aspect ratios
|
|
454
|
+
/**
|
|
455
|
+
* Helper function to get object-position for specific aspect ratios
|
|
456
456
|
*/
|
|
457
457
|
export var getFaceCenteredObjectPositionForAspectRatio = function getFaceCenteredObjectPositionForAspectRatio(aspectRatio, faceMetadata) {
|
|
458
458
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
15
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
18
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
19
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
20
|
+
import { Layout } from "./DefaultLayout.js";
|
|
21
|
+
import { getVideoOrientation } from "../../../helpers/getVideoOrientation.js";
|
|
22
|
+
import { cleanFacemetadata } from "../../../helpers/cleanFacemetadata";
|
|
23
|
+
export var CreatorCollabSplitLayout = /*#__PURE__*/function (_Layout) {
|
|
24
|
+
function CreatorCollabSplitLayout(props) {
|
|
25
|
+
var _this;
|
|
26
|
+
_classCallCheck(this, CreatorCollabSplitLayout);
|
|
27
|
+
_this = _callSuper(this, CreatorCollabSplitLayout, [props]);
|
|
28
|
+
_this.getVideoProps(props);
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
_inherits(CreatorCollabSplitLayout, _Layout);
|
|
32
|
+
return _createClass(CreatorCollabSplitLayout, [{
|
|
33
|
+
key: "getVideoProps",
|
|
34
|
+
value: function getVideoProps(props) {
|
|
35
|
+
var _props$data$sourceVid, _props$data, _props$data2, _props$data2$firstNoB, _props$data3, _props$data3$firstNoB, _props$data4, _props$data5, _props$data6, _props$data7, _props$data8, _props$data9, _props$data10, _props$data11, _props$data12;
|
|
36
|
+
var sourceVideoOrientation = getVideoOrientation((_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.aspectRatio);
|
|
37
|
+
var coerceBool = function coerceBool(value) {
|
|
38
|
+
return value === true || value === "true" || value === 1 || value === "1";
|
|
39
|
+
};
|
|
40
|
+
var coerceEffects = function coerceEffects(effects) {
|
|
41
|
+
if (!effects) return effects;
|
|
42
|
+
return Object.entries(effects).reduce(function (acc, _ref) {
|
|
43
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
44
|
+
key = _ref2[0],
|
|
45
|
+
value = _ref2[1];
|
|
46
|
+
acc[key] = coerceBool(value);
|
|
47
|
+
return acc;
|
|
48
|
+
}, {});
|
|
49
|
+
};
|
|
50
|
+
this.props = {
|
|
51
|
+
firstVideoFile: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.firstVideoFile,
|
|
52
|
+
firstNoBackgroundVideoUrl: (_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : (_props$data2$firstNoB = _props$data2.firstNoBackgroundVideo) === null || _props$data2$firstNoB === void 0 ? void 0 : _props$data2$firstNoB.videoUrl,
|
|
53
|
+
firstNoBackgroundFaceMetadata: cleanFacemetadata((_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : (_props$data3$firstNoB = _props$data3.firstNoBackgroundVideo) === null || _props$data3$firstNoB === void 0 ? void 0 : _props$data3$firstNoB.faceMetadata),
|
|
54
|
+
startSecondVideoFrom: 0,
|
|
55
|
+
secondVideoFile: (_props$data4 = props.data) === null || _props$data4 === void 0 ? void 0 : _props$data4.secondVideoFile,
|
|
56
|
+
text: (_props$data5 = props.data) === null || _props$data5 === void 0 ? void 0 : _props$data5.text,
|
|
57
|
+
fullName: (_props$data6 = props.data) === null || _props$data6 === void 0 ? void 0 : _props$data6.fullName,
|
|
58
|
+
title: (_props$data7 = props.data) === null || _props$data7 === void 0 ? void 0 : _props$data7.title,
|
|
59
|
+
collaboratorName: (_props$data8 = props.data) === null || _props$data8 === void 0 ? void 0 : _props$data8.collaboratorName,
|
|
60
|
+
collaboratorTitle: (_props$data9 = props.data) === null || _props$data9 === void 0 ? void 0 : _props$data9.collaboratorTitle,
|
|
61
|
+
topicLabel: (_props$data10 = props.data) === null || _props$data10 === void 0 ? void 0 : _props$data10.topicLabel,
|
|
62
|
+
activeSpeaker: (_props$data11 = props.data) === null || _props$data11 === void 0 ? void 0 : _props$data11.activeSpeaker,
|
|
63
|
+
noBackgroundVideoEffects: coerceEffects((_props$data12 = props.data) === null || _props$data12 === void 0 ? void 0 : _props$data12.noBackgroundVideoEffects),
|
|
64
|
+
sourceVideoOrientation: sourceVideoOrientation
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}]);
|
|
68
|
+
}(Layout);
|
|
@@ -8,6 +8,7 @@ import { SimpleFrameLayout } from "./SimpleFrameLayout.js";
|
|
|
8
8
|
import { Layout } from "./DefaultLayout.js";
|
|
9
9
|
import { TextWithVideoLayout } from "./TextWithVideoLayout.js";
|
|
10
10
|
import { HandoffLayout } from "./HandoffLayout.js";
|
|
11
|
+
import { CreatorCollabSplitLayout } from "./CreatorCollabSplitLayout.js";
|
|
11
12
|
import { MotionStillLayout } from "./MotionStillLayout.js";
|
|
12
13
|
import { KeywordLayout } from "./KeywordLayout.js";
|
|
13
14
|
import { IntroVideoLayout } from "./IntroVideoLayout";
|
|
@@ -39,6 +40,10 @@ export var LayoutFactory = /*#__PURE__*/function () {
|
|
|
39
40
|
{
|
|
40
41
|
return new HandoffLayout(props).flatten();
|
|
41
42
|
}
|
|
43
|
+
case "creator_collab_split":
|
|
44
|
+
{
|
|
45
|
+
return new CreatorCollabSplitLayout(props).flatten();
|
|
46
|
+
}
|
|
42
47
|
case "motion_still":
|
|
43
48
|
case "motion_still_green_screen":
|
|
44
49
|
case "motion_still_full_screen":
|
|
@@ -29,58 +29,58 @@ export var screenplaySchema = z.object({
|
|
|
29
29
|
}), z.object({
|
|
30
30
|
type: "segmentx"
|
|
31
31
|
})])),
|
|
32
|
-
/* z.object({
|
|
33
|
-
type: "segment",
|
|
34
|
-
segments: z.array(
|
|
35
|
-
z.object({
|
|
36
|
-
layout: z.any(),
|
|
37
|
-
effects: z.array(effectSchema),
|
|
38
|
-
})
|
|
39
|
-
),
|
|
32
|
+
/* z.object({
|
|
33
|
+
type: "segment",
|
|
34
|
+
segments: z.array(
|
|
35
|
+
z.object({
|
|
36
|
+
layout: z.any(),
|
|
37
|
+
effects: z.array(effectSchema),
|
|
38
|
+
})
|
|
39
|
+
),
|
|
40
40
|
})*/
|
|
41
|
-
/*z.object({
|
|
42
|
-
type: "effect",
|
|
43
|
-
segments: z.array(effectSchema),
|
|
44
|
-
}),
|
|
45
|
-
z.object({
|
|
46
|
-
type: z.enum(segmentTypes),
|
|
47
|
-
segments: z.array([
|
|
48
|
-
{
|
|
49
|
-
type: "caption",
|
|
50
|
-
segments: z.array(
|
|
51
|
-
z.object({
|
|
52
|
-
type: "caption_simple",
|
|
53
|
-
data: {
|
|
54
|
-
transcript_text: z.array(
|
|
55
|
-
z.object({
|
|
56
|
-
text: z.string(),
|
|
57
|
-
offset: z.number(),
|
|
58
|
-
duration: z.number(),
|
|
59
|
-
})
|
|
60
|
-
),
|
|
61
|
-
duration: z.number().optional(),
|
|
62
|
-
offset: z.number().optional(),
|
|
63
|
-
},
|
|
64
|
-
})
|
|
65
|
-
),
|
|
66
|
-
},
|
|
67
|
-
]),
|
|
68
|
-
}),
|
|
69
|
-
z.object({
|
|
70
|
-
type: "audio",
|
|
71
|
-
segments: z.array([
|
|
72
|
-
z.object({
|
|
73
|
-
type: z.string(),
|
|
74
|
-
data: {
|
|
75
|
-
sourceAudio: {
|
|
76
|
-
url: z.string().url(),
|
|
77
|
-
volume: z.number().min(0).max(1),
|
|
78
|
-
start: z.number(),
|
|
79
|
-
},
|
|
80
|
-
offset: z.number(),
|
|
81
|
-
},
|
|
82
|
-
}),
|
|
83
|
-
]),
|
|
41
|
+
/*z.object({
|
|
42
|
+
type: "effect",
|
|
43
|
+
segments: z.array(effectSchema),
|
|
44
|
+
}),
|
|
45
|
+
z.object({
|
|
46
|
+
type: z.enum(segmentTypes),
|
|
47
|
+
segments: z.array([
|
|
48
|
+
{
|
|
49
|
+
type: "caption",
|
|
50
|
+
segments: z.array(
|
|
51
|
+
z.object({
|
|
52
|
+
type: "caption_simple",
|
|
53
|
+
data: {
|
|
54
|
+
transcript_text: z.array(
|
|
55
|
+
z.object({
|
|
56
|
+
text: z.string(),
|
|
57
|
+
offset: z.number(),
|
|
58
|
+
duration: z.number(),
|
|
59
|
+
})
|
|
60
|
+
),
|
|
61
|
+
duration: z.number().optional(),
|
|
62
|
+
offset: z.number().optional(),
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
),
|
|
66
|
+
},
|
|
67
|
+
]),
|
|
68
|
+
}),
|
|
69
|
+
z.object({
|
|
70
|
+
type: "audio",
|
|
71
|
+
segments: z.array([
|
|
72
|
+
z.object({
|
|
73
|
+
type: z.string(),
|
|
74
|
+
data: {
|
|
75
|
+
sourceAudio: {
|
|
76
|
+
url: z.string().url(),
|
|
77
|
+
volume: z.number().min(0).max(1),
|
|
78
|
+
start: z.number(),
|
|
79
|
+
},
|
|
80
|
+
offset: z.number(),
|
|
81
|
+
},
|
|
82
|
+
}),
|
|
83
|
+
]),
|
|
84
84
|
}),*/
|
|
85
85
|
output: z.object({
|
|
86
86
|
orientation: z["enum"](orientations),
|
|
@@ -9,6 +9,7 @@ import { Nametag } from "./components/effects/Nametag";
|
|
|
9
9
|
import { Title } from "./components/effects/Title";
|
|
10
10
|
import { Watermark } from "./tracks/Watermark";
|
|
11
11
|
import { Handoff } from "./components/layouts/Handoff";
|
|
12
|
+
import { CreatorCollabSplit } from "./components/layouts/CreatorCollabSplit";
|
|
12
13
|
import { HandoffNametag } from "./components/effects/HandoffNametag";
|
|
13
14
|
import { MotionStill } from "./components/layouts/MotionStill";
|
|
14
15
|
import { Keyword } from "./components/layouts/Keyword";
|
|
@@ -38,8 +39,8 @@ import { DynamicTriangle } from "./components/layouts/DynamicTriangle";
|
|
|
38
39
|
import { KeywordStudioBackdrop } from "./components/layouts/KeywordStudioBackdrop";
|
|
39
40
|
import { MotionStillGreenScreenV2 } from "./components/layouts/MotionStillGreenScreenV2";
|
|
40
41
|
|
|
41
|
-
/** Update this so that Remotion knows which component to render when it is passed via screenplay. Ex. "title" will have rendered "Title" component
|
|
42
|
-
* Here we are mapping directly types and component names. Types are snake_case and components PascalCase.
|
|
42
|
+
/** Update this so that Remotion knows which component to render when it is passed via screenplay. Ex. "title" will have rendered "Title" component
|
|
43
|
+
* Here we are mapping directly types and component names. Types are snake_case and components PascalCase.
|
|
43
44
|
* */
|
|
44
45
|
export var RegisteredComponents = {
|
|
45
46
|
// Layouts
|
|
@@ -49,6 +50,7 @@ export var RegisteredComponents = {
|
|
|
49
50
|
SimpleFrameZoomCut: SimpleFrameZoomCut,
|
|
50
51
|
TextWithVideo: TextWithVideo,
|
|
51
52
|
Handoff: Handoff,
|
|
53
|
+
CreatorCollabSplit: CreatorCollabSplit,
|
|
52
54
|
MotionStill: MotionStill,
|
|
53
55
|
MotionStillFullScreen: MotionStillFullScreen,
|
|
54
56
|
MotionStillGreenScreen: MotionStillGreenScreenV2,
|
|
@@ -23,26 +23,26 @@ var transitionThemes = {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
/*
|
|
27
|
-
const UseMotionBlur = ({ children, componentName }) => {
|
|
28
|
-
const {
|
|
29
|
-
props: {
|
|
30
|
-
output: { theme = "default" } = {
|
|
31
|
-
theme: window.screenplayProps.output.theme,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
} = useVideoConfig();
|
|
35
|
-
|
|
36
|
-
if (motionBlurComponents[componentName] && motionBlurThemes[theme]) {
|
|
37
|
-
return (
|
|
38
|
-
<CameraMotionBlur shutterAngle={180} samples={5}>
|
|
39
|
-
{children}
|
|
40
|
-
</CameraMotionBlur>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return children;
|
|
45
|
-
};
|
|
26
|
+
/*
|
|
27
|
+
const UseMotionBlur = ({ children, componentName }) => {
|
|
28
|
+
const {
|
|
29
|
+
props: {
|
|
30
|
+
output: { theme = "default" } = {
|
|
31
|
+
theme: window.screenplayProps.output.theme,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
} = useVideoConfig();
|
|
35
|
+
|
|
36
|
+
if (motionBlurComponents[componentName] && motionBlurThemes[theme]) {
|
|
37
|
+
return (
|
|
38
|
+
<CameraMotionBlur shutterAngle={180} samples={5}>
|
|
39
|
+
{children}
|
|
40
|
+
</CameraMotionBlur>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return children;
|
|
45
|
+
};
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
var NestedEffects = function NestedEffects(_ref) {
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zync/zync-screnplay-player",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"files": [
|
|
5
|
-
"dist"
|
|
6
|
-
],
|
|
7
|
-
"main": "dist/bundle.js",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"exports": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"require": "./dist/bundle.js"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"clean": "rimraf dist",
|
|
15
|
-
"build": "npm run clean && babel src --out-dir dist --extensions \".ts,.tsx,.js,.jsx\" --copy-files && webpack",
|
|
16
|
-
"publish-lib": "npm run build && npm publish --access public"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@remotion/google-fonts": "4.0.208",
|
|
20
|
-
"@remotion/lottie": "4.0.208",
|
|
21
|
-
"@remotion/motion-blur": "4.0.208",
|
|
22
|
-
"@remotion/player": "4.0.208",
|
|
23
|
-
"@remotion/transitions": "4.0.208",
|
|
24
|
-
"remotion": "4.0.208"
|
|
25
|
-
},
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"react": "16.14.0",
|
|
28
|
-
"react-dom": "16.14.0"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@babel/cli": "7.21.5",
|
|
32
|
-
"@babel/core": "7.21.5",
|
|
33
|
-
"@babel/preset-env": "7.21.5",
|
|
34
|
-
"@babel/preset-react": "7.18.6",
|
|
35
|
-
"@babel/preset-typescript": "^7.26.0",
|
|
36
|
-
"babel-loader": "^9.2.1",
|
|
37
|
-
"terser-webpack-plugin": "^5.3.11",
|
|
38
|
-
"ts-loader": "^9.5.2",
|
|
39
|
-
"typescript": "^5.7.3",
|
|
40
|
-
"webpack": "^5.97.1",
|
|
41
|
-
"webpack-cli": "^6.0.1",
|
|
42
|
-
"rimraf": "^5.0.7"
|
|
43
|
-
},
|
|
44
|
-
"browser": {
|
|
45
|
-
"fs": false
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@zync/zync-screnplay-player",
|
|
3
|
+
"version": "0.1.197",
|
|
4
|
+
"files": [
|
|
5
|
+
"dist"
|
|
6
|
+
],
|
|
7
|
+
"main": "dist/bundle.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/bundle.js"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"clean": "rimraf dist",
|
|
15
|
+
"build": "npm run clean && babel src --out-dir dist --extensions \".ts,.tsx,.js,.jsx\" --copy-files && webpack",
|
|
16
|
+
"publish-lib": "npm run build && npm publish --access public"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@remotion/google-fonts": "4.0.208",
|
|
20
|
+
"@remotion/lottie": "4.0.208",
|
|
21
|
+
"@remotion/motion-blur": "4.0.208",
|
|
22
|
+
"@remotion/player": "4.0.208",
|
|
23
|
+
"@remotion/transitions": "4.0.208",
|
|
24
|
+
"remotion": "4.0.208"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "16.14.0",
|
|
28
|
+
"react-dom": "16.14.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@babel/cli": "7.21.5",
|
|
32
|
+
"@babel/core": "7.21.5",
|
|
33
|
+
"@babel/preset-env": "7.21.5",
|
|
34
|
+
"@babel/preset-react": "7.18.6",
|
|
35
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
36
|
+
"babel-loader": "^9.2.1",
|
|
37
|
+
"terser-webpack-plugin": "^5.3.11",
|
|
38
|
+
"ts-loader": "^9.5.2",
|
|
39
|
+
"typescript": "^5.7.3",
|
|
40
|
+
"webpack": "^5.97.1",
|
|
41
|
+
"webpack-cli": "^6.0.1",
|
|
42
|
+
"rimraf": "^5.0.7"
|
|
43
|
+
},
|
|
44
|
+
"browser": {
|
|
45
|
+
"fs": false
|
|
46
|
+
}
|
|
47
|
+
}
|