@eyepop.ai/eyepop 1.14.3 → 1.14.4
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/eyepop.index.js +14 -8
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +14 -8
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +1 -1
package/dist/eyepop.index.mjs
CHANGED
|
@@ -9241,7 +9241,7 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9241
9241
|
await this._pc.setLocalDescription(offer);
|
|
9242
9242
|
const session = await this._getSession();
|
|
9243
9243
|
const ingressUrl = this.gresUrl(session);
|
|
9244
|
-
this._requestLogger.debug(
|
|
9244
|
+
this._requestLogger.debug(`before POST: ${ingressUrl}`);
|
|
9245
9245
|
const headers = {
|
|
9246
9246
|
...session.authenticationHeaders(),
|
|
9247
9247
|
"Content-Type": "application/sdp"
|
|
@@ -9251,17 +9251,16 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9251
9251
|
method: "POST",
|
|
9252
9252
|
body: offer.sdp
|
|
9253
9253
|
});
|
|
9254
|
+
this._requestLogger.debug(`after POST: ${ingressUrl} status: ${response.status}`);
|
|
9254
9255
|
if (response.status != 201) {
|
|
9255
9256
|
return Promise.reject(`unknown status code for POST '${ingressUrl}': ${response.status} (${response.statusText})`);
|
|
9256
9257
|
}
|
|
9257
9258
|
this._eTag = response.headers.get("ETag") ?? "";
|
|
9258
9259
|
this._location = response.headers.get("Location");
|
|
9259
|
-
return this.onRemoteAnswer(
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
})
|
|
9264
|
-
);
|
|
9260
|
+
return await this.onRemoteAnswer(new RTCSessionDescription({
|
|
9261
|
+
type: "answer",
|
|
9262
|
+
sdp: await response.text()
|
|
9263
|
+
}));
|
|
9265
9264
|
}
|
|
9266
9265
|
async sendLocalCandidates(candidates) {
|
|
9267
9266
|
if (!this._offerData) {
|
|
@@ -9460,7 +9459,7 @@ var WebrtcWhip = class extends WebrtcBase {
|
|
|
9460
9459
|
if (response.status >= 300) {
|
|
9461
9460
|
return Promise.reject(`unknown status code for GET '${ingressUrl}': ${response.status} (${response.statusText})`);
|
|
9462
9461
|
}
|
|
9463
|
-
return this.onIceServers(response);
|
|
9462
|
+
return await this.onIceServers(response);
|
|
9464
9463
|
}
|
|
9465
9464
|
async stream() {
|
|
9466
9465
|
if (this._stream) {
|
|
@@ -10179,6 +10178,13 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
|
|
|
10179
10178
|
}
|
|
10180
10179
|
} else if (init?.body instanceof ReadableStream) {
|
|
10181
10180
|
streamBody = init.body;
|
|
10181
|
+
} else if (typeof init?.body === "string") {
|
|
10182
|
+
streamBody = new ReadableStream({
|
|
10183
|
+
start: (controller) => {
|
|
10184
|
+
controller.enqueue(Buffer.from(init?.body, "utf8"));
|
|
10185
|
+
controller.close();
|
|
10186
|
+
}
|
|
10187
|
+
});
|
|
10182
10188
|
}
|
|
10183
10189
|
if (streamBody) {
|
|
10184
10190
|
if (TcpSockets?.TLSSocket !== void 0) {
|