opensips-js 0.1.27 → 0.1.29
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.d.ts +2 -0
- package/dist/opensips-js.cjs.js +2 -2
- package/dist/opensips-js.es.js +11 -9
- package/dist/opensips-js.iife.js +2 -2
- package/dist/opensips-js.umd.js +2 -2
- package/package.json +1 -1
- package/src/types/rtc.d.ts +2 -0
package/dist/opensips-js.es.js
CHANGED
|
@@ -18962,14 +18962,16 @@ class nu extends ft.EventEmitter {
|
|
|
18962
18962
|
return this._id;
|
|
18963
18963
|
}
|
|
18964
18964
|
connect(t = "") {
|
|
18965
|
-
t !== "" && (this._direction = "outgoing"), this.target = t
|
|
18966
|
-
|
|
18967
|
-
}, this._connection.
|
|
18968
|
-
console.log("
|
|
18969
|
-
}, this._connection.
|
|
18970
|
-
console.log("
|
|
18971
|
-
}, this._connection.
|
|
18972
|
-
console.log("
|
|
18965
|
+
t !== "" && (this._direction = "outgoing"), this.target = t;
|
|
18966
|
+
const n = this._ua.options.msrpWs ? "ws" : "wss";
|
|
18967
|
+
this._connection = new WebSocket(`${n}://${this._ua.options.msrpDomain || this._ua._configuration.realm}`, "msrp"), this._connection.binaryType = "arraybuffer", this._connection.onopen = (a) => {
|
|
18968
|
+
console.log("open", a), this.onopen();
|
|
18969
|
+
}, this._connection.onclose = (a) => {
|
|
18970
|
+
console.log("close", a), this.onclose();
|
|
18971
|
+
}, this._connection.onmessage = (a) => {
|
|
18972
|
+
console.log("msg", a), this.onmessage(a);
|
|
18973
|
+
}, this._connection.onerror = (a) => {
|
|
18974
|
+
console.log("error", a), this.onerror();
|
|
18973
18975
|
};
|
|
18974
18976
|
}
|
|
18975
18977
|
_sendKeepAlive() {
|
|
@@ -19652,7 +19654,7 @@ class $T {
|
|
|
19652
19654
|
this._ua.clearKeepAliveInterval(), this._ua.setLastRegisterTimestamp();
|
|
19653
19655
|
let d = r.getParam("expires");
|
|
19654
19656
|
!d && o.hasHeader("expires") && (d = o.getHeader("expires")), d || (d = this._expires), d = Number(d), d < fa && (d = fa);
|
|
19655
|
-
const h = d > 64 ? d * 1e3 / 2 + Math.floor((d / 2 - 32) * 1e3 * Math.random()) : d * 1e3
|
|
19657
|
+
const h = d > 64 ? d * 1e3 / 2 + Math.floor((d / 2 - 32) * 1e3 * Math.random()) : Math.floor(d * 1e3 / 2);
|
|
19656
19658
|
this._registrationTimer = setTimeout(() => {
|
|
19657
19659
|
this._registrationTimer = null, this._ua.listeners("registrationExpiring").length === 0 ? this.register() : this._ua.emit("registrationExpiring");
|
|
19658
19660
|
}, h), r.hasParam("temp-gruu") && (this._ua.contact.temp_gruu = r.getParam("temp-gruu").replace(/"/g, "")), r.hasParam("pub-gruu") && (this._ua.contact.pub_gruu = r.getParam("pub-gruu").replace(/"/g, "")), this._registered || (this._registered = !0, this._ua.registered({ response: o }));
|