ugcinc-render 1.5.27 → 1.5.29

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/index.js CHANGED
@@ -1634,7 +1634,8 @@ function VideoElement({
1634
1634
  const y = segment.yOffset * scale;
1635
1635
  const width = segment.width * scale;
1636
1636
  const height = segment.height * scale;
1637
- const startFrom = (segment.startTrim ?? 0) / 1e3;
1637
+ const startFromMs = segment.startTrim ?? 0;
1638
+ const startFromFrames = Math.round(startFromMs / 1e3 * fps);
1638
1639
  const fadeOpacity = (0, import_react4.useMemo)(() => {
1639
1640
  if (fadeIn <= 0) return 1;
1640
1641
  const framesFromStart = frame - startFrame;
@@ -1670,11 +1671,11 @@ function VideoElement({
1670
1671
  objectFit: fitModeToCss2(fit)
1671
1672
  }), [fit]);
1672
1673
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1673
- import_remotion3.Video,
1674
+ import_remotion3.OffthreadVideo,
1674
1675
  {
1675
1676
  src,
1676
1677
  style: videoStyle,
1677
- startFrom,
1678
+ trimBefore: startFromFrames,
1678
1679
  playbackRate: speed,
1679
1680
  volume
1680
1681
  }
package/dist/index.mjs CHANGED
@@ -1523,7 +1523,7 @@ import { AbsoluteFill as AbsoluteFill2, useCurrentFrame as useCurrentFrame3, use
1523
1523
 
1524
1524
  // src/components/VideoElement.tsx
1525
1525
  import { useMemo as useMemo4 } from "react";
1526
- import { Video, useCurrentFrame as useCurrentFrame2, useVideoConfig as useVideoConfig2 } from "remotion";
1526
+ import { OffthreadVideo, useCurrentFrame as useCurrentFrame2, useVideoConfig as useVideoConfig2 } from "remotion";
1527
1527
  import { jsx as jsx4 } from "react/jsx-runtime";
1528
1528
  function fitModeToCss2(fit) {
1529
1529
  return fit;
@@ -1548,7 +1548,8 @@ function VideoElement({
1548
1548
  const y = segment.yOffset * scale;
1549
1549
  const width = segment.width * scale;
1550
1550
  const height = segment.height * scale;
1551
- const startFrom = (segment.startTrim ?? 0) / 1e3;
1551
+ const startFromMs = segment.startTrim ?? 0;
1552
+ const startFromFrames = Math.round(startFromMs / 1e3 * fps);
1552
1553
  const fadeOpacity = useMemo4(() => {
1553
1554
  if (fadeIn <= 0) return 1;
1554
1555
  const framesFromStart = frame - startFrame;
@@ -1584,11 +1585,11 @@ function VideoElement({
1584
1585
  objectFit: fitModeToCss2(fit)
1585
1586
  }), [fit]);
1586
1587
  return /* @__PURE__ */ jsx4("div", { style: containerStyle, children: /* @__PURE__ */ jsx4(
1587
- Video,
1588
+ OffthreadVideo,
1588
1589
  {
1589
1590
  src,
1590
1591
  style: videoStyle,
1591
- startFrom,
1592
+ trimBefore: startFromFrames,
1592
1593
  playbackRate: speed,
1593
1594
  volume
1594
1595
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.5.27",
3
+ "version": "1.5.29",
4
4
  "description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",