If I open http://chatphrase.com/test/ in two browser tabs (either on the same machine or different machines - I'm testing using Google Chrome for both) and enter the same word in both, the two tabs seem to perform the ICE / STUN / SDP handshaking successfully and connect to each other, but the remote video element, despite having the remote stream attached, remains blank (and hovering over the element causes it to shrink to 2x2).
https://apprtc.appspot.com/ works fine. What is my site doing wrong?
This seems to be an exclusively client-based issue, but for what it's worth, my server-side code is at https://github.com/stuartpb/chatphrase/blob/master/app.js .
When the ICE candidates come in, they're not being added to the peer connection:
https://github.com/stuartpb/chatphrase/blob/99ce85330594026d70d5f9441cc06be6c4904b7e/static/chatphrase.js#L44 https://github.com/stuartpb/chatphrase/blob/99ce85330594026d70d5f9441cc06be6c4904b7e/static/chatphrase.js#L76 https://github.com/stuartpb/chatphrase/blob/99ce85330594026d70d5f9441cc06be6c4904b7e/static/chatphrase.js#L168
addIce(resbody.ice);
should be addIce(peercon,resbody.ice);
.
(I wrote this function somewhere around 4AM, right around the time that you start forgetting the signatures of functions you just wrote.)
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加