ugcinc-render 1.8.208 → 1.8.210

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
@@ -1919,7 +1919,7 @@ function VideoElement({
1919
1919
  const borderRadius = segment.borderRadius;
1920
1920
  const fadeIn = segment.fadeIn ?? 0;
1921
1921
  const loop = segment.loop ?? VIDEO_DEFAULTS.loop;
1922
- const sourceDurationMs = segment.sourceDurationMs;
1922
+ const loopSourceDurationMs = segment.sourceDurationMs ?? (segment.duration?.type === "absolute" ? segment.duration.value : void 0);
1923
1923
  const x = segment.xOffset * scale;
1924
1924
  const y = segment.yOffset * scale;
1925
1925
  const width = segment.width * scale;
@@ -1961,10 +1961,10 @@ function VideoElement({
1961
1961
  objectFit: fitModeToCss2(fit)
1962
1962
  }), [fit]);
1963
1963
  const loopDurationInFrames = (0, import_react4.useMemo)(() => {
1964
- if (!loop || !sourceDurationMs) return void 0;
1965
- const effectiveDurationMs = sourceDurationMs / speed;
1964
+ if (!loop || !loopSourceDurationMs) return void 0;
1965
+ const effectiveDurationMs = loopSourceDurationMs / speed;
1966
1966
  return Math.max(1, Math.round(effectiveDurationMs / 1e3 * fps));
1967
- }, [loop, sourceDurationMs, speed, fps]);
1967
+ }, [loop, loopSourceDurationMs, speed, fps]);
1968
1968
  const videoElement = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1969
1969
  import_remotion3.OffthreadVideo,
1970
1970
  {
@@ -4605,7 +4605,7 @@ function generateStoryReplyElements(props, calculatedMessages) {
4605
4605
  height: imageHeight,
4606
4606
  zIndex: 3,
4607
4607
  inputId: `${STORY_REPLY_INPUT_ID_PREFIX}${cm.message.id}`,
4608
- fit: "cover",
4608
+ fit: "contain",
4609
4609
  borderRadius: storyReplyImageBorderRadius
4610
4610
  });
4611
4611
  const barWidth = storyReplyBarRight - storyReplyBarLeft;
@@ -5795,7 +5795,7 @@ function generateMessageElements2(props, calculatedMessages) {
5795
5795
  zIndex: 5 + i,
5796
5796
  inputId: `${SENDER_IMAGE_INPUT_ID_PREFIX}${cm.message.id}`,
5797
5797
  borderRadius: senderImageBorderRadius,
5798
- fit: "cover"
5798
+ fit: "contain"
5799
5799
  });
5800
5800
  }
5801
5801
  const radii = getCornerRadii2(cm, bubbleRadiusNormal, bubbleRadiusGrouped);
package/dist/index.mjs CHANGED
@@ -965,7 +965,7 @@ function VideoElement({
965
965
  const borderRadius = segment.borderRadius;
966
966
  const fadeIn = segment.fadeIn ?? 0;
967
967
  const loop = segment.loop ?? VIDEO_DEFAULTS.loop;
968
- const sourceDurationMs = segment.sourceDurationMs;
968
+ const loopSourceDurationMs = segment.sourceDurationMs ?? (segment.duration?.type === "absolute" ? segment.duration.value : void 0);
969
969
  const x = segment.xOffset * scale;
970
970
  const y = segment.yOffset * scale;
971
971
  const width = segment.width * scale;
@@ -1007,10 +1007,10 @@ function VideoElement({
1007
1007
  objectFit: fitModeToCss2(fit)
1008
1008
  }), [fit]);
1009
1009
  const loopDurationInFrames = useMemo4(() => {
1010
- if (!loop || !sourceDurationMs) return void 0;
1011
- const effectiveDurationMs = sourceDurationMs / speed;
1010
+ if (!loop || !loopSourceDurationMs) return void 0;
1011
+ const effectiveDurationMs = loopSourceDurationMs / speed;
1012
1012
  return Math.max(1, Math.round(effectiveDurationMs / 1e3 * fps));
1013
- }, [loop, sourceDurationMs, speed, fps]);
1013
+ }, [loop, loopSourceDurationMs, speed, fps]);
1014
1014
  const videoElement = /* @__PURE__ */ jsx4(
1015
1015
  OffthreadVideo,
1016
1016
  {
@@ -3651,7 +3651,7 @@ function generateStoryReplyElements(props, calculatedMessages) {
3651
3651
  height: imageHeight,
3652
3652
  zIndex: 3,
3653
3653
  inputId: `${STORY_REPLY_INPUT_ID_PREFIX}${cm.message.id}`,
3654
- fit: "cover",
3654
+ fit: "contain",
3655
3655
  borderRadius: storyReplyImageBorderRadius
3656
3656
  });
3657
3657
  const barWidth = storyReplyBarRight - storyReplyBarLeft;
@@ -4841,7 +4841,7 @@ function generateMessageElements2(props, calculatedMessages) {
4841
4841
  zIndex: 5 + i,
4842
4842
  inputId: `${SENDER_IMAGE_INPUT_ID_PREFIX}${cm.message.id}`,
4843
4843
  borderRadius: senderImageBorderRadius,
4844
- fit: "cover"
4844
+ fit: "contain"
4845
4845
  });
4846
4846
  }
4847
4847
  const radii = getCornerRadii2(cm, bubbleRadiusNormal, bubbleRadiusGrouped);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.8.208",
3
+ "version": "1.8.210",
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",