Move WS API to separate module

This commit is contained in:
Alexey Khit
2023-05-23 14:21:39 +03:00
parent 82a8e07b66
commit 59555cfe1d
9 changed files with 97 additions and 62 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
package mp4
import (
"github.com/AlexxIT/go2rtc/internal/api/ws"
"net/http"
"strconv"
"strings"
@@ -17,8 +18,8 @@ import (
func Init() {
log = app.GetLogger("mp4")
api.HandleWS("mse", handlerWSMSE)
api.HandleWS("mp4", handlerWSMP4)
ws.HandleFunc("mse", handlerWSMSE)
ws.HandleFunc("mp4", handlerWSMP4)
api.HandleFunc("api/frame.mp4", handlerKeyframe)
api.HandleFunc("api/stream.mp4", handlerMP4)