@zync/zync-screnplay-player 0.1.222 → 0.1.224

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.
@@ -430,7 +430,11 @@ export var HookVideo = function HookVideo(_ref5) {
430
430
  hookDurationSeconds = _ref5$hookDurationSec === void 0 ? 1.6 : _ref5$hookDurationSec,
431
431
  hookAccentText = _ref5.hookAccentText,
432
432
  _ref5$disableHookSoun = _ref5.disableHookSounds,
433
- disableHookSounds = _ref5$disableHookSoun === void 0 ? false : _ref5$disableHookSoun;
433
+ disableHookSounds = _ref5$disableHookSoun === void 0 ? false : _ref5$disableHookSoun,
434
+ _ref5$trimLeft = _ref5.trimLeft,
435
+ trimLeft = _ref5$trimLeft === void 0 ? 0 : _ref5$trimLeft,
436
+ _ref5$baseTrimLeft = _ref5.baseTrimLeft,
437
+ baseTrimLeft = _ref5$baseTrimLeft === void 0 ? 0 : _ref5$baseTrimLeft;
434
438
  var frame = useCurrentFrame();
435
439
  var _useVideoConfig = useVideoConfig(),
436
440
  outputWidth = _useVideoConfig.width,
@@ -465,6 +469,10 @@ export var HookVideo = function HookVideo(_ref5) {
465
469
  effectiveHookFrames = _getHookTiming.effectiveHookFrames,
466
470
  settleFrames = _getHookTiming.settleFrames,
467
471
  shortSegment = _getHookTiming.shortSegment;
472
+ var hookAnimationOffsetFrames = Math.max(0, Math.round((trimLeft - baseTrimLeft) * fps));
473
+ var hookAnimationFrame = frame + hookAnimationOffsetFrames;
474
+ var hookOverlayFrame = hookAnimationFrame;
475
+ var isContinuationChunk = hookAnimationOffsetFrames > 0;
468
476
  var preset = useOrientationBased({
469
477
  landscape: {
470
478
  textBoxWidth: style === HOOK_STYLE_PRESETS.split_reveal ? width * 0.38 : style === HOOK_STYLE_PRESETS.mono_shock ? width * 0.46 : width * 0.58,
@@ -494,7 +502,7 @@ export var HookVideo = function HookVideo(_ref5) {
494
502
  var monoOverlayHoldFrames = style === HOOK_STYLE_PRESETS.mono_shock ? Math.round(fps * 0.55) : 0;
495
503
  var overlayFadeFrames = style === HOOK_STYLE_PRESETS.mono_shock ? 12 : 6;
496
504
  var overlayEndFrame = shortSegment ? durationInFrames : Math.min(durationInFrames, effectiveHookFrames + monoOverlayHoldFrames);
497
- var hookOverlayOpacity = shortSegment ? 1 : interpolate(frame, [Math.max(overlayEndFrame - overlayFadeFrames, 0), overlayEndFrame], [1, 0], {
505
+ var hookOverlayOpacity = shortSegment && !isContinuationChunk ? 1 : interpolate(hookOverlayFrame, [Math.max(overlayEndFrame - overlayFadeFrames, 0), overlayEndFrame], [1, 0], {
498
506
  extrapolateLeft: "clamp",
499
507
  extrapolateRight: "clamp"
500
508
  });
@@ -516,7 +524,7 @@ export var HookVideo = function HookVideo(_ref5) {
516
524
  extrapolateLeft: "clamp",
517
525
  extrapolateRight: "clamp"
518
526
  })), HOOK_STYLE_PRESETS.border_alarm, 0), HOOK_STYLE_PRESETS.split_reveal, 0)[style];
519
- var letterboxHeight = style === HOOK_STYLE_PRESETS.mono_shock ? interpolate(frame, [0, effectiveHookFrames, overlayEndFrame], [0, height * 0.11, height * 0.11], {
527
+ var letterboxHeight = style === HOOK_STYLE_PRESETS.mono_shock ? interpolate(hookOverlayFrame, [0, effectiveHookFrames, Math.max(effectiveHookFrames + 1, overlayEndFrame)], [0, height * 0.11, height * 0.11], {
520
528
  extrapolateLeft: "clamp",
521
529
  extrapolateRight: "clamp"
522
530
  }) * hookOverlayOpacity : 0;
@@ -533,7 +541,7 @@ export var HookVideo = function HookVideo(_ref5) {
533
541
  extrapolateRight: "clamp"
534
542
  }) : 0;
535
543
  var _getVideoTreatment = getVideoTreatment({
536
- frame: frame,
544
+ frame: hookOverlayFrame,
537
545
  style: style,
538
546
  hookFrames: effectiveHookFrames,
539
547
  settleFrames: settleFrames,
@@ -805,7 +813,7 @@ export var HookVideo = function HookVideo(_ref5) {
805
813
  accentContrast: accentContrast,
806
814
  primaryContrast: primaryContrast,
807
815
  style: style,
808
- frame: frame,
816
+ frame: hookAnimationFrame,
809
817
  fps: fps,
810
818
  hookFrames: effectiveHookFrames
811
819
  }))), /*#__PURE__*/React.createElement(AbsoluteFill, {
@@ -295,7 +295,7 @@ var KeywordComponent = function KeywordComponent(_ref4) {
295
295
  }
296
296
  }, /*#__PURE__*/React.createElement("div", {
297
297
  style: {
298
- position: "fixed",
298
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed",
299
299
  zIndex: 999,
300
300
  height: CHROME_PADDING,
301
301
  width: width,
@@ -304,7 +304,7 @@ var KeywordComponent = function KeywordComponent(_ref4) {
304
304
  }
305
305
  }), /*#__PURE__*/React.createElement("div", {
306
306
  style: {
307
- position: "fixed",
307
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed",
308
308
  zIndex: 999,
309
309
  width: CHROME_PADDING,
310
310
  height: height,
@@ -313,7 +313,7 @@ var KeywordComponent = function KeywordComponent(_ref4) {
313
313
  }
314
314
  }), /*#__PURE__*/React.createElement("div", {
315
315
  style: {
316
- position: "fixed",
316
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed",
317
317
  zIndex: 999,
318
318
  width: CHROME_PADDING,
319
319
  height: height,
@@ -205,7 +205,7 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
205
205
  }
206
206
  }, /*#__PURE__*/React.createElement("div", {
207
207
  style: {
208
- position: "fixed",
208
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed",
209
209
  zIndex: 999,
210
210
  height: CHROME_PADDING,
211
211
  width: width,
@@ -214,7 +214,7 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
214
214
  }
215
215
  }), /*#__PURE__*/React.createElement("div", {
216
216
  style: {
217
- position: "fixed",
217
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed",
218
218
  zIndex: 999,
219
219
  width: CHROME_PADDING,
220
220
  height: height,
@@ -223,7 +223,7 @@ var MotionStillComponent = function MotionStillComponent(_ref3) {
223
223
  }
224
224
  }), /*#__PURE__*/React.createElement("div", {
225
225
  style: {
226
- position: "fixed",
226
+ position: shouldUseSquareInLandscape ? "absolute" : "fixed",
227
227
  zIndex: 999,
228
228
  width: CHROME_PADDING,
229
229
  height: height,