summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-21 13:45:06 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-21 13:45:06 +0100
commitd5b95cfa5cd87bfc21366d7a06836650d6f34cc4 (patch)
tree32aaad585b1fc002f83a32505ae093c49885acda
parentbe38cae07c94f908428abd2a83a1a27bc1913b4f (diff)
downloadliberty-d5b95cfa5cd87bfc21366d7a06836650d6f34cc4.tar.gz
liberty-d5b95cfa5cd87bfc21366d7a06836650d6f34cc4.tar.bz2
liberty-d5b95cfa5cd87bfc21366d7a06836650d6f34cc4.zip
Replace broken video.js player with native HTML5 video element
video.js was loading from the unbuilt source directory and required Flash-era IE workarounds no longer needed. Native <video> with controls handles playback in all modern browsers. MIME type now taken from attachment data rather than hardcoded as video/mp4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-xtemplates/mime/video/player.tpl12
1 files changed, 3 insertions, 9 deletions
diff --git a/templates/mime/video/player.tpl b/templates/mime/video/player.tpl
index 048c566..5512638 100755
--- a/templates/mime/video/player.tpl
+++ b/templates/mime/video/player.tpl
@@ -1,14 +1,8 @@
{strip}
{if $attachment.media_url}
-<script src="{$smarty.const.THEMES_PKG_URL}js/videojs/src/js/video.js"></script>
-
-<video id="my-video" class="video-js" controls preload="auto" width="100%" height="600px">
- <source src="{$attachment.source_url}" type="video/mp4">
- <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video</p>
+<video controls preload="metadata" style="width:100%;max-height:600px;">
+ <source src="{$attachment.source_url}" type="{$attachment.mime_type|default:'video/mp4'}">
+ <p>{tr}Your browser does not support HTML5 video.{/tr} <a href="{$attachment.download_url}">{tr}Download{/tr}</a></p>
</video>
-
-<script>
- var player = videojs('my-video');
-</script>
{/if}
{/strip}