mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-07-06 15:54:00 +02:00
Make viewer able to change quality
This commit is contained in:
@ -36,21 +36,21 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
|
||||
err = conn.ReadJSON(c)
|
||||
if err != nil {
|
||||
log.Printf("Failed to receive client description: %s", err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
// Get requested stream
|
||||
stream, err := streams.Get(c.Stream)
|
||||
if err != nil {
|
||||
log.Printf("Stream not found: %s", c.Stream)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
// Get requested quality
|
||||
q, err := stream.GetQuality(c.Quality)
|
||||
if err != nil {
|
||||
log.Printf("Quality not found: %s", c.Quality)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
// Exchange session descriptions with WebRTC stream server
|
||||
@ -61,7 +61,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Send new local description
|
||||
if err := conn.WriteJSON(localDescription); err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user