perchco / perchrtc

An iOS WebRTC demo using XirSys servers
MIT License
135 stars 34 forks source link

DTLS problems ? #29

Open antoniotuzzi opened 8 years ago

antoniotuzzi commented 8 years ago

Hello Chris more an advice than a bug: I was trying to use PerchRTC with a JANUS server the JANUS is exposing a SocketIO similar in some ways to the XirSys (less the auth...) I was able to get all the publish from WEB (in chrome) and my device and the emulator both are rendering Audio and Video (some small problem if the audio is presented before the video stream) But I'm having problem with the publish: I prepare my offer, I send it, starts the ICE dance, I send all the candidates but I see the server stucked always in [WARN] [892394496] Still waiting for the DTLS stack for component 1 in stream 1... so the server never starts the part of "MATCHING the candidates"

so my question is the nighthawk-webrtc missing some SSL related part ? (just a guess!)

thanks Antonio

ceaglest commented 8 years ago

@antoniotuzzi Let me clarify here.. since i'm not super familiar with the server..

You have replaced the XirSys signaling with your own deploment of Janus Media Gateway, but you are still using XirSys for STUN/TURN? Janus is performing its own validation of the signaling exchange between peers, but complains that DTLS fingerprints don't match or something else is malformed?

nighthawk-webrtc is a vanilla build of the Chrome m45 branch with some capture and audio modifications. Nothing wrt SSL was modified, but if the issue has been fixed since m45, we wouldn't have the fix.

Do you see any similar issues in the WebRTC bug tracker?

antoniotuzzi commented 8 years ago

@ceaglest thank you for the reply

(yes I replaced the Xirsys layer, STUN/TURN included with an experimental layer wrapper on Janus) MY FAULT! Anyway I discovered today what I was doing wrong: when I was preparing the offer, to present myself on the server as "publisher" the server replied with ok, and was sending me a JSEP answer; I forgot to set the RemoteDescription on the PeerConnection using that answer!

now the state is back stable, and I have media (audio) traveling in the 2 directions

I have some problems with video though : A) if I receive publish audio before and video immediatly after the video is never rendered B) if I receive the audio offer, and the video after a couple of secs, the video starts, but the screen stays always black C) if I receive an offer audio and an offer video, and I order them in a queue, giving priority to the video the video and the audio are correctly rendered

:+1:

ceaglest commented 8 years ago

@antoniotuzzi Interesting, you'd have to take me through the signaling flow in more detail (do you have logs or an architecture diagram to share?). Sounds like you are performing two offer/answer round trips to publish audio and then video over the same PeerConnection.

Regardless, I'm glad you were able to get it working in the end.