mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: OPENVIDU_RECORDING_COMPOSED_BASICAUTH
parent
08f4b895c0
commit
e4ccb6f3bb
|
@ -130,6 +130,8 @@ public class OpenviduConfig {
|
|||
|
||||
private String openviduRecordingCustomLayout;
|
||||
|
||||
private boolean openviduRecordingComposedBasicauth;
|
||||
|
||||
private String openviduRecordingVersion;
|
||||
|
||||
private Integer openviduStreamsVideoMaxRecvBandwidth;
|
||||
|
@ -246,6 +248,10 @@ public class OpenviduConfig {
|
|||
return this.openviduRecordingCustomLayout;
|
||||
}
|
||||
|
||||
public boolean isOpenviduRecordingComposedBasicauth() {
|
||||
return this.openviduRecordingComposedBasicauth;
|
||||
}
|
||||
|
||||
public String getOpenViduRecordingVersion() {
|
||||
return this.openviduRecordingVersion;
|
||||
}
|
||||
|
@ -488,6 +494,7 @@ public class OpenviduConfig {
|
|||
openviduRecordingPublicAccess = asBoolean("OPENVIDU_RECORDING_PUBLIC_ACCESS");
|
||||
openviduRecordingAutostopTimeout = asNonNegativeInteger("OPENVIDU_RECORDING_AUTOSTOP_TIMEOUT");
|
||||
openviduRecordingCustomLayout = asFileSystemPath("OPENVIDU_RECORDING_CUSTOM_LAYOUT");
|
||||
openviduRecordingComposedBasicauth = asBoolean("OPENVIDU_RECORDING_COMPOSED_BASICAUTH");
|
||||
openviduRecordingVersion = asNonEmptyString("OPENVIDU_RECORDING_VERSION");
|
||||
openviduRecordingComposedUrl = asOptionalURL("OPENVIDU_RECORDING_COMPOSED_URL");
|
||||
checkOpenviduRecordingNotification();
|
||||
|
|
|
@ -516,6 +516,8 @@ public class ComposedRecordingService extends RecordingService {
|
|||
}
|
||||
|
||||
String layout, finalUrl;
|
||||
final String basicauth = openviduConfig.isOpenviduRecordingComposedBasicauth() ? ("OPENVIDUAPP:" + secret + "@")
|
||||
: "";
|
||||
if (RecordingLayout.CUSTOM.equals(recording.getRecordingLayout())) {
|
||||
layout = recording.getCustomLayout();
|
||||
if (!layout.isEmpty()) {
|
||||
|
@ -523,8 +525,8 @@ public class ComposedRecordingService extends RecordingService {
|
|||
layout = layout.endsWith("/") ? layout.substring(0, layout.length() - 1) : layout;
|
||||
}
|
||||
layout += "/index.html";
|
||||
finalUrl = (startsWithHttp ? "http" : "https") + "://OPENVIDUAPP:" + secret + "@" + recordingUrl
|
||||
+ "/layouts/custom" + layout + "?sessionId=" + recording.getSessionId() + "&secret=" + secret;
|
||||
finalUrl = (startsWithHttp ? "http" : "https") + "://" + basicauth + recordingUrl + "/layouts/custom"
|
||||
+ layout + "?sessionId=" + recording.getSessionId() + "&secret=" + secret;
|
||||
} else {
|
||||
layout = recording.getRecordingLayout().name().toLowerCase().replaceAll("_", "-");
|
||||
int port = startsWithHttp ? 80 : 443;
|
||||
|
@ -535,7 +537,7 @@ public class ComposedRecordingService extends RecordingService {
|
|||
}
|
||||
String defaultPathForDefaultLayout = recordingComposedUrlDefined ? ""
|
||||
: ("/" + openviduConfig.getOpenViduFrontendDefaultPath());
|
||||
finalUrl = (startsWithHttp ? "http" : "https") + "://OPENVIDUAPP:" + secret + "@" + recordingUrl
|
||||
finalUrl = (startsWithHttp ? "http" : "https") + "://" + basicauth + recordingUrl
|
||||
+ defaultPathForDefaultLayout + "/#/layout-" + layout + "/" + recording.getSessionId() + "/"
|
||||
+ secret + "/" + port + "/" + !recording.hasAudio();
|
||||
}
|
||||
|
|
|
@ -93,6 +93,12 @@
|
|||
"description": "URL the composed-video recording dockerized Chrome will use to connect to the recording layouts inside OpenVidu Server host. This will affect all video recording layouts (default one BEST_FIT, all CUSTOM layouts). This allows changing the default URL, which is the public URL 'https://DOMAIN_OR_PUBLIC_IP:HTTPS_PORT/', for those cases where OpenVidu Server host does not allow back and forth connections using the public url from inside the host",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "OPENVIDU_RECORDING_COMPOSED_BASICAUTH",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "'true' to automatically add Basic Auth credentials to the URL passed to the recording container, false otherwise",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "OPENVIDU_WEBHOOK",
|
||||
"type": "java.lang.Boolean",
|
||||
|
|
|
@ -33,6 +33,7 @@ OPENVIDU_RECORDING_NOTIFICATION=publisher_moderator
|
|||
OPENVIDU_RECORDING_CUSTOM_LAYOUT=/opt/openvidu/custom-layout
|
||||
OPENVIDU_RECORDING_AUTOSTOP_TIMEOUT=120
|
||||
OPENVIDU_RECORDING_COMPOSED_URL=
|
||||
OPENVIDU_RECORDING_COMPOSED_BASICAUTH=true
|
||||
|
||||
OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH=1000
|
||||
OPENVIDU_STREAMS_VIDEO_MIN_RECV_BANDWIDTH=300
|
||||
|
|
Loading…
Reference in New Issue