test pc 3 سال پیش
والد
کامیت
5560556d7e
1فایلهای تغییر یافته به همراه14 افزوده شده و 2 حذف شده
  1. 14 2
      src/move/move.service.ts

+ 14 - 2
src/move/move.service.ts

@@ -48,7 +48,7 @@ export class MoveService implements OnModuleInit {
     traceIds: [],
     vehicle: null,
     mediaSrc: null,
-    moveOver: false,
+    //moveOver: false,
     moveStart: false,
     newUserStates: [
       {
@@ -1108,6 +1108,12 @@ export class MoveService implements OnModuleInit {
 
           if (cameraInfo.mediaSrc) {
             this.reply.mediaSrc = cameraInfo.mediaSrc;
+            if(this.cameraInfos.length == 0){
+              this.reply.moveStart = true;
+            }
+            else{
+              this.reply.moveStart = false;
+            }
           }
           // if (this.cameraInfos.length == 0) {
           //   this.reply.moveOver = true;
@@ -1184,6 +1190,12 @@ export class MoveService implements OnModuleInit {
 
         if (cameraInfo.mediaSrc) {
           this.reply.mediaSrc = cameraInfo.mediaSrc;
+          if(this.cameraInfos.length == 0){
+            this.reply.moveStart = true;
+          }
+          else{
+            this.reply.moveStart = false;
+          }
         }
         // if (this.cameraInfos.length == 0) {
         //   this.reply.moveOver = true;
@@ -1284,8 +1296,8 @@ export class MoveService implements OnModuleInit {
 
         if (cameraInfo.mediaSrc) {
           this.reply.mediaSrc = cameraInfo.mediaSrc;
+          this.reply.moveStart = true;
         }
-        this.reply.moveStart = true;
         this.sendingFrameForJoystick = true;
       }
       console.log('handlejoysticktesttest:actionRequest-镜头过渡'+new Date().getTime());