@whereby.com/media 9.2.0 → 9.2.1
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 +2 -4
- package/dist/index.mjs +2 -4
- package/dist/legacy-esm.js +2 -4
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2473,11 +2473,9 @@ function getMediaConstraints({ disableAEC, disableAGC, hd, lax, lowDataMode, pre
|
|
|
2473
2473
|
function getConstraints({ devices, videoId, audioId, options, type = "ideal" }) {
|
|
2474
2474
|
const audioDevices = devices.filter((d) => d.kind === "audioinput");
|
|
2475
2475
|
const videoDevices = devices.filter((d) => d.kind === "videoinput");
|
|
2476
|
-
const useDefaultAudio = !audioId || !audioDevices.some((d) => d.deviceId === audioId);
|
|
2477
|
-
const useDefaultVideo = !videoId || !videoDevices.some((d) => d.deviceId === videoId);
|
|
2478
2476
|
const constraints = getMediaConstraints(Object.assign({ preferredDeviceIds: {
|
|
2479
|
-
audioId:
|
|
2480
|
-
videoId:
|
|
2477
|
+
audioId: typeof audioId === "string" ? { [type]: audioId } : null,
|
|
2478
|
+
videoId: typeof videoId === "string" ? { [type]: videoId } : null,
|
|
2481
2479
|
} }, options));
|
|
2482
2480
|
if (audioId === false || !audioDevices.length) {
|
|
2483
2481
|
delete constraints.audio;
|
package/dist/index.mjs
CHANGED
|
@@ -2452,11 +2452,9 @@ function getMediaConstraints({ disableAEC, disableAGC, hd, lax, lowDataMode, pre
|
|
|
2452
2452
|
function getConstraints({ devices, videoId, audioId, options, type = "ideal" }) {
|
|
2453
2453
|
const audioDevices = devices.filter((d) => d.kind === "audioinput");
|
|
2454
2454
|
const videoDevices = devices.filter((d) => d.kind === "videoinput");
|
|
2455
|
-
const useDefaultAudio = !audioId || !audioDevices.some((d) => d.deviceId === audioId);
|
|
2456
|
-
const useDefaultVideo = !videoId || !videoDevices.some((d) => d.deviceId === videoId);
|
|
2457
2455
|
const constraints = getMediaConstraints(Object.assign({ preferredDeviceIds: {
|
|
2458
|
-
audioId:
|
|
2459
|
-
videoId:
|
|
2456
|
+
audioId: typeof audioId === "string" ? { [type]: audioId } : null,
|
|
2457
|
+
videoId: typeof videoId === "string" ? { [type]: videoId } : null,
|
|
2460
2458
|
} }, options));
|
|
2461
2459
|
if (audioId === false || !audioDevices.length) {
|
|
2462
2460
|
delete constraints.audio;
|
package/dist/legacy-esm.js
CHANGED
|
@@ -2452,11 +2452,9 @@ function getMediaConstraints({ disableAEC, disableAGC, hd, lax, lowDataMode, pre
|
|
|
2452
2452
|
function getConstraints({ devices, videoId, audioId, options, type = "ideal" }) {
|
|
2453
2453
|
const audioDevices = devices.filter((d) => d.kind === "audioinput");
|
|
2454
2454
|
const videoDevices = devices.filter((d) => d.kind === "videoinput");
|
|
2455
|
-
const useDefaultAudio = !audioId || !audioDevices.some((d) => d.deviceId === audioId);
|
|
2456
|
-
const useDefaultVideo = !videoId || !videoDevices.some((d) => d.deviceId === videoId);
|
|
2457
2455
|
const constraints = getMediaConstraints(Object.assign({ preferredDeviceIds: {
|
|
2458
|
-
audioId:
|
|
2459
|
-
videoId:
|
|
2456
|
+
audioId: typeof audioId === "string" ? { [type]: audioId } : null,
|
|
2457
|
+
videoId: typeof videoId === "string" ? { [type]: videoId } : null,
|
|
2460
2458
|
} }, options));
|
|
2461
2459
|
if (audioId === false || !audioDevices.length) {
|
|
2462
2460
|
delete constraints.audio;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whereby.com/media",
|
|
3
3
|
"description": "Media library for Whereby",
|
|
4
|
-
"version": "9.2.
|
|
4
|
+
"version": "9.2.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/whereby/sdk",
|
|
7
7
|
"repository": {
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"prettier": "^3.5.3",
|
|
62
62
|
"process": "^0.11.10",
|
|
63
63
|
"typescript": "^5.8.3",
|
|
64
|
+
"@whereby.com/eslint-config": "0.1.0",
|
|
64
65
|
"@whereby.com/jest-config": "0.1.0",
|
|
65
66
|
"@whereby.com/prettier-config": "0.1.0",
|
|
66
67
|
"@whereby.com/rollup-config": "0.1.1",
|
|
67
|
-
"@whereby.com/tsconfig": "0.1.0"
|
|
68
|
-
"@whereby.com/eslint-config": "0.1.0"
|
|
68
|
+
"@whereby.com/tsconfig": "0.1.0"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": ">=24.0.0"
|