@whereby.com/assistant-sdk 1.2.57 → 1.2.58
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/polyfills.cjs +25 -23
- package/package.json +2 -2
package/dist/polyfills.cjs
CHANGED
|
@@ -56,35 +56,37 @@ function setWebsocketOrigin(roomUrl) {
|
|
|
56
56
|
console.error(e);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
if (typeof global.navigator === "undefined") {
|
|
60
|
+
Object.defineProperty(global, "navigator", {
|
|
61
|
+
value: {
|
|
62
|
+
userAgent: "Node.js/20",
|
|
63
|
+
},
|
|
64
|
+
writable: false,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
59
69
|
const wrtcMediaDevices = wrtc.mediaDevices;
|
|
60
|
-
Object.defineProperty(global, "
|
|
70
|
+
Object.defineProperty(global.navigator, "mediaDevices", {
|
|
61
71
|
value: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
]));
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
72
|
+
getUserMedia: wrtc.getUserMedia,
|
|
73
|
+
addEventListener: wrtcMediaDevices.addEventListener,
|
|
74
|
+
removeEventListener: wrtcMediaDevices.removeEventListener,
|
|
75
|
+
enumerateDevices: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
+
return new Promise((resolve) => resolve([
|
|
77
|
+
{
|
|
78
|
+
deviceId: "default",
|
|
79
|
+
groupId: uuid.v4(),
|
|
80
|
+
kind: "audioinput",
|
|
81
|
+
label: "Dummy audio device",
|
|
82
|
+
},
|
|
83
|
+
]));
|
|
84
|
+
}),
|
|
78
85
|
},
|
|
79
86
|
writable: false,
|
|
80
87
|
enumerable: true,
|
|
81
88
|
configurable: true,
|
|
82
89
|
});
|
|
83
|
-
class DOMException {
|
|
84
|
-
constructor(...args) {
|
|
85
|
-
console.error("DOMException", args);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
90
|
class RTCPeerConnection extends wrtc.RTCPeerConnection {
|
|
89
91
|
constructor() {
|
|
90
92
|
super(...arguments);
|
|
@@ -102,7 +104,7 @@ class RTCPeerConnection extends wrtc.RTCPeerConnection {
|
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
|
-
|
|
107
|
+
// even in NodeJS versions that include WebSocket, we need ws to be able to set the origin header
|
|
106
108
|
global.WebSocket = ws;
|
|
107
109
|
global.MediaStream = wrtc.MediaStream;
|
|
108
110
|
global.MediaStreamTrack = wrtc.MediaStreamTrack;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@whereby.com/assistant-sdk",
|
|
3
3
|
"description": "Assistant SDK for whereby.com",
|
|
4
4
|
"author": "Whereby AS",
|
|
5
|
-
"version": "1.2.
|
|
5
|
+
"version": "1.2.58",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"express": "5.1.0",
|
|
65
65
|
"uuid": "^11.0.3",
|
|
66
66
|
"ws": "^8.18.0",
|
|
67
|
-
"@whereby.com/core": "1.9.
|
|
67
|
+
"@whereby.com/core": "1.9.17"
|
|
68
68
|
},
|
|
69
69
|
"prettier": "@whereby.com/prettier-config",
|
|
70
70
|
"scripts": {
|