Skip to content

Commit

Permalink
fix audio player not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
slatinsky committed Nov 5, 2023
1 parent de9f96e commit 2bd5870
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 11 additions & 4 deletions frontend/src/components/messages/MessageAttachments.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,16 @@
</a>
</div>
{#if attachment.type == 'audio'}
<audio class="chatlog__attachment-media" controls preload="metadata">
<source src="{checkUrl(attachment)}" alt="{attachment?.filenameWithoutHash ?? 'Audio attachment'}" title="Audio: {attachment.filenameWithoutHash} ({Math.round(attachment.sizeBytes / 1024)} KB)">
</audio>
<audio class="" controls preload="metadata">
<source src="{checkUrl(attachment)}" alt="{attachment?.filenameWithoutHash ?? 'Audio attachment'}" title="Audio: {attachment.filenameWithoutHash} ({Math.round(attachment.sizeBytes / 1024)} KB)">
</audio>
{/if}
{/if}
{/each}
{/each}

<style>
audio {
max-width: 80%;
width: 700px;
}
</style>
5 changes: 0 additions & 5 deletions frontend/src/components/messages/NewMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,6 @@
}
audio {
max-width: 80%;
width: 700px;
}
.msg-root .msg-jump {
visibility: hidden;
position: absolute;
Expand Down

0 comments on commit 2bd5870

Please sign in to comment.