mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: "echo" rpc method
parent
fccd21eefd
commit
21020c1ca9
|
@ -638,6 +638,10 @@ public class SessionEventsHandler {
|
||||||
rpcNotificationService.sendResponse(participant.getParticipantPrivateId(), transactionId, new JsonObject());
|
rpcNotificationService.sendResponse(participant.getParticipantPrivateId(), transactionId, new JsonObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onEcho(String participantPrivateId, Integer transactionId) {
|
||||||
|
rpcNotificationService.sendResponse(participantPrivateId, transactionId, new JsonObject());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This handler must be called before cleaning any sessions or recordings hosted
|
* This handler must be called before cleaning any sessions or recordings hosted
|
||||||
* by the crashed Media Node
|
* by the crashed Media Node
|
||||||
|
|
|
@ -194,6 +194,10 @@ public abstract class SessionManager {
|
||||||
public abstract void onVideoData(Participant participant, Integer transactionId, Integer height, Integer width,
|
public abstract void onVideoData(Participant participant, Integer transactionId, Integer height, Integer width,
|
||||||
Boolean videoActive, Boolean audioActive);
|
Boolean videoActive, Boolean audioActive);
|
||||||
|
|
||||||
|
public void onEcho(String participantPrivateId, Integer requestId) {
|
||||||
|
sessionEventsHandler.onEcho(participantPrivateId, requestId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Session given its id
|
* Returns a Session given its id
|
||||||
*
|
*
|
||||||
|
|
|
@ -172,6 +172,9 @@ public class RpcHandler extends DefaultJsonRpcHandler<JsonObject> {
|
||||||
case ProtocolElements.VIDEODATA_METHOD:
|
case ProtocolElements.VIDEODATA_METHOD:
|
||||||
updateVideoData(rpcConnection, request);
|
updateVideoData(rpcConnection, request);
|
||||||
break;
|
break;
|
||||||
|
case ProtocolElements.ECHO_METHOD:
|
||||||
|
echo(rpcConnection, request);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
log.error("Unrecognized request {}", request);
|
log.error("Unrecognized request {}", request);
|
||||||
break;
|
break;
|
||||||
|
@ -717,6 +720,10 @@ public class RpcHandler extends DefaultJsonRpcHandler<JsonObject> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void echo(RpcConnection rpcConnection, Request<JsonObject> request) {
|
||||||
|
sessionManager.onEcho(rpcConnection.getParticipantPrivateId(), request.getId());
|
||||||
|
}
|
||||||
|
|
||||||
public void leaveRoomAfterConnClosed(String participantPrivateId, EndReason reason) {
|
public void leaveRoomAfterConnClosed(String participantPrivateId, EndReason reason) {
|
||||||
try {
|
try {
|
||||||
sessionManager.evictParticipant(this.sessionManager.getParticipant(participantPrivateId), null, null,
|
sessionManager.evictParticipant(this.sessionManager.getParticipant(participantPrivateId), null, null,
|
||||||
|
|
Loading…
Reference in New Issue