async sendDescriptionHandler({ target, description }) { const { webRTCManager, socket } = this; await webRTCManager.setRemoteDescription(target, description); if (description.type === DESCRIPTION_TYPE.ANSWER) return; const answer = await webRTCManager.createAnswerDescription(target); await webRTCManager.setLocalDescription(target, answer); socket.emit(EVENTS.SEND_DESCRIPTION, { target, description: answer }); }
async sendDescriptionHandler({ target, description }) { const { webRTCManager, socket } = this; await webRTCManager.setRemoteDescription(target, description); if (description.type === DESCRIPTION_TYPE.ANSWER) return; const answer = await webRTCManager.createAnswerDescription(target); await webRTCManager.setLocalDescription(target, answer); socket.emit(EVENTS.SEND_DESCRIPTION, { target, description: answer }); }