iobroker.agent-dvr 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +22 -11
- package/README.md +22 -11
- package/admin/assets/index-D01Axkcs.js +685 -0
- package/admin/i18n/de.json +1 -1
- package/admin/i18n/es.json +1 -1
- package/admin/i18n/fr.json +1 -1
- package/admin/i18n/it.json +1 -1
- package/admin/i18n/nl.json +1 -1
- package/admin/i18n/pl.json +1 -1
- package/admin/i18n/pt.json +1 -1
- package/admin/i18n/ru.json +1 -1
- package/admin/i18n/uk.json +1 -1
- package/admin/i18n/zh-cn.json +1 -1
- package/admin/index_m.html +1 -1
- package/build/main.js +56 -4
- package/build/main.js.map +2 -2
- package/io-package.json +28 -28
- package/lib/web.js +4 -3
- package/package.json +1 -1
- package/www/index.html +15 -14
package/admin/i18n/de.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Aufnahmen-Tab anzeigen",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Den Aufnahmen-Tab in der Dashboard-Navigation anzeigen. Deaktivieren um den Tab vollständig auszublenden.",
|
|
23
23
|
"cfgDashMaxRec": "Max. Aufnahmen gesamt",
|
|
24
|
-
"cfgDashMaxRec_tt": "Maximale Gesamtanzahl
|
|
24
|
+
"cfgDashMaxRec_tt": "Maximale Gesamtanzahl der im Dashboard angezeigten Aufnahmen über alle Kameras (neueste zuerst).",
|
|
25
25
|
"cfgDashGridCols": "Spaltenanzahl (0 = automatisch)",
|
|
26
26
|
"cfgDashGridCols_tt": "Anzahl Kamera-Spalten fest vorgeben. 0 = optimale Anzahl wird automatisch berechnet.",
|
|
27
27
|
"cfgDashRefreshSec": "Kameraliste neu laden alle (Sekunden)",
|
package/admin/i18n/es.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Mostrar pestaña de grabaciones",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Muestra la pestaña de grabaciones en la navegación del panel. Desactivar para ocultar la pestaña por completo.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Número máximo total de grabaciones mostradas en el panel en todas las cámaras (las más recientes primero).",
|
|
25
25
|
"cfgDashGridCols": "Número de columnas (0 = automático)",
|
|
26
26
|
"cfgDashGridCols_tt": "Forzar un número fijo de columnas de cámara. 0 = el número óptimo se calcula automáticamente.",
|
|
27
27
|
"cfgDashRefreshSec": "Recargar lista de cámaras cada (segundos)",
|
package/admin/i18n/fr.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Afficher l'onglet enregistrements",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Afficher l'onglet enregistrements dans la navigation du tableau de bord. Désactiver pour masquer l'onglet complètement.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Nombre maximum total d'enregistrements affichés dans le tableau de bord pour toutes les caméras (les plus récents en premier).",
|
|
25
25
|
"cfgDashGridCols": "Nombre de colonnes (0 = automatique)",
|
|
26
26
|
"cfgDashGridCols_tt": "Forcer un nombre fixe de colonnes de caméras. 0 = le nombre optimal est calculé automatiquement.",
|
|
27
27
|
"cfgDashRefreshSec": "Recharger la liste des caméras toutes les (secondes)",
|
package/admin/i18n/it.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Mostra scheda registrazioni",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Mostra la scheda registrazioni nella navigazione del pannello. Disattivare per nascondere completamente la scheda.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Numero massimo totale di registrazioni visualizzate nel pannello per tutte le telecamere (le più recenti prima).",
|
|
25
25
|
"cfgDashGridCols": "Numero colonne (0 = automatico)",
|
|
26
26
|
"cfgDashGridCols_tt": "Forza un numero fisso di colonne per le telecamere. 0 = il numero ottimale viene calcolato automaticamente.",
|
|
27
27
|
"cfgDashRefreshSec": "Ricarica lista telecamere ogni (secondi)",
|
package/admin/i18n/nl.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Opnamen-tabblad tonen",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Toont het opnamen-tabblad in de dashboardnavigatie. Uitschakelen om het tabblad volledig te verbergen.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Maximaal totaal aantal opnames dat in het dashboard wordt weergegeven voor alle camera's (nieuwste eerst).",
|
|
25
25
|
"cfgDashGridCols": "Aantal kolommen (0 = automatisch)",
|
|
26
26
|
"cfgDashGridCols_tt": "Forceer een vast aantal camerakolommen. 0 = optimaal aantal wordt automatisch berekend.",
|
|
27
27
|
"cfgDashRefreshSec": "Cameralijst elke (seconden) herladen",
|
package/admin/i18n/pl.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Pokaż zakładkę nagrań",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Wyświetla zakładkę nagrań w nawigacji panelu. Wyłącz aby całkowicie ukryć zakładkę.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Maksymalna łączna liczba nagrań wyświetlanych na pulpicie nawigacyjnym dla wszystkich kamer (najnowsze pierwsze).",
|
|
25
25
|
"cfgDashGridCols": "Liczba kolumn (0 = automatycznie)",
|
|
26
26
|
"cfgDashGridCols_tt": "Wymusza stałą liczbę kolumn kamer. 0 = optymalna liczba jest obliczana automatycznie.",
|
|
27
27
|
"cfgDashRefreshSec": "Odświeżaj listę kamer co (sekundy)",
|
package/admin/i18n/pt.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Mostrar aba de gravações",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Mostra a aba de gravações na navegação do painel. Desativar para ocultar a aba completamente.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Número máximo total de gravações exibidas no painel em todas as câmeras (as mais recentes primeiro).",
|
|
25
25
|
"cfgDashGridCols": "Número de colunas (0 = automático)",
|
|
26
26
|
"cfgDashGridCols_tt": "Força um número fixo de colunas de câmeras. 0 = o número ideal é calculado automaticamente.",
|
|
27
27
|
"cfgDashRefreshSec": "Recarregar lista de câmeras a cada (segundos)",
|
package/admin/i18n/ru.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Показывать вкладку записей",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Отображает вкладку записей в навигации панели. Отключите чтобы полностью скрыть вкладку.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Максимальное общее количество записей, отображаемых на панели для всех камер (сначала новейшие).",
|
|
25
25
|
"cfgDashGridCols": "Количество столбцов (0 = авто)",
|
|
26
26
|
"cfgDashGridCols_tt": "Принудительно задать фиксированное количество столбцов камер. 0 = оптимальное количество вычисляется автоматически.",
|
|
27
27
|
"cfgDashRefreshSec": "Обновлять список камер каждые (секунд)",
|
package/admin/i18n/uk.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "Показувати вкладку записів",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "Відображає вкладку записів у навігації панелі. Вимкніть щоб повністю приховати вкладку.",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "Максимальна загальна кількість записів, що відображаються на панелі для всіх камер (спочатку найновіші).",
|
|
25
25
|
"cfgDashGridCols": "Кількість стовпців (0 = авто)",
|
|
26
26
|
"cfgDashGridCols_tt": "Примусово задати фіксовану кількість стовпців камер. 0 = оптимальна кількість обчислюється автоматично.",
|
|
27
27
|
"cfgDashRefreshSec": "Оновлювати список камер кожні (секунд)",
|
package/admin/i18n/zh-cn.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cfgDashEnableRecordings": "显示录像标签页",
|
|
22
22
|
"cfgDashEnableRecordings_tt": "在仪表板导航中显示录像标签页。禁用则完全隐藏该标签页。",
|
|
23
23
|
"cfgDashMaxRec": "Max. recordings total",
|
|
24
|
-
"cfgDashMaxRec_tt": "
|
|
24
|
+
"cfgDashMaxRec_tt": "仪表板中所有摄像头显示的最大录像总数(最新的优先)。",
|
|
25
25
|
"cfgDashGridCols": "列数(0 = 自动)",
|
|
26
26
|
"cfgDashGridCols_tt": "强制设置固定的摄像头列数。0 = 自动计算最优数量。",
|
|
27
27
|
"cfgDashRefreshSec": "每隔(秒)重新加载摄像头列表",
|
package/admin/index_m.html
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
};
|
|
19
19
|
document.head.appendChild(script);
|
|
20
20
|
</script>
|
|
21
|
-
<script type="module" crossorigin src="./assets/index-
|
|
21
|
+
<script type="module" crossorigin src="./assets/index-D01Axkcs.js"></script>
|
|
22
22
|
</head>
|
|
23
23
|
<body>
|
|
24
24
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
package/build/main.js
CHANGED
|
@@ -879,7 +879,14 @@ class AgentDvr extends utils.Adapter {
|
|
|
879
879
|
await this.fetchSnapshotB64(d.oid, snapId);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
|
+
if (!this.ensuredFolders.has(`${fid}._widgetMigrated`)) {
|
|
883
|
+
this.ensuredFolders.add(`${fid}._widgetMigrated`);
|
|
884
|
+
await this.delObjectAsync(`${fid}.widget`).catch(() => void 0);
|
|
885
|
+
}
|
|
882
886
|
await this.updateCameraEvents(d, fid);
|
|
887
|
+
if (this.config.enableWidget && d.ot === 2) {
|
|
888
|
+
await this.updateLiveWidget(d, fid);
|
|
889
|
+
}
|
|
883
890
|
}
|
|
884
891
|
// ---- PTZ presets ----
|
|
885
892
|
async buildPtzPresets(d, fid) {
|
|
@@ -1064,6 +1071,47 @@ class AgentDvr extends utils.Adapter {
|
|
|
1064
1071
|
const grid = tiles ? `<div class="advgrid">${tiles}</div>` : `<div class="advempty">No cameras</div>`;
|
|
1065
1072
|
return `<style>${galleryCss(minCol, maxW)}</style>${grid}`;
|
|
1066
1073
|
}
|
|
1074
|
+
buildSingleCamLiveHtml(d) {
|
|
1075
|
+
const minCol = this.config.widgetMinCol || 150;
|
|
1076
|
+
const maxW = this.config.widgetMaxModalWidth || 900;
|
|
1077
|
+
const PAUSE_ATTR = ` onchange="if(!this.checked){var m=this.nextElementSibling.nextElementSibling,v=m&&m.querySelector('video');if(v){v.pause();}}"`;
|
|
1078
|
+
const oid = d.oid;
|
|
1079
|
+
const id = `advlive${sanitize(oid)}`;
|
|
1080
|
+
const grab = `${this.baseUrl}/grab.jpg?oid=${oid}&ot=2&maintainAR=1`;
|
|
1081
|
+
const webm = `${this.baseUrl}/video.webm?oid=${oid}&ot=2`;
|
|
1082
|
+
const name = escHtml(d.name || `Camera ${oid}`);
|
|
1083
|
+
const arRaw = this.camAspect[oid] || this.config.widgetLiveAspect || "";
|
|
1084
|
+
const ar = arRaw ? String(arRaw).replace("/", " / ") : "";
|
|
1085
|
+
const fix = ar ? " advimgfix" : "";
|
|
1086
|
+
const arStyle = ar ? ` style="aspect-ratio:${ar}"` : "";
|
|
1087
|
+
const inner = `<span class="advimg${fix}"${arStyle}><img src="${grab}" loading="lazy" alt=""><span class="advtag" style="top:5px;left:5px">● ${escHtml(this.wt.live)}</span><span class="advplay"></span></span><span class="advcap">${name}</span>`;
|
|
1088
|
+
const tile = `<input class="advlb" type="checkbox" id="${id}"${PAUSE_ATTR}><label class="advcell advthumb" for="${id}">${inner}</label><div class="advmodal"><label class="advbackdrop" for="${id}"></label><div class="advbox"><label class="advclose" for="${id}">✕</label><video class="advvideo" controls preload="none" playsinline src="${webm}"></video><div class="advinfo">${name} · Live</div></div></div>`;
|
|
1089
|
+
return `<style>${galleryCss(minCol, maxW)}</style><div class="advgrid">${tile}</div>`;
|
|
1090
|
+
}
|
|
1091
|
+
async updateLiveWidget(d, fid) {
|
|
1092
|
+
const wId = `${fid}.widget_live`;
|
|
1093
|
+
if (!this.ensuredFolders.has(wId)) {
|
|
1094
|
+
await this.ensurePath(wId);
|
|
1095
|
+
await this.setObjectNotExistsAsync(wId, {
|
|
1096
|
+
type: "state",
|
|
1097
|
+
common: {
|
|
1098
|
+
name: "HTML live widget",
|
|
1099
|
+
type: "string",
|
|
1100
|
+
role: "html",
|
|
1101
|
+
read: true,
|
|
1102
|
+
write: false,
|
|
1103
|
+
def: ""
|
|
1104
|
+
},
|
|
1105
|
+
native: {}
|
|
1106
|
+
});
|
|
1107
|
+
this.ensuredFolders.add(wId);
|
|
1108
|
+
}
|
|
1109
|
+
const sig = `${d.name}|${this.camAspect[d.oid] || ""}`;
|
|
1110
|
+
if (this.widgetSig[wId] !== sig) {
|
|
1111
|
+
await this.setStateAsync(wId, { val: this.buildSingleCamLiveHtml(d), ack: true });
|
|
1112
|
+
this.widgetSig[wId] = sig;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1067
1115
|
// ---- event data points ----
|
|
1068
1116
|
async writeEventDps(d, fid, events) {
|
|
1069
1117
|
var _a, _b, _c, _d, _e;
|
|
@@ -1184,13 +1232,13 @@ class AgentDvr extends utils.Adapter {
|
|
|
1184
1232
|
await this.writeEventDps(d, fid, events);
|
|
1185
1233
|
}
|
|
1186
1234
|
if (this.config.enableWidget) {
|
|
1187
|
-
const wId = `${fid}.
|
|
1235
|
+
const wId = `${fid}.widget_recordings`;
|
|
1188
1236
|
if (!this.ensuredFolders.has(wId)) {
|
|
1189
1237
|
await this.ensurePath(wId);
|
|
1190
1238
|
await this.setObjectNotExistsAsync(wId, {
|
|
1191
1239
|
type: "state",
|
|
1192
1240
|
common: {
|
|
1193
|
-
name: "HTML
|
|
1241
|
+
name: "HTML recordings widget",
|
|
1194
1242
|
type: "string",
|
|
1195
1243
|
role: "html",
|
|
1196
1244
|
read: true,
|
|
@@ -1375,12 +1423,16 @@ class AgentDvr extends utils.Adapter {
|
|
|
1375
1423
|
}
|
|
1376
1424
|
if (this.config.enableOverview) {
|
|
1377
1425
|
const cams = devices.filter((d) => d.ot === 2);
|
|
1378
|
-
const ovId = "
|
|
1426
|
+
const ovId = "widget_live_overview";
|
|
1379
1427
|
if (!this.ensuredFolders.has(ovId)) {
|
|
1428
|
+
if (!this.ensuredFolders.has("_overviewMigrated")) {
|
|
1429
|
+
this.ensuredFolders.add("_overviewMigrated");
|
|
1430
|
+
await this.delObjectAsync("overview").catch(() => void 0);
|
|
1431
|
+
}
|
|
1380
1432
|
await this.setObjectNotExistsAsync(ovId, {
|
|
1381
1433
|
type: "state",
|
|
1382
1434
|
common: {
|
|
1383
|
-
name: "
|
|
1435
|
+
name: "Live overview widget (all cameras)",
|
|
1384
1436
|
type: "string",
|
|
1385
1437
|
role: "html",
|
|
1386
1438
|
read: true,
|