Closed nadeemarain closed 10 years ago
Sorry for the slow reply... I think the id variable is needed there to look up channel in the array rtc.dataChannels
Generally, I think all the OTR related code is wrapped in a if statement around the global variable encryption_type Thanks, Sam
Closing for now. Feel free to reopen. -Sam
I tried this thing and it says signature is not defined and then I found this function you have defined...
send: function(connection, message) { var channel = rtc.dataChannels[connection]; if (rtc.connection_ok_to_send[connection]) { if (encryption_type != "NONE") { otr_send_msg(connection,message); } else { channel.send(message); } } else { console.log("unable to send message to " + connection); } },
I am not using any encryption, so I am using simple channel.send (rtcChannel.send in my case). So when I remove id from the dataChannelChat.send(id, event.target.result), I get the following error:
Uncaught NetworkError: Failed to execute 'send' on 'RTCDataChannel': Could not send data controllers.js:1029 reader.onload
Can you tell me what is the issue?