fix cameras parameters
This commit is contained in:
parent
ab1c9aca80
commit
a95a6d99e4
10
server.js
10
server.js
@ -2739,7 +2739,7 @@ app.post('/cameras-parameters', async (req, res) => {
|
||||
},
|
||||
data: JSON.stringify({
|
||||
"FIELDS": [
|
||||
"AR"
|
||||
"MAIN"
|
||||
]
|
||||
}),
|
||||
});
|
||||
@ -2768,13 +2768,11 @@ app.put('/cameras-parameters', async (req, res) => {
|
||||
const { serial } = req.query;
|
||||
|
||||
const {
|
||||
VEC
|
||||
MAIN
|
||||
} = requestData;
|
||||
|
||||
const requestBody = {
|
||||
"AR": {
|
||||
"VEC": VEC
|
||||
}
|
||||
"MAIN": MAIN
|
||||
};
|
||||
|
||||
|
||||
@ -2916,7 +2914,7 @@ app.put('/camera-parameters', async (req, res) => {
|
||||
|
||||
// Создаем JSON для GET запроса
|
||||
const requestBody = {
|
||||
"AR": camerasData
|
||||
"MAIN": camerasData
|
||||
};
|
||||
|
||||
// Отправляем GET запрос с JSON BODY
|
||||
|
@ -380,7 +380,7 @@ for (let radioButton of radioButtons) {
|
||||
|
||||
console.log(data.DATA);
|
||||
|
||||
camerasData = data.DATA.AR.VEC;
|
||||
camerasData = data.DATA.MAIN;
|
||||
|
||||
function updateFields(selectedIndex) {
|
||||
const selectedData = camerasData[selectedIndex];
|
||||
|
@ -1301,11 +1301,11 @@ mark.style.display = "none";
|
||||
|
||||
updateCamerasInArray();
|
||||
|
||||
const VEC = camerasData;
|
||||
console.log(VEC);
|
||||
const MAIN = camerasData;
|
||||
console.log(MAIN);
|
||||
|
||||
const requestData = {
|
||||
VEC
|
||||
MAIN
|
||||
};
|
||||
|
||||
try {
|
||||
|
@ -344,7 +344,7 @@
|
||||
type: 'flv',
|
||||
isLive: true,
|
||||
cors: true,
|
||||
url: `${baseURL}?serial=${serial}&channel=${i}&quality=0`,
|
||||
url: `${baseURL}?serial=${serial}&channel=${i}&quality=1`,
|
||||
}, {
|
||||
enableWorker: true,
|
||||
enableStashBuffer: false,
|
||||
|
Loading…
Reference in New Issue
Block a user