@sesionario/blocks 1.25.0 → 1.26.1

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.cjs CHANGED
@@ -5164,6 +5164,7 @@ function VideoPlayer({
5164
5164
  onPlayingChange,
5165
5165
  onFirstPlay,
5166
5166
  onError,
5167
+ fit = "aspect-video",
5167
5168
  className
5168
5169
  }) {
5169
5170
  const t = { ...DEFAULT_LABELS2, ...labels };
@@ -5445,8 +5446,10 @@ function VideoPlayer({
5445
5446
  ref: containerRef,
5446
5447
  "data-slot": "video-player",
5447
5448
  "data-mode": mode,
5449
+ "data-fit": fit,
5448
5450
  className: cn(
5449
- "group relative aspect-video w-full overflow-hidden rounded-lg bg-black text-white select-none",
5451
+ "group relative w-full overflow-hidden rounded-lg bg-black text-white select-none",
5452
+ fit === "contain" ? "h-full min-h-0 aspect-auto" : "aspect-video",
5450
5453
  className
5451
5454
  ),
5452
5455
  onMouseMove: revealControls,
@@ -5463,7 +5466,7 @@ function VideoPlayer({
5463
5466
  {
5464
5467
  ref: videoRef,
5465
5468
  playsInline: true,
5466
- className: "h-full w-full bg-black",
5469
+ className: "h-full w-full bg-black object-contain",
5467
5470
  onClick: active ? togglePlay : void 0,
5468
5471
  poster
5469
5472
  }
@@ -5841,6 +5844,8 @@ function FeedVideoPlayer({
5841
5844
  playbackId,
5842
5845
  onPlayingChange,
5843
5846
  paused: pausedProp,
5847
+ fit = "aspect-video",
5848
+ className,
5844
5849
  ...playerProps
5845
5850
  }) {
5846
5851
  const {
@@ -5855,14 +5860,24 @@ function FeedVideoPlayer({
5855
5860
  },
5856
5861
  [onExclusivePlayingChange, onPlayingChange]
5857
5862
  );
5858
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, "data-slot": "feed-video-player", children: /* @__PURE__ */ jsxRuntime.jsx(
5859
- VideoPlayer,
5863
+ return /* @__PURE__ */ jsxRuntime.jsx(
5864
+ "div",
5860
5865
  {
5861
- ...playerProps,
5862
- paused: pausedProp || exclusivePaused,
5863
- onPlayingChange: handlePlayingChange
5866
+ ref: containerRef,
5867
+ "data-slot": "feed-video-player",
5868
+ className: cn(fit === "contain" && "h-full min-h-0 w-full", className),
5869
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5870
+ VideoPlayer,
5871
+ {
5872
+ ...playerProps,
5873
+ fit,
5874
+ paused: pausedProp || exclusivePaused,
5875
+ onPlayingChange: handlePlayingChange,
5876
+ className: fit === "contain" ? "h-full min-h-0" : void 0
5877
+ }
5878
+ )
5864
5879
  }
5865
- ) });
5880
+ );
5866
5881
  }
5867
5882
  function usePlaybackStats(statsUrl, { intervalMs = 15e3, enabled = true } = {}) {
5868
5883
  const [stats, setStats] = React7__namespace.useState({});