mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-29 22:41:06 +02:00
Separate statistics per stream
This commit is contained in:
@ -137,7 +137,7 @@ func statisticsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
enc := json.NewEncoder(w)
|
||||
err := enc.Encode(struct {
|
||||
ConnectedViewers int
|
||||
}{webrtc.GetNumberConnectedSessions()})
|
||||
}{webrtc.GetNumberConnectedSessions(strings.Replace(r.URL.Path[7:], "/", "", -1))})
|
||||
if err != nil {
|
||||
http.Error(w, "Failed to generate JSON.", http.StatusInternalServerError)
|
||||
log.Printf("Failed to generate JSON: %s", err)
|
||||
|
Reference in New Issue
Block a user