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());
|
||||
}
|
||||
|
||||
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
|
||||
* 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,
|
||||
Boolean videoActive, Boolean audioActive);
|
||||
|
||||
public void onEcho(String participantPrivateId, Integer requestId) {
|
||||
sessionEventsHandler.onEcho(participantPrivateId, requestId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Session given its id
|
||||
*
|
||||
|
|
|
@ -172,6 +172,9 @@ public class RpcHandler extends DefaultJsonRpcHandler<JsonObject> {
|
|||
case ProtocolElements.VIDEODATA_METHOD:
|
||||
updateVideoData(rpcConnection, request);
|
||||
break;
|
||||
case ProtocolElements.ECHO_METHOD:
|
||||
echo(rpcConnection, request);
|
||||
break;
|
||||
default:
|
||||
log.error("Unrecognized request {}", request);
|
||||
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) {
|
||||
try {
|
||||
sessionManager.evictParticipant(this.sessionManager.getParticipant(participantPrivateId), null, null,
|
||||
|
|
Loading…
Reference in New Issue