@zync/zync-screnplay-player 0.1.228 → 0.1.230

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.
@@ -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),
@@ -46,8 +46,8 @@ import { KeywordStudioBackdrop } from "./components/layouts/KeywordStudioBackdro
46
46
  import { MotionStillGreenScreenV2 } from "./components/layouts/MotionStillGreenScreenV2";
47
47
  import { HookVideo } from "./components/layouts/HookVideo";
48
48
 
49
- /** Update this so that Remotion knows which component to render when it is passed via screenplay. Ex. "title" will have rendered "Title" component
50
- * Here we are mapping directly types and component names. Types are snake_case and components PascalCase.
49
+ /** Update this so that Remotion knows which component to render when it is passed via screenplay. Ex. "title" will have rendered "Title" component
50
+ * Here we are mapping directly types and component names. Types are snake_case and components PascalCase.
51
51
  * */
52
52
  export var RegisteredComponents = {
53
53
  // Layouts
@@ -4,11 +4,50 @@ var _excluded = ["component", "index"],
4
4
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
5
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
6
6
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
7
- import { Easing, Sequence, Series, useVideoConfig } from "remotion";
7
+ import { AbsoluteFill, Audio, Easing, Sequence, Series, interpolate, staticFile, useCurrentFrame, useVideoConfig } from "remotion";
8
8
  import React from "react";
9
9
  import { RegisteredComponents } from "../registeredComponents";
10
10
  import { linearTiming, TransitionSeries } from "@remotion/transitions";
11
11
  import { glitchOnePresentation } from "./transitions/GlitchOne";
12
+ var HOOK_EXIT_PRE_FRAMES = 8;
13
+ var HOOK_EXIT_POST_FRAMES = 7;
14
+ var GLITCH_SLAM_TEAR_BARS = [{
15
+ top: 8,
16
+ height: 2.6,
17
+ phase: -4,
18
+ direction: 1,
19
+ weight: 0.72
20
+ }, {
21
+ top: 19,
22
+ height: 4.8,
23
+ phase: -2,
24
+ direction: -1,
25
+ weight: 0.94
26
+ }, {
27
+ top: 35,
28
+ height: 2.2,
29
+ phase: 0,
30
+ direction: 1,
31
+ weight: 0.84
32
+ }, {
33
+ top: 49,
34
+ height: 5.8,
35
+ phase: 1,
36
+ direction: -1,
37
+ weight: 1
38
+ }, {
39
+ top: 64,
40
+ height: 3.2,
41
+ phase: 3,
42
+ direction: 1,
43
+ weight: 0.68
44
+ }, {
45
+ top: 79,
46
+ height: 4.4,
47
+ phase: 4,
48
+ direction: -1,
49
+ weight: 0.78
50
+ }];
12
51
  var motionBlurComponents = {
13
52
  SentenceSimple: true,
14
53
  Sentence: true
@@ -23,32 +62,219 @@ var transitionThemes = {
23
62
  }
24
63
  };
25
64
 
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
- };
65
+ /*
66
+ const UseMotionBlur = ({ children, componentName }) => {
67
+ const {
68
+ props: {
69
+ output: { theme = "default" } = {
70
+ theme: window.screenplayProps.output.theme,
71
+ },
72
+ },
73
+ } = useVideoConfig();
74
+
75
+ if (motionBlurComponents[componentName] && motionBlurThemes[theme]) {
76
+ return (
77
+ <CameraMotionBlur shutterAngle={180} samples={5}>
78
+ {children}
79
+ </CameraMotionBlur>
80
+ );
81
+ }
82
+
83
+ return children;
84
+ };
46
85
  */
47
86
 
48
- var NestedEffects = function NestedEffects(_ref) {
87
+ var isTruthy = function isTruthy(value) {
88
+ return value === true || value === "true" || value === 1 || value === "1";
89
+ };
90
+ var isHookExitEffectEnabled = function isHookExitEffectEnabled(_ref) {
49
91
  var component = _ref.component,
50
- index = _ref.index,
51
- otherProps = _objectWithoutProperties(_ref, _excluded);
92
+ hasNextSegment = _ref.hasNextSegment,
93
+ props = _ref.props;
94
+ return component === "HookVideo" && hasNextSegment && !isTruthy(props.disableHookExitEffect);
95
+ };
96
+ var withAlpha = function withAlpha(color, alpha) {
97
+ return /^#[0-9a-fA-F]{6}$/.test(color || "") ? "".concat(color).concat(alpha) : color;
98
+ };
99
+ var getHookGlitchSlamShake = function getHookGlitchSlamShake(overlay, frame, width) {
100
+ if (!overlay) {
101
+ return {
102
+ x: 0,
103
+ scale: 1
104
+ };
105
+ }
106
+ var localFrame = frame - overlay.from;
107
+ var fadeOutEnd = Math.max(overlay.durationInFrames - 1, overlay.peakFrame + 1);
108
+ var relativeFrame = localFrame - overlay.peakFrame;
109
+ var preImpact = interpolate(localFrame, [0, overlay.peakFrame], [0, 1], {
110
+ easing: Easing["in"](Easing.cubic),
111
+ extrapolateLeft: "clamp",
112
+ extrapolateRight: "clamp"
113
+ });
114
+ var postDecay = localFrame <= overlay.peakFrame ? 1 : interpolate(localFrame, [overlay.peakFrame, fadeOutEnd], [1, 0], {
115
+ easing: Easing.out(Easing.cubic),
116
+ extrapolateLeft: "clamp",
117
+ extrapolateRight: "clamp"
118
+ });
119
+ var impact = localFrame <= overlay.peakFrame ? preImpact : postDecay;
120
+ var cutPulse = interpolate(Math.abs(relativeFrame), [0, 2, 7], [1, 0.52, 0], {
121
+ extrapolateLeft: "clamp",
122
+ extrapolateRight: "clamp"
123
+ });
124
+ var jitter = (localFrame % 2 === 0 ? 0.86 : -0.86) + Math.sin((localFrame + 1) * 2.37) * 0.24;
125
+ var baseAmplitude = Math.max(6, width * 0.008) * impact;
126
+ var slamAmplitude = Math.max(14, width * 0.018) * cutPulse;
127
+ var x = Math.round((baseAmplitude + slamAmplitude) * jitter * 10) / 10;
128
+ var scale = 1 + impact * 0.004 + cutPulse * 0.012;
129
+ return {
130
+ x: x,
131
+ scale: scale
132
+ };
133
+ };
134
+ var HookGlitchSlamOverlay = function HookGlitchSlamOverlay(_ref2) {
135
+ var _window, _window$screenplayPro;
136
+ var durationInFrames = _ref2.durationInFrames,
137
+ peakFrame = _ref2.peakFrame;
138
+ var frame = useCurrentFrame();
139
+ var _useVideoConfig = useVideoConfig(),
140
+ width = _useVideoConfig.width,
141
+ _useVideoConfig$props = _useVideoConfig.props,
142
+ compositionProps = _useVideoConfig$props === void 0 ? {} : _useVideoConfig$props;
143
+ var inputProps = (compositionProps === null || compositionProps === void 0 ? void 0 : compositionProps.input) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : _window$screenplayPro.input : {}) || {};
144
+ var accentColor = inputProps.accentColor || "#ffffff";
145
+ var accentWash = withAlpha(accentColor, "40") || "rgba(255,255,255,0.24)";
146
+ var fadeOutEnd = Math.max(durationInFrames - 1, peakFrame + 1);
147
+ var relativeFrame = frame - peakFrame;
148
+ var preImpact = interpolate(frame, [0, peakFrame], [0, 1], {
149
+ easing: Easing["in"](Easing.cubic),
150
+ extrapolateLeft: "clamp",
151
+ extrapolateRight: "clamp"
152
+ });
153
+ var postDecay = frame <= peakFrame ? 1 : interpolate(frame, [peakFrame, fadeOutEnd], [1, 0], {
154
+ easing: Easing.out(Easing.cubic),
155
+ extrapolateLeft: "clamp",
156
+ extrapolateRight: "clamp"
157
+ });
158
+ var impact = frame <= peakFrame ? preImpact : postDecay;
159
+ var cutPulse = interpolate(Math.abs(relativeFrame), [0, 2, 6], [1, 0.46, 0], {
160
+ extrapolateLeft: "clamp",
161
+ extrapolateRight: "clamp"
162
+ });
163
+ var tearWindow = interpolate(Math.abs(relativeFrame), [0, 5, 9], [1, 0.72, 0], {
164
+ extrapolateLeft: "clamp",
165
+ extrapolateRight: "clamp"
166
+ });
167
+ var flashOpacity = cutPulse * 0.46 + impact * 0.05;
168
+ var accentOpacity = cutPulse * 0.16 * postDecay;
169
+ var splitOpacity = Math.min(0.22, (cutPulse * 0.16 + tearWindow * 0.05) * postDecay);
170
+ var splitOffset = Math.max(5, width * 0.006) * (0.4 + cutPulse);
171
+ var maxTearOffset = Math.max(22, width * 0.04);
172
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
173
+ style: {
174
+ zIndex: 9999,
175
+ overflow: "hidden",
176
+ pointerEvents: "none"
177
+ }
178
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, {
179
+ style: {
180
+ opacity: accentOpacity,
181
+ backgroundColor: accentWash,
182
+ mixBlendMode: "screen"
183
+ }
184
+ }), /*#__PURE__*/React.createElement(AbsoluteFill, {
185
+ style: {
186
+ opacity: splitOpacity,
187
+ backgroundColor: "rgba(0,240,255,0.72)",
188
+ mixBlendMode: "screen",
189
+ transform: "translate3d(".concat(-splitOffset, "px, 0, 0)")
190
+ }
191
+ }), /*#__PURE__*/React.createElement(AbsoluteFill, {
192
+ style: {
193
+ opacity: splitOpacity,
194
+ backgroundColor: "rgba(255,32,96,0.66)",
195
+ mixBlendMode: "screen",
196
+ transform: "translate3d(".concat(splitOffset, "px, 0, 0)")
197
+ }
198
+ }), GLITCH_SLAM_TEAR_BARS.map(function (bar, index) {
199
+ var barPulse = interpolate(Math.abs(relativeFrame - bar.phase), [0, 2, 5], [1, 0.48, 0], {
200
+ extrapolateLeft: "clamp",
201
+ extrapolateRight: "clamp"
202
+ }) * impact;
203
+ var tearOffset = bar.direction * maxTearOffset * bar.weight * barPulse;
204
+ var colorOpacity = Math.min(0.58, barPulse * 0.46);
205
+ var shadowOpacity = Math.min(0.18, barPulse * 0.18);
206
+ return /*#__PURE__*/React.createElement(React.Fragment, {
207
+ key: "glitch-slam-tear-".concat(index)
208
+ }, /*#__PURE__*/React.createElement("div", {
209
+ style: {
210
+ position: "absolute",
211
+ top: "".concat(bar.top, "%"),
212
+ left: "-8%",
213
+ width: "116%",
214
+ height: "".concat(bar.height, "%"),
215
+ opacity: colorOpacity,
216
+ background: index % 2 === 0 ? "linear-gradient(90deg, rgba(0,240,255,0), rgba(0,240,255,0.78) 18%, rgba(255,255,255,0.42) 52%, rgba(0,240,255,0) 100%)" : "linear-gradient(90deg, rgba(255,32,96,0), rgba(255,32,96,0.72) 22%, rgba(255,255,255,0.38) 58%, rgba(255,32,96,0) 100%)",
217
+ mixBlendMode: "screen",
218
+ transform: "translate3d(".concat(tearOffset, "px, 0, 0)")
219
+ }
220
+ }), /*#__PURE__*/React.createElement("div", {
221
+ style: {
222
+ position: "absolute",
223
+ top: "".concat(bar.top + bar.height * 0.35, "%"),
224
+ left: "-8%",
225
+ width: "116%",
226
+ height: "0.5%",
227
+ opacity: shadowOpacity,
228
+ backgroundColor: "rgba(0,0,0,0.72)",
229
+ transform: "translate3d(".concat(-tearOffset * 0.55, "px, 0, 0)")
230
+ }
231
+ }));
232
+ }), /*#__PURE__*/React.createElement(AbsoluteFill, {
233
+ style: {
234
+ opacity: flashOpacity,
235
+ backgroundColor: "rgba(255,255,255,0.86)",
236
+ mixBlendMode: "screen"
237
+ }
238
+ }));
239
+ };
240
+ var buildHookExitOverlays = function buildHookExitOverlays(track) {
241
+ var overlays = [];
242
+ var timelineCursor = 0;
243
+ track.forEach(function (_ref3, index) {
244
+ var layout = _ref3.layout;
245
+ var durationInFrames = layout.durationInFrames;
246
+ var hasNextSegment = index < track.length - 1;
247
+ var hookExitEffectEnabled = isHookExitEffectEnabled({
248
+ component: layout.component,
249
+ hasNextSegment: hasNextSegment,
250
+ props: layout
251
+ });
252
+ var segmentEnd = timelineCursor + durationInFrames;
253
+ if (hookExitEffectEnabled) {
254
+ var _track, _track$layout;
255
+ var nextDuration = ((_track = track[index + 1]) === null || _track === void 0 ? void 0 : (_track$layout = _track.layout) === null || _track$layout === void 0 ? void 0 : _track$layout.durationInFrames) || 0;
256
+ var preFrames = Math.min(HOOK_EXIT_PRE_FRAMES, durationInFrames);
257
+ var postFrames = Math.min(HOOK_EXIT_POST_FRAMES, nextDuration);
258
+ var from = Math.max(0, segmentEnd - preFrames);
259
+ var overlayDuration = preFrames + postFrames;
260
+ if (overlayDuration > 0) {
261
+ overlays.push({
262
+ from: from,
263
+ durationInFrames: overlayDuration,
264
+ peakFrame: segmentEnd - from,
265
+ playSound: !isTruthy(layout.disableHookSounds) && !isTruthy(layout.disableTransitionSounds),
266
+ soundFrom: segmentEnd
267
+ });
268
+ }
269
+ }
270
+ timelineCursor += durationInFrames;
271
+ });
272
+ return overlays;
273
+ };
274
+ var NestedEffects = function NestedEffects(_ref4) {
275
+ var component = _ref4.component,
276
+ index = _ref4.index,
277
+ otherProps = _objectWithoutProperties(_ref4, _excluded);
52
278
  var ComponentToRender = RegisteredComponents[component];
53
279
  if (!ComponentToRender) {
54
280
  return null;
@@ -59,15 +285,44 @@ var NestedEffects = function NestedEffects(_ref) {
59
285
  name: "NestedEffect-".concat(component)
60
286
  }, /*#__PURE__*/React.createElement(ComponentToRender, otherProps));
61
287
  };
62
- var StandardVideoTrack = function StandardVideoTrack(_ref2) {
63
- var track = _ref2.track;
64
- return /*#__PURE__*/React.createElement(Series, null, track.map(function (_ref3, index) {
65
- var _ref3$layout = _ref3.layout,
66
- component = _ref3$layout.component,
67
- otherProps = _objectWithoutProperties(_ref3$layout, _excluded2),
68
- _ref3$effects = _ref3.effects,
69
- effects = _ref3$effects === void 0 ? [] : _ref3$effects;
288
+ var StandardVideoTrack = function StandardVideoTrack(_ref5) {
289
+ var track = _ref5.track;
290
+ var frame = useCurrentFrame();
291
+ var _useVideoConfig2 = useVideoConfig(),
292
+ width = _useVideoConfig2.width;
293
+ var hookExitOverlays = buildHookExitOverlays(track);
294
+ var activeHookExitOverlay = hookExitOverlays.find(function (_ref6) {
295
+ var from = _ref6.from,
296
+ durationInFrames = _ref6.durationInFrames;
297
+ return frame >= from && frame < from + durationInFrames;
298
+ });
299
+ var _getHookGlitchSlamSha = getHookGlitchSlamShake(activeHookExitOverlay, frame, width),
300
+ shakeX = _getHookGlitchSlamSha.x,
301
+ shakeScale = _getHookGlitchSlamSha.scale;
302
+ return /*#__PURE__*/React.createElement(AbsoluteFill, {
303
+ style: {
304
+ overflow: "hidden"
305
+ }
306
+ }, /*#__PURE__*/React.createElement(AbsoluteFill, {
307
+ style: {
308
+ transform: "translate3d(".concat(shakeX, "px, 0, 0) scale(").concat(shakeScale, ")"),
309
+ transformOrigin: "center center"
310
+ }
311
+ }, /*#__PURE__*/React.createElement(Series, null, track.map(function (_ref7, index, array) {
312
+ var _ref7$layout = _ref7.layout,
313
+ component = _ref7$layout.component,
314
+ otherProps = _objectWithoutProperties(_ref7$layout, _excluded2),
315
+ _ref7$effects = _ref7.effects,
316
+ effects = _ref7$effects === void 0 ? [] : _ref7$effects;
70
317
  var ComponentToRender = RegisteredComponents[component];
318
+ var hookExitEffectEnabled = isHookExitEffectEnabled({
319
+ component: component,
320
+ hasNextSegment: index < array.length - 1,
321
+ props: otherProps
322
+ });
323
+ var hookExitProps = component === "HookVideo" ? {
324
+ hookExitEffectEnabled: hookExitEffectEnabled
325
+ } : {};
71
326
  if (!ComponentToRender) {
72
327
  return null;
73
328
  }
@@ -76,26 +331,53 @@ var StandardVideoTrack = function StandardVideoTrack(_ref2) {
76
331
  name: "Layout - " + component,
77
332
  durationInFrames: otherProps.durationInFrames,
78
333
  premountFor: 100
79
- }, /*#__PURE__*/React.createElement(ComponentToRender, otherProps, effects.map(function (effect, i) {
334
+ }, /*#__PURE__*/React.createElement(ComponentToRender, _extends({}, otherProps, hookExitProps), effects.map(function (effect, i) {
80
335
  return /*#__PURE__*/React.createElement(NestedEffects, _extends({
81
336
  key: i
82
337
  }, effect, {
83
338
  index: index
84
339
  }));
85
340
  })));
341
+ }))), hookExitOverlays.map(function (_ref8, index) {
342
+ var from = _ref8.from,
343
+ durationInFrames = _ref8.durationInFrames,
344
+ peakFrame = _ref8.peakFrame,
345
+ playSound = _ref8.playSound,
346
+ soundFrom = _ref8.soundFrom;
347
+ return /*#__PURE__*/React.createElement(React.Fragment, {
348
+ key: "hook-glitch-slam-".concat(from, "-").concat(index)
349
+ }, /*#__PURE__*/React.createElement(Sequence, {
350
+ from: from,
351
+ durationInFrames: durationInFrames,
352
+ name: "HookGlitchSlamOverlay"
353
+ }, /*#__PURE__*/React.createElement(HookGlitchSlamOverlay, {
354
+ durationInFrames: durationInFrames,
355
+ peakFrame: peakFrame
356
+ })), playSound ? /*#__PURE__*/React.createElement(Sequence, {
357
+ from: soundFrom,
358
+ name: "HookGlitchSlamSound"
359
+ }, /*#__PURE__*/React.createElement(Audio, {
360
+ src: staticFile("blip.mp3"),
361
+ volume: function volume(localFrame) {
362
+ return interpolate(localFrame, [0, 2, 10], [0, 0.32, 0], {
363
+ extrapolateLeft: "clamp",
364
+ extrapolateRight: "clamp"
365
+ });
366
+ }
367
+ })) : null);
86
368
  }));
87
369
  };
88
- var TransitionVideoTrack = function TransitionVideoTrack(_ref4) {
89
- var track = _ref4.track,
90
- transition = _ref4.transition;
91
- return /*#__PURE__*/React.createElement(TransitionSeries, null, track.map(function (_ref5, index, array) {
92
- var _ref5$layout = _ref5.layout,
93
- component = _ref5$layout.component,
94
- otherProps = _objectWithoutProperties(_ref5$layout, _excluded3),
95
- _ref5$effects = _ref5.effects,
96
- effects = _ref5$effects === void 0 ? [] : _ref5$effects,
97
- _ref5$transitionAfter = _ref5.transitionAfter,
98
- transitionAfter = _ref5$transitionAfter === void 0 ? true : _ref5$transitionAfter;
370
+ var TransitionVideoTrack = function TransitionVideoTrack(_ref9) {
371
+ var track = _ref9.track,
372
+ transition = _ref9.transition;
373
+ return /*#__PURE__*/React.createElement(TransitionSeries, null, track.map(function (_ref10, index, array) {
374
+ var _ref10$layout = _ref10.layout,
375
+ component = _ref10$layout.component,
376
+ otherProps = _objectWithoutProperties(_ref10$layout, _excluded3),
377
+ _ref10$effects = _ref10.effects,
378
+ effects = _ref10$effects === void 0 ? [] : _ref10$effects,
379
+ _ref10$transitionAfte = _ref10.transitionAfter,
380
+ transitionAfter = _ref10$transitionAfte === void 0 ? true : _ref10$transitionAfte;
99
381
  var ComponentToRender = RegisteredComponents[component];
100
382
  var hasNextSegment = index < array.length - 1;
101
383
  var shouldTransition = hasNextSegment && transitionAfter !== false;
@@ -120,18 +402,18 @@ var TransitionVideoTrack = function TransitionVideoTrack(_ref4) {
120
402
  }) : null];
121
403
  }));
122
404
  };
123
- export var LayoutVideoTrack = function LayoutVideoTrack(_ref6) {
124
- var track = _ref6.track;
405
+ export var LayoutVideoTrack = function LayoutVideoTrack(_ref11) {
406
+ var track = _ref11.track;
125
407
  if (!track) {
126
408
  return null;
127
409
  }
128
- var _useVideoConfig = useVideoConfig(),
129
- _useVideoConfig$props = _useVideoConfig.props.output,
130
- _useVideoConfig$props2 = _useVideoConfig$props === void 0 ? {
410
+ var _useVideoConfig3 = useVideoConfig(),
411
+ _useVideoConfig3$prop = _useVideoConfig3.props.output,
412
+ _useVideoConfig3$prop2 = _useVideoConfig3$prop === void 0 ? {
131
413
  theme: window.screenplayProps.output.theme
132
- } : _useVideoConfig$props,
133
- _useVideoConfig$props3 = _useVideoConfig$props2.theme,
134
- theme = _useVideoConfig$props3 === void 0 ? "default" : _useVideoConfig$props3;
414
+ } : _useVideoConfig3$prop,
415
+ _useVideoConfig3$prop3 = _useVideoConfig3$prop2.theme,
416
+ theme = _useVideoConfig3$prop3 === void 0 ? "default" : _useVideoConfig3$prop3;
135
417
  var transition = transitionThemes[theme];
136
418
  if (transition) {
137
419
  return /*#__PURE__*/React.createElement(TransitionVideoTrack, {
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
- {
2
- "name": "@zync/zync-screnplay-player",
3
- "version": "0.1.228",
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.441",
20
- "@remotion/lottie": "4.0.441",
21
- "@remotion/motion-blur": "4.0.441",
22
- "@remotion/player": "4.0.441",
23
- "@remotion/transitions": "4.0.441",
24
- "remotion": "4.0.441"
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.230",
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.441",
20
+ "@remotion/lottie": "4.0.441",
21
+ "@remotion/motion-blur": "4.0.441",
22
+ "@remotion/player": "4.0.441",
23
+ "@remotion/transitions": "4.0.441",
24
+ "remotion": "4.0.441"
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
+ }