|
@@ -582,7 +582,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
this.moveService.sendingFrameForJoystick = true;
|
|
this.moveService.sendingFrameForJoystick = true;
|
|
|
|
|
|
// if (this.joystickFrameCnt === -1) {
|
|
// if (this.joystickFrameCnt === -1) {
|
|
- this.joystickFrameCnt = this.frameCnt.getValue();
|
|
|
|
|
|
+ this.joystickFrameCnt = this.frameCnt.getValue();
|
|
// }
|
|
// }
|
|
this.joystickFrameCnt += 1;
|
|
this.joystickFrameCnt += 1;
|
|
const streamData: StreamFrameType = {
|
|
const streamData: StreamFrameType = {
|
|
@@ -621,7 +621,12 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
) as StreamReplyType;
|
|
) as StreamReplyType;
|
|
console.log('has-complementFrame', complementFrame);
|
|
console.log('has-complementFrame', complementFrame);
|
|
if (complementFrame) {
|
|
if (complementFrame) {
|
|
- pushJoyStickSteam(complementFrame);
|
|
|
|
|
|
+ const start = performance.now();
|
|
|
|
+ pushJoyStickSteam(complementFrame, true);
|
|
|
|
+ const stop = performance.now();
|
|
|
|
+ const inMillSeconds = stop - start;
|
|
|
|
+ const rounded = Number(inMillSeconds).toFixed(3);
|
|
|
|
+ console.log(`complementFrame调用时间---->${rounded}`);
|
|
} else {
|
|
} else {
|
|
this.logger.log('joystick opt done');
|
|
this.logger.log('joystick opt done');
|
|
this.logger.log('joystick 交权给空流,当前pts', hasPush.frame);
|
|
this.logger.log('joystick 交权给空流,当前pts', hasPush.frame);
|
|
@@ -685,9 +690,9 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
if (!this.onMoving.getValue()) {
|
|
if (!this.onMoving.getValue()) {
|
|
// 在非行走时接受
|
|
// 在非行走时接受
|
|
this.holdSteam();
|
|
this.holdSteam();
|
|
- if (this.joystickFrameCnt === -1) {
|
|
|
|
- this.joystickFrameCnt = this.frameCnt.getValue();
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.joystickFrameCnt === -1) {
|
|
|
|
+ this.joystickFrameCnt = this.frameCnt.getValue();
|
|
|
|
+ // }
|
|
// 人物数据去掉mediaSrc以免前误会
|
|
// 人物数据去掉mediaSrc以免前误会
|
|
joystickRes?.mediaSrc && delete joystickRes.mediaSrc;
|
|
joystickRes?.mediaSrc && delete joystickRes.mediaSrc;
|
|
|
|
|