diff --git a/openvidu-browser/src/OpenVidu/OpenVidu.ts b/openvidu-browser/src/OpenVidu/OpenVidu.ts index 67b02967..c9710b17 100644 --- a/openvidu-browser/src/OpenVidu/OpenVidu.ts +++ b/openvidu-browser/src/OpenVidu/OpenVidu.ts @@ -780,6 +780,13 @@ export class OpenVidu { this.jsonRpcClient.close(4103, "Master Node has crashed"); } + /** + * @hidden + */ + getWsReadyState(): number { + return this.jsonRpcClient.getReadyState(); + } + /** * @hidden */ diff --git a/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js b/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js index 9a626f05..8f0463ca 100644 --- a/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js +++ b/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/jsonrpcclient.js @@ -270,6 +270,10 @@ function JsonRpcClient(configuration) { pingNextNum = 0; usePing(); } + + this.getReadyState = function () { + return ws.getReadyState(); + } } diff --git a/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js b/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js index 91045c99..4850077f 100644 --- a/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js +++ b/openvidu-browser/src/OpenViduInternal/KurentoUtils/kurento-jsonrpc/clients/transports/webSocketWithReconnection.js @@ -151,6 +151,10 @@ function WebSocketWithReconnection(config) { }; registerMessageHandler(); }; + + this.getReadyState = () => { + return ws.readyState; + } } module.exports = WebSocketWithReconnection; \ No newline at end of file