]> git.mxchange.org Git - friendica.git/commitdiff
Issue 14132: Title for videos
authorMichael <heluecht@pirati.ca>
Fri, 10 May 2024 05:42:45 +0000 (05:42 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 10 May 2024 05:42:45 +0000 (05:42 +0000)
src/Model/Item.php
view/templates/video_top.tpl

index 34208fead8661d58bc23aacda992bc1aeef0460e..2990461627657a671dfe5f9b5efb0f00a8fd3fe0 100644 (file)
@@ -3688,13 +3688,14 @@ class Item
                                /// @todo Move the template to /content as well
                                $media = Renderer::replaceMacros(Renderer::getMarkupTemplate('video_top.tpl'), [
                                        '$video' => [
-                                               'id'      => $PostMedia->id,
-                                               'src'     => (string)$PostMedia->url,
-                                               'name'    => $PostMedia->name ?: $PostMedia->url,
-                                               'preview' => $preview_url,
-                                               'mime'    => (string)$PostMedia->mimetype,
-                                               'height'  => $height,
-                                               'width'   => $width,
+                                               'id'          => $PostMedia->id,
+                                               'src'         => (string)$PostMedia->url,
+                                               'name'        => $PostMedia->name ?: $PostMedia->url,
+                                               'preview'     => $preview_url,
+                                               'mime'        => (string)$PostMedia->mimetype,
+                                               'height'      => $height,
+                                               'width'       => $width,
+                                               'description' => $PostMedia->description,
                                        ],
                                ]);
                                if (($item['post-type'] ?? null) == Item::PT_VIDEO) {
index b3cf049e717edb67e8889a3dc818e101d8d29c6f..4e85198abe4c8c09624c556a4cce2b526c767355 100644 (file)
@@ -1,6 +1,6 @@
 <div class="video-top-wrapper lframe" id="video-top-wrapper-{{$video.id}}">
        {{* set preloading to none to lessen the load on the server *}}
-       <video src="{{$video.src}}" controls {{if $video.preview}}preload="none" poster="{{$video.preview}}" {else}preload="metadata" {{/if}}width="{{$video.width}}" height="{{$video.height}}">
+       <video src="{{$video.src}}" controls {{if $video.preview}}preload="none" poster="{{$video.preview}}" {else}preload="metadata" {{/if}}width="{{$video.width}}" height="{{$video.height}}" title="{{$video.description}}">
                <a href="{{$video.src}}">{{$video.name}}</a>
        </video>