openvidu-server: new Error code SERVICE_NOT_ENABLED_ERROR_CODE

pull/748/head
pabloFuente 2022-10-27 16:14:13 +02:00
parent 98ecdc278e
commit 46ab59f4b2
2 changed files with 50 additions and 48 deletions

View File

@ -23,7 +23,8 @@ public class OpenViduException extends JsonRpcErrorException {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static enum Code { public static enum Code {
GENERIC_ERROR_CODE(999), WRONG_PATH_CODE(998), WRONG_OPENVIDU_EDITION(997), GENERIC_ERROR_CODE(999), WRONG_PATH_CODE(998), WRONG_OPENVIDU_EDITION_ERROR_CODE(997),
SERVICE_NOT_ENABLED_ERROR_CODE(996),
TRANSPORT_ERROR_CODE(803), TRANSPORT_RESPONSE_ERROR_CODE(802), TRANSPORT_REQUEST_ERROR_CODE(801), TRANSPORT_ERROR_CODE(803), TRANSPORT_RESPONSE_ERROR_CODE(802), TRANSPORT_REQUEST_ERROR_CODE(801),

View File

@ -1201,15 +1201,16 @@ public class KurentoSessionManager extends SessionManager {
} }
@Override @Override
public void onSubscribeToSpeechToText(Participant participant, Integer transactionId, String lang, JsonArray connectionIds) { public void onSubscribeToSpeechToText(Participant participant, Integer transactionId, String lang,
JsonArray connectionIds) {
sessionEventsHandler.onUnsubscribeToSpeechToText(participant, transactionId, new OpenViduException( sessionEventsHandler.onUnsubscribeToSpeechToText(participant, transactionId, new OpenViduException(
Code.WRONG_OPENVIDU_EDITION, "Speech To text requires OpenVidu Pro/Enterprise edition")); Code.WRONG_OPENVIDU_EDITION_ERROR_CODE, "Speech To Text requires OpenVidu Pro/Enterprise edition"));
} }
@Override @Override
public void onUnsubscribeFromSpeechToText(Participant participant, Integer transactionId, JsonArray connectionIds) { public void onUnsubscribeFromSpeechToText(Participant participant, Integer transactionId, JsonArray connectionIds) {
sessionEventsHandler.onUnsubscribeToSpeechToText(participant, transactionId, new OpenViduException( sessionEventsHandler.onUnsubscribeToSpeechToText(participant, transactionId, new OpenViduException(
Code.WRONG_OPENVIDU_EDITION, "Speech To text requires OpenVidu Pro/Enterprise edition")); Code.WRONG_OPENVIDU_EDITION_ERROR_CODE, "Speech To Text requires OpenVidu Pro/Enterprise edition"));
} }
private String mungeSdpOffer(Session kSession, Participant participant, String sdpOffer, boolean isPublisher) { private String mungeSdpOffer(Session kSession, Participant participant, String sdpOffer, boolean isPublisher) {