This commit is contained in:
Mário Panenko 2024-11-04 21:12:21 +00:00
parent 835779bd6f
commit f4a13dc858

View File

@ -48,10 +48,15 @@ async function loadVideoSequenceByLetters() {
function playVideoAtIndex(index) {
if (index < 0 || index >= videoSequence.length) return;
videoPlayer.src = videoSequence[index];
videoPlayer.play();
currentIndex = index;
// Update the title with the current letter or word
const currentChar = videoSequence[index].split('/').pop().split('.')[0]; // Extract letter from the video path
document.getElementById('currentLetter').innerText = `${currentChar.toUpperCase()}`; // Update text
if (autoPlayEnabled) {
videoPlayer.onended = () => {
currentIndex++;