@voicenter-team/opensips-js 1.0.93 → 1.0.94

Sign up to get free protection for your applications and to get access to all the features.
@@ -23990,7 +23990,7 @@ class bE extends jT {
23990
23990
  ...s.configuration,
23991
23991
  sockets: s.socketInterfaces.map((a) => new uv.WebSocketInterface(a))
23992
23992
  };
23993
- super(l), this.initialized = !1, this.logger = console, this.newRTCSessionEventName = "newRTCSession", this.registeredEventName = "registered", this.unregisteredEventName = "unregistered", this.disconnectedEventName = "disconnected", this.connectedEventName = "connected", this.newMSRPSessionEventName = "newMSRPSession", this.isReconnecting = !1, this.audio = null, this.msrp = null, this.video = null, this.listenersList = {}, this.modules = [], s.pnExtraHeaders && Object.keys(s.pnExtraHeaders).length && this.registrator().setExtraContactUriParams(s.pnExtraHeaders), this.options = s, this.modules = s.modules, i && JT(i) && (this.logger = i);
23993
+ super(l), this.initialized = !1, this.connected = !1, this.logger = console, this.newRTCSessionEventName = "newRTCSession", this.registeredEventName = "registered", this.unregisteredEventName = "unregistered", this.disconnectedEventName = "disconnected", this.connectedEventName = "connected", this.newMSRPSessionEventName = "newMSRPSession", this.isReconnecting = !1, this.audio = null, this.msrp = null, this.video = null, this.listenersList = {}, this.modules = [], s.pnExtraHeaders && Object.keys(s.pnExtraHeaders).length && this.registrator().setExtraContactUriParams(s.pnExtraHeaders), this.options = s, this.modules = s.modules, i && JT(i) && (this.logger = i);
23994
23994
  }
23995
23995
  on(s, i) {
23996
23996
  return super.on(s, i);
@@ -24022,12 +24022,12 @@ class bE extends jT {
24022
24022
  ), this.on(
24023
24023
  this.connectedEventName,
24024
24024
  () => {
24025
- this.logger.log("Connected to", this.options.socketInterfaces[0]), this.isReconnecting = !1;
24025
+ this.logger.log("Connected to", this.options.socketInterfaces[0]), this.setConnected(!0), this.isReconnecting = !1;
24026
24026
  }
24027
24027
  ), this.on(
24028
24028
  this.disconnectedEventName,
24029
24029
  () => {
24030
- this.isReconnecting || (this.logger.log("Disconnected from", this.options.socketInterfaces[0]), this.logger.log("Reconnecting to", this.options.socketInterfaces[0]), this.isReconnecting = !0, this.stop(), this.setInitialized(!1), setTimeout(this.start.bind(this), 5e3));
24030
+ this.isReconnecting || (this.logger.log("Disconnected from", this.options.socketInterfaces[0]), this.logger.log("Reconnecting to", this.options.socketInterfaces[0]), this.isReconnecting = !0, this.stop(), this.setInitialized(!1), this.setConnected(!1), setTimeout(this.start.bind(this), 5e3));
24031
24031
  }
24032
24032
  ), this.logger.log("Connecting to", this.options.socketInterfaces[0]), this.start(), this;
24033
24033
  }
@@ -25003,6 +25003,9 @@ class bE extends jT {
25003
25003
  setInitialized(s) {
25004
25004
  this.initialized = s, this.emit("ready", s);
25005
25005
  }
25006
+ setConnected(s) {
25007
+ this.connected = s, this.emit("connection", s);
25008
+ }
25006
25009
  /*public setMuteWhenJoin (value: boolean) {
25007
25010
  this.muteWhenJoinEnabled = value
25008
25011
  this.emit('changeMuteWhenJoin', value)