@poolse/sdk 2.14.0 → 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 +26 -0
- package/dist/index.cjs +35 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -35
- package/dist/index.d.ts +19 -35
- package/dist/index.js +35 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@ 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
|
+
|
|
20
|
+
## [2.14.1] — 2026-08-23
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **Device lists came back with no ids and no names.** `listDevices`
|
|
25
|
+
built its result by spreading each `MediaDeviceInfo`, but that is a
|
|
26
|
+
WebIDL interface whose `deviceId`, `kind` and `label` are accessors on
|
|
27
|
+
the _prototype_ — so `{ ...device }` produces `{}`. Every picker was a
|
|
28
|
+
list of blank, unselectable rows. Each field is now read explicitly.
|
|
29
|
+
- Entries with an empty `deviceId` are dropped. A browser returns that
|
|
30
|
+
placeholder for a device the page has not been granted, and offering
|
|
31
|
+
it gives the user a row that cannot be selected.
|
|
32
|
+
|
|
7
33
|
## [2.14.0] — 2026-08-23
|
|
8
34
|
|
|
9
35
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -1660,6 +1660,16 @@ var CallTokensResource = class {
|
|
|
1660
1660
|
};
|
|
1661
1661
|
|
|
1662
1662
|
// src/voice/call-room.ts
|
|
1663
|
+
function toDevices(raw, kind) {
|
|
1664
|
+
const out = [];
|
|
1665
|
+
for (const device of raw) {
|
|
1666
|
+
if (device.kind && device.kind !== kind) continue;
|
|
1667
|
+
const deviceId = device.deviceId ?? "";
|
|
1668
|
+
if (!deviceId) continue;
|
|
1669
|
+
out.push({ deviceId, kind, label: device.label ?? "" });
|
|
1670
|
+
}
|
|
1671
|
+
return out;
|
|
1672
|
+
}
|
|
1663
1673
|
var CallRoom = class {
|
|
1664
1674
|
livekit;
|
|
1665
1675
|
tokenProvider;
|
|
@@ -1797,9 +1807,15 @@ var CallRoom = class {
|
|
|
1797
1807
|
try {
|
|
1798
1808
|
await room.connect(connection.url, connection.token);
|
|
1799
1809
|
this.selfId = room.localParticipant.identity;
|
|
1800
|
-
await
|
|
1810
|
+
await this.publish(
|
|
1811
|
+
() => room.localParticipant.setMicrophoneEnabled(!this.startMuted),
|
|
1812
|
+
"microphone"
|
|
1813
|
+
);
|
|
1801
1814
|
if (this.startWithVideo) {
|
|
1802
|
-
await
|
|
1815
|
+
await this.publish(
|
|
1816
|
+
() => room.localParticipant.setCameraEnabled(true, { facingMode: this.facing }),
|
|
1817
|
+
"camera"
|
|
1818
|
+
);
|
|
1803
1819
|
}
|
|
1804
1820
|
try {
|
|
1805
1821
|
await room.startAudio?.();
|
|
@@ -1883,14 +1899,13 @@ var CallRoom = class {
|
|
|
1883
1899
|
async listDevices(kind) {
|
|
1884
1900
|
try {
|
|
1885
1901
|
const fromLiveKit = await this.livekit.Room.getLocalDevices?.(kind, false);
|
|
1886
|
-
if (fromLiveKit) return fromLiveKit
|
|
1902
|
+
if (fromLiveKit?.length) return toDevices(fromLiveKit, kind);
|
|
1887
1903
|
} catch {
|
|
1888
1904
|
}
|
|
1889
1905
|
const media = globalThis.navigator?.mediaDevices;
|
|
1890
1906
|
if (!media?.enumerateDevices) return [];
|
|
1891
1907
|
try {
|
|
1892
|
-
|
|
1893
|
-
return all.filter((d) => d.kind === kind).map((d) => ({ deviceId: d.deviceId, kind, label: d.label }));
|
|
1908
|
+
return toDevices(await media.enumerateDevices(), kind);
|
|
1894
1909
|
} catch {
|
|
1895
1910
|
return [];
|
|
1896
1911
|
}
|
|
@@ -1932,6 +1947,20 @@ var CallRoom = class {
|
|
|
1932
1947
|
return this.room?.localParticipant.isMicrophoneEnabled ?? false;
|
|
1933
1948
|
}
|
|
1934
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
|
+
}
|
|
1935
1964
|
async withLocal(fn, what) {
|
|
1936
1965
|
const room = this.room;
|
|
1937
1966
|
if (!room) return;
|
|
@@ -2426,7 +2455,7 @@ var Poolse = class {
|
|
|
2426
2455
|
};
|
|
2427
2456
|
|
|
2428
2457
|
// src/version.ts
|
|
2429
|
-
var version = "2.
|
|
2458
|
+
var version = "2.15.0";
|
|
2430
2459
|
|
|
2431
2460
|
exports.ApiError = ApiError;
|
|
2432
2461
|
exports.AttachmentHandle = AttachmentHandle;
|