mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: prepare mediaNodeId property in Session entity
parent
5d21baff89
commit
7691bccdfb
|
@ -31,6 +31,8 @@ import org.kurento.client.MediaPipeline;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import io.openvidu.client.OpenViduException;
|
||||
import io.openvidu.client.OpenViduException.Code;
|
||||
import io.openvidu.client.internal.ProtocolElements;
|
||||
|
@ -334,4 +336,13 @@ public class KurentoSession extends Session {
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonObject toJson(boolean withPendingConnections, boolean withWebrtcStats) {
|
||||
JsonObject json = super.toJson(withPendingConnections, withWebrtcStats);
|
||||
if (this.kms != null && this.kurentoSessionHandler.addMediaNodeInfoToSessionEntity()) {
|
||||
json.addProperty("mediaNodeId", kms.getId());
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -56,4 +56,8 @@ public class KurentoSessionEventsHandler extends SessionEventsHandler {
|
|||
rpcNotificationService.sendNotification(connectionId, ProtocolElements.MEDIAERROR_METHOD, notifParams);
|
||||
}
|
||||
|
||||
public boolean addMediaNodeInfoToSessionEntity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue