Inspect if webrtc connection is successfully established - webrtc

I've created a webrtc app on localhost. Because the input video and output video is coming from the same camera, I can't visually determine if the webrtc connection is indeed working correctly.
I went to chrome://webrtc-internals/, to inspect the details, but I am not sure which one tells me if connection is working. Is there some flag that I can check, perhaps on RTCPeerConnection object or in webrtc-internals, to determine if the connection is indeed successful?

If the connection is established successfully, then you will be seeing this in chrome://webrtc-internals/
24/07/2019, 16:54:53
signalingstatechange
stable
and
24/07/2019, 16:55:09
iceconnectionstatechange
completed

Related

DOMException: Could not start video source

I am trying to run the webRTC code which i have mentioned below, it is working fine when i am connecting with two devices using same network. But it is not connecting when the devices are in different networks and i am getting DOM Exception. please help me to fix it.
please refer the below link for your understanding
It seems like you need a TURN-Server. (CoTurn for example). The traffic will be relayed if a direct connection is not possible (NAT, Firewall,...)

how do I get libnice to stop candidate checking

I am using libnice on a C++ native server which is trying to make a WebRTC peer connection to a web browser client app. Using libnice, the candidate gathering is successful and the Offer/Answer exchange is successful. It then proceeds with the checking stage which is also successful. I can see in Wireshark that the STUN request/response exchanges are also successful.
However, the candidate checking keeps going on and on, constantly sending/receiving the successful STUN requests/responses.
It is not obvious to me, and the example code does not show, how to actually stop the candidate checks when they have succeeded. I have called the API routine: nice_agent_attach_recv() and registered the callback but it does not seem to fire. And even if it did, the callback signature does not give me any clue as to how to process any of the data.
Question: what processing should be done in the ice_agent_attach_recv() callback?
Thanks,
-Andres
No processing in the callback should need to be done. You would need to call nice_agent_get_local_candidates() and then continue with credentials and so on. There is a decent example here in the reference manual.

Kurento: Kurento-room without webcam

I've seen that kurento-room isn't able of managing a user that enters only with microphone(no webcam).
The user actually appears in the room, with a black screen in the place where the webcam is normally located, but no audio is received from him either.
Why can this be happening?
That's an error in the connection of WebRTC endpoints. The thing is that the endpoint only negotiates audio, but the connection was made with audio and video profiles, and the media server committed seppuku. It should be fixed by now, providing the right media profiles in the connect method.

Why can't I see remote video in my WebRTC app?

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.)

OpenTok WebRTC - The video stream failed to connect error

Condition:
1. Two users use Chrome (latest version) on Mac
2. One-to-one video conference
Problem - sometimes (~ ones in 5-6 calls) video window shows the error - The video stream failed to connect. Please notify the site owner. It can be on the beggining, or after several minutes spent on call.
Where can be the issue?
If any addition info needed i will provide in the post.
Thanks
If I understand correctly, one in 5-6 calls results in "Video stream failed to connect error". This is most likely a firewall or router configuration issue.
If you are video chatting with different people and you are sometimes getting a "video stream failed to connect error", the person you are chatting with probably has a firewall or configuration issue.
If you are testing with yourself and sometimes getting that error, you might have firewall or configuration issues.
To verify that you firewall is configured correctly, try running this diagnostic tool.
If you would like to see when your users are experiencing this error and would like to educate them on the diagnostic tool or what the possible causes are, you can listen to exception events (#1013 in your case)
Disclaimer: I work at TokBox.
Good Luck!