فهرست منبع

Merge branch 'master' of http://192.168.0.115:3000/xushiting/Metaverse

# Conflicts:
#	dist/js/index.js
#	dist/js/index.js.map
#	src/EngineProxy.js
#	src/ModelManager.js
#	src/Xverse_Room.js
xushiting 3 سال پیش
والد
کامیت
5ef237152d
6فایلهای تغییر یافته به همراه39 افزوده شده و 12 حذف شده
  1. 3 1
      .gitignore
  2. 20 0
      dist/index.html
  3. 6 6
      dist/js/index.js
  4. 6 3
      src/Rtcp.js
  5. 3 1
      src/Workers.js
  6. 1 1
      src/wasm/lib264.js

+ 3 - 1
.gitignore

@@ -24,4 +24,6 @@ report*.json
 *.sw?
 *.bak
 *.log
-bk
+bk
+dist/index.js
+dist/index.js.map

+ 20 - 0
dist/index.html

@@ -34,6 +34,7 @@
     <script src="./libs/axios.min.js"></script>
     <script src="./libs/VisibilityChangeHandler.js"></script>
     <script src="./libs/decoder.js"></script>
+
     
     <!-- <script src="./webrtc//adapter-7.4.0.min.js"></script>
     <script src="./webrtc/srs.sdk.js"></script> -->
@@ -334,6 +335,25 @@ const WASM_Version = "h264"
         }
         )))
     };
+    objectParseFloat = (i) => {
+        const e = {};
+        return (
+        i &&
+            Object.keys(i).forEach((t) => {
+            e[t] = parseFloat(i[t]);
+            }),
+        e
+        );
+    }
+    getRandomItem = (i) =>
+    i.length === 0 ? null : i[Math.floor(Math.random() * i.length)]
+    
+    function uuid$1() {
+    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (i) => {
+        const e = (Math.random() * 16) | 0;
+        return (i === "x" ? e : (e & 3) | 8).toString(16);
+    });
+    }
 
     </script>
 

+ 6 - 6
dist/js/index.js

@@ -1,9 +1,9 @@
-/**
-* Name: Metaverse
-* Date: 2022/4/11
-* Author: https://www.4dkankan.com
-* Copyright © 2022 4DAGE Co., Ltd. All rights reserved.
-* Licensed under the GLP license
+/**
+* Name: Metaverse
+* Date: 2022/4/11
+* Author: https://www.4dkankan.com
+* Copyright © 2022 4DAGE Co., Ltd. All rights reserved.
+* Licensed under the GLP license
 */
 (function (factory) {
   typeof define === 'function' && define.amd ? define(factory) :

+ 6 - 3
src/Rtcp.js

@@ -4,6 +4,7 @@ import Heartbeat from "./Heartbeat.js"
  
 export default class Rtcp extends EventEmitter {
     constructor(e) {
+        
         super();
         E(this, "connection", null);
         E(this, "inputChannel", null);
@@ -145,8 +146,8 @@ export default class Rtcp extends EventEmitter {
         const e = Date.now();
         this.connection.ondatachannel = t=>{
             logger.info(`ondatachannel: ${t.channel.label}`);
+           
             this.inputChannel = t.channel;
-            
             this.inputChannel.onopen = ()=>{
                 var r;
                 logger.info("The input channel has opened, id:", (r = this.inputChannel) == null ? void 0 : r.id),
@@ -162,14 +163,16 @@ export default class Rtcp extends EventEmitter {
                     startTime: e,
                     group: "joinRoom"
                 }))
+                console.log('this.inputChannel',this.inputChannel)
             }
             ,
             this.inputChannel.onclose = ()=>{
                 var r;
                 return logger.info("The input channel has closed, id:", (r = this.inputChannel) == null ? void 0 : r.id)
-            }
-            ,
+            },
             this.inputChannel.onmessage = r=>{
+                // console.log('this.workers',this.workers)
+                console.log('inputChannel',r.data)
                 this.workers.dataHandle(r.data)
             }
         }

+ 3 - 1
src/Workers.js

@@ -507,15 +507,17 @@ export default class Workers {
             };
             this.cacheFrameComposes.push(n)
         }
+    
         const t = new Blob([decoder],{
             type: "application/javascript"
         });
         return this.decoderWorker = new Worker(URL.createObjectURL(t)),
+ 
         this.decoderWorker.postMessage({
             t: 9,
             url: WASM_URLS[WASM_Version],
             jitterLength: DECODER_PASSIVE_JITTER
-        }),
+        });
         this.decoderWorker.postMessage({
             t: 1,
             config: e

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
src/wasm/lib264.js