I run my webrtc code with chrome 21.
If I open two tabs in the same chrome, and then open page with webrtc code inside.
One tab is for sending video stream; one tab is for receiving video stream
It works fine.
However, If I open page with two Incognito mode or two different chrome browser,
I can get the sdp and candidate information correctly. It seems that video can decode the information.
In remote video, I can see only 
Besides, it seems crash. I tried to click “close chrome” but useless.
Does anyone have any similar problem?
While testing WebRTC, I found that such condition occurs when we call
peerConnection.addStream(…)in the wrong place —-You must remember that ordering highly matters in WebRTC!
Updated at: 6:36 PM – Thursday, July 17, 2014 (UTC)
Blank video occurs in following cases:
OfferToReceiveVideo:trueHTMLMediaElement.HAVE_CURRENT_DATAormediaElement.pausedormediaElement.currentTimewhilst it is android which has known issues regarding these properties.Solutions?
OfferToReceiveAudio/OfferToReceiveVideoare used according to stream(s) attached.Ordering of the code is, kind of rare-issues, nowadays, because we all know that
addStreamshould be called before creating offer or answer; even for renegotiated sessions.Try to use
chrome://webrtc-internalsand Firefox’sabout:configto see what’s happening inside these browsers; and always use console-logs foronIceConnectionStateChangeevent which helps you check if ICE-Agentfailedin the ICE-connectivity check process or…Sometimes setting-remote-sdp for offerer too earlier, causes exceptions. Always use
onSdpErrorboth forcreateOffer/createAnswerandsetLocalDescription/setRemoteDescriptione.g.peer.setRemoteDescription(remoteSDP, onSdpSuccess, onSdpFailure);
A few demos resources:
and https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html