fixed
This commit is contained in:
parent
835779bd6f
commit
f4a13dc858
@ -48,10 +48,15 @@ async function loadVideoSequenceByLetters() {
|
|||||||
|
|
||||||
function playVideoAtIndex(index) {
|
function playVideoAtIndex(index) {
|
||||||
if (index < 0 || index >= videoSequence.length) return;
|
if (index < 0 || index >= videoSequence.length) return;
|
||||||
|
|
||||||
videoPlayer.src = videoSequence[index];
|
videoPlayer.src = videoSequence[index];
|
||||||
videoPlayer.play();
|
videoPlayer.play();
|
||||||
currentIndex = index;
|
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) {
|
if (autoPlayEnabled) {
|
||||||
videoPlayer.onended = () => {
|
videoPlayer.onended = () => {
|
||||||
currentIndex++;
|
currentIndex++;
|
||||||
|
Loading…
Reference in New Issue
Block a user