]> git.mxchange.org Git - friendica.git/commitdiff
Set default value for max video height
authorMichael <heluecht@pirati.ca>
Thu, 7 Mar 2024 14:22:40 +0000 (14:22 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 7 Mar 2024 14:22:40 +0000 (14:22 +0000)
src/Model/Item.php
static/defaults.config.php

index b5e31f0fba4f9f2a46c74c5a3409a3edfc10883e..9ef59c73d0081249c7bc56cad6c77f0459e57c91 100644 (file)
@@ -3644,7 +3644,7 @@ class Item
 
                        if ($PostMedia->mimetype->type == 'video') {
                                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';
                                } else {
                                        $height = 'auto';
index 8a13c61a390d079efdeee927cd6f94e23111f748..7c17dce2270fe8f99e9d645b8dbf49d14ed1842c 100644 (file)
@@ -407,6 +407,10 @@ return [
                // Maximum recursion depth when fetching posts until the job is delegated to a worker task or finished.
                'max_recursion_depth' => 50,
 
+               // max_video_height (Integer)
+               // Maximum height of videos in portrait mode.
+               'max_video_height' => 640,
+
                // memcache_host (String)
                // Host name of the memcache daemon.
                'memcache_host' => '127.0.0.1',