@livedigital/client 3.4.0 → 3.5.0-add-current-node-getter.1

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@livedigital/client",
3
3
  "author": "vlprojects",
4
4
  "license": "MIT",
5
- "version": "3.4.0",
5
+ "version": "3.5.0-add-current-node-getter.1",
6
6
  "private": false,
7
7
  "bugs": {
8
8
  "url": "https://github.com/vlprojects/livedigital-sdk/issues"
@@ -139,6 +139,10 @@ class SocketIO {
139
139
  });
140
140
  }
141
141
 
142
+ getServerUrl(): string | undefined {
143
+ return this.serverUrl;
144
+ }
145
+
142
146
  private getDisconnectReasonCode(reasonSentence: string): string {
143
147
  const reason = String(reasonSentence).toLowerCase();
144
148
  return this.knownDisconnectReasonsCodes[reason] || reason;
package/src/index.ts CHANGED
@@ -140,6 +140,10 @@ class Client {
140
140
  public async getTransportsInfo(): Promise<TransportsStateInfo> {
141
141
  return this.engine.network.getTransportsStateInfo();
142
142
  }
143
+
144
+ public getCurrentNode(): string | undefined {
145
+ return this.engine.network.socket.getServerUrl();
146
+ }
143
147
  }
144
148
 
145
149
  export default Client;