|
@@ -25,7 +25,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
private rotateService: RotateService,
|
|
private rotateService: RotateService,
|
|
private moveService: MoveService,
|
|
private moveService: MoveService,
|
|
private getRouterService: GetRouterService, // @InjectQueue('rotate') private rotateQueue: Queue, // @InjectQueue('walking') private walkingQueue: Queue,
|
|
private getRouterService: GetRouterService, // @InjectQueue('rotate') private rotateQueue: Queue, // @InjectQueue('walking') private walkingQueue: Queue,
|
|
- ) {}
|
|
|
|
|
|
+ ) { }
|
|
@Client(grpcClientOptions) private readonly client: ClientGrpc;
|
|
@Client(grpcClientOptions) private readonly client: ClientGrpc;
|
|
|
|
|
|
public _frameInteval: NodeJS.Timeout;
|
|
public _frameInteval: NodeJS.Timeout;
|
|
@@ -340,8 +340,8 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
if (seqs?.length) {
|
|
if (seqs?.length) {
|
|
const lastSeq = rotateCamData?.length
|
|
const lastSeq = rotateCamData?.length
|
|
? (Array.from(rotateCamData).concat(
|
|
? (Array.from(rotateCamData).concat(
|
|
- seqs,
|
|
|
|
- ) as any as StreamReplyType[])
|
|
|
|
|
|
+ seqs,
|
|
|
|
+ ) as any as StreamReplyType[])
|
|
: seqs;
|
|
: seqs;
|
|
console.log('walking --总序列--seqs', seqs.length);
|
|
console.log('walking --总序列--seqs', seqs.length);
|
|
this.handleSeqMoving(lastSeq);
|
|
this.handleSeqMoving(lastSeq);
|
|
@@ -389,8 +389,8 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
console.log('joystickRes-seqs', seqs.length);
|
|
console.log('joystickRes-seqs', seqs.length);
|
|
const lastSeq = rotateCamData?.length
|
|
const lastSeq = rotateCamData?.length
|
|
? (Array.from(rotateCamData).concat(
|
|
? (Array.from(rotateCamData).concat(
|
|
- seqs,
|
|
|
|
- ) as any as StreamReplyType[])
|
|
|
|
|
|
+ seqs,
|
|
|
|
+ ) as any as StreamReplyType[])
|
|
: seqs;
|
|
: seqs;
|
|
this.handleSeqMoving(lastSeq);
|
|
this.handleSeqMoving(lastSeq);
|
|
} else {
|
|
} else {
|
|
@@ -593,15 +593,14 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
async handleIframeRequest() {
|
|
async handleIframeRequest() {
|
|
//TODO Iframe 最终传什么?
|
|
//TODO Iframe 最终传什么?
|
|
|
|
|
|
- this.requestIFrameQueue.next(this.streamService.lastStreamFrame);
|
|
|
|
|
|
+ this.requestIFrameQueue.next(this.streamService.lastStreamFrame.getValue());
|
|
|
|
|
|
if (!this.requestIFrameQueueSub) {
|
|
if (!this.requestIFrameQueueSub) {
|
|
this.requestIFrameQueueSub = this.requestIFrameQueue.subscribe(
|
|
this.requestIFrameQueueSub = this.requestIFrameQueue.subscribe(
|
|
(frameData: StreamFrameType) => {
|
|
(frameData: StreamFrameType) => {
|
|
const nextFrame = this.frameCnt.getValue() + 1;
|
|
const nextFrame = this.frameCnt.getValue() + 1;
|
|
- this.logger.warn('lostIframe', nextFrame, frameData);
|
|
|
|
|
|
+ this.logger.warn('lostIframe', nextFrame, JSON.stringify(frameData));
|
|
frameData.frame = nextFrame;
|
|
frameData.frame = nextFrame;
|
|
- console.log('frameData', frameData);
|
|
|
|
this.streamService.pushFrameToSteam(frameData);
|
|
this.streamService.pushFrameToSteam(frameData);
|
|
this.frameCnt.next(nextFrame);
|
|
this.frameCnt.next(nextFrame);
|
|
this.resumeStream();
|
|
this.resumeStream();
|
|
@@ -696,7 +695,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
delete redisData.mediaSrc;
|
|
delete redisData.mediaSrc;
|
|
this.logger.log(
|
|
this.logger.log(
|
|
`user:${this.user_id}:first render stream` +
|
|
`user:${this.user_id}:first render stream` +
|
|
- JSON.stringify({ path: clipPath, meta: redisData }),
|
|
|
|
|
|
+ JSON.stringify({ path: clipPath, meta: redisData }),
|
|
);
|
|
);
|
|
const status = await this.pushFirstRender(
|
|
const status = await this.pushFirstRender(
|
|
clipPath,
|
|
clipPath,
|