1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #5446 from hubaishan/ticket/14771

[Ticket/14771]  Support playing audio attachments
This commit is contained in:
Marc Alexander
2021-07-15 20:37:36 +02:00
committed by GitHub
10 changed files with 145 additions and 4 deletions

View File

@@ -29,6 +29,26 @@
</dl>
<!-- ENDIF -->
{% if _file.S_AUDIO_FILE %}
<dl class="file">
<dt class="c-file-header">
<audio class="c-file-audio-controls" controls="controls" preload="metadata">
<source class="c-file-audio-source" src="{{ _file.U_DOWNLOAD_LINK }}" type="{{ _file.MIMETYPE }}">
</audio>
</dt>
{% if _file.COMMENT %}
<dd class="c-file-comment">{{ _file.COMMENT }}</dd>
{% endif %}
<dd class="c-file-actions">
{% if _file.UPLOAD_ICON %}
<span class="o-icon c-file-icon">{{ _file.UPLOAD_ICON }}</span>
{% endif %}
<a class="c-file-actions-link postlink" href="{{ _file.U_DOWNLOAD_LINK }}" download>{{ _file.DOWNLOAD_NAME }}</a>
<span class="c-file-actions-meta">({{ _file.FILESIZE }} {{ _file.SIZE_LANG }}) {{ _file.L_DOWNLOAD_COUNT }}</span>
</dd>
</dl>
{% endif %}
<!-- EVENT attachment_file_append -->
<!-- ENDIF -->
<!-- END _file -->

View File

@@ -682,6 +682,14 @@ dl.thumbnail dt a:hover img {
border: 1px solid transparent;
}
.c-file-comment {
font-style: italic;
}
.c-file-audio-controls {
max-width: 100%;
}
/* Post poll styles
---------------------------------------- */
fieldset.polls {