fix cameras parameters

This commit is contained in:
Ivan 2023-09-29 01:18:53 +03:00
parent ab1c9aca80
commit a95a6d99e4
Signed by untrusted user who does not match committer: ppechenkoo
GPG Key ID: 0C191B86D9582583
4 changed files with 9 additions and 11 deletions

View File

@ -2739,7 +2739,7 @@ app.post('/cameras-parameters', async (req, res) => {
}, },
data: JSON.stringify({ data: JSON.stringify({
"FIELDS": [ "FIELDS": [
"AR" "MAIN"
] ]
}), }),
}); });
@ -2768,13 +2768,11 @@ app.put('/cameras-parameters', async (req, res) => {
const { serial } = req.query; const { serial } = req.query;
const { const {
VEC MAIN
} = requestData; } = requestData;
const requestBody = { const requestBody = {
"AR": { "MAIN": MAIN
"VEC": VEC
}
}; };
@ -2916,7 +2914,7 @@ app.put('/camera-parameters', async (req, res) => {
// Создаем JSON для GET запроса // Создаем JSON для GET запроса
const requestBody = { const requestBody = {
"AR": camerasData "MAIN": camerasData
}; };
// Отправляем GET запрос с JSON BODY // Отправляем GET запрос с JSON BODY

View File

@ -380,7 +380,7 @@ for (let radioButton of radioButtons) {
console.log(data.DATA); console.log(data.DATA);
camerasData = data.DATA.AR.VEC; camerasData = data.DATA.MAIN;
function updateFields(selectedIndex) { function updateFields(selectedIndex) {
const selectedData = camerasData[selectedIndex]; const selectedData = camerasData[selectedIndex];

View File

@ -1301,11 +1301,11 @@ mark.style.display = "none";
updateCamerasInArray(); updateCamerasInArray();
const VEC = camerasData; const MAIN = camerasData;
console.log(VEC); console.log(MAIN);
const requestData = { const requestData = {
VEC MAIN
}; };
try { try {

View File

@ -344,7 +344,7 @@
type: 'flv', type: 'flv',
isLive: true, isLive: true,
cors: true, cors: true,
url: `${baseURL}?serial=${serial}&channel=${i}&quality=0`, url: `${baseURL}?serial=${serial}&channel=${i}&quality=1`,
}, { }, {
enableWorker: true, enableWorker: true,
enableStashBuffer: false, enableStashBuffer: false,