From b2f385042bc5d7b7fa6913740b81d50ef3d4920c Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Wed, 2 Jun 2021 12:42:16 +0200 Subject: [PATCH] openvidu-server: fix Recording construction with frameRate property --- .../openvidu/server/recording/Recording.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/openvidu-server/src/main/java/io/openvidu/server/recording/Recording.java b/openvidu-server/src/main/java/io/openvidu/server/recording/Recording.java index 871c909ae7..790defebff 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/recording/Recording.java +++ b/openvidu-server/src/main/java/io/openvidu/server/recording/Recording.java @@ -78,12 +78,18 @@ public Recording(JsonObject json) { RecordingProperties.Builder builder = new RecordingProperties.Builder().name(json.get("name").getAsString()) .outputMode(outputMode).hasAudio(hasAudio).hasVideo(hasVideo); if (RecordingUtils.IS_COMPOSED(outputMode) && hasVideo) { - builder.resolution(json.get("resolution").getAsString()); - builder.frameRate(json.get("frameRate").getAsInt()); - RecordingLayout recordingLayout = RecordingLayout.valueOf(json.get("recordingLayout").getAsString()); - builder.recordingLayout(recordingLayout); - if (RecordingLayout.CUSTOM.equals(recordingLayout)) { - builder.customLayout(json.get("customLayout").getAsString()); + if (json.has("resolution")) { + builder.resolution(json.get("resolution").getAsString()); + } + if (json.has("frameRate")) { + builder.frameRate(json.get("frameRate").getAsInt()); + } + if (json.has("recordingLayout")) { + RecordingLayout recordingLayout = RecordingLayout.valueOf(json.get("recordingLayout").getAsString()); + builder.recordingLayout(recordingLayout); + if (RecordingLayout.CUSTOM.equals(recordingLayout) && json.has("customLayout")) { + builder.customLayout(json.get("customLayout").getAsString()); + } } } this.recordingProperties = builder.build();