mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 08:44:02 +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() {
|
public static function get() {
|
||||||
return Cache::remember(self::CACHE_KEY, 900, function() {
|
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 [
|
return [
|
||||||
'version' => config('pixelfed.version'),
|
'version' => config('pixelfed.version'),
|
||||||
'open_registration' => (bool) config_cache('pixelfed.open_registration'),
|
'open_registration' => (bool) config_cache('pixelfed.open_registration'),
|
||||||
|
@ -80,7 +93,8 @@ class Config {
|
||||||
'org' => config('instance.label.covid.org'),
|
'org' => config('instance.label.covid.org'),
|
||||||
'url' => config('instance.label.covid.url'),
|
'url' => config('instance.label.covid.url'),
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
|
'hls' => $hls
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue