mirror of
https://github.com/friendica/friendica
synced 2025-04-24 11:10:18 +00:00
Issue 14132: Title for videos
This commit is contained in:
parent
765af10f00
commit
e7b861388d
2 changed files with 9 additions and 8 deletions
|
@ -3688,13 +3688,14 @@ class Item
|
||||||
/// @todo Move the template to /content as well
|
/// @todo Move the template to /content as well
|
||||||
$media = Renderer::replaceMacros(Renderer::getMarkupTemplate('video_top.tpl'), [
|
$media = Renderer::replaceMacros(Renderer::getMarkupTemplate('video_top.tpl'), [
|
||||||
'$video' => [
|
'$video' => [
|
||||||
'id' => $PostMedia->id,
|
'id' => $PostMedia->id,
|
||||||
'src' => (string)$PostMedia->url,
|
'src' => (string)$PostMedia->url,
|
||||||
'name' => $PostMedia->name ?: $PostMedia->url,
|
'name' => $PostMedia->name ?: $PostMedia->url,
|
||||||
'preview' => $preview_url,
|
'preview' => $preview_url,
|
||||||
'mime' => (string)$PostMedia->mimetype,
|
'mime' => (string)$PostMedia->mimetype,
|
||||||
'height' => $height,
|
'height' => $height,
|
||||||
'width' => $width,
|
'width' => $width,
|
||||||
|
'description' => $PostMedia->description,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
if (($item['post-type'] ?? null) == Item::PT_VIDEO) {
|
if (($item['post-type'] ?? null) == Item::PT_VIDEO) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="video-top-wrapper lframe" id="video-top-wrapper-{{$video.id}}">
|
<div class="video-top-wrapper lframe" id="video-top-wrapper-{{$video.id}}">
|
||||||
{{* set preloading to none to lessen the load on the server *}}
|
{{* 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>
|
<a href="{{$video.src}}">{{$video.name}}</a>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue