]> Zhao Yanbai Git Server - acecode.git/commitdiff
...
authoracevest <zhaoyanbai@126.com>
Sun, 17 Jan 2021 16:45:21 +0000 (00:45 +0800)
committeracevest <zhaoyanbai@126.com>
Sun, 17 Jan 2021 16:45:21 +0000 (00:45 +0800)
projects/audio_stream/audioweb/main.go
projects/esp32_video_stream/esp32camweb/canvas.html

index 4c4cec5884e8cdd5b453a70cb00931bb80a68bab..2205e7e9ef899489377236b7c6444412b668a513 100644 (file)
@@ -60,19 +60,6 @@ func audioHandler(w http.ResponseWriter, r *http.Request) {
                        continue
                }
 
-
-        /*
-        data := make([]byte, len(p)/2, len(p)/2)
-        k := 0
-        for i :=0; i<len(p); i++ {
-            if (i / 2) % 2 == 1 {
-                continue
-            }
-
-            data[k] = p[i]
-            k++
-        }*/
-
                select {
                case frameChan <- p:
                        log.Printf("put frame")
index 06d1810790011b4aad5dfacdb985542af5e37f2a..d464876edaeeb2844bf87a7dde048e223fcb0a56 100644 (file)
             msg = slice.join('\n')+'\n';
             Msg.innerHTML = msg;
         }
-    
+
         function initWebsocket() {
             ws = new WebSocket(wsURL);
             ws.SendCmd = function(req) {
                 req = JSON.stringify(req);
                 ws.send(req);
             }
-    
+
             ws.onopen = function () {
                 Msg("websocket opened");
             };
-    
+
             ws.onerror = function (event) {
                 Msg("websocket error: " + event);
             };
-    
+
             ws.onclose = function (event) {
                 Msg("websocket closed with code: " + event.code + " reason: " + event.reason);
             };
-    
+
             ws.onmessage = function (event) {
                 imageData = event.data;
                 frameCount++;