|
|
@@ -300,7 +300,15 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
JSON.stringify(stream),
|
|
|
);
|
|
|
if (!this.stopRotated) {
|
|
|
- await this.seqExehandleRotateStream(stream);
|
|
|
+ console.log('bufferedAmount', this.channel.bufferedAmount());
|
|
|
+ if (this.channel.bufferedAmount() <= 16000) {
|
|
|
+ await this.seqExehandleRotateStream(stream);
|
|
|
+ } else {
|
|
|
+ console.error(
|
|
|
+ '当前存在网络Jiiter--放弃',
|
|
|
+ JSON.stringify(stream),
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
// this.roQueue.next(stream);
|
|
|
} else {
|
|
|
@@ -1003,7 +1011,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
// 保证每一段都是序列动作的前面队列是空的
|
|
|
// this.moveQueue.clean();
|
|
|
|
|
|
- seqs.forEach((frame: StreamReplyType) => {
|
|
|
+ seqs.forEach(async (frame: StreamReplyType) => {
|
|
|
const mediaSrc = frame.mediaSrc;
|
|
|
const src = mediaSrc.split('?')[0];
|
|
|
|
|
|
@@ -1019,7 +1027,11 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
mType: type,
|
|
|
};
|
|
|
// this.moveQueue.next(stream);
|
|
|
- this.handleMoveSteam(stream);
|
|
|
+ if (this.channel.bufferedAmount() <= 16000) {
|
|
|
+ await this.handleMoveSteam(stream);
|
|
|
+ } else {
|
|
|
+ console.error('当前存在网络Jiiter--放弃', JSON.stringify(stream));
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|