Send WS response on MJPEG or MP4 stream starts

This commit is contained in:
Alexey Khit
2023-01-02 16:30:54 +03:00
parent 96d1ef2d2c
commit 66f729aa0e
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -121,6 +121,8 @@ func handlerWS(tr *api.Transport, _ *api.Message) error {
return err
}
tr.Write(&api.Message{Type: "mjpeg"})
tr.OnClose(func() {
stream.RemoveConsumer(cons)
})