à jour
This commit is contained in:
@@ -176,4 +176,44 @@ async function renderVideo(id){
|
||||
console.error("Error rendering video:", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async function start_timelapse(id,frequency){
|
||||
try {
|
||||
const mydata = JSON.stringify({
|
||||
frequency:frequency
|
||||
});
|
||||
const response = await $.ajax({
|
||||
url: api_url.concat(`/procedure/start/`+id),
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: mydata
|
||||
});
|
||||
|
||||
console.log("data retrieval started:", response);
|
||||
} catch (error) {
|
||||
console.error("Error starting the retrieval:", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async function stopCamera(id){
|
||||
try {
|
||||
const mydata = JSON.stringify({
|
||||
info:"None"
|
||||
});
|
||||
const response = await $.ajax({
|
||||
url: api_url.concat(`/procedure/stop`+id),
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: mydata
|
||||
});
|
||||
|
||||
console.log("Camera stopped succesfully :", response);
|
||||
} catch (error) {
|
||||
console.error("Error stopping the camera :", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user