Add autoplay for videos

This commit is contained in:
Nicolò P 2024-12-05 18:19:34 +01:00
parent 0051474202
commit 872dff3769

View File

@ -251,6 +251,7 @@ UI.imageGallery = function (galleryId, images, video = false) {
mediaObj.media = 'video';
mediaObj["src-mp4"] = `video/${img.filename}`;
mediaObj.poster = `video/${img.filename.replace('mp4', 'png')}`;
mediaObj.autoplay = true;
} else {
mediaObj.src = `img/${img.filename}`;
}