gemercheung 3 vuotta sitten
vanhempi
commit
5c8d29c882

+ 2 - 2
config.dev.yaml

@@ -42,8 +42,8 @@ queueRedis:
 
 stun:
   server: ['turn:4dage:4dage168@47.107.125.202:4478', 'stun:47.107.125.202:3478']
-  portRangeBegin: 52000
-  portRangeEnd: 53000
+  portRangeBegin: 49152
+  portRangeEnd: 65535
 
 server:
   private_ip: 172.18.197.114

+ 5 - 1
src/rotate/rotate.service.ts

@@ -52,7 +52,11 @@ export class RotateService {
         },
       },
       camera: {
-        position: { x: -1139.3031005859375, y: 99.99999237060548, z: 120 },
+        position: {
+          x: -3332.0390625,
+          y: -99.99999237060548,
+          z: 116.20999908447266,
+        },
         angle: {
           pitch: 0,
           yaw: 0,

+ 10 - 2
src/scene/scene.service.ts

@@ -379,7 +379,11 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
             const stop = performance.now();
             const inMillSeconds = stop - start;
             const rounded = Number(inMillSeconds).toFixed(3);
-            this.logger.log(`[timer]-rotate-入队列前: ${rounded}ms`);
+            this.logger.log(
+              `[timer]-rotate-入队列前: ${rounded}ms -->` +
+                JSON.stringify(stream),
+            );
+
             this.roQueue.next(stream);
           } else {
             // this.onRotating.next(false);
@@ -403,7 +407,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
       this.handleWalking(request);
     }
 
-    console.log('moveSliceLastFrameSub', this.moveSliceLastFrameSub);
+    console.log('moveSliceLastFrameSub', !!this.moveSliceLastFrameSub);
 
     // 监听每小段最后一帧
     if (!this.moveSliceLastFrameSub) {
@@ -819,6 +823,10 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
               this.hasJoystickMoveRequest = false;
               this.logger.log('move end');
             }, 300);
+          } else {
+            this.logger.error(
+              `movesteam::当前帧:${res.frame}` + JSON.stringify(res),
+            );
           }
         } catch (error) {
           this.logger.error('handleMoveSteam::error', error);

+ 4 - 0
src/scene/stream/stream.service.ts

@@ -206,6 +206,10 @@ export class StreamService {
           }
           return resolve({ frame: stream.frame, done: true });
         });
+        steam.on('error', (error) => {
+          this.logger.error('steam-error', error.message);
+          return reject({ frame: stream.frame, done: false });
+        });
       } catch (error) {
         this.logger.error(error);
         return reject({ frame: stream.frame, done: false });