From c72050bf4a48b8567584f6dc2a2b9a04a53fc62b Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 12:38:35 +0900 Subject: [PATCH 01/12] =?UTF-8?q?fix:=20MediasoupConfig=EC=97=90=20H264=20?= =?UTF-8?q?=EB=B9=84=EB=94=94=EC=98=A4=20=EC=BD=94=EB=8D=B1=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20VP8=20=EC=BD=94=EB=8D=B1=EC=9D=98=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=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/config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/media/src/mediasoup/config.ts b/apps/media/src/mediasoup/config.ts index 7371a5e8..0d27a8f5 100644 --- a/apps/media/src/mediasoup/config.ts +++ b/apps/media/src/mediasoup/config.ts @@ -29,10 +29,22 @@ export class MediasoupConfig { useinbandfec: 1, }, }, + { + kind: 'video', + mimeType: 'video/H264', + clockRate: 90000, + parameters: { + 'packetization-mode': 1, + 'profile-level-id': '42e01f', + }, + }, { kind: 'video', mimeType: 'video/VP8', clockRate: 90000, + parameters: { + 'x-google-start-bitrate': 10000, + }, }, ] as RtpCodecCapability[], }; From 461a53f49176728ad8989f13577813b3e5332201 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 12:38:53 +0900 Subject: [PATCH 02/12] =?UTF-8?q?fix:=20=ED=81=B4=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EC=96=B8=ED=8A=B8=20=EC=B8=A1=20=EC=BD=94=EB=8D=B1=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=EC=99=80=20=EC=84=9C=EB=B2=84=EC=B8=A1=20=EC=BD=94?= =?UTF-8?q?=EB=8D=B1=20=EC=A0=95=EB=B3=B4=EA=B0=80=20=EC=9D=BC=EC=B9=98?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EC=95=84=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=B2=84=EA=B7=B8=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 | 16 ++++++++++------ packages/mediasoup/src/server/index.ts | 11 ----------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/apps/media/src/mediasoup/mediasoup.service.ts b/apps/media/src/mediasoup/mediasoup.service.ts index d389c86b..9cfcab4f 100644 --- a/apps/media/src/mediasoup/mediasoup.service.ts +++ b/apps/media/src/mediasoup/mediasoup.service.ts @@ -113,10 +113,6 @@ export class MediasoupService implements OnModuleInit { const peer = room.getPeer(socketId); const transport = peer.getTransport(transportId); - if (appData.mediaTypes !== 'audio') { - rtpParameters.encodings = server.PRODUCER_OPTIONS.encodings; - } - const producer = await transport.produce({ kind, rtpParameters, @@ -269,6 +265,8 @@ export class MediasoupService implements OnModuleInit { const peer = room.peers.get(socketId); const consumer = peer.getConsumer(consumerId); + if (!consumer) return; + consumer?.pause(); return { paused: true, consumerId, producerId: consumer.producerId }; @@ -279,6 +277,8 @@ export class MediasoupService implements OnModuleInit { const peer = room.peers.get(socketId); const consumer = peer.getConsumer(consumerId); + if (!consumer) return; + if (consumer?.producerPaused) { return { paused: true, consumerId, producerId: consumer.producerId }; } @@ -289,11 +289,15 @@ export class MediasoupService implements OnModuleInit { } pauseConsumers(socketId: string, roomId: string, consumerIds: string[]) { - return consumerIds.map((consumerId) => this.pauseConsumer(socketId, consumerId, roomId)); + return consumerIds + .map((consumerId) => this.pauseConsumer(socketId, consumerId, roomId)) + .filter(Boolean); } resumeConsumers(socketId: string, roomId: string, consumerIds: string[]) { - return consumerIds.map((consumerId) => this.resumeConsumer(socketId, consumerId, roomId)); + return consumerIds + .map((consumerId) => this.resumeConsumer(socketId, consumerId, roomId)) + .filter(Boolean); } changeConsumerPreferredLayers( diff --git a/packages/mediasoup/src/server/index.ts b/packages/mediasoup/src/server/index.ts index 43402b54..6e3afd84 100644 --- a/packages/mediasoup/src/server/index.ts +++ b/packages/mediasoup/src/server/index.ts @@ -77,14 +77,3 @@ export interface ChangeConsumerPreferredLayersDto { roomId: string; networkQualities: NetworkQualityDto[]; } - -export const PRODUCER_OPTIONS = { - encodings: [ - { rid: 'r0', maxBitrate: 50000, scalabilityMode: 'S1T3', active: true, dtx: false }, - { rid: 'r1', maxBitrate: 150000, scalabilityMode: 'S1T3', active: true, dtx: false }, - { rid: 'r2', maxBitrate: 500000, scalabilityMode: 'S1T3', active: true, dtx: false }, - ], - codecOptions: { - videoGoogleStartBitrate: 1000, - }, -}; From 715c98ac3cd634c3cc2b293d0f1a00194ce78b57 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 12:39:40 +0900 Subject: [PATCH 03/12] =?UTF-8?q?fix:=20consumer=EA=B0=80=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=EB=90=9C=20=EA=B2=BD=EC=9A=B0=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=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/web/src/hooks/mediasoup/useRemoteStream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/hooks/mediasoup/useRemoteStream.ts b/apps/web/src/hooks/mediasoup/useRemoteStream.ts index fbf3e9b7..a1f15a4b 100644 --- a/apps/web/src/hooks/mediasoup/useRemoteStream.ts +++ b/apps/web/src/hooks/mediasoup/useRemoteStream.ts @@ -249,7 +249,7 @@ const useRemoteStream = () => { const newStreams = [...prevStreams]; const stream = newStreams.find((stream) => stream.consumer?.producerId === producerId); - if (!stream) { + if (!stream || stream.consumer?.closed) { return prevStreams; } @@ -280,7 +280,7 @@ const useRemoteStream = () => { const newStreams = [...prevStreams]; const stream = newStreams.find((stream) => stream.consumer?.producerId === producerId); - if (!stream) { + if (!stream || stream.consumer?.closed) { return prevStreams; } From b8d96162b3eb470dc67949e5be4a06f6431910a0 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 12:40:10 +0900 Subject: [PATCH 04/12] =?UTF-8?q?fix:=20=EB=84=A4=ED=8A=B8=EC=9B=8C?= =?UTF-8?q?=ED=81=AC=20=ED=92=88=EC=A7=88=20=EC=B2=B4=ED=81=AC=20=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=EA=B0=80=20=EC=97=86=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/hooks/mediasoup/useNetworkMonitor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts b/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts index 7a842a01..5dcde660 100644 --- a/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts +++ b/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts @@ -13,7 +13,7 @@ const QUALITY_LEVEL = { }, poor: { quality: 0, - options: { packetLossRate: 5, jitter: 30, frameDropRate: 10, averageRTT: 300, nackCount: 50 }, + options: { packetLossRate: 10, jitter: 30, frameDropRate: 10, averageRTT: 300, nackCount: 50 }, }, } as const; @@ -144,6 +144,8 @@ const useNetworkMonitor = ({ streams }: UseNetworkMonitorProps) => { const networkQualities = await checkNetworkQuality(notPausedStreams); + if (!networkQualities || !networkQualities.length) return; + socket.emit(SOCKET_EVENTS.changeConsumerPreferredLayers, { roomId: ticleId, networkQualities, From bdf17ab6bb8fdab454c3dcd77bc9e2023e2c01ea Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 12:40:32 +0900 Subject: [PATCH 05/12] =?UTF-8?q?fix:=20=EB=B9=84=EB=94=94=EC=98=A4=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EB=93=80=EC=84=9C=20=EC=98=B5=EC=85=98?= =?UTF-8?q?=EC=9D=98=20=EC=9D=B8=EC=BD=94=EB=94=A9=20=EB=B0=8F=20=EC=BD=94?= =?UTF-8?q?=EB=8D=B1=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mediasoup/src/client/index.ts | 37 +++++++++++++++----------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/packages/mediasoup/src/client/index.ts b/packages/mediasoup/src/client/index.ts index 29c8cb40..a2622df1 100644 --- a/packages/mediasoup/src/client/index.ts +++ b/packages/mediasoup/src/client/index.ts @@ -65,25 +65,32 @@ export interface ResumeConsumersRes { paused: boolean; } -export const PRODUCER_OPTIONS: ProducerOptions = { - encodings: [ - { rid: 'r0', maxBitrate: 50000, scalabilityMode: 'S1T3' }, - { rid: 'r1', maxBitrate: 150000, scalabilityMode: 'S1T3' }, - { rid: 'r2', maxBitrate: 500000, scalabilityMode: 'S1T3' }, - ], - codecOptions: { - videoGoogleStartBitrate: 1000, - }, -}; - export const VIDEO_PRODUCER_OPTIONS: ProducerOptions = { encodings: [ - { rid: 'r0', maxBitrate: 50000, scalabilityMode: 'S1T3' }, - { rid: 'r1', maxBitrate: 150000, scalabilityMode: 'S1T3' }, - { rid: 'r2', maxBitrate: 500000, scalabilityMode: 'S1T3' }, + { + rid: 'r0', + maxBitrate: 750000, + scaleResolutionDownBy: 2, + scalabilityMode: 'S2T3', + maxFramerate: 30, + }, + { + rid: 'r1', + maxBitrate: 2000000, + scaleResolutionDownBy: 1.5, + scalabilityMode: 'S2T3', + maxFramerate: 30, + }, + { + rid: 'r2', + maxBitrate: 3000000, + scaleResolutionDownBy: 1, + scalabilityMode: 'S2T3', + maxFramerate: 30, + }, ], codecOptions: { - videoGoogleStartBitrate: 1000, + videoGoogleStartBitrate: 100000, opusDtx: true, }, }; From a86c8bd84e108a1273861f46f34604e7dc0e9df1 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 12:40:57 +0900 Subject: [PATCH 06/12] =?UTF-8?q?docs:=20README.md=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index af8d7e9a..54abff5e 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ ## 프론트엔드 +

🔗 네트워크 상태에 따른 스트림 품질 변경

🔗 스트리밍을 최적화 해보자

> 최대한 많은 유저가 들어와 화상 서비스를 이용하는 것을 목적으로 하는 만큼 소켓 이벤트, 기존 할당된 자원에 대한 관리를 진행하며 최대한 적은 자원으로 나은 환경을 제공하기 위해 최적화를 진행하였습니다. From a706740c2c400541e8cf4012991f13438b50a19d Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 13:58:44 +0900 Subject: [PATCH 07/12] =?UTF-8?q?fix:=20=EB=B9=84=EB=94=94=EC=98=A4=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EB=93=80=EC=84=9C=20=EC=98=B5=EC=85=98?= =?UTF-8?q?=EC=9D=98=20=EC=B5=9C=EB=8C=80=20=EB=B9=84=ED=8A=B8=20=EC=A0=84?= =?UTF-8?q?=EC=86=A1=EB=A5=A0=20=EC=A1=B0=EC=A0=95=20=EB=B0=8F=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=9C=20scalabilityMode=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mediasoup/src/client/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/mediasoup/src/client/index.ts b/packages/mediasoup/src/client/index.ts index a2622df1..cdeda50b 100644 --- a/packages/mediasoup/src/client/index.ts +++ b/packages/mediasoup/src/client/index.ts @@ -71,21 +71,18 @@ export const VIDEO_PRODUCER_OPTIONS: ProducerOptions = { rid: 'r0', maxBitrate: 750000, scaleResolutionDownBy: 2, - scalabilityMode: 'S2T3', maxFramerate: 30, }, { rid: 'r1', maxBitrate: 2000000, scaleResolutionDownBy: 1.5, - scalabilityMode: 'S2T3', maxFramerate: 30, }, { rid: 'r2', - maxBitrate: 3000000, + maxBitrate: 3500000, scaleResolutionDownBy: 1, - scalabilityMode: 'S2T3', maxFramerate: 30, }, ], From daba3502265c29f2b7a13753f5c46cd8e0d10074 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 14:25:58 +0900 Subject: [PATCH 08/12] =?UTF-8?q?fix:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20scaleResolutionDownBy=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mediasoup/src/client/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/mediasoup/src/client/index.ts b/packages/mediasoup/src/client/index.ts index cdeda50b..3b748c97 100644 --- a/packages/mediasoup/src/client/index.ts +++ b/packages/mediasoup/src/client/index.ts @@ -70,19 +70,16 @@ export const VIDEO_PRODUCER_OPTIONS: ProducerOptions = { { rid: 'r0', maxBitrate: 750000, - scaleResolutionDownBy: 2, maxFramerate: 30, }, { rid: 'r1', maxBitrate: 2000000, - scaleResolutionDownBy: 1.5, maxFramerate: 30, }, { rid: 'r2', maxBitrate: 3500000, - scaleResolutionDownBy: 1, maxFramerate: 30, }, ], From 81a43aabfa958113e5aa127f7491ac26b4279817 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 14:26:18 +0900 Subject: [PATCH 09/12] =?UTF-8?q?fix:=20=ED=95=A8=EC=88=98=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20consumer=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=ED=99=95=EC=9D=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/src/hooks/mediasoup/useNetworkMonitor.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts b/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts index 5dcde660..acf5acb7 100644 --- a/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts +++ b/apps/web/src/hooks/mediasoup/useNetworkMonitor.ts @@ -89,12 +89,12 @@ const useNetworkMonitor = ({ streams }: UseNetworkMonitorProps) => { [] ); - const checkNetworkQuality = async (streams: client.RemoteStream[]) => { + const checkNetworkQualities = async (streams: client.RemoteStream[]) => { const networkQualities = await Promise.all( streams.map(async (data) => { const { consumer } = data; - if (!consumer) return; + if (!consumer || consumer.closed || consumer.paused) return; let networkQuality = 2; // 0: poor, 1: average, 2: good @@ -131,7 +131,15 @@ const useNetworkMonitor = ({ streams }: UseNetworkMonitorProps) => { }) ); - return networkQualities; + return networkQualities.filter(Boolean).reduce( + (acc, cur) => { + if (!cur) return acc; + if (acc.some((data) => data.consumerId === cur.consumerId)) return acc; + + return [...acc, cur]; + }, + [] as { consumerId: string; networkQuality: number }[] + ); }; useEffect(() => { @@ -142,7 +150,7 @@ const useNetworkMonitor = ({ streams }: UseNetworkMonitorProps) => { const interval = setInterval(async () => { const notPausedStreams = getNotPausedStreams(streams); - const networkQualities = await checkNetworkQuality(notPausedStreams); + const networkQualities = await checkNetworkQualities(notPausedStreams); if (!networkQualities || !networkQualities.length) return; From 25e22e765d196ad8fbf84b4754a9c196dec79e1a Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 14:44:10 +0900 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20=EB=84=A4=ED=8A=B8=EC=9B=8C?= =?UTF-8?q?=ED=81=AC=20=EC=83=81=ED=83=9C=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?=ED=95=B4=EC=83=81=EB=8F=84=EB=A7=8C=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=ED=95=98=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 }); }); } From c654f4b51d194512348f5522f09a5f7a6af2d5d0 Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 15:41:42 +0900 Subject: [PATCH 11/12] =?UTF-8?q?fix:=20=EB=AF=B8=EB=94=94=EC=96=B4=20?= =?UTF-8?q?=EC=9E=A5=EC=B9=98=20=ED=95=84=ED=84=B0=EB=A7=81=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EA=B0=9C=EC=84=A0=20=EB=B0=8F=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=EB=90=9C=20=EC=9E=A5=EC=B9=98=20ID=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=20=EC=A1=B0=EA=B1=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/hooks/useMediaTracks.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/web/src/hooks/useMediaTracks.ts b/apps/web/src/hooks/useMediaTracks.ts index 41c7787c..187516e2 100644 --- a/apps/web/src/hooks/useMediaTracks.ts +++ b/apps/web/src/hooks/useMediaTracks.ts @@ -12,7 +12,7 @@ const DEFAULT_LOCAL_STREAM = { const getMediaDevices = (kind: MediaDeviceKind, devices: MediaDeviceInfo[]) => { return devices - .filter((device) => device.kind === kind && device.deviceId && device.deviceId !== 'default') + .filter((device) => device.kind === kind && device.deviceId) .map((device) => ({ label: device.label, value: device.deviceId })); }; @@ -116,16 +116,22 @@ const useMediaTracks = () => { setAudioDevices(audioInputs); setAudioOutputDevices(audioOutputs); - if (videoInputs[0]) setSelectedVideoDeviceId(videoInputs[0].value); - if (audioInputs[0]) setSelectedAudioDeviceId(audioInputs[0].value); - if (audioOutputs[0]) setSelectedAudioOutputDeviceId(audioOutputs[0].value); + if (videoInputs[0] && !selectedVideoDeviceId) { + setSelectedVideoDeviceId(videoInputs[0].value); + } + if (audioInputs[0] && !selectedAudioDeviceId) { + setSelectedAudioDeviceId(audioInputs[0].value); + } + if (audioOutputs[0] && !selectedAudioOutputDeviceId) { + setSelectedAudioOutputDeviceId(audioOutputs[0].value); + } } catch (_) { toast('미디어 정보를 가져올 수 없습니다.'); } }; fetchMediaDevices(); - }, []); + }, [video, audio]); return { video, From b66ff0667f99f6401f0ed6304c69c0563051413c Mon Sep 17 00:00:00 2001 From: seoko97 Date: Thu, 5 Dec 2024 15:41:51 +0900 Subject: [PATCH 12/12] =?UTF-8?q?fix:=20consumer=EC=9D=98=20=EC=84=A0?= =?UTF-8?q?=ED=98=B8=20=EB=A0=88=EC=9D=B4=EC=96=B4=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=97=90=EC=84=9C=20null=20=EC=A1=B0=EA=B1=B4=EB=B6=80=20?= =?UTF-8?q?=EC=97=B0=EC=82=B0=EC=9E=90=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/media/src/mediasoup/mediasoup.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/media/src/mediasoup/mediasoup.service.ts b/apps/media/src/mediasoup/mediasoup.service.ts index b80a67f9..6770fc49 100644 --- a/apps/media/src/mediasoup/mediasoup.service.ts +++ b/apps/media/src/mediasoup/mediasoup.service.ts @@ -313,7 +313,7 @@ export class MediasoupService implements OnModuleInit { if (!consumer || consumer.closed || consumer.paused) return; - consumer?.setPreferredLayers({ spatialLayer: networkQuality }); + consumer.setPreferredLayers({ spatialLayer: networkQuality }); }); }