add ws/wss protocol selector
This commit is contained in:
parent
6847493fbf
commit
58e59c2708
@ -1,6 +1,6 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# Build commands:
|
||||
# - $VERSION=0.4
|
||||
# - $VERSION=0.5
|
||||
# - rm build -r -Force ; rm ./node_modules/.cache/babel-loader -r -Force ; yarn build
|
||||
# - docker build --pull --rm -t oncharterliz/multi-frigate:latest -t oncharterliz/multi-frigate:$VERSION "."
|
||||
# - docker image push --all-tags oncharterliz/multi-frigate
|
||||
|
||||
@ -137,8 +137,10 @@ export const proxyApi = {
|
||||
|
||||
getEventsSummary: (hostName: string, cameraName: string) =>
|
||||
instanceApi.get(`proxy/${hostName}/api/${cameraName}/events/summary`).then(res => res.data),
|
||||
cameraWsURL: (hostName: string, cameraName: string) =>
|
||||
`ws://${proxyURL.host}/proxy-ws/${hostName}/live/jsmpeg/${cameraName}`,
|
||||
cameraWsURL: (hostName: string, cameraName: string) => {
|
||||
const protocol = proxyURL.protocol === 'https:' ? 'wss' : 'ws';
|
||||
return `${protocol}://${proxyURL.host}/proxy-ws/${hostName}/live/jsmpeg/${cameraName}`
|
||||
},
|
||||
cameraImageURL: (hostName: string, cameraName: string) =>
|
||||
`${proxyPrefix}${hostName}/api/${cameraName}/latest.jpg`,
|
||||
eventURL: (hostName: string, event: string) =>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user