mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-21 20:28:06 +00:00
dont upscale demo videos
This commit is contained in:
parent
84763e09d0
commit
b2f249cbfd
1 changed files with 5 additions and 0 deletions
5
docs/_static/custom.js
vendored
5
docs/_static/custom.js
vendored
|
|
@ -79,6 +79,10 @@ function init_shader_modals() {
|
|||
|
||||
function open_modal(video_src) {
|
||||
video.innerHTML = '<source src="' + video_src + '" type="video/webm">';
|
||||
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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue