]> 127.0.0.1 Git - part/.git/commitdiff
Fix v0.22.8
authorqydysky <32743305+qydysky@users.noreply.github.com>
Wed, 15 Feb 2023 17:37:00 +0000 (01:37 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Wed, 15 Feb 2023 17:37:00 +0000 (01:37 +0800)
websocket/Recoder.go

index 5e703d78555513dbcd5d8e1e2a569d994723f229..34e281792362bea2376dcf10395df6efff3d874e 100644 (file)
@@ -105,12 +105,12 @@ func Play(filePath string, perReadSize int, maxReadSize int) (s *Server, close f
                        `recv`: func(a any) (disable bool) {
                                if d, ok := a.(Uinterface); ok {
                                        switch string(d.Data) {
-                                       case "pause":
+                                       case "%Cpause":
                                                timer.Stop()
-                                       case "play":
+                                       case "%Cplay":
                                                timer.Reset(time.Second)
                                        default:
-                                               cu, _ = strconv.ParseFloat(string(d.Data), 64)
+                                               cu, _ = strconv.ParseFloat(string(d.Data[2:]), 64)
                                        }
                                }
                                return false