const OV = useRef(new OpenVidu());
// ######### sendRequest 오버라이딩 예외처리
OV.current.sendRequest = function (method, params, callback) {
try {
if (params && typeof params === 'function') {
callback = params;
params = {};
}
console.debug(
'Sending request: {method:"' +
method +
'", params: ' +
JSON.stringify(params) +
'}',
);
if (this.jsonRpcClient) {
this.jsonRpcClient.send(method, params, callback);
}
} catch (error) {
console.error('An error occurred while sending the request:', error);
}
};