@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.js
CHANGED
|
@@ -9306,7 +9306,7 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9306
9306
|
await this._pc.setLocalDescription(offer);
|
|
9307
9307
|
const session = await this._getSession();
|
|
9308
9308
|
const ingressUrl = this.gresUrl(session);
|
|
9309
|
-
this._requestLogger.debug(
|
|
9309
|
+
this._requestLogger.debug(`before POST: ${ingressUrl}`);
|
|
9310
9310
|
const headers = {
|
|
9311
9311
|
...session.authenticationHeaders(),
|
|
9312
9312
|
"Content-Type": "application/sdp"
|
|
@@ -9316,17 +9316,16 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9316
9316
|
method: "POST",
|
|
9317
9317
|
body: offer.sdp
|
|
9318
9318
|
});
|
|
9319
|
+
this._requestLogger.debug(`after POST: ${ingressUrl} status: ${response.status}`);
|
|
9319
9320
|
if (response.status != 201) {
|
|
9320
9321
|
return Promise.reject(`unknown status code for POST '${ingressUrl}': ${response.status} (${response.statusText})`);
|
|
9321
9322
|
}
|
|
9322
9323
|
this._eTag = response.headers.get("ETag") ?? "";
|
|
9323
9324
|
this._location = response.headers.get("Location");
|
|
9324
|
-
return this.onRemoteAnswer(
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
})
|
|
9329
|
-
);
|
|
9325
|
+
return await this.onRemoteAnswer(new RTCSessionDescription({
|
|
9326
|
+
type: "answer",
|
|
9327
|
+
sdp: await response.text()
|
|
9328
|
+
}));
|
|
9330
9329
|
}
|
|
9331
9330
|
async sendLocalCandidates(candidates) {
|
|
9332
9331
|
if (!this._offerData) {
|
|
@@ -9525,7 +9524,7 @@ var WebrtcWhip = class extends WebrtcBase {
|
|
|
9525
9524
|
if (response.status >= 300) {
|
|
9526
9525
|
return Promise.reject(`unknown status code for GET '${ingressUrl}': ${response.status} (${response.statusText})`);
|
|
9527
9526
|
}
|
|
9528
|
-
return this.onIceServers(response);
|
|
9527
|
+
return await this.onIceServers(response);
|
|
9529
9528
|
}
|
|
9530
9529
|
async stream() {
|
|
9531
9530
|
if (this._stream) {
|
|
@@ -10244,6 +10243,13 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
|
|
|
10244
10243
|
}
|
|
10245
10244
|
} else if (init?.body instanceof ReadableStream) {
|
|
10246
10245
|
streamBody = init.body;
|
|
10246
|
+
} else if (typeof init?.body === "string") {
|
|
10247
|
+
streamBody = new ReadableStream({
|
|
10248
|
+
start: (controller) => {
|
|
10249
|
+
controller.enqueue(Buffer.from(init?.body, "utf8"));
|
|
10250
|
+
controller.close();
|
|
10251
|
+
}
|
|
10252
|
+
});
|
|
10247
10253
|
}
|
|
10248
10254
|
if (streamBody) {
|
|
10249
10255
|
if (TcpSockets?.TLSSocket !== void 0) {
|