From a2700191474001c16d44cdf8341145e02bbbb86b Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 11 Jul 2021 06:21:25 +0200 Subject: [PATCH] easier to tell youre trying to watch a video that firefox cant deal with --- copyparty/web/baguettebox.js | 2 ++ copyparty/web/browser.css | 3 +++ 2 files changed, 5 insertions(+) diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index aec005f5..60c61210 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -443,6 +443,8 @@ window.baguetteBox = (function () { var is_vid = re_v.test(imageSrc), image = mknod(is_vid ? 'video' : 'img'); + clmod(imageContainer, 'vid', is_vid); + image.addEventListener(is_vid ? 'loadedmetadata' : 'load', function () { // Remove loader element var spinner = document.querySelector('#baguette-img-' + index + ' .baguetteBox-spinner'); diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 2a183828..9d1f6028 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1184,6 +1184,9 @@ html.light #tree::-webkit-scrollbar { vertical-align: middle; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); } +#baguetteBox-overlay .full-image video { + background: #333; +} #baguetteBox-overlay .full-image figcaption { display: block; position: absolute;