Code refactoring (change interface to any)

This commit is contained in:
Alexey Khit
2023-03-17 06:44:40 +03:00
parent d4d91e4920
commit 2146ea470b
23 changed files with 54 additions and 54 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ func handlerKeyframe(w http.ResponseWriter, r *http.Request) {
exit := make(chan []byte)
cons := &mp4.Segment{OnlyKeyframe: true}
cons.Listen(func(msg interface{}) {
cons.Listen(func(msg any) {
if data, ok := msg.([]byte); ok && exit != nil {
exit <- data
exit = nil
+2 -2
View File
@@ -26,7 +26,7 @@ func handlerWSMSE(tr *api.Transport, msg *api.Message) error {
cons.Medias = parseMedias(codecs, true)
}
cons.Listen(func(msg interface{}) {
cons.Listen(func(msg any) {
if data, ok := msg.([]byte); ok {
tr.Write(data)
}
@@ -74,7 +74,7 @@ func handlerWSMP4(tr *api.Transport, msg *api.Message) error {
cons.Medias = parseMedias(codecs, false)
}
cons.Listen(func(msg interface{}) {
cons.Listen(func(msg any) {
if data, ok := msg.([]byte); ok {
tr.Write(data)
}