-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bidirectional Streams? #9
Comments
That should definitely not be happening. Do you see the same behavior on http://cdn.peerjs.com/demo/chat.html? |
Yeah, It's the same for me. Here are the exact steps I'm taking: Peer 1: peer.connect('Peer 2 ID'); |
I've seen this before--it happens when one peer does not receive all of the ice candidates of the other. But as Eric said, this should not be happening anymore. Could you paste the logs from the console on both peers when trying to connect on http://cdn.peerjs.com/demo/chat.html? |
Sure! Peer 1:
Peer 2:
|
Awesome, thanks :). I will see if I can reproduce it. You're on latest Canary, using two tabs? |
Yup! On Thu, Feb 14, 2013 at 4:26 PM, Michelle Bu notifications@github.com
|
I wound up just treating it like readonly writeonly streams and opening a connection back on a "connection" event in some ways this might be considered a feature rather than a bug? Although I can't think of a good use case off the top of my head. |
That's really weird. I still haven't been able to reproduce this single directional connection bug. Any more details on OS, exact Chrome build, etc? The fact that the 'Data channel connection success' message logs means that the DataChannel is in the open state, at which point the transfer of data is no longer in PeerJS's control. That being said, you guys should try out some of the other demos, like 'http://sharefest.peer5.com/' that DON'T use PeerJS to see if you have similar issues. Edit: Actually there's very few 2-way DataChannel demos that would actually test this kind of functionality, but it seems that similar one-way problems are happening with WebRTC media streams as well, so we'll just keep up to date with commit logs and see what happens. |
@whytheplatypus We just tried it and it works! Cool stuff. I also cloned it myself and took out the extra connection when a 'connection' event is fired. This also worked for me, so this is still a pretty weird bug. |
Little more info on the bug:
it looks like this has something to do with glad you liked the chat thing :P this stuff is so much fun to work with |
@whytheplatypus Does the 'open' event on that connection object ever fire? What is It seems to be happening to only a handful of people; really wish I could repro. |
Could it be due to firewalls? |
Alright well it looks like there's no bug after all.. at least for me.. I just wasn't listening for the data event in the right place. There's no new 'connection' event on the peer that called peer.connect(id) so it wasn't listening for any 'data' events. adding conn.on('data', function(data){
//code
}); after var conn = peer.connect(id); was all that I needed... |
Glad to hear it :) |
I believe this is just due to firewalls and is not a bug in PeerJS, so I'm closing this for now. |
I see this is a really old issue, however this problem is occuring for me on the official chat demo http://cdn.peerjs.com/demo/chat.html Chromium I have a standard NAT setup, and can get bidirectional data working just fine with WebRTC itself. Edit: |
When peer 1 connects with peer 2, both update their peer.connections object, but I was only able to get peer 1 to actually send peer 2 data. Peer 2 would not send data to peer 1.
After manually connecting peer 2 to peer 1, the situation reverses: peer 1 cannot send messages to peer 2, but peer 2 can send messages to peer 1.
These streams are supposed to be bidirectional, right?
The text was updated successfully, but these errors were encountered: