Skip to content

Commit 4a08e99

Browse files
author
Fedir Zadniprovskyi
committed
fix: webrtc codecs filtering not applied due to missing control statement
1 parent a7626a9 commit 4a08e99

File tree

1 file changed

+2
-0
lines changed
  • src/speaches/routers/realtime

1 file changed

+2
-0
lines changed

src/speaches/routers/realtime/rtc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ async def realtime_webrtc(
293293
"icegatheringstatechange",
294294
lambda: logger.info(f"ICE gathering state changed to {pc.iceGatheringState}"),
295295
)
296+
# NOTE: will never be called according to https://github.com/aiortc/aiortc/issues/1344
296297
pc.on(
297298
"icecandidate",
298299
lambda *args, **kwargs: logger.info(f"ICE candidate: {args}, {kwargs}. {pc.iceGatheringState}"),
@@ -318,6 +319,7 @@ async def realtime_webrtc(
318319
for codec in media.rtp.codecs:
319320
if codec.name != "opus":
320321
logger.info(f"Removing codec: {codec}")
322+
continue
321323
filtered_codecs.append(codec)
322324
if len(filtered_codecs) == 0:
323325
logger.error("No appropriate codecs found")

0 commit comments

Comments
 (0)