Auto-download: hide play button on video's play

This commit is contained in:
Eduard Kuzmenko 2022-02-27 20:34:45 +02:00
parent 8e4db1d7e3
commit f7f4e3dd0d

View File

@ -453,6 +453,12 @@ export function wrapVideo({doc, container, message, boxWidth, boxHeight, withTai
video.addEventListener('timeupdate', () => {
spanTime.innerText = (video.duration - video.currentTime + '').toHHMMSS(false);
});
if(spanPlay) {
video.addEventListener('timeupdate', () => {
spanPlay.remove();
}, {once: true});
}
}
video.muted = true;