feat: select correct transcoding for streaming

This commit is contained in:
Deluan
2020-03-16 14:28:13 -04:00
committed by Deluan Quintão
parent 39993810b3
commit c8b0d2bfae
9 changed files with 204 additions and 54 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ func (c *StreamController) Stream(w http.ResponseWriter, r *http.Request) (*resp
maxBitRate := utils.ParamInt(r, "maxBitRate", 0)
format := utils.ParamString(r, "format")
stream, err := c.streamer.NewStream(r.Context(), id, maxBitRate, format)
stream, err := c.streamer.NewStream(r.Context(), id, format, maxBitRate)
if err != nil {
return nil, err
}
@@ -62,7 +62,7 @@ func (c *StreamController) Download(w http.ResponseWriter, r *http.Request) (*re
return nil, err
}
stream, err := c.streamer.NewStream(r.Context(), id, 0, "raw")
stream, err := c.streamer.NewStream(r.Context(), id, "raw", 0)
if err != nil {
return nil, err
}