|
@@ -581,9 +581,9 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
// 过滤新东西, 推完给回false
|
|
|
this.moveService.sendingFrameForJoystick = true;
|
|
|
|
|
|
- if (this.joystickFrameCnt === -1) {
|
|
|
+ // if (this.joystickFrameCnt === -1) {
|
|
|
this.joystickFrameCnt = this.frameCnt.getValue();
|
|
|
- }
|
|
|
+ // }
|
|
|
this.joystickFrameCnt += 1;
|
|
|
const streamData: StreamFrameType = {
|
|
|
frame: this.joystickFrameCnt,
|
|
@@ -613,6 +613,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
//this.moveService.updateUser(userId, breakPointId, lastReply);
|
|
|
}
|
|
|
// 共用_JoyStickingTimeout
|
|
|
+ this.frameCnt.next(hasPush.frame);
|
|
|
clearTimeout(this._JoyStickingSteamTimeout);
|
|
|
this._JoyStickingSteamTimeout = setTimeout(async () => {
|
|
|
const complementFrame = this.moveService.complementFrame(
|
|
@@ -620,9 +621,8 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
) as StreamReplyType;
|
|
|
console.log('has-complementFrame', complementFrame);
|
|
|
if (complementFrame) {
|
|
|
- pushJoyStickSteam(complementFrame, true);
|
|
|
+ pushJoyStickSteam(complementFrame);
|
|
|
} else {
|
|
|
- this.frameCnt.next(hasPush.frame);
|
|
|
this.logger.log('joystick opt done');
|
|
|
this.logger.log('joystick 交权给空流,当前pts', hasPush.frame);
|
|
|
const stopFrameData = this.moveService.stopJoystick(this.user_id);
|
|
@@ -633,6 +633,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
const stopRes = await this.streamService.pushMetaDataToSteam(
|
|
|
stopFrame,
|
|
|
);
|
|
|
+ console.log('stopFrame', stopFrame);
|
|
|
if (stopRes.done) {
|
|
|
this.onJoysticking.next(false);
|
|
|
this.resumeStream();
|