mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-16 02:11:52 +02:00
Added the check if a path is selected and the call to the transcript functio.
This commit is contained in:
@@ -25,6 +25,7 @@ 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() {
|
||||||
|
try {
|
||||||
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
|
||||||
let isChecked = false;
|
let isChecked = false;
|
||||||
|
|
||||||
@@ -36,10 +37,18 @@ function checkBoxes() {
|
|||||||
|
|
||||||
if(isChecked){
|
if(isChecked){
|
||||||
//Code to submit the video
|
//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 {
|
} else {
|
||||||
//language only english at the moment
|
//language only english at the moment
|
||||||
alert('Please select at least one document type.');
|
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"})
|
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user