diff --git a/Frontend/templates/Frontend/video-editing.html b/Frontend/templates/Frontend/video-editing.html index 965b141..3e743f6 100644 --- a/Frontend/templates/Frontend/video-editing.html +++ b/Frontend/templates/Frontend/video-editing.html @@ -45,6 +45,9 @@
`; - console.log(data["timestamps"]); - data = data["timestamps"]; - - for (i = 0; i < data.length; i++) { - // iterates through each line of transcript - for (j=0; j 38) { - // checks if the line is longer than 38 characters and if so it creates a new paragraph (goes to next line) - console.log(i + " " + line + ", " + word); - paragraph += `
`; - transcriptHTML += paragraph; - //ends the paragraph - - //new paragraph - paragraph = ''; - line = word; - paragraph += ` ${word}`; - - } else { - line += ` ${word}`; - paragraph += ` ${word}`; - } - - if (j == data[i]["words"].length-1 && i == data.length-1){ - // checks if the last word has been reached - paragraph += `
`; - transcriptHTML += paragraph; - } - - - } - } - - // transcriptHTML += `${line.trim()}
`; - console.log("*********************** The Transcript HTML ****************************"); - - transcriptArea.innerHTML = transcriptHTML; - - console.log(transcriptArea); - - // Add event listeners to the lines - var words = transcriptArea.getElementsByTagName("span"); - for (var i = 0; i < words.length; i++) { - var word = words[i]; - var time = word.getAttribute("data-time"); - - word.addEventListener("click", (function(time) { - return function() { - var video = document.getElementById("video"); - - // Set the video's current time to the time attribute - video.currentTime = time; - video.play(); - } - })(time)); - } -} - -document.getElementById("play-button").addEventListener("click", function() { -// Code to play the video goes here -}); - -document.getElementById("pause-button").addEventListener("click", function() { -// Code to pause the video goes here -}); - -document.getElementById("stop-button").addEventListener("click", function() { -// Code to stop the video goes here -});