xushiting 3 éve
szülő
commit
57440d0c95
9 módosított fájl, 175 hozzáadás és 142 törlés
  1. 6 3
      dist/index.html
  2. 19 19
      src/Logger.js
  3. 8 0
      src/Rtcp.js
  4. 1 1
      src/Socket.js
  5. 58 47
      src/Workers.js
  6. 3 2
      src/XAvatar.js
  7. 1 1
      src/XMaterialComponent.js
  8. 1 1
      src/Xverse_Room.js
  9. 78 68
      src/v2Decoder/index.js

+ 6 - 3
dist/index.html

@@ -58,11 +58,12 @@
     <script src="./libs/decoder.js"></script>
     <script src="./libs/nipplejs.min.js"></script>
     <script src="./shader.js"></script>
-
+    <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
     <!-- <script src="./webrtc//adapter-7.4.0.min.js"></script>
     <script src="./webrtc/srs.sdk.js"></script> -->
     <link rel="stylesheet" href="./css/index.cb1a6e05.css" />
     <script>
+        var vConsole = new window.VConsole();
         const SERVER_URLS = {
             DEV: "wss://sit-eks.xverse.cn/ws",
             PROD: "wss://eks.xverse.cn/ws"
@@ -72,7 +73,7 @@
             PROD: "https://xa.xverse.cn/collect1"
         }
         , MAX_RECONNECT_COUNT = 3
-        , DEFAULT_JOINROOM_TIMEOUT = 15e3
+        , DEFAULT_JOINROOM_TIMEOUT = 5e4
         , DEFAULT_MAIN_CAMERA_FOV = 50
         , DEFAULT_AVATAR_SCALE = 1
         , REPORT_NUM_PER_REQUEST = 20
@@ -93,7 +94,9 @@
     const COMPONENT_LIST_PREFIX = "/component_list.json";
 
     const debugMode = location.href.indexOf("debug") > -1  // true
-    
+    if(debugMode){
+        var vConsole = new window.VConsole();
+    }
 
     // 角色相关设置
     const avatarSetting = {

+ 19 - 19
src/Logger.js

@@ -42,10 +42,10 @@ export default class Logger{
         }
     }
     debug(...e) {
-        return this.print("debug", 1, ...e)
+        //return this.print("debug", 1, ...e)
     }
     info(...e) {
-        return this.print("info", 2, ...e)
+        //return this.print("info", 2, ...e)
     }
     infoAndReportLog(e, ...t) {
         const {reportOptions: r} = e;
@@ -55,27 +55,27 @@ export default class Logger{
         this.debug(...t)
     }
     infoAndReportMeasurement(e, ...t) {
-        var n;
-        const {reportOptions: r} = e;
-        if (e.startTime) {
-            const o = Date.now();
-            e.value === void 0 && (e.endTime = o),
-            e.value === void 0 && (e.value = o - e.startTime)
-        }
-        if (e.error ? e.code = ((n = e.error) == null ? void 0 : n.code) || Codes.Internal : e.code = Codes.Success,
-        reporter.report("measurement", e, r),
-        t.length || (t = [e]),
-        e.level === 4 || e.error) {
-            this.error(...t);
-            return
-        }
-        this.warn(...t)
+        // var n;
+        // const {reportOptions: r} = e;
+        // if (e.startTime) {
+        //     const o = Date.now();
+        //     e.value === void 0 && (e.endTime = o),
+        //     e.value === void 0 && (e.value = o - e.startTime)
+        // }
+        // if (e.error ? e.code = ((n = e.error) == null ? void 0 : n.code) || Codes.Internal : e.code = Codes.Success,
+        // reporter.report("measurement", e, r),
+        // t.length || (t = [e]),
+        // e.level === 4 || e.error) {
+        //     this.error(...t);
+        //     return
+        // }
+        // this.warn(...t)
     }
     warn(...e) {
-        return this.print("warn", 3, ...e)
+        //return this.print("warn", 3, ...e)
     }
     error(...e) {
-        return this.print("error", 4, ...e)
+        //return this.print("error", 4, ...e)
     }
     // console前缀
     prefix(e) {

+ 8 - 0
src/Rtcp.js

@@ -207,6 +207,14 @@ export default class Rtcp extends EventEmitter {
         let t = "";
         try {
             t = JSON.stringify(e)
+            if(e.action_type != 1009 && e.action_type != 1024){
+                if(e.action_type == 15){
+                    console.log('发送:action_type:'+e.action_type+',trace_id:'+e.trace_id+',joystick_action'+JSON.stringify(e.dir_action)+',playPosition:'+JSON.stringify(window.room.avatars[0].xAvatar.position)+',时间:'+new Date().getTime());
+                }
+                else{
+                    console.log('发送:action_type:'+e.action_type+',trace_id:'+e.trace_id+',playPosition:'+JSON.stringify(window.room.avatars[0].xAvatar.position)+',时间:'+new Date().getTime());
+                }
+            }
         } catch (r) {
             logger.error(r);
             return

+ 1 - 1
src/Socket.js

@@ -207,7 +207,7 @@ export default class Socket extends EventEmitter {
         if (!r) return;
         const n = r.id;
 
-        if(n == "heartbeat") console.log("Socket心跳请求时间(ms):", Date.now() - parseInt(r.data))
+        //if(n == "heartbeat") console.log("Socket心跳请求时间(ms):", Date.now() - parseInt(r.data))
 
         if (!!n)
           switch (

+ 58 - 47
src/Workers.js

@@ -522,7 +522,7 @@ export default class Workers {
 
         //重新decode cache ptr
 
-        console.log("this.cachedStreams", this.cachedStreams, this.setPtr);
+        //console.log("this.cachedStreams", this.cachedStreams, this.setPtr);
 
         this.decoderWorker.postMessage(
           {
@@ -769,7 +769,7 @@ export default class Workers {
             }
             const _ = "wasm:" + d;
             this._rtcp.sendStringData(_);
-            console.log("meta——丢帧" + s.data.metadata); //.newUserStates[0].playerState.user.camera.yaw);
+            //console.log("meta——丢帧" + s.data.metadata); //.newUserStates[0].playerState.user.camera.yaw);
             break;
           }
           case 9: {
@@ -784,6 +784,16 @@ export default class Workers {
               });
             break;
           }
+          case 11: {
+            console.log("Workers:pts: %s, isIDR: %s, length: %s, traceIds: %s,cameraPosition:%s, time: %s",
+            s.data.pts,
+            s.data.isIDR,
+            s.data.mediaLength,
+            s.data.traceIds,
+            s.data.cameraPosition,
+            new Date().getTime());
+            break;
+          }
           default:
             defaultLogger.error("Receive unknown message event from decoder"),
               defaultLogger.debug(s.data);
@@ -901,11 +911,11 @@ export default class Workers {
       //   "接受webrtc请求(定时执行UpdateYUV):" +
       //     JSON.stringify(this.cachedMetas[e])
       // );
-      console.log("回传", {
-        signal: this.cachedMetas[e],
-        pts: this.cachedPtss[e],
-        alreadyUpdateYUV: true,
-      });
+      // console.log("回传", {
+      //   signal: this.cachedMetas[e],
+      //   pts: this.cachedPtss[e],
+      //   alreadyUpdateYUV: true,
+      // });
       this.executeFunction("signal", {
         signal: this.cachedMetas[e],
         pts: this.cachedPtss[e],
@@ -923,7 +933,7 @@ export default class Workers {
       o = i.getUint32(0);
     if (o == 1723558763) return true;
     if (o != 2296221069) return false;
-    console.log("Receive Pano Message"), i.getUint16(4);
+    //console.log("Receive Pano Message"), i.getUint16(4);
     const s = i.getUint16(6),
       c = i.getUint32(8),
       d = i.getUint32(12),
@@ -1053,27 +1063,27 @@ export default class Workers {
 
     // console.log("zh----", fCnt, b);
     if (b !== 255) {
-      console.log("gemer1", {
-        byteLength: e.byteLength,
-        frame: fCnt,
-        mediaLen: $,
-        metaLen: j,
-        b: b,
-        cachedKey: rt,
-        serverTime: _e,
-        it: it,
-        start: c,
-        ot: ot,
-        nt: nt,
-        total: nt,
-        tt: tt,
-        et: et,
-        isPureMeta: ot === nt,
-        at: at,
-      });
+      // console.log("gemer1", {
+      //   byteLength: e.byteLength,
+      //   frame: fCnt,
+      //   mediaLen: $,
+      //   metaLen: j,
+      //   b: b,
+      //   cachedKey: rt,
+      //   serverTime: _e,
+      //   it: it,
+      //   start: c,
+      //   ot: ot,
+      //   nt: nt,
+      //   total: nt,
+      //   tt: tt,
+      //   et: et,
+      //   isPureMeta: ot === nt,
+      //   at: at,
+      // });
     }
     let copyIDR = b;
-    console.log("metaverse----IDR:" + copyIDR);
+    //console.log("metaverse----IDR:" + copyIDR);
 
     // debugger;
     const down = Date.now();
@@ -1120,9 +1130,9 @@ export default class Workers {
       const Mt = JSON.parse(this.Stringify(bt)); // json 与帧map的坐标数据
       const Pt = Date.now();
 
-      console.log("gemer2", fCnt, it, Mt);
+      //console.log("gemer2", fCnt, it, Mt);
 
-      this.showAllReceivedMetadata && console.log(_e, gt, Mt);
+      //this.showAllReceivedMetadata && console.log(_e, gt, Mt);
 
       // console.log("Pt - Rt", Pt - Rt, Pt, Rt);
       this.metaParseArray.push(Pt - Rt);
@@ -1135,13 +1145,14 @@ export default class Workers {
           this.inMovingMode &&
           (this.moveStartPts = d),
         this.moveStartPts == d &&
-          ((this.MoveResponseDelay = Date.now() - this.StartMovingTs),
-          console.log(
-            "move response delay: ",
-            d,
-            this.moveStartPts,
-            this.MoveResponseDelay
-          ));
+          ((this.MoveResponseDelay = Date.now() - this.StartMovingTs)
+          // console.log(
+          //   "move response delay: ",
+          //   d,
+          //   this.moveStartPts,
+          //   this.MoveResponseDelay
+          // )
+          );
 
       const It = this.getIsMoving(Mt);
 
@@ -1262,7 +1273,7 @@ export default class Workers {
           const Rt = JSON.parse(this.Stringify(xt));
           const Mt = Date.now();
 
-          this.showAllReceivedMetadata && console.log(_e, St, Rt),
+          //this.showAllReceivedMetadata && console.log(_e, St, Rt),
             this.metaParseArray.push(Mt - bt),
             (_t = Rt.traceIds) != null &&
               _t.length &&
@@ -1319,16 +1330,16 @@ export default class Workers {
           };
           //有效Iframe
           //console.error("IT", It);
-          console.log("Work-It1.data", fCnt, It.data);
-          console.log(
-            "Work-IT2",
-            fCnt,
-            It.metadata.mediaSrc +
-              "," +
-              JSON.stringify(
-                It.metadata.newUserStates[0].playerState.player.position
-              )
-          );
+          // console.log("Work-It1.data", fCnt, It.data);
+          // console.log(
+          //   "Work-IT2",
+          //   fCnt,
+          //   It.metadata.mediaSrc +
+          //     "," +
+          //     JSON.stringify(
+          //       It.metadata.newUserStates[0].playerState.player.position
+          //     )
+          // );
           // testFrame += 1;
           // console.error("IT", fCnt, JSON.stringify(Rt));
           //console.error("traceIds", fCnt, Rt.traceIds.length);

+ 3 - 2
src/XAvatar.js

@@ -385,8 +385,9 @@ export default class XAvatar {
               
             if (!$ || $.length <= 0)
             //角色  id= ${this.id}  找不到地面,当前高度为下发高度
-                return console.warn(`\u89D2\u8272 id= ${this.id} \u627E\u4E0D\u5230\u5730\u9762\uFF0C\u5F53\u524D\u9AD8\u5EA6\u4E3A\u4E0B\u53D1\u9AD8\u5EA6`),
-                i(0);
+                //return console.warn(`\u89D2\u8272 id= ${this.id} \u627E\u4E0D\u5230\u5730\u9762\uFF0C\u5F53\u524D\u9AD8\u5EA6\u4E3A\u4E0B\u53D1\u9AD8\u5EA6`),
+                //i(0);
+                return i(0);
             let _e = j.intersectsMeshes($);
             if (_e.length > 0)
                 return i(_e[0].distance - b);

+ 1 - 1
src/XMaterialComponent.js

@@ -110,7 +110,7 @@ export default class XMaterialComponent {
     fov == -1 && (fov = this.yuvInfo.fov);
 
     if (this._isUpdateYUV == !0) {
-      console.log('执行:updateRawYUVData')
+      //console.log('执行:updateRawYUVData')
       const yuvInfo = { width, height, fov }
       const videosResOriArrayIndex = this._videoRawYUVTexArray.findId(width, height)
       const currentVideoId = this._videoRawYUVTexArray.getCurrentVideoTexId();

+ 1 - 1
src/Xverse_Room.js

@@ -320,7 +320,7 @@ export default class Xverse_Room extends EventEmitter {
     try {
       await this.networkController
         .connect()
-        ._timeout(8e3, new InitNetworkTimeoutError()),
+        ._timeout(8e4, new InitNetworkTimeoutError()),
         logger.infoAndReportMeasurement({
           type: "networkInitAt",
           group: "joinRoom",

+ 78 - 68
src/v2Decoder/index.js

@@ -159,7 +159,7 @@ if ("function" === typeof importScripts) {
   };
 
   Decoder.prototype.isSeqJump = function (a, b) {
-    console.log("[xmedia] isSeqJump,a:%s, b:%s",a,b);
+    //console.log("[xmedia] isSeqJump,a:%s, b:%s",a,b);
     return this.distance(a, b) >= CACHE_BUF_LENGTH - 1;
   };
 
@@ -228,7 +228,7 @@ if ("function" === typeof importScripts) {
     this.cntBufInc = 0;
     this.prevBufNum = 0;
     this.MAX_TRY_TO_DEC_BUFNUM = 3;
-    console.log("[xmedia] resetDecoder");
+    //console.log("[xmedia] resetDecoder");
     this.skipFrameUntilI = true;
 
     this.consumerPrevPts = -1;
@@ -251,7 +251,8 @@ if ("function" === typeof importScripts) {
 
   Decoder.prototype.dumpLogBuf = function () {
     while (logBufQueue.length > 0) {
-      console.log(logBufQueue.shift());
+      //console.log(logBufQueue.shift());
+      logBufQueue.shift();
     }
   };
 
@@ -302,7 +303,7 @@ if ("function" === typeof importScripts) {
     }
 
     if (this.enable_logging) {
-      console.log(logInfo);
+      //console.log(logInfo);
     } else {
       logBufQueue.push(logInfo);
       if (logBufQueue.length > MAX_LOG_NUM) {
@@ -340,7 +341,7 @@ if ("function" === typeof importScripts) {
     if (this.isSlotEmpty(index)) {
       //lost
       // debugger
-      console.log("[xmedia] return on SLOT EMPTY, prev: %s", prevSeq);
+      //console.log("[xmedia] return on SLOT EMPTY, prev: %s", prevSeq);
       this.consumerWaitingIDR = true;
       this.consumerPrevPts = this.seqAdd(this.consumerPrevPts, 1, 65536);
       return true;
@@ -382,12 +383,12 @@ if ("function" === typeof importScripts) {
       }
     }
 
-    console.log(
-      "[xmedia] return finally, prev: %s, cur: %s",
-      this.prevSeq,
-      this.consumerCurrPts,
-      Date.now() - testLastestTime
-    );
+    // console.log(
+    //   "[xmedia] return finally, prev: %s, cur: %s",
+    //   this.prevSeq,
+    //   this.consumerCurrPts,
+    //   Date.now() - testLastestTime
+    // );
 
     testLastestTime = String(Date.now()).slice();
     this.consumerPrevPts = this.consumerCurrPts;
@@ -403,11 +404,11 @@ if ("function" === typeof importScripts) {
   };
 
   Decoder.prototype.slotHasContent = function (index) {
-    console.log("[xmedia] slotHasContent ------------ 000, media: %s, meta: %s, pts: %s",
-      (mediaArray[index].media == null),
-      (mediaArray[index].meta == null),
-      mediaArray[index].pts
-    );
+    // console.log("[xmedia] slotHasContent ------------ 000, media: %s, meta: %s, pts: %s",
+    //   (mediaArray[index].media == null),
+    //   (mediaArray[index].meta == null),
+    //   mediaArray[index].pts
+    // );
     return (
       mediaArray[index].media != null &&
       mediaArray[index].meta != null &&
@@ -417,16 +418,25 @@ if ("function" === typeof importScripts) {
 
   Decoder.prototype.procBufItem = function (index) {
     this.dumpJitterBufInfo("Entering Decoder.prototype.procBufItem");
+    self.postMessage({
+      t: 11,
+      pts: mediaArray[index].pts,
+      isIDR: mediaArray[index].isIDR,
+      mediaLength: mediaArray[index].media.length,
+      traceIds:mediaArray[index].metadata.traceIds,
+      cameraPosition:JSON.stringify(mediaArray[index].metadata.newUserStates[0].playerState.camera.position),
+      time:new Date().getTime()
+    })
     // console.log("[][Core][WASM], pts: %s, isIDR: %s, length: %s",
     //   mediaArray[index].pts,
     //   mediaArray[index].isIDR,
     //   mediaArray[index].media.length
     // );
-    console.log("metaverse----core, pts: %s, isIDR: %s, length: %s",
-      mediaArray[index].pts,
-      mediaArray[index].isIDR,
-      mediaArray[index].media.length,
-    );
+    // console.log("metaverse----core, pts: %s, isIDR: %s, length: %s",
+    //   mediaArray[index].pts,
+    //   mediaArray[index].isIDR,
+    //   mediaArray[index].media.length,
+    // );
     // var loginfo = 'pts: %s, isIDR: %s, length: %s', mediaArray[index].pts, mediaArray[index].isIDR, mediaArray[index].media.length
     //I帧返回false,P帧返回true
     needToSkip = this.skipFrameUntilI && !mediaArray[index].isIDR;
@@ -447,9 +457,9 @@ if ("function" === typeof importScripts) {
     // console.log("[xmedia] %s ------------ 000", JSON.stringify(mediaArray[index].metadata));
     // console.log("procBufItem", index, mediaArray[index]);
     if (this.slotHasContent(index) && !needToSkip) {
-      console.log("[xmedia] %s ------------ 001", mediaArray[index].pts);
+      //console.log("[xmedia] %s ------------ 001", mediaArray[index].pts);
       if(mediaArray[index].metadata.mediaSrc){
-        console.log("角度:"+ mediaArray[index].metadata.newUserStates[0].playerState.camera.angle.yaw);
+        //console.log("角度:"+ mediaArray[index].metadata.newUserStates[0].playerState.camera.angle.yaw);
       }
       
       let objData = {
@@ -462,20 +472,20 @@ if ("function" === typeof importScripts) {
 
       // -------------------
       if (this.checkPktOrderInConsumer(index)) {
-        console.log("[xmedia] %s ------------ 002", mediaArray[index].pts);
+        //console.log("[xmedia] %s ------------ 002", mediaArray[index].pts);
         this.decodeFrame(objData);
       }
 
       if (mediaArray[index].isIDR) {
-        console.log("[xmedia] %s ------------ 003", mediaArray[index].pts);
+        //console.log("[xmedia] %s ------------ 003", mediaArray[index].pts);
         // console.log("mediaArray[index].isIDR: this.skipFrameUntilI = false")
         this.skipFrameUntilI = false;
       }
     } 
     else{
-      console.log("[xmedia] %s ------------ 004", mediaArray[index].pts);
+      //console.log("[xmedia] %s ------------ 004", mediaArray[index].pts);
       this.slotHasMedia(index)
-      console.log("[xmedia] %s ------------ 005", mediaArray[index].pts);
+      //console.log("[xmedia] %s ------------ 005", mediaArray[index].pts);
       this.dropPkt += 1;
     }
     /*
@@ -518,7 +528,7 @@ if ("function" === typeof importScripts) {
       }
     }
     */
-    console.log('procBufItem');
+    //console.log('procBufItem');
     this.dumpJitterBufInfo("Leaving Decoder.prototype.procBufItem, " + loginfo);
     this.lastObj = mediaArray[index];
     this.resetBufItem(index);
@@ -607,7 +617,7 @@ if ("function" === typeof importScripts) {
       this.procBufItem(this.readPtr);
     } catch (error) {
       //console.log("[xmedia] 掉帧", error);
-      console.log("Work-IT2 掉帧2")
+      //console.log("Work-IT2 掉帧2")
     }
 
     // if (this.getNumOfPktToBeDec() > this.prevBufNum) {
@@ -825,36 +835,36 @@ if ("function" === typeof importScripts) {
   Decoder.prototype.isIFrame = function (isIDR, mediaLen) {
     // return data.isIDR && media.byteLength !=0
     let flag =  isIDR && mediaLen != 0;
-    if(flag){
-      console.log('metaverse---------��IFrame');
-    }
-    else{
-      console.log('metaverse---------����IFrame');
-    }
+    // if(flag){
+    //   console.log('metaverse---------��IFrame');
+    // }
+    // else{
+    //   console.log('metaverse---------����IFrame');
+    // }
     return flag;
   };
 
   Decoder.prototype.isPFrame = function (isIDR, mediaLen) {
     // return !data.isIDR && media.byteLength !=0
     let flag = !isIDR && mediaLen != 0;
-    if(flag){
-      console.log('metaverse---------��PFrame');
-    }
-    else{
-      console.log('metaverse---------����PFrame');
-    }
+    // if(flag){
+    //   console.log('metaverse---------��PFrame');
+    // }
+    // else{
+    //   console.log('metaverse---------����PFrame');
+    // }
     return flag;
   };
 
   Decoder.prototype.isPureMeta = function (metaLen, mediaLen) {
     // return media.byteLength == 0 && meta.byteLength !=0
     let flag = mediaLen == 0 && metaLen != 0;
-    if(flag){
-      console.log('metaverse---------��PureMeta');
-    }
-    else{
-      console.log('metaverse---------����PureMeta');
-    }
+    // if(flag){
+    //   console.log('metaverse---------��PureMeta');
+    // }
+    // else{
+    //   console.log('metaverse---------����PureMeta');
+    // }
     return flag;
   };
 
@@ -879,17 +889,17 @@ if ("function" === typeof importScripts) {
       // console.log("[xmedia] 000-2 isIDR: %s, mediaLen: %s", isIDR, mediaLen)
       // console.log("[xmedia] 000-3 this.isPFrame(isIDR, mediaLen): %s", this.isPFrame(isIDR, mediaLen))
       if (this.isPFrame(isIDR, mediaLen)) {
-        console.log("[xmedia] 001: isPFrame TRUE");
+        //console.log("[xmedia] 001: isPFrame TRUE");
         this.packetsDrop += 1;
         // MARKER META1META2
         dropPkt = true;
       }
       if (this.isIFrame(isIDR, mediaLen)) {
-        console.log("[xmedia] 002: isIFrame TRUE");
+        //console.log("[xmedia] 002: isIFrame TRUE");
         this.isFirstFrame = false;
       }
     }
-    console.log("[xmedia] 003: dropPkt: %s", dropPkt);
+    //console.log("[xmedia] 003: dropPkt: %s", dropPkt);
     return dropPkt;
   };
 
@@ -925,7 +935,7 @@ if ("function" === typeof importScripts) {
       if (this.isPFrame(data.isIDR, media.byteLength)) {
         // MARKER META1META2
         this.packetsDrop += 1;
-        console.log("fk1");
+        //console.log("fk1");
         return;
       }
       this.prevSeq = this.seqDiff(pts, 1, 65536);
@@ -982,19 +992,19 @@ if ("function" === typeof importScripts) {
         this.packetsLost -= 1;
         // this.packetdisorder +=1
       }
-      console.log(
-        "[xmedia] disorder frame received. preSeq: %s, pts: %s",
-        this.prevSeq,
-        pts
-      );
+      // console.log(
+      //   "[xmedia] disorder frame received. preSeq: %s, pts: %s",
+      //   this.prevSeq,
+      //   pts
+      // );
       if (this.seqDiff(this.prevSeq, pts, 65536) < this.getNumOfPktToBeDec()) {
         // slot for pts is not handled yet. just put it back:
-        console.log(
-          "put disorder frame to enc_queue, pkt:%s, prevPts: %s, numOfPktToBeDec: %s",
-          pts,
-          this.prevSeq,
-          this.getNumOfPktToBeDec()
-        );
+        // console.log(
+        //   "put disorder frame to enc_queue, pkt:%s, prevPts: %s, numOfPktToBeDec: %s",
+        //   pts,
+        //   this.prevSeq,
+        //   this.getNumOfPktToBeDec()
+        // );
       } else {
         //dropDisorder++
         console.error(
@@ -1089,7 +1099,7 @@ if ("function" === typeof importScripts) {
 
     if (cachedFirstFrame != undefined) {
       self.postMessage(cachedFirstFrame, [cachedFirstFrame.data.buffer]);
-      console.log("cachedFirstFrame", cachedFirstFrame);
+      //console.log("cachedFirstFrame", cachedFirstFrame);
       send_out_buffer += 1;
       this.receivedEmit++;
       cachedFirstFrame = undefined;
@@ -1296,7 +1306,7 @@ if ("function" === typeof importScripts) {
         //   }
         // }
       } catch (e) {
-        console.log("catch error ", e);
+        //console.log("catch error ", e);
         if (this.errorCacheSize > 0) {
           downloadBlob(
             this.errorCacheBuffer.subarray(0, this.errorCacheSize),
@@ -1320,7 +1330,7 @@ if ("function" === typeof importScripts) {
       var poc = Module.getValue(resultBuffer + 32, "i32");
       var pts = data.frameCnt;
 
-      console.log("ret", ret);
+      //console.log("ret", ret);
 
       if (ret != 0) {
         printConsole.log(
@@ -1428,7 +1438,7 @@ if ("function" === typeof importScripts) {
         cachedFirstFrame = objData;
       }
     }
-    console.log("this.startEmit", this.startEmit);
+    //console.log("this.startEmit", this.startEmit);
 
     // if (cacheBuffer != null) {
     //   Module._free(cacheBuffer)
@@ -1445,7 +1455,7 @@ if ("function" === typeof importScripts) {
   Decoder.prototype.receiveBuffer = function (data) {
     framesReturned++;
     send_out_buffer -= 1;
-    console.log("receiveBuffer", data);
+    //console.log("receiveBuffer", data);
     YUVArray.push({ status: 0, buffer: data.buffer });
   };
 
@@ -1477,7 +1487,7 @@ if ("function" === typeof importScripts) {
     try {
       self.importScripts(url);
     } catch (e) {
-      console.log("catch error ", e);
+      //console.log("catch error ", e);
       printConsole.error(e.message, "5003");
     }
   };