From 25e22e765d196ad8fbf84b4754a9c196dec79e1a Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 14:44:10 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=84=A4=ED=8A=B8=EC=9B=8C=ED=81=AC=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=EC=97=90=20=EB=94=B0=EB=9D=BC=20=ED=95=B4?= =?UTF-8?q?=EC=83=81=EB=8F=84=EB=A7=8C=20=EB=B3=80=EA=B2=BD=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/media/src/mediasoup/mediasoup.service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/media/src/mediasoup/mediasoup.service.ts b/apps/media/src/mediasoup/mediasoup.service.ts index 9cfcab4f..b80a67f9 100644 --- a/apps/media/src/mediasoup/mediasoup.service.ts +++ b/apps/media/src/mediasoup/mediasoup.service.ts @@ -311,10 +311,9 @@ export class MediasoupService implements OnModuleInit { const consumer = peer.getConsumer(consumerId); - consumer?.setPreferredLayers({ - spatialLayer: networkQuality, - temporalLayer: networkQuality, - }); + if (!consumer || consumer.closed || consumer.paused) return; + + consumer?.setPreferredLayers({ spatialLayer: networkQuality }); }); }