From c56ac287387e6b0f2666595305a5a448eaff9b40 Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 4 Oct 2023 23:57:42 +0300 Subject: [PATCH] SSL update 2 --- static/templates/live.html | 3 ++- static/templates/reports/report.html | 2 +- static/templates/videos/export.html | 2 +- static/templates/videos/playback.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/templates/live.html b/static/templates/live.html index c86ee22..eae854b 100644 --- a/static/templates/live.html +++ b/static/templates/live.html @@ -312,7 +312,8 @@ let currentCameraGroup = 1; const camerasPerGroup = 5; var totalCameras = 12 - 1; - const baseURL = "http://{{VIRTUAL_HOST}}/http/live.flv"; + const isSecure = window.location.protocol === "https:"; + const baseURL = "https://{{VIRTUAL_HOST}}/http/live.flv"; function stopAllCameras() { flvPlayers.forEach(player => { diff --git a/static/templates/reports/report.html b/static/templates/reports/report.html index 3e85d42..3d17fee 100644 --- a/static/templates/reports/report.html +++ b/static/templates/reports/report.html @@ -205,7 +205,7 @@ diff --git a/static/templates/videos/export.html b/static/templates/videos/export.html index 30c8799..9852e14 100644 --- a/static/templates/videos/export.html +++ b/static/templates/videos/export.html @@ -863,7 +863,7 @@ endVideoTimeInput.addEventListener("blur", sendPostRequest); const serial = selectedDevice.value; - const url = `http://localhost:8081/export?url=http%3A%2F%2F{{VIRTUAL_HOST}}%2Fhttp%2Fdownload.flv%3Fserial%3D${serial}%26channel%3D${channel}%26queryTime%3D${selectedDate}%26startTime%3D${startTime}%26endTime%3D${endTime}%26recordID%3D${resData.dataId}`; + const url = `https://localhost:8081/export?url=http%3A%2F%2F{{VIRTUAL_HOST}}%2Fhttp%2Fdownload.flv%3Fserial%3D${serial}%26channel%3D${channel}%26queryTime%3D${selectedDate}%26startTime%3D${startTime}%26endTime%3D${endTime}%26recordID%3D${resData.dataId}`; document.getElementById("exportLoading").style.display = 'none'; window.open(url, '_blank'); } diff --git a/static/templates/videos/playback.html b/static/templates/videos/playback.html index cf9a9bf..d88370b 100644 --- a/static/templates/videos/playback.html +++ b/static/templates/videos/playback.html @@ -683,7 +683,7 @@ videoTimeInput.addEventListener("blur", sendPostRequest); selectedChannel = channel; - const url = `http://localhost:8081/playback?url=http%3A%2F%2F{{VIRTUAL_HOST}}%2Fhttp%2Fplayback.flv%3Fserial%3D${serial}%26channel%3D${channel}%26quality%3D1%26queryTime%3D${selectedDate}%26startTime%3D${startTime}%26endTime%3D${endTime}`; + const url = `https://localhost:8081/playback?url=http%3A%2F%2F{{VIRTUAL_HOST}}%2Fhttp%2Fplayback.flv%3Fserial%3D${serial}%26channel%3D${channel}%26quality%3D1%26queryTime%3D${selectedDate}%26startTime%3D${startTime}%26endTime%3D${endTime}`; window.open(url, '_blank'); }