@camstack/ui-library 1.2.186 → 1.2.188

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.
@@ -129,6 +129,17 @@ export declare function freezeVerdict(stats: WebrtcDebugStats | null): FreezeVer
129
129
  export interface StreamDebugSample {
130
130
  /** When this sample was taken, by the reporting player's clock. */
131
131
  readonly at: number;
132
+ /**
133
+ * The verdict, computed HERE.
134
+ *
135
+ * The host that renders this sample is not always a web page — the native
136
+ * app draws it in React Native — and `@camstack/ui-library` is a DOM
137
+ * component library whose bundle a React Native app must not import (it
138
+ * reaches for browser globals and for `Array.prototype.toSorted`, which
139
+ * Hermes does not have). Sending the verdict rather than the function that
140
+ * derives it keeps that boundary one-way.
141
+ */
142
+ readonly verdict: FreezeVerdictKind;
132
143
  /** The session both halves describe; `null` before the player has one. */
133
144
  readonly sessionId: string | null;
134
145
  readonly stats: WebrtcDebugStats | null;
package/dist/index.cjs CHANGED
@@ -23526,6 +23526,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23526
23526
  const [loading, setLoading] = (0, react$1.useState)(false);
23527
23527
  const [status, setStatus] = (0, react$1.useState)(null);
23528
23528
  const confirm = useConfirm();
23529
+ const deviceId = useDeviceId();
23529
23530
  const handleClick = async () => {
23530
23531
  if (field.confirmMessage) {
23531
23532
  if (!await confirm({
@@ -23537,6 +23538,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23537
23538
  }
23538
23539
  if (!onAction) return;
23539
23540
  const params = resolveActionParams(field, values);
23541
+ if (field.includeDeviceId === true && deviceId !== null && deviceId !== void 0) params["deviceId"] = deviceId;
23540
23542
  setLoading(true);
23541
23543
  setStatus(null);
23542
23544
  try {
@@ -28646,6 +28648,7 @@ function CameraStreamPlayer({ serverUrl, streamKey, label, autoPlay = true, mute
28646
28648
  const emit = () => {
28647
28649
  onDebugStatsRef.current?.({
28648
28650
  at: Date.now(),
28651
+ verdict: freezeVerdict(debugStatsRef.current).kind,
28649
28652
  sessionId: activeSessionIdRef.current,
28650
28653
  stats: debugStatsRef.current,
28651
28654
  server: serverDebugRef.current,
package/dist/index.js CHANGED
@@ -23502,6 +23502,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23502
23502
  const [loading, setLoading] = useState(false);
23503
23503
  const [status, setStatus] = useState(null);
23504
23504
  const confirm = useConfirm();
23505
+ const deviceId = useDeviceId();
23505
23506
  const handleClick = async () => {
23506
23507
  if (field.confirmMessage) {
23507
23508
  if (!await confirm({
@@ -23513,6 +23514,7 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
23513
23514
  }
23514
23515
  if (!onAction) return;
23515
23516
  const params = resolveActionParams(field, values);
23517
+ if (field.includeDeviceId === true && deviceId !== null && deviceId !== void 0) params["deviceId"] = deviceId;
23516
23518
  setLoading(true);
23517
23519
  setStatus(null);
23518
23520
  try {
@@ -28622,6 +28624,7 @@ function CameraStreamPlayer({ serverUrl, streamKey, label, autoPlay = true, mute
28622
28624
  const emit = () => {
28623
28625
  onDebugStatsRef.current?.({
28624
28626
  at: Date.now(),
28627
+ verdict: freezeVerdict(debugStatsRef.current).kind,
28625
28628
  sessionId: activeSessionIdRef.current,
28626
28629
  stats: debugStatsRef.current,
28627
28630
  server: serverDebugRef.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/ui-library",
3
- "version": "1.2.186",
3
+ "version": "1.2.188",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",