mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: parse ignoreFailedStreams recording property from REST params
parent
f1da724533
commit
888cc1bfc5
|
@ -925,6 +925,7 @@ public class SessionRestController {
|
||||||
Integer frameRateFinal = null;
|
Integer frameRateFinal = null;
|
||||||
Long shmSizeFinal = null;
|
Long shmSizeFinal = null;
|
||||||
String customLayoutFinal = null;
|
String customLayoutFinal = null;
|
||||||
|
Boolean ignoreFailedStreamsFinal = null;
|
||||||
|
|
||||||
RecordingProperties defaultProps = session.getSessionProperties().defaultRecordingProperties();
|
RecordingProperties defaultProps = session.getSessionProperties().defaultRecordingProperties();
|
||||||
|
|
||||||
|
@ -938,6 +939,7 @@ public class SessionRestController {
|
||||||
Integer frameRateDefault = defaultProps.frameRate();
|
Integer frameRateDefault = defaultProps.frameRate();
|
||||||
Long shmSizeDefault = defaultProps.shmSize();
|
Long shmSizeDefault = defaultProps.shmSize();
|
||||||
String customLayoutDefault = defaultProps.customLayout();
|
String customLayoutDefault = defaultProps.customLayout();
|
||||||
|
Boolean ignoreFailedStreamsDefault = defaultProps.ignoreFailedStreams();
|
||||||
|
|
||||||
// Provided properties through params
|
// Provided properties through params
|
||||||
String sessionIdParam;
|
String sessionIdParam;
|
||||||
|
@ -950,6 +952,7 @@ public class SessionRestController {
|
||||||
Integer frameRateParam;
|
Integer frameRateParam;
|
||||||
Long shmSizeParam = null;
|
Long shmSizeParam = null;
|
||||||
String customLayoutParam;
|
String customLayoutParam;
|
||||||
|
Boolean ignoreFailedStreamsParam;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sessionIdParam = (String) params.get("session");
|
sessionIdParam = (String) params.get("session");
|
||||||
|
@ -964,6 +967,7 @@ public class SessionRestController {
|
||||||
shmSizeParam = Long.parseLong(params.get("shmSize").toString());
|
shmSizeParam = Long.parseLong(params.get("shmSize").toString());
|
||||||
}
|
}
|
||||||
customLayoutParam = (String) params.get("customLayout");
|
customLayoutParam = (String) params.get("customLayout");
|
||||||
|
ignoreFailedStreamsParam = (Boolean) params.get("ignoreFailedStreams");
|
||||||
} catch (ClassCastException | NumberFormatException e) {
|
} catch (ClassCastException | NumberFormatException e) {
|
||||||
throw new Exception("Type error in some parameter: " + e.getMessage());
|
throw new Exception("Type error in some parameter: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -1086,6 +1090,14 @@ public class SessionRestController {
|
||||||
customLayoutFinal = "";
|
customLayoutFinal = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (OutputMode.INDIVIDUAL.equals(outputModeFinal)) {
|
||||||
|
if (ignoreFailedStreamsParam != null) {
|
||||||
|
ignoreFailedStreamsFinal = ignoreFailedStreamsParam;
|
||||||
|
} else if (ignoreFailedStreamsDefault != null) {
|
||||||
|
ignoreFailedStreamsFinal = ignoreFailedStreamsDefault;
|
||||||
|
} else {
|
||||||
|
ignoreFailedStreamsFinal = RecordingProperties.DefaultValues.ignoreFailedStreams;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RecordingProperties.Builder builder = new RecordingProperties.Builder();
|
RecordingProperties.Builder builder = new RecordingProperties.Builder();
|
||||||
|
@ -1099,6 +1111,9 @@ public class SessionRestController {
|
||||||
builder.customLayout(customLayoutFinal);
|
builder.customLayout(customLayoutFinal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (OutputMode.INDIVIDUAL.equals(outputModeFinal)) {
|
||||||
|
builder.ignoreFailedStreams(ignoreFailedStreamsFinal);
|
||||||
|
}
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue