WebRTC-Experiment
WebRTC-Experiment copied to clipboard
custom socket
Hi, I am using RTCMulticonnection opened socket for chat service while audio conferencing, like when user join in room and connection stablished via signaling server, I add few socket function to add chat service in RTCMulticonnection file, will it affect connection or will it make connection to lose in between.
` connection.sendMessage = function(messagePacket, roomid, callback) {
connection.socket.emit('message', messagePacket, roomid);
connection.socket.on('send-message', () => {
callback();
});
}
connection.onReceiveMessage = function(callabck) {
connection.socket.on('receive-message',(messagePacket) => {
callabck(messagePacket);
});
}
`
@muaz-khan