mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update Config util, add hls attributes
This commit is contained in:
parent
6cf4363c50
commit
5c358010b0
1 changed files with 85 additions and 71 deletions
|
@ -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
|
||||
]
|
||||
];
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue