@zync/zync-screnplay-player 0.1.187 → 0.1.188

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.
@@ -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;
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;
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,7 +43,8 @@ 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
- text: props.data.text
46
+ text: props.data.text,
47
+ handoffOverlapSeconds: ((_props$data13 = props.data) === null || _props$data13 === void 0 ? void 0 : _props$data13.handoffOverlapSeconds) || 1
47
48
  };
48
49
  }
49
50
  }]);
@@ -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),
@@ -38,8 +38,8 @@ import { DynamicTriangle } from "./components/layouts/DynamicTriangle";
38
38
  import { KeywordStudioBackdrop } from "./components/layouts/KeywordStudioBackdrop";
39
39
  import { MotionStillGreenScreenV2 } from "./components/layouts/MotionStillGreenScreenV2";
40
40
 
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.
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.
43
43
  * */
44
44
  export var RegisteredComponents = {
45
45
  // Layouts
@@ -110,15 +110,16 @@ export var HandoffNametag = function HandoffNametag(_ref) {
110
110
  textTransform: "uppercase",
111
111
  flexDirection: "column"
112
112
  }
113
- }, fullNameLines.map(function (line) {
113
+ }, fullNameLines.map(function (line, lineIndex) {
114
114
  var index = 0;
115
115
  return /*#__PURE__*/React.createElement("div", {
116
116
  style: {
117
117
  display: "flex",
118
118
  gap: "10px",
119
119
  justifyContent: lineJustifyContent[alignment]
120
- }
121
- }, line.split(" ").map(function (word) {
120
+ },
121
+ key: "fullname-line-".concat(lineIndex)
122
+ }, line.split(" ").map(function (word, wordIndex) {
122
123
  var delay = Math.min(index * fullNameDelayBetweenWords, maxTimeInFrames);
123
124
  index++;
124
125
  var opacity = interpolate(frame - delay, [0, 15], [0, 1], {
@@ -133,7 +134,8 @@ export var HandoffNametag = function HandoffNametag(_ref) {
133
134
  style: {
134
135
  opacity: opacity,
135
136
  transform: "translateY(".concat(translateY, "px)")
136
- }
137
+ },
138
+ key: "fullname-word-".concat(lineIndex, "-").concat(wordIndex)
137
139
  }, word);
138
140
  }));
139
141
  })), splitTitle && /*#__PURE__*/React.createElement("div", {
@@ -144,15 +146,16 @@ export var HandoffNametag = function HandoffNametag(_ref) {
144
146
  display: "flex",
145
147
  flexDirection: "column"
146
148
  }
147
- }, titleLines.map(function (line) {
149
+ }, titleLines.map(function (line, lineIndex) {
148
150
  var index = 0;
149
151
  return /*#__PURE__*/React.createElement("div", {
150
152
  style: {
151
153
  display: "flex",
152
154
  gap: "10px",
153
155
  justifyContent: lineJustifyContent[alignment]
154
- }
155
- }, line.split(" ").map(function (word) {
156
+ },
157
+ key: "title-line-".concat(lineIndex)
158
+ }, line.split(" ").map(function (word, wordIndex) {
156
159
  var delay = Math.min(index * titleDelayBetweenWords, maxTimeInFrames);
157
160
  var opacity = interpolate(frame - delay, [0, 15], [0, 1], {
158
161
  easing: Easing["in"](Easing.ease),
@@ -166,7 +169,8 @@ export var HandoffNametag = function HandoffNametag(_ref) {
166
169
  style: {
167
170
  opacity: opacity,
168
171
  transform: "translateY(".concat(translateY, "px)")
169
- }
172
+ },
173
+ key: "title-word-".concat(lineIndex, "-").concat(wordIndex)
170
174
  }, word);
171
175
  }));
172
176
  }))));
@@ -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,45 +1,47 @@
1
- {
2
- "name": "@zync/zync-screnplay-player",
3
- "version": "0.1.187",
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
- "build": "rm -rf dist && babel src --out-dir dist --extensions \".ts,.tsx,.js,.jsx\" --copy-files && webpack",
15
- "publish-lib": "npm run build && npm publish --access public"
16
- },
17
- "dependencies": {
18
- "@remotion/google-fonts": "4.0.208",
19
- "@remotion/lottie": "4.0.208",
20
- "@remotion/motion-blur": "4.0.208",
21
- "@remotion/player": "4.0.208",
22
- "@remotion/transitions": "4.0.208",
23
- "remotion": "4.0.208"
24
- },
25
- "peerDependencies": {
26
- "react": "16.14.0",
27
- "react-dom": "16.14.0"
28
- },
29
- "devDependencies": {
30
- "@babel/cli": "7.21.5",
31
- "@babel/core": "7.21.5",
32
- "@babel/preset-env": "7.21.5",
33
- "@babel/preset-react": "7.18.6",
34
- "@babel/preset-typescript": "^7.26.0",
35
- "babel-loader": "^9.2.1",
36
- "terser-webpack-plugin": "^5.3.11",
37
- "ts-loader": "^9.5.2",
38
- "typescript": "^5.7.3",
39
- "webpack": "^5.97.1",
40
- "webpack-cli": "^6.0.1"
41
- },
42
- "browser": {
43
- "fs": false
44
- }
45
- }
1
+ {
2
+ "name": "@zync/zync-screnplay-player",
3
+ "version": "0.1.188",
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
+ }