From b2f249cbfdad6b693ef1917d3bac4cd935452de1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Aug 2026 15:27:44 +0530 Subject: [PATCH] dont upscale demo videos --- docs/_static/custom.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/_static/custom.js b/docs/_static/custom.js index 14e68047a..228cbbcfc 100644 --- a/docs/_static/custom.js +++ b/docs/_static/custom.js @@ -79,6 +79,10 @@ function init_shader_modals() { function open_modal(video_src) { video.innerHTML = ''; + video.addEventListener('loadedmetadata', function on_meta() { + video.style.width = video.videoWidth + 'px'; + video.removeEventListener('loadedmetadata', on_meta); + }); video.load(); video.play(); overlay.classList.add('active'); @@ -89,6 +93,7 @@ function init_shader_modals() { overlay.classList.remove('active'); video.pause(); video.innerHTML = ''; + video.style.width = ''; document.body.classList.remove('shader-modal-open'); }