openvidu-browser: OpenVidu#getWsReadyState

pull/630/head
pabloFuente 2021-05-26 13:03:10 +02:00
parent 05718efc2e
commit fccd21eefd
3 changed files with 15 additions and 0 deletions

View File

@ -780,6 +780,13 @@ export class OpenVidu {
this.jsonRpcClient.close(4103, "Master Node has crashed"); this.jsonRpcClient.close(4103, "Master Node has crashed");
} }
/**
* @hidden
*/
getWsReadyState(): number {
return this.jsonRpcClient.getReadyState();
}
/** /**
* @hidden * @hidden
*/ */

View File

@ -270,6 +270,10 @@ function JsonRpcClient(configuration) {
pingNextNum = 0; pingNextNum = 0;
usePing(); usePing();
} }
this.getReadyState = function () {
return ws.getReadyState();
}
} }

View File

@ -151,6 +151,10 @@ function WebSocketWithReconnection(config) {
}; };
registerMessageHandler(); registerMessageHandler();
}; };
this.getReadyState = () => {
return ws.readyState;
}
} }
module.exports = WebSocketWithReconnection; module.exports = WebSocketWithReconnection;