add snapshot producer

This commit is contained in:
seydx
2025-01-24 22:35:04 +01:00
parent 2c5f1e0417
commit 0651a09a3c
3 changed files with 376 additions and 283 deletions
+8
View File
@@ -84,10 +84,18 @@ func apiRing(w http.ResponseWriter, r *http.Request) {
var items []*api.Source
for _, camera := range devices.AllCameras {
cleanQuery.Set("device_id", camera.DeviceID)
// Stream source
items = append(items, &api.Source{
Name: camera.Description,
URL: "ring:?" + cleanQuery.Encode(),
})
// Snapshot source
items = append(items, &api.Source{
Name: camera.Description + " Snapshot",
URL: "ring:?" + cleanQuery.Encode() + "&snapshot",
})
}
api.ResponseSources(w, items)