fix(cctv): key-gate Ottawa, opt-in Québec video, keep shared slots

Review fixes for #1506.

- Ottawa: use the documented camera list and the city's Traffic Camera
  Images API. The pack is skipped with no request unless
  OTTAWA_CAMERA_CERTIFICATE is set; the certificate is added only at
  fetch time inside the pinned /opendata/ path, and each camera is
  fetched at most once a minute through the shared frame cache.
- Québec 511 video is opt-in (CCTV_QUEBEC_VIDEO_ENABLED=1) and loads
  only after the viewer presses Play; selection, auto-hop, scenes and
  voice no longer contact Québec 511. Credit splits locations (MTQ,
  CC BY 4.0) from video (Québec 511). Interrupted play() is no longer
  reported as an unavailable source; the per-frame listener runs only
  while a Québec camera is selected and the canvas rect is cached.
- Catalog cap: reserved Québec and World slots come only from capacity
  above the 4,000 shared slots, so a lower CCTV_MAX_SOURCES thins every
  pack instead of starving the existing ones. dev-fresh and
  .env.example default to 7,516.
- Throttled frames (World, Ottawa): inside the refresh floor with no
  cached frame the proxy serves the placeholder, never Street View; a
  failed fetch backs off for a minute; the cache is bounded by bytes.
- MJPEG first-frame extraction runs only for sources registered as
  MJPEG (Taiwan Highway Bureau), caps a frame at 2 MB, reads in linear
  time, accepts a CRLF preamble and a boundary that already starts with
  "--", and ends a part without Content-Length at the next delimiter.
  THB hosts are registered in the redirect pin list.
- Tests: World loader policy, Québec loader and opt-in, proxy cooldown
  without Street View, Ottawa signing, cap reservations at 7,516, 4,000
  and 48, overlay Play gate, refresh, visibility and teardown. Guard
  tests check the 4,000 shared slots again.
- Remove the unused standalone Québec preview module and public page.
- Docs: DATA_SOURCES, SECURITY, CURRENT-STATE, CCTV_INTEGRATION, README,
  .env.example, changelog fragment renamed to its full scope.
This commit is contained in:
Said Turksever committed 2026-11-03 15:31:08 +00:00
1 parent fa4ce4b2a5
commit db8afbae81
43 files changed
+1327 -1110

No files matched your search

+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "إغلاق معاينة الكاميرا",
"Refresh map still": "تحديث صورة الخريطة الثابتة",
"The map still uses a separate request and may show a different moment.": "تستخدم صورة الخريطة طلبًا منفصلًا وقد تعرض لحظة مختلفة.",
@@ -3228,5 +3226,6 @@
"Audio": "الصوت",
"UTILITIES": "الأدوات",
"Exit cockpit to fly to a drawing": "اخرج من القمرة للانتقال إلى رسم",
"Directions, drawing and your own files": "الاتجاهات والرسم وملفاتك الخاصة"
"Directions, drawing and your own files": "الاتجاهات والرسم وملفاتك الخاصة",
"Video plays from Québec 511, which sees your IP address.": "يُشغَّل الفيديو من Québec 511، الذي يرى عنوان IP الخاص بك."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Kameravorschau schließen",
"Refresh map still": "Kartenstandbild aktualisieren",
"The map still uses a separate request and may show a different moment.": "Das Kartenstandbild wird separat abgerufen und kann einen anderen Moment zeigen.",
@@ -2948,5 +2946,6 @@
"Audio": "Audio",
"UTILITIES": "WERKZEUGE",
"Exit cockpit to fly to a drawing": "Cockpit verlassen, um zu einer Zeichnung zu fliegen",
"Directions, drawing and your own files": "Route, Zeichnen und eigene Dateien"
"Directions, drawing and your own files": "Route, Zeichnen und eigene Dateien",
"Video plays from Québec 511, which sees your IP address.": "Das Video wird von Québec 511 abgespielt, das Ihre IP-Adresse sieht."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Cerrar vista previa de la cámara",
"Refresh map still": "Actualizar imagen fija del mapa",
"The map still uses a separate request and may show a different moment.": "La imagen del mapa usa una solicitud independiente y puede mostrar otro momento.",
@@ -3018,5 +3016,6 @@
"Right panels": "Paneles derechos",
"UTILITIES": "UTILIDADES",
"Exit cockpit to fly to a drawing": "Sal de la cabina para volar a un dibujo",
"Directions, drawing and your own files": "Indicaciones, dibujo y tus propios archivos"
"Directions, drawing and your own files": "Indicaciones, dibujo y tus propios archivos",
"Video plays from Québec 511, which sees your IP address.": "El vídeo se reproduce desde Québec 511, que ve tu dirección IP."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Fermer l’aperçu de la caméra",
"Refresh map still": "Actualiser l’image fixe sur la carte",
"The map still uses a separate request and may show a different moment.": "L’image fixe de la carte utilise une requête distincte et peut montrer un autre moment.",
@@ -3018,5 +3016,6 @@
"Audio": "Audio",
"UTILITIES": "OUTILS",
"Exit cockpit to fly to a drawing": "Quittez le cockpit pour rejoindre un dessin",
"Directions, drawing and your own files": "Itinéraire, dessin et vos propres fichiers"
"Directions, drawing and your own files": "Itinéraire, dessin et vos propres fichiers",
"Video plays from Québec 511, which sees your IP address.": "La vidéo est lue depuis Québec 511, qui voit votre adresse IP."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Chiudi anteprima della telecamera",
"Refresh map still": "Aggiorna immagine fissa sulla mappa",
"The map still uses a separate request and may show a different moment.": "L’immagine sulla mappa usa una richiesta separata e può mostrare un momento diverso.",
@@ -3018,5 +3016,6 @@
"Audio": "Audio",
"UTILITIES": "STRUMENTI",
"Exit cockpit to fly to a drawing": "Esci dal cockpit per volare a un disegno",
"Directions, drawing and your own files": "Indicazioni, disegno e i tuoi file"
"Directions, drawing and your own files": "Indicazioni, disegno e i tuoi file",
"Video plays from Québec 511, which sees your IP address.": "Il video viene riprodotto da Québec 511, che vede il tuo indirizzo IP."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "カメラのプレビューを閉じる",
"Refresh map still": "地図上の静止画を更新",
"The map still uses a separate request and may show a different moment.": "地図上の静止画は別のリクエストで取得されるため、異なる時点を表示する場合があります。",
@@ -2878,5 +2876,6 @@
"Audio": "オーディオ",
"UTILITIES": "ユーティリティ",
"Exit cockpit to fly to a drawing": "描画の位置へ移動するにはコックピットを終了してください",
"Directions, drawing and your own files": "ルート案内、描画、自分のファイル"
"Directions, drawing and your own files": "ルート案内、描画、自分のファイル",
"Video plays from Québec 511, which sees your IP address.": "動画は Québec 511 から再生され、Québec 511 にはあなたの IP アドレスが見えます。"
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Fechar prévia da câmera",
"Refresh map still": "Atualizar imagem fixa no mapa",
"The map still uses a separate request and may show a different moment.": "A imagem no mapa usa uma solicitação separada e pode mostrar outro momento.",
@@ -3018,5 +3016,6 @@
"Audio": "Áudio",
"UTILITIES": "UTILITÁRIOS",
"Exit cockpit to fly to a drawing": "Saia da cabine para voar até um desenho",
"Directions, drawing and your own files": "Rotas, desenho e seus próprios arquivos"
"Directions, drawing and your own files": "Rotas, desenho e seus próprios arquivos",
"Video plays from Québec 511, which sees your IP address.": "O vídeo é reproduzido a partir do Québec 511, que vê o seu endereço IP."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Закрыть просмотр камеры",
"Refresh map still": "Обновить кадр на карте",
"The map still uses a separate request and may show a different moment.": "Кадр на карте запрашивается отдельно и может показывать другой момент.",
@@ -3088,5 +3086,6 @@
"Right panels": "Правые панели",
"UTILITIES": "ИНСТРУМЕНТЫ",
"Exit cockpit to fly to a drawing": "Выйдите из кабины, чтобы перелететь к рисунку",
"Directions, drawing and your own files": "Маршруты, рисование и ваши файлы"
"Directions, drawing and your own files": "Маршруты, рисование и ваши файлы",
"Video plays from Québec 511, which sees your IP address.": "Видео воспроизводится с Québec 511, который видит ваш IP-адрес."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "Закрити перегляд камери",
"Refresh map still": "Оновити кадр на карті",
"The map still uses a separate request and may show a different moment.": "Кадр на карті запитується окремо та може показувати інший момент.",
@@ -3088,5 +3086,6 @@
"Audio": "Аудіо",
"UTILITIES": "ІНСТРУМЕНТИ",
"Exit cockpit to fly to a drawing": "Вийдіть із кабіни, щоб перелетіти до малюнка",
"Directions, drawing and your own files": "Маршрути, малювання та ваші файли"
"Directions, drawing and your own files": "Маршрути, малювання та ваші файли",
"Video plays from Québec 511, which sees your IP address.": "Відео відтворюється з Québec 511, який бачить вашу IP-адресу."
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "关闭摄像头预览",
"Refresh map still": "刷新地图静止画面",
"The map still uses a separate request and may show a different moment.": "地图静止画面通过单独的请求获取,可能显示不同的时刻。",
@@ -2878,5 +2876,6 @@
"Right panels": "右侧面板",
"UTILITIES": "工具",
"Exit cockpit to fly to a drawing": "请先退出座舱,再飞往绘制位置",
"Directions, drawing and your own files": "路线导航、绘制和你自己的文件"
"Directions, drawing and your own files": "路线导航、绘制和你自己的文件",
"Video plays from Québec 511, which sees your IP address.": "视频从 Québec 511 播放,Québec 511 会看到你的 IP 地址。"
}
+2 -3
View File
@@ -1,6 +1,4 @@
{
"MTQ · CC BY 4.0": "MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL": "OpenStreetMap contributors · ODbL",
"Close camera preview": "關閉攝影機預覽",
"Refresh map still": "重新整理地圖靜態畫面",
"The map still uses a separate request and may show a different moment.": "地圖靜態畫面使用獨立請求,顯示的時間可能不同。",
@@ -2878,5 +2876,6 @@
"Right panels": "右側面板",
"UTILITIES": "工具",
"Exit cockpit to fly to a drawing": "請先退出座艙,再飛往繪製位置",
"Directions, drawing and your own files": "路線導航、繪製和你自己的文件"
"Directions, drawing and your own files": "路線導航、繪製和你自己的文件",
"Video plays from Québec 511, which sees your IP address.": "影片從 Québec 511 播放,Québec 511 會看到你的 IP 位址。"
}
+11 -33
View File
@@ -31,9 +31,7 @@
"dB",
"hPa",
"{source} HTTP {status}",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"de": [
"1090 MHz",
@@ -201,9 +199,7 @@
"{value} KM/S",
"ΔN",
"Ⅱ PAUSE",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"es": [
"1090 MHz",
@@ -331,9 +327,7 @@
"{value} KM/S",
"ΔE",
"ΔN",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"fr": [
"1090 MHz",
@@ -514,9 +508,7 @@
"ΔE",
"ΔN",
"Ⅱ PAUSE",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"it": [
"1090 MHz",
@@ -687,9 +679,7 @@
"{value} conf",
"ΔE",
"ΔN",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"ja": [
"1090 MHz",
@@ -738,9 +728,7 @@
"{type} SPD: {speed} HDG: {heading}",
"ΔE",
"ΔN",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"pt": [
"1090 MHz",
@@ -869,9 +857,7 @@
"{value} KM/H",
"{value} KM/S",
"ΔN",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"ru": [
"AIS: --",
@@ -889,9 +875,7 @@
"S2 GhostMaps",
"S2 · {name}",
"VS",
"WHOT/BHOT",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"WHOT/BHOT"
],
"uk": [
"AIS: --",
@@ -904,9 +888,7 @@
"NVG",
"REC",
"S2 GhostMaps",
"WHOT/BHOT",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"WHOT/BHOT"
],
"zh-CN": [
"1090 MHz",
@@ -963,9 +945,7 @@
"{value} KM/S",
"ΔE",
"ΔN",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
],
"zh-Hant": [
"1090 MHz",
@@ -1022,8 +1002,6 @@
"{value} KM/S",
"ΔE",
"ΔN",
"▲ {frp} MW",
"MTQ · CC BY 4.0",
"OpenStreetMap contributors · ODbL"
"▲ {frp} MW"
]
}