2021-06-21 02:26:35 +02:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/owncast/owncast/core"
|
|
|
|
"github.com/owncast/owncast/utils"
|
|
|
|
)
|
|
|
|
|
2021-09-12 09:18:15 +02:00
|
|
|
// Ping is fired by a client to show they are still an active viewer.
|
2021-06-21 02:26:35 +02:00
|
|
|
func Ping(w http.ResponseWriter, r *http.Request) {
|
|
|
|
id := utils.GenerateClientIDFromRequest(r)
|
2021-09-12 09:18:15 +02:00
|
|
|
core.SetViewerIDActive(id)
|
2021-06-21 02:26:35 +02:00
|
|
|
}
|