Update Config util, add hls attributes

This commit is contained in:
Daniel Supernault 2023-10-23 01:15:02 -06:00
parent 6cf4363c50
commit 5c358010b0
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -11,6 +11,19 @@ class Config {
public static function get() {
return Cache::remember(self::CACHE_KEY, 900, function() {
$hls = [
'enabled' => config('media.hls.enabled'),
];
if(config('media.hls.enabled')) {
$hls = [
'enabled' => true,
'debug' => (bool) config('media.hls.debug'),
'p2p' => (bool) config('media.hls.p2p'),
'p2p_debug' => (bool) config('media.hls.p2p_debug'),
'tracker' => config('media.hls.tracker'),
'ice' => config('media.hls.ice')
];
}
return [
'version' => config('pixelfed.version'),
'open_registration' => (bool) config_cache('pixelfed.open_registration'),
@ -80,7 +93,8 @@ class Config {
'org' => config('instance.label.covid.org'),
'url' => config('instance.label.covid.url'),
]
]
],
'hls' => $hls
]
];
});