gemercheung 3 years ago
parent
commit
0011aa41ea
2 changed files with 3 additions and 4 deletions
  1. 1 1
      src/meta.gateway.ts
  2. 2 3
      src/scene/scene.service.ts

+ 1 - 1
src/meta.gateway.ts

@@ -100,7 +100,7 @@ export class MetaGateway
       iceServers: stun_server,
       // enableIceTcp: true,
       // maxMessageSize: 662144,
-      mtu: 1500,
+      mtu: 1200,
     });
 
     this.peer.onLocalDescription((sdp, type) => {

+ 2 - 3
src/scene/scene.service.ts

@@ -1174,11 +1174,10 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
     // this.startStream();
     // this.handleStream();
     this.channel.onBufferedAmountLow(() => {
-      console.error('onBufferedAmountLow');
-
+      console.error('onBufferedAmountLow', this.channel.bufferedAmount());
       //64k->65536 128k->131072
       this.channel.setBufferedAmountLowThreshold(65536);
-      this.logger.error('onBufferedAmountLow', this.channel.maxMessageSize());
+      this.logger.error('onBufferedAmountLow', this.channel.bufferedAmount());
     });
   }