Make use of the video tag for videos in the ML.

Cherry-picked from master branch.
This commit is contained in:
onli 2019-11-03 21:30:51 +01:00 committed by Thomas Hochstein
parent 5934de7a4e
commit ac81762eaa
2 changed files with 19 additions and 4 deletions

View File

@ -9,6 +9,8 @@ Version 2.3.3-beta1 ()
* Updates mailer event plugin to support force sending mails on
published blog entries and ability to prepend a mail body.
Also fixes missing "keep strip tags" configuration option
* Use the video tag for videos in the Medialibrary, also when
inserting such a video into an entry
* Fix: Items in Medialibrary that are not images now get
the correct link

View File

@ -56,7 +56,6 @@
{/if}
{/if}
<article id="media_{$file.id}" class="media_file {if $media.manage AND $media.multiperm}manage {/if}{cycle values="odd,even"}">
<header class="clearfix">
{if $media.manage AND $media.multiperm}
@ -81,9 +80,23 @@
<div class="clearfix equal_heights media_file_wrap">
<div class="media_file_preview">
<a {if $media.manage AND $media.multiperm}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}">
<img src="{$img_src}" title="{$img_title}" alt="{$img_alt}">
</a>
{if $file.mediatype == 'video'}
<video src="{$file.imgsrc}" controls>
<img src="{$img_src}" title="{$img_title}" alt="{$img_alt}">
</video>
<br />
{if NOT $media.manage}
{* we need a link to go to the next step when inserting into an entry *}
<a {if $media.manage AND $media.multiperm}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}">
{$CONST.VIDEO}
</a>
{/if}
{else}
<a {if $media.manage AND $media.multiperm}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}">
{* even files that are not images get aplaceholder image from the backend *}
<img src="{$img_src}" title="{$img_title}" alt="{$img_alt}">
</a>
{/if}
<footer id="media_file_meta_{$file.id}" class="media_file_meta additional_info">
<ul class="plainList">
{if $file.hotlink}