Possibility to set custom RTMP/RTMPS hostname (#4811)
* live: set custom RTMP/RTMPS hostname closes #4786 * dont use webserver.hostname as default * check that rtmp/s.hostname is set
This commit is contained in:
parent
b5c00b9b67
commit
8d07888728
|
@ -396,6 +396,7 @@ live:
|
||||||
rtmp:
|
rtmp:
|
||||||
enabled: true
|
enabled: true
|
||||||
port: 1935
|
port: 1935
|
||||||
|
hostname: 'localhost'
|
||||||
|
|
||||||
rtmps:
|
rtmps:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -404,6 +405,7 @@ live:
|
||||||
key_file: ''
|
key_file: ''
|
||||||
# Absolute path
|
# Absolute path
|
||||||
cert_file: ''
|
cert_file: ''
|
||||||
|
hostname: 'localhost'
|
||||||
|
|
||||||
# Allow to transcode the live streaming in multiple live resolutions
|
# Allow to transcode the live streaming in multiple live resolutions
|
||||||
transcoding:
|
transcoding:
|
||||||
|
|
|
@ -404,6 +404,7 @@ live:
|
||||||
rtmp:
|
rtmp:
|
||||||
enabled: true
|
enabled: true
|
||||||
port: 1935
|
port: 1935
|
||||||
|
hostname: 'localhost'
|
||||||
|
|
||||||
rtmps:
|
rtmps:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -412,6 +413,7 @@ live:
|
||||||
key_file: ''
|
key_file: ''
|
||||||
# Absolute path
|
# Absolute path
|
||||||
cert_file: ''
|
cert_file: ''
|
||||||
|
hostname: 'localhost'
|
||||||
|
|
||||||
# Allow to transcode the live streaming in multiple live resolutions
|
# Allow to transcode the live streaming in multiple live resolutions
|
||||||
transcoding:
|
transcoding:
|
||||||
|
|
|
@ -49,7 +49,8 @@ function checkMissedConfig () {
|
||||||
'search.remote_uri.users', 'search.remote_uri.anonymous', 'search.search_index.enabled', 'search.search_index.url',
|
'search.remote_uri.users', 'search.remote_uri.anonymous', 'search.search_index.enabled', 'search.search_index.url',
|
||||||
'search.search_index.disable_local_search', 'search.search_index.is_default_search',
|
'search.search_index.disable_local_search', 'search.search_index.is_default_search',
|
||||||
'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives',
|
'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives',
|
||||||
'live.rtmp.enabled', 'live.rtmp.port', 'live.rtmps.enabled', 'live.rtmps.port', 'live.rtmps.key_file', 'live.rtmps.cert_file',
|
'live.rtmp.enabled', 'live.rtmp.port', 'live.rtmp.hostname',
|
||||||
|
'live.rtmps.enabled', 'live.rtmps.port', 'live.rtmps.hostname', 'live.rtmps.key_file', 'live.rtmps.cert_file',
|
||||||
'live.transcoding.enabled', 'live.transcoding.threads', 'live.transcoding.profile',
|
'live.transcoding.enabled', 'live.transcoding.threads', 'live.transcoding.profile',
|
||||||
'live.transcoding.resolutions.144p', 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p',
|
'live.transcoding.resolutions.144p', 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p',
|
||||||
'live.transcoding.resolutions.480p', 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p',
|
'live.transcoding.resolutions.480p', 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p',
|
||||||
|
|
|
@ -297,12 +297,14 @@ const CONFIG = {
|
||||||
|
|
||||||
RTMP: {
|
RTMP: {
|
||||||
get ENABLED () { return config.get<boolean>('live.rtmp.enabled') },
|
get ENABLED () { return config.get<boolean>('live.rtmp.enabled') },
|
||||||
get PORT () { return config.get<number>('live.rtmp.port') }
|
get PORT () { return config.get<number>('live.rtmp.port') },
|
||||||
|
get HOSTNAME () { return config.get<number>('live.rtmp.hostname') }
|
||||||
},
|
},
|
||||||
|
|
||||||
RTMPS: {
|
RTMPS: {
|
||||||
get ENABLED () { return config.get<boolean>('live.rtmps.enabled') },
|
get ENABLED () { return config.get<boolean>('live.rtmps.enabled') },
|
||||||
get PORT () { return config.get<number>('live.rtmps.port') },
|
get PORT () { return config.get<number>('live.rtmps.port') },
|
||||||
|
get HOSTNAME () { return config.get<number>('live.rtmps.hostname') },
|
||||||
get KEY_FILE () { return config.get<string>('live.rtmps.key_file') },
|
get KEY_FILE () { return config.get<string>('live.rtmps.key_file') },
|
||||||
get CERT_FILE () { return config.get<string>('live.rtmps.cert_file') }
|
get CERT_FILE () { return config.get<string>('live.rtmps.cert_file') }
|
||||||
},
|
},
|
||||||
|
|
|
@ -1046,8 +1046,8 @@ function updateWebserverUrls () {
|
||||||
WEBSERVER.HOSTNAME = CONFIG.WEBSERVER.HOSTNAME
|
WEBSERVER.HOSTNAME = CONFIG.WEBSERVER.HOSTNAME
|
||||||
WEBSERVER.PORT = CONFIG.WEBSERVER.PORT
|
WEBSERVER.PORT = CONFIG.WEBSERVER.PORT
|
||||||
|
|
||||||
WEBSERVER.RTMP_URL = 'rtmp://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.LIVE.RTMP.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH
|
WEBSERVER.RTMP_URL = 'rtmp://' + CONFIG.LIVE.RTMP.HOSTNAME + ':' + CONFIG.LIVE.RTMP.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH
|
||||||
WEBSERVER.RTMPS_URL = 'rtmps://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.LIVE.RTMPS.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH
|
WEBSERVER.RTMPS_URL = 'rtmps://' + CONFIG.LIVE.RTMPS.HOSTNAME + ':' + CONFIG.LIVE.RTMPS.PORT + '/' + VIDEO_LIVE.RTMP.BASE_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateWebserverConfig () {
|
function updateWebserverConfig () {
|
||||||
|
|
Loading…
Reference in New Issue