diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/config.ts | 4 | ||||
-rw-r--r-- | server/initializers/constants.ts | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index d8f5f3496..59a65d6a5 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -313,13 +313,15 @@ const CONFIG = { | |||
313 | RTMP: { | 313 | RTMP: { |
314 | get ENABLED () { return config.get<boolean>('live.rtmp.enabled') }, | 314 | get ENABLED () { return config.get<boolean>('live.rtmp.enabled') }, |
315 | get PORT () { return config.get<number>('live.rtmp.port') }, | 315 | get PORT () { return config.get<number>('live.rtmp.port') }, |
316 | get HOSTNAME () { return config.get<number>('live.rtmp.hostname') } | 316 | get HOSTNAME () { return config.get<number>('live.rtmp.hostname') }, |
317 | get PUBLIC_HOSTNAME () { return config.get<number>('live.rtmp.public_hostname') } | ||
317 | }, | 318 | }, |
318 | 319 | ||
319 | RTMPS: { | 320 | RTMPS: { |
320 | get ENABLED () { return config.get<boolean>('live.rtmps.enabled') }, | 321 | get ENABLED () { return config.get<boolean>('live.rtmps.enabled') }, |
321 | get PORT () { return config.get<number>('live.rtmps.port') }, | 322 | get PORT () { return config.get<number>('live.rtmps.port') }, |
322 | get HOSTNAME () { return config.get<number>('live.rtmps.hostname') }, | 323 | get HOSTNAME () { return config.get<number>('live.rtmps.hostname') }, |
324 | get PUBLIC_HOSTNAME () { return config.get<number>('live.rtmps.public_hostname') }, | ||
323 | get KEY_FILE () { return config.get<string>('live.rtmps.key_file') }, | 325 | get KEY_FILE () { return config.get<string>('live.rtmps.key_file') }, |
324 | get CERT_FILE () { return config.get<string>('live.rtmps.cert_file') } | 326 | get CERT_FILE () { return config.get<string>('live.rtmps.cert_file') } |
325 | }, | 327 | }, |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 4656ccdbc..9986dbf89 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -1074,8 +1074,11 @@ function updateWebserverUrls () { | |||
1074 | WEBSERVER.HOSTNAME = CONFIG.WEBSERVER.HOSTNAME | 1074 | WEBSERVER.HOSTNAME = CONFIG.WEBSERVER.HOSTNAME |
1075 | WEBSERVER.PORT = CONFIG.WEBSERVER.PORT | 1075 | WEBSERVER.PORT = CONFIG.WEBSERVER.PORT |
1076 | 1076 | ||
1077 | WEBSERVER.RTMP_URL = 'rtmp://' + CONFIG.LIVE.RTMP.HOSTNAME + ':' + CONFIG.LIVE.RTMP.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH | 1077 | const rtmpHostname = CONFIG.LIVE.RTMP.PUBLIC_HOSTNAME || CONFIG.WEBSERVER.HOSTNAME |
1078 | WEBSERVER.RTMPS_URL = 'rtmps://' + CONFIG.LIVE.RTMPS.HOSTNAME + ':' + CONFIG.LIVE.RTMPS.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH | 1078 | const rtmpsHostname = CONFIG.LIVE.RTMPS.PUBLIC_HOSTNAME || CONFIG.WEBSERVER.HOSTNAME |
1079 | |||
1080 | WEBSERVER.RTMP_URL = 'rtmp://' + rtmpHostname + ':' + CONFIG.LIVE.RTMP.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH | ||
1081 | WEBSERVER.RTMPS_URL = 'rtmps://' + rtmpsHostname + ':' + CONFIG.LIVE.RTMPS.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH | ||
1079 | } | 1082 | } |
1080 | 1083 | ||
1081 | function updateWebserverConfig () { | 1084 | function updateWebserverConfig () { |