Adds error handler for mp4 init

This commit is contained in:
Alexey Khit
2022-09-13 14:38:54 +03:00
parent 217c8c2bf6
commit e049a17216
4 changed files with 30 additions and 10 deletions
+8 -1
View File
@@ -41,5 +41,12 @@ func handlerWS(ctx *api.Context, msg *streamer.Message) {
Type: MsgTypeMSE, Value: cons.MimeType(),
})
ctx.Write(cons.Init())
data, err := cons.Init()
if err != nil {
log.Warn().Err(err).Msg("[api.mse] init")
ctx.Error(err)
return
}
ctx.Write(data)
}