Set default value for max video height

This commit is contained in:
Michael 2024-03-07 14:22:40 +00:00
parent 1b00b91767
commit 67696d08da
2 changed files with 5 additions and 1 deletions

View file

@ -3644,7 +3644,7 @@ class Item
if ($PostMedia->mimetype->type == 'video') { if ($PostMedia->mimetype->type == 'video') {
if (($PostMedia->height ?? 0) > ($PostMedia->width ?? 0)) { if (($PostMedia->height ?? 0) > ($PostMedia->width ?? 0)) {
$height = min(DI::config()->get('system', 'max_video_height'), $PostMedia->height); $height = min(DI::config()->get('system', 'max_video_height') ?: '100%', $PostMedia->height);
$width = 'auto'; $width = 'auto';
} else { } else {
$height = 'auto'; $height = 'auto';

View file

@ -407,6 +407,10 @@ return [
// Maximum recursion depth when fetching posts until the job is delegated to a worker task or finished. // Maximum recursion depth when fetching posts until the job is delegated to a worker task or finished.
'max_recursion_depth' => 50, 'max_recursion_depth' => 50,
// max_video_height (Integer)
// Maximum height of videos in portrait mode.
'max_video_height' => 640,
// memcache_host (String) // memcache_host (String)
// Host name of the memcache daemon. // Host name of the memcache daemon.
'memcache_host' => '127.0.0.1', 'memcache_host' => '127.0.0.1',