Improve unsupported file type handling

Make arbitrary files look nicer and display the filename.

If an audio or video element fails to load for any reason, timeout after
a few seconds and render it as an arbitrary file. Also short circuit to
this treatment for common audio and video file types that we know are
going to fail, e.g., proprietary formats from apple.

// FREEBIE
This commit is contained in:
lilia
2017-04-18 15:20:45 -07:00
parent 27a1c9f18a
commit a27ea20f3e
7 changed files with 119 additions and 23 deletions

View File

@@ -151,6 +151,10 @@
<img src='{{ source }}' class='preview' />
<a class='x close' alt='remove attachment' href='#'></a>
</script>
<script type='text/x-tmpl-mustache' id='file-view'>
<span class='icon'></span>
<span class='fileName' alt='{{ fileName }}' title='{{ altText }}'>{{ fileName }}</a>
</script>
<script type='text/x-tmpl-mustache' id='hasRetry'>
{{ messageNotSent }}
<span href='#' class='retry'>{{ resend }}</span>