gemercheung 3 anos atrás
pai
commit
c852e2018c
5 arquivos alterados com 16 adições e 12 exclusões
  1. 2 0
      src/ActionsHandler.js
  2. 1 1
      src/Rtcp.js
  3. 6 6
      src/Workers-bk.js
  4. 5 3
      src/Workers.js
  5. 2 2
      src/main.js

+ 2 - 0
src/ActionsHandler.js

@@ -35,6 +35,8 @@ export default class ActionsHandler {
     {
         // console.error("[Action]", Actions[actionData.data.action_type])
 
+        //console.log('发送数据:'+JSON.stringify(actionData))
+
         await this.beforeSend(actionData);
         const traceId = util.uuid();
         // 向后端发送action_type信息,获取signal和stream

+ 1 - 1
src/Rtcp.js

@@ -120,7 +120,7 @@ export default class Rtcp extends EventEmitter {
             var o = this.inputChannel;
 			if(!this.actived || !this.inputChannel || this.inputChannel.readyState === "open"){
 				if(o != null){
-					// console.log('发送webrtc数据:'+e)
+					//console.log('发送webrtc数据:'+e)
 					o.send(e)
 				}
 			}

+ 6 - 6
src/Workers-bk.js

@@ -1199,7 +1199,7 @@ export default class Workers {
             position: st,
           };
           if (this.inPanoMode) {
-            console.log("接受webrtc请求:" + JSON.stringify(Rt));
+            //("接受webrtc请求:" + JSON.stringify(Rt));
             this.executeFunction("signal", {
               signal: Rt,
               pts: -1,
@@ -1264,7 +1264,7 @@ export default class Workers {
   }
   dataHandle(e) {
     if (this.saveframe) {
-      console.log("接受webrtc请求:录制视频");
+      //console.log("接受webrtc请求:录制视频");
       this.decoderWorker.postMessage({
         t: 6,
       });
@@ -1272,7 +1272,7 @@ export default class Workers {
     }
 
     if (this.SaveMediaStream) {
-      console.log("接受webrtc请求:下载视频");
+      //console.log("接受webrtc请求:下载视频");
       this.decoderWorker.postMessage({
         t: 7,
       }),
@@ -1281,18 +1281,18 @@ export default class Workers {
 
     const i = new Uint8Array(e);
     if (i.length >= 4 && this.isHeartBeatPacket(i.buffer, i.length) == !0) {
-      console.log("接受webrtc请求:心跳");
+      //console.log("接受webrtc请求:心跳");
       return;
     }
     if (i.length > 36 && this.unmarshalStream(i.buffer) == !0) {
       this.reconnectSignal &&
         (this.executeFunction("reconnectedFrame", {}),
         (this.reconnectSignal = !1));
-      console.log("接受webrtc请求:视频流");
+      //console.log("接受webrtc请求:视频流");
       return;
     }
     if (i.length > 20 && this.unmarshalPano(i.buffer) == !0) {
-      console.log("接受webrtc请求:全景图");
+      //console.log("接受webrtc请求:全景图");
       return;
     }
     this.noWasmBytesReceived += e.byteLength;

+ 5 - 3
src/Workers.js

@@ -1312,6 +1312,8 @@ export default class Workers {
             position: st,
           };
           //有效Iframe
+          //console.error("IT", It);
+          //console.log("It.data", It.data);
 
           console.error("IT", fCnt, It);
           testFrame += 1;
@@ -1407,7 +1409,7 @@ export default class Workers {
   }
   dataHandle(e) {
     if (this.saveframe) {
-      console.log("接受webrtc请求:录制视频");
+      //console.log("接受webrtc请求:录制视频");
       this.decoderWorker.postMessage({
         t: 6,
       });
@@ -1415,7 +1417,7 @@ export default class Workers {
     }
 
     if (this.SaveMediaStream) {
-      console.log("接受webrtc请求:下载视频");
+      //console.log("接受webrtc请求:下载视频");
       this.decoderWorker.postMessage({
         t: 7,
       }),
@@ -1441,7 +1443,7 @@ export default class Workers {
     }
     this.noWasmBytesReceived += e.byteLength;
     const o = JSON.parse(this.Stringify(i));
-    // console.log("接受webrtc请求:" + JSON.stringify(o));
+    //console.log("接受webrtc请求:" + JSON.stringify(o));
     this.executeFunction("signal", {
       signal: o,
       pts: -1,

+ 2 - 2
src/main.js

@@ -34,8 +34,8 @@ const l = async()=>{
             avatarId: 'KGe_Boy',
             roomId: 'e629ef3e-022d-4e64-8654-703bb96410eb',
             userId: nickname,
-            // wsServerUrl: 'wss://uat-eks.xverse.cn/ws',
-             wsServerUrl: "ws://localhost:6688/ws",
+            wsServerUrl: 'wss://uat-eks.xverse.cn/ws',
+            // wsServerUrl: "ws://localhost:6688/ws",
             //wsServerUrl: "wss://meta-socket.4dage.com/ws",
             appId: "10016",
             token: " ",