@camstack/ui-library 1.2.187 → 1.2.189

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
@@ -19017,6 +19017,15 @@ function BandRow({ band, onChange, onRemove, sensorContext }) {
19017
19017
  children: m.label
19018
19018
  }, m.value))
19019
19019
  }),
19020
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
19021
+ type: "button",
19022
+ "aria-label": "Band audio",
19023
+ "aria-pressed": band.audio !== "muted",
19024
+ title: band.audio === "muted" ? "Silent — this band records the video-only stream." : "With sound — this band records the camera’s audio.",
19025
+ onClick: () => onChange({ audio: band.audio === "muted" ? "on" : "muted" }),
19026
+ className: `inline-flex items-center gap-1 rounded px-2 py-0.5 ${band.audio === "muted" ? "bg-surface-hover text-foreground-subtle" : "bg-primary/10 text-primary"}`,
19027
+ children: [band.audio === "muted" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VolumeX, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Volume2, { className: "h-3.5 w-3.5" }), band.audio === "muted" ? "Silent" : "Sound"]
19028
+ }),
19020
19029
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "flex-1" }),
19021
19030
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
19022
19031
  type: "button",
@@ -23526,6 +23535,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23526
23535
  const [loading, setLoading] = (0, react$1.useState)(false);
23527
23536
  const [status, setStatus] = (0, react$1.useState)(null);
23528
23537
  const confirm = useConfirm();
23538
+ const deviceId = useDeviceId();
23529
23539
  const handleClick = async () => {
23530
23540
  if (field.confirmMessage) {
23531
23541
  if (!await confirm({
@@ -23537,6 +23547,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23537
23547
  }
23538
23548
  if (!onAction) return;
23539
23549
  const params = resolveActionParams(field, values);
23550
+ if (field.includeDeviceId === true && deviceId !== null && deviceId !== void 0) params["deviceId"] = deviceId;
23540
23551
  setLoading(true);
23541
23552
  setStatus(null);
23542
23553
  try {
package/dist/index.js CHANGED
@@ -18993,6 +18993,15 @@ function BandRow({ band, onChange, onRemove, sensorContext }) {
18993
18993
  children: m.label
18994
18994
  }, m.value))
18995
18995
  }),
18996
+ /* @__PURE__ */ jsxs("button", {
18997
+ type: "button",
18998
+ "aria-label": "Band audio",
18999
+ "aria-pressed": band.audio !== "muted",
19000
+ title: band.audio === "muted" ? "Silent — this band records the video-only stream." : "With sound — this band records the camera’s audio.",
19001
+ onClick: () => onChange({ audio: band.audio === "muted" ? "on" : "muted" }),
19002
+ className: `inline-flex items-center gap-1 rounded px-2 py-0.5 ${band.audio === "muted" ? "bg-surface-hover text-foreground-subtle" : "bg-primary/10 text-primary"}`,
19003
+ children: [band.audio === "muted" ? /* @__PURE__ */ jsx(VolumeX, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Volume2, { className: "h-3.5 w-3.5" }), band.audio === "muted" ? "Silent" : "Sound"]
19004
+ }),
18996
19005
  /* @__PURE__ */ jsx("span", { className: "flex-1" }),
18997
19006
  /* @__PURE__ */ jsx("button", {
18998
19007
  type: "button",
@@ -23502,6 +23511,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23502
23511
  const [loading, setLoading] = useState(false);
23503
23512
  const [status, setStatus] = useState(null);
23504
23513
  const confirm = useConfirm();
23514
+ const deviceId = useDeviceId();
23505
23515
  const handleClick = async () => {
23506
23516
  if (field.confirmMessage) {
23507
23517
  if (!await confirm({
@@ -23513,6 +23523,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23513
23523
  }
23514
23524
  if (!onAction) return;
23515
23525
  const params = resolveActionParams(field, values);
23526
+ if (field.includeDeviceId === true && deviceId !== null && deviceId !== void 0) params["deviceId"] = deviceId;
23516
23527
  setLoading(true);
23517
23528
  setStatus(null);
23518
23529
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/ui-library",
3
- "version": "1.2.187",
3
+ "version": "1.2.189",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",