mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Added the check if a path is selected and the call to the transcript functio.
This commit is contained in:
+21
-12
@@ -25,21 +25,30 @@ manualBtn.addEventListener('click', () => {
|
||||
|
||||
//function to check if one checkbox is at least klicked
|
||||
function checkBoxes() {
|
||||
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
||||
let isChecked = false;
|
||||
try {
|
||||
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
||||
let isChecked = false;
|
||||
|
||||
checkboxes.forEach(function(checkbox){
|
||||
if(checkbox.checked){
|
||||
isChecked = true;
|
||||
checkboxes.forEach(function(checkbox){
|
||||
if(checkbox.checked){
|
||||
isChecked = true;
|
||||
}
|
||||
});
|
||||
|
||||
if(isChecked){
|
||||
//Code to submit the video
|
||||
var pathTest = fileName.textContent + "";
|
||||
if(pathTest.endsWith(".mp4", ".mov", ".avi", ".mkv")){
|
||||
mapFunctions.get("extraction-video-to-audio").function({inputVideoPath: pathTest, outputType:"wav"});
|
||||
}
|
||||
} else {
|
||||
//language only english at the moment
|
||||
alert('Please select at least one document type.');
|
||||
}
|
||||
});
|
||||
|
||||
if(isChecked){
|
||||
//Code to submit the video
|
||||
} else {
|
||||
//language only english at the moment
|
||||
alert('Please select at least one document type.');
|
||||
} catch (error) {
|
||||
console.log("Error in scrpt.js checkBoxes function");
|
||||
}
|
||||
|
||||
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user