test pc před 3 roky
rodič
revize
3475e52b2e
4 změnil soubory, kde provedl 29 přidání a 26 odebrání
  1. 1 1
      src/Signal.js
  2. 22 19
      src/Workers.js
  3. 1 1
      src/XverseAvatarManager.js
  4. 5 5
      src/v2Decoder/index.js

+ 1 - 1
src/Signal.js

@@ -59,7 +59,7 @@ export default class Signal {
                 const { isMoving, isRotating } = mainUserState.renderInfo;
                 this._room.avatarManager._updateAvatarMovingStatus({
                     id: mainUserState.userId,
-                    isMoving: !!isMoving,
+                    isMoving: isMoving,
                     isRotating: !!isRotating
                 })
             }

+ 22 - 19
src/Workers.js

@@ -1068,24 +1068,24 @@ 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);
@@ -1135,7 +1135,7 @@ 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);
 
@@ -1241,6 +1241,8 @@ export default class Workers {
       const At = this.hasFrmCntInCache(fCnt);
 
       if (At != -1)
+      {
+        console.log('out of bound:'+it);
         if (
           (this.cacheFrameComposes[At].buffer.set(at, it),
           (this.cacheFrameComposes[At].size += ot),
@@ -1406,6 +1408,7 @@ export default class Workers {
               ", total size is ",
               nt
             );
+      }
       else if (At == -1) {
         let gt = this.hasFrmCntInCache(-1);
         if (gt == -1) {

+ 1 - 1
src/XverseAvatarManager.js

@@ -227,7 +227,7 @@ export default class XverseAvatarManager extends EventEmitter {
                 const {isMoving, isRotating} = userState.renderInfo;
                 this._updateAvatarMovingStatus({
                     id: userState.userId,
-                    isMoving: !!isMoving,
+                    isMoving: isMoving,
                     isRotating: !!isRotating
                 })
             }

+ 5 - 5
src/v2Decoder/index.js

@@ -458,7 +458,7 @@ 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);
       }
@@ -473,20 +473,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;
     }
     /*