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 to check if one checkbox is at least klicked
|
||||||
function checkBoxes() {
|
function checkBoxes() {
|
||||||
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
try {
|
||||||
let isChecked = false;
|
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
||||||
|
let isChecked = false;
|
||||||
|
|
||||||
checkboxes.forEach(function(checkbox){
|
checkboxes.forEach(function(checkbox){
|
||||||
if(checkbox.checked){
|
if(checkbox.checked){
|
||||||
isChecked = true;
|
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.');
|
||||||
}
|
}
|
||||||
});
|
} catch (error) {
|
||||||
|
console.log("Error in scrpt.js checkBoxes function");
|
||||||
if(isChecked){
|
|
||||||
//Code to submit the video
|
|
||||||
} else {
|
|
||||||
//language only english at the moment
|
|
||||||
alert('Please select at least one document type.');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
|
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user