@eyepop.ai/eyepop 1.11.5 → 1.11.6
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.mjs
CHANGED
|
@@ -9130,6 +9130,21 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9130
9130
|
ingressId() {
|
|
9131
9131
|
return this._ingressId;
|
|
9132
9132
|
}
|
|
9133
|
+
gresUrl(session, location = null) {
|
|
9134
|
+
let urlPath;
|
|
9135
|
+
if (location) {
|
|
9136
|
+
urlPath = path.join(this._urlPath, location);
|
|
9137
|
+
} else {
|
|
9138
|
+
urlPath = this._urlPath;
|
|
9139
|
+
}
|
|
9140
|
+
let baseUrl;
|
|
9141
|
+
if (session.baseUrl?.endsWith("/")) {
|
|
9142
|
+
baseUrl = session.baseUrl;
|
|
9143
|
+
} else {
|
|
9144
|
+
baseUrl = session.baseUrl + "/";
|
|
9145
|
+
}
|
|
9146
|
+
return new URL(urlPath, baseUrl);
|
|
9147
|
+
}
|
|
9133
9148
|
async onLocalOffer(offer) {
|
|
9134
9149
|
if (!this._pc) {
|
|
9135
9150
|
throw new Error("onLocalOffer no peer connection");
|
|
@@ -9140,7 +9155,7 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9140
9155
|
this._offerData = _WebrtcBase.parseOffer(offer.sdp);
|
|
9141
9156
|
await this._pc.setLocalDescription(offer);
|
|
9142
9157
|
const session = await this._getSession();
|
|
9143
|
-
const ingressUrl =
|
|
9158
|
+
const ingressUrl = this.gresUrl(session);
|
|
9144
9159
|
this._requestLogger.debug("before POST: %s", ingressUrl);
|
|
9145
9160
|
const headers = {
|
|
9146
9161
|
...session.authenticationHeaders(),
|
|
@@ -9169,12 +9184,7 @@ var WebrtcBase = class _WebrtcBase {
|
|
|
9169
9184
|
}
|
|
9170
9185
|
let urlPath = void 0;
|
|
9171
9186
|
const session = await this._getSession();
|
|
9172
|
-
|
|
9173
|
-
urlPath = path.join(this._urlPath, this._location);
|
|
9174
|
-
} else {
|
|
9175
|
-
urlPath = this._urlPath;
|
|
9176
|
-
}
|
|
9177
|
-
const ingressUrl = new URL(urlPath, session.baseUrl);
|
|
9187
|
+
const ingressUrl = this.gresUrl(session, this._location);
|
|
9178
9188
|
this._requestLogger.debug("before PATCH: %s", ingressUrl);
|
|
9179
9189
|
const headers = {
|
|
9180
9190
|
...session.authenticationHeaders(),
|
|
@@ -9356,7 +9366,7 @@ var WebrtcWhip = class extends WebrtcBase {
|
|
|
9356
9366
|
}
|
|
9357
9367
|
async start() {
|
|
9358
9368
|
const session = await this._getSession();
|
|
9359
|
-
const ingressUrl =
|
|
9369
|
+
const ingressUrl = this.gresUrl(session);
|
|
9360
9370
|
this._requestLogger.debug("before GET: %s", ingressUrl);
|
|
9361
9371
|
const response = await this._client.fetch(ingressUrl, {
|
|
9362
9372
|
headers: session.authenticationHeaders(),
|
|
@@ -9457,7 +9467,7 @@ var WebrtcWhep = class extends WebrtcBase {
|
|
|
9457
9467
|
}
|
|
9458
9468
|
async start() {
|
|
9459
9469
|
const session = await this._getSession();
|
|
9460
|
-
const egressUrl =
|
|
9470
|
+
const egressUrl = this.gresUrl(session);
|
|
9461
9471
|
this._requestLogger.debug("before GET: %s", egressUrl);
|
|
9462
9472
|
const response = await this._client.fetch(egressUrl, {
|
|
9463
9473
|
headers: session.authenticationHeaders(),
|