Skip to content

Commit

Permalink
openvidu-server: fix Recording construction with frameRate property
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Jun 2, 2021
1 parent 9cb45c7 commit b2f3850
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b2f3850

Please sign in to comment.