feat(playout): allow harbor ssl configuration

This commit is contained in:
jo 2023-03-30 20:39:02 +02:00 committed by Kyle Robbertze
parent 8764feded9
commit b2fc3a5ecf
17 changed files with 248 additions and 13 deletions

View file

@ -117,6 +117,7 @@ class Schema implements ConfigurationInterface
/* */->validate()->ifString()->then($trim_leading_slash)->end()
/* */->end()
/* */->integerNode('port')->defaultValue(8001)->end()
/* */->booleanNode('secure')->defaultValue(False)->end()
/**/->end()->end()
/**/->arrayNode('show')->addDefaultsIfNotSet()->children()
/* */->booleanNode('enabled')->defaultTrue()->end()
@ -126,6 +127,7 @@ class Schema implements ConfigurationInterface
/* */->validate()->ifString()->then($trim_leading_slash)->end()
/* */->end()
/* */->integerNode('port')->defaultValue(8002)->end()
/* */->booleanNode('secure')->defaultValue(False)->end()
/**/->end()->end()
->end()->end()

View file

@ -1090,8 +1090,11 @@ class Application_Model_Preference
$host = Config::get('general.public_url_raw')->getHost();
$port = Application_Model_StreamSetting::getMasterLiveStreamPort();
$mount = Application_Model_StreamSetting::getMasterLiveStreamMountPoint();
$secure = Application_Model_StreamSetting::getMasterLiveStreamSecure();
return "http://{$host}:{$port}/{$mount}";
$scheme = $secure ? 'https' : 'http';
return "{$scheme}://{$host}:{$port}/{$mount}";
}
public static function GetLiveDJSourceConnectionURL()
@ -1103,8 +1106,11 @@ class Application_Model_Preference
$host = Config::get('general.public_url_raw')->getHost();
$port = Application_Model_StreamSetting::getDjLiveStreamPort();
$mount = Application_Model_StreamSetting::getDjLiveStreamMountPoint();
$secure = Application_Model_StreamSetting::getDjLiveStreamSecure();
return "http://{$host}:{$port}/{$mount}";
$scheme = $secure ? 'https' : 'http';
return "{$scheme}://{$host}:{$port}/{$mount}";
}
public static function SetAutoTransition($value)

View file

@ -190,6 +190,11 @@ class Application_Model_StreamSetting
return Config::get('stream.inputs.main.mount') ?? 'main';
}
public static function getMasterLiveStreamSecure()
{
return Config::get('stream.inputs.main.secure') ?? false;
}
public static function getDjLiveStreamPort()
{
return Config::get('stream.inputs.show.port') ?? 8002;
@ -200,6 +205,11 @@ class Application_Model_StreamSetting
return Config::get('stream.inputs.show.mount') ?? 'show';
}
public static function getDjLiveStreamSecure()
{
return Config::get('stream.inputs.show.secure') ?? false;
}
public static function getAdminUser($stream)
{
return self::getStreamDataNormalized($stream)['admin_user'];