This commit is contained in:
yumoqing 2024-09-03 16:27:25 +08:00
parent 3408f3ff82
commit dd16852148

View File

@ -159,7 +159,7 @@ class RTCLLM:
'answer':{'type':pc.localDescription.type, 'sdp':pc.localDescription.sdp}, 'answer':{'type':pc.localDescription.type, 'sdp':pc.localDescription.sdp},
'to':data['from'] 'to':data['from']
})) }))
"""
offer = await pc.createOffer() offer = await pc.createOffer()
await pc.setLocalDescription(offer) await pc.setLocalDescription(offer)
await self.ws_send(json.dumps({ await self.ws_send(json.dumps({
@ -167,6 +167,7 @@ class RTCLLM:
'offer': {'type':pc.localDescription.type, 'sdp':pc.localDescription.sdp}, 'offer': {'type':pc.localDescription.type, 'sdp':pc.localDescription.sdp},
'to':data['from'] 'to':data['from']
})) }))
"""
async def accept_answer(self, data): async def accept_answer(self, data):
pc = self.get_pc(data) pc = self.get_pc(data)