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)}')