From c5e40621c888ad2d307a301c5182b936757f6521 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 4 Sep 2024 15:14:37 +0800 Subject: [PATCH] bugfix --- rtcllm/rtc.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rtcllm/rtc.py b/rtcllm/rtc.py index 4b161be..e8cd1ff 100644 --- a/rtcllm/rtc.py +++ b/rtcllm/rtc.py @@ -83,16 +83,18 @@ class RTCLLM: })) async def on_icecandidate(self, pc, to, candidate): - print('******************** on_icecandidate()', self, pc, candidate, candidate.__class__.__name__) if candidate: + candi = { + 'candidate':'candidate:' + candidate.to_sdp(), + 'sdpMid':candidate.sdpMid, + 'type': candidate.type + } + print('***********on_icecandidate()', candi) await self.ws_send(json.dumps({ "type":"iceCandidate", "to":to, - "candidate":{ - 'candidate':candidate.to_sdp(), - 'sdpMid':candidate.sdpMid, - 'type': candidate.type} - })) + "candidate":candi + }) async def save_onlineList(self, data): print(f'{self}, {type(self)}')