xushiting 3 yıl önce
ebeveyn
işleme
36e0802573
2 değiştirilmiş dosya ile 10 ekleme ve 9 silme
  1. 4 4
      src/main.js
  2. 6 5
      src/v2Decoder/index.js

+ 4 - 4
src/main.js

@@ -35,10 +35,10 @@ const l = async()=>{
             roomId: 'e629ef3e-022d-4e64-8654-703bb96410eb',
             roomId: 'e629ef3e-022d-4e64-8654-703bb96410eb',
             userId: nickname,
             userId: nickname,
             //wsServerUrl: 'wss://uat-eks.xverse.cn/ws',
             //wsServerUrl: 'wss://uat-eks.xverse.cn/ws',
-            // wsServerUrl: "ws://localhost:6688/ws",
-            wsServerUrl: "wss://meta-socket.4dage.com/ws",
-            appId: "10016",
-            // appId: "0000000002",
+            //wsServerUrl: "ws://localhost:6688/ws",
+            wsServerUrl: "wss://meta-socket1.4dage.com/ws",
+            //appId: "10016",
+            appId: "0000000002",
             token: " ",
             token: " ",
             nickname: nickname,
             nickname: nickname,
             firends: ["user1"],
             firends: ["user1"],

+ 6 - 5
src/v2Decoder/index.js

@@ -441,6 +441,10 @@ if ("function" === typeof importScripts) {
 
 
     if (this.slotHasContent(index) && !needToSkip) {
     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);
+      }
+      
       let objData = {
       let objData = {
         media: mediaArray[index].media,
         media: mediaArray[index].media,
         frameCnt: mediaArray[index].pts,
         frameCnt: mediaArray[index].pts,
@@ -462,7 +466,7 @@ if ("function" === typeof importScripts) {
       }
       }
     } else {
     } else {
       console.log("[xmedia] %s ------------ 004", mediaArray[index].pts);
       console.log("[xmedia] %s ------------ 004", mediaArray[index].pts);
-      if (this.slotHasMedia(index)) {
+      if (this.slotHasMedia(index)) {             //非空帧
         console.log("[xmedia] %s ------------ 005", mediaArray[index].pts);
         console.log("[xmedia] %s ------------ 005", mediaArray[index].pts);
         //need to skip, waiting I Frame
         //need to skip, waiting I Frame
         //dropCache++
         //dropCache++
@@ -582,11 +586,9 @@ if ("function" === typeof importScripts) {
     try {
     try {
       this.procBufItem(this.readPtr);
       this.procBufItem(this.readPtr);
     } catch (error) {
     } catch (error) {
-      
+      console.log("[xmedia] 掉帧", error);
     }
     }
 
 
-
-
     // if (this.getNumOfPktToBeDec() > this.prevBufNum) {
     // if (this.getNumOfPktToBeDec() > this.prevBufNum) {
     //   this.cntBufInc++
     //   this.cntBufInc++
     // } else {
     // } else {
@@ -1239,7 +1241,6 @@ if ("function" === typeof importScripts) {
       let start_ts = Date.now();
       let start_ts = Date.now();
       let ret = 0;
       let ret = 0;
       try {
       try {
-        console.log('metaverse----WASM:cacheBuffer:'+cacheBuffer+',content_size:'+content_size+',resultBuffer:'+resultBuffer);
         ret = Module._decodeData(
         ret = Module._decodeData(
           0,
           0,
           data.frameCnt,
           data.frameCnt,