@poolse/sdk 2.14.1 → 2.15.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to `@poolse/sdk` are documented here. Format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
5
5
  [semver](https://semver.org).
6
6
 
7
+ ## [2.15.0] — 2026-08-23
8
+
9
+ ### Fixed
10
+
11
+ - **A video call on a machine with no camera failed outright.**
12
+ `setCameraEnabled` throws `NotFoundError` on a desktop without a
13
+ webcam, and that landed in `join()`'s error path and tore the call
14
+ down — video calling was impossible from such a machine, when it
15
+ should have connected as audio. Capture devices are now best-effort:
16
+ a missing or refused camera _or_ microphone reports through
17
+ `onError` and the call still connects. An SFU that genuinely cannot be
18
+ reached still fails, as it should.
19
+
7
20
  ## [2.14.1] — 2026-08-23
8
21
 
9
22
  ### Fixed
package/dist/index.cjs CHANGED
@@ -1807,9 +1807,15 @@ var CallRoom = class {
1807
1807
  try {
1808
1808
  await room.connect(connection.url, connection.token);
1809
1809
  this.selfId = room.localParticipant.identity;
1810
- await room.localParticipant.setMicrophoneEnabled(!this.startMuted);
1810
+ await this.publish(
1811
+ () => room.localParticipant.setMicrophoneEnabled(!this.startMuted),
1812
+ "microphone"
1813
+ );
1811
1814
  if (this.startWithVideo) {
1812
- await room.localParticipant.setCameraEnabled(true, { facingMode: this.facing });
1815
+ await this.publish(
1816
+ () => room.localParticipant.setCameraEnabled(true, { facingMode: this.facing }),
1817
+ "camera"
1818
+ );
1813
1819
  }
1814
1820
  try {
1815
1821
  await room.startAudio?.();
@@ -1941,6 +1947,20 @@ var CallRoom = class {
1941
1947
  return this.room?.localParticipant.isMicrophoneEnabled ?? false;
1942
1948
  }
1943
1949
  // ── internals ───────────────────────────────────────────────────────
1950
+ /**
1951
+ * Publish one capture device, surviving its absence.
1952
+ *
1953
+ * Split out from {@link withLocal} because this runs mid-join, before
1954
+ * the room is marked connected — emitting a roster here would
1955
+ * advertise a call that has not finished starting.
1956
+ */
1957
+ async publish(fn, what) {
1958
+ try {
1959
+ await fn();
1960
+ } catch (err) {
1961
+ this.emitError(new Error(`no ${what} available: ${String(err)}`));
1962
+ }
1963
+ }
1944
1964
  async withLocal(fn, what) {
1945
1965
  const room = this.room;
1946
1966
  if (!room) return;
@@ -2435,7 +2455,7 @@ var Poolse = class {
2435
2455
  };
2436
2456
 
2437
2457
  // src/version.ts
2438
- var version = "2.14.1";
2458
+ var version = "2.15.0";
2439
2459
 
2440
2460
  exports.ApiError = ApiError;
2441
2461
  exports.AttachmentHandle = AttachmentHandle;