@poolse/react-ui 2.15.0 → 2.15.2

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
@@ -296,8 +296,8 @@ function CallVideoGrid({
296
296
  const spotlight = others[0] ?? self;
297
297
  if (!spotlight) return null;
298
298
  return /* @__PURE__ */ jsxs("div", { className: className ?? "callstage callstage--solo", children: [
299
- /* @__PURE__ */ jsx(CallVideoTile, { participant: spotlight, label, bleed: true }),
300
- self && others.length === 1 && /* @__PURE__ */ jsx(FloatingSelf, { onClick: onLocalClick, children: /* @__PURE__ */ jsx(CallVideoTile, { participant: self, label, hideName: true }) })
299
+ /* @__PURE__ */ jsx(CallVideoTile, { participant: spotlight, label, bleed: true, fit: "contain" }),
300
+ self && others.length === 1 && /* @__PURE__ */ jsx(FloatingSelf, { onClick: onLocalClick, children: /* @__PURE__ */ jsx(CallVideoTile, { participant: self, label, hideName: true, bleed: true, fit: "cover" }) })
301
301
  ] });
302
302
  }
303
303
  const tiles = [...others, ...self ? [self] : []];
@@ -314,7 +314,8 @@ function CallVideoTile({
314
314
  participant,
315
315
  label,
316
316
  bleed = false,
317
- hideName = false
317
+ hideName = false,
318
+ fit = "cover"
318
319
  }) {
319
320
  const ref = useRef(null);
320
321
  const track = participant.videoTrack;
@@ -342,18 +343,16 @@ function CallVideoTile({
342
343
  playsInline: true,
343
344
  muted: participant.isSelf,
344
345
  style: {
345
- // `contain` for the spotlight, `cover` for everything else,
346
- // and set here rather than left to host CSS because it is
346
+ // Set here rather than left to host CSS because it is
347
347
  // behaviour rather than theme.
348
348
  //
349
349
  // A phone publishes portrait video. Cropping that to fill a
350
350
  // landscape browser window — which is what `cover` does —
351
351
  // throws away most of the frame and lands somewhere around
352
- // the caller's nose. Letterboxing shows the picture they
353
- // are actually sending. Fixed-ratio tiles keep `cover`,
354
- // where the crop is slight and the alternative is a grid
355
- // full of pillarboxed slivers.
356
- objectFit: bleed ? "contain" : "cover",
352
+ // the caller's nose, so the spotlight letterboxes.
353
+ // Fixed-ratio tiles crop, where the loss is slight and the
354
+ // alternative is a grid full of pillarboxed slivers.
355
+ objectFit: fit,
357
356
  // Mirrored only for yourself — mirroring a remote feed would
358
357
  // flip their text and reverse which hand they are waving
359
358
  // with.