gemercheung 3 lat temu
rodzic
commit
37f26a1798
1 zmienionych plików z 29 dodań i 29 usunięć
  1. 29 29
      src/scene/scene.service.ts

+ 29 - 29
src/scene/scene.service.ts

@@ -610,24 +610,24 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
           //this.moveService.updateUser(userId, breakPointId, lastReply);
         }
         // 共用_JoyStickingTimeout
-        clearTimeout(this._JoyStickingTimeout);
-        this._JoyStickingTimeout = setTimeout(() => {
-          // const complementFrame = this.moveService.complementFrame(
-          //   this.user_id,
-          // ) as StreamReplyType;
-          // console.log('has-complementFrame', complementFrame);
-          // if (complementFrame) {
-          //   pushJoyStickSteam(complementFrame);
-          // } else {
-          this.frameCnt.next(hasPush.frame);
-          this.logger.log('joystick opt done');
-          this.logger.log('joystick 交权给空流,当前pts', hasPush.frame);
-          // this.frameCnt.next(res.frame);
-          this.onJoysticking.next(false);
-          this.resumeStream();
-          this.joystickFrameCnt = -1;
-          this.isJoystickHasStream = false;
-          // }
+        clearTimeout(this._JoyStickingSteamTimeout);
+        this._JoyStickingSteamTimeout = setTimeout(() => {
+          const complementFrame = this.moveService.complementFrame(
+            this.user_id,
+          ) as StreamReplyType;
+          console.log('has-complementFrame', complementFrame);
+          if (complementFrame) {
+            pushJoyStickSteam(complementFrame);
+          } else {
+            this.frameCnt.next(hasPush.frame);
+            this.logger.log('joystick opt done');
+            this.logger.log('joystick 交权给空流,当前pts', hasPush.frame);
+            // this.frameCnt.next(res.frame);
+            this.onJoysticking.next(false);
+            this.resumeStream();
+            this.joystickFrameCnt = -1;
+            this.isJoystickHasStream = false;
+          }
         }, 200);
       } else {
         console.error('joystick-流地址有误::', joystickRes.mediaSrc);
@@ -694,17 +694,17 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
                   'joystick-位置流 交权给空流,当前pts',
                   res.frame,
                 );
-                const complementFrame = this.moveService.complementFrame(
-                  this.user_id,
-                ) as StreamReplyType;
-                console.log('has-complementFrame', complementFrame);
-                if (complementFrame) {
-                  pushJoyStickSteam(complementFrame);
-                } else {
-                  this.moveService.stopJoystick(this.user_id);
-                  this.onJoysticking.next(false);
-                  this.resumeStream();
-                }
+                // const complementFrame = this.moveService.complementFrame(
+                //   this.user_id,
+                // ) as StreamReplyType;
+                // console.log('has-complementFrame', complementFrame);
+                // if (complementFrame) {
+                //   pushJoyStickSteam(complementFrame);
+                // } else {
+                this.moveService.stopJoystick(this.user_id);
+                this.onJoysticking.next(false);
+                this.resumeStream();
+                // }
               }, 200);
             } else {
               console.error(