WebRTC stream not appearing in Firefox

2,552 views
Skip to first unread message

Rhythm Chopra

unread,
Jan 24, 2018, 7:07:23 AM1/24/18
to meetecho-janus

I have setup janus locally, and used the demo tests for viewing a gstreamer stream of my webcam into browser. It works well in Chrome but throws an error in Firefox ICE failed, add a TURN server and see about:webrtc for more details.


Following contains my about:webrtc logs from firefox
https://stackoverflow.com/questions/48165631/webrtc-error-in-firefox-ice-failed-add-a-turn-server-and-see-aboutwebrtc-for


I am using is Mozilla firefox-57.0.4

P.S.: Even after adding the turn server, the same error keeps occuring. So, I guess it's not associated with TURN/STUN servers.


Please suggest a solution.

Thanks

Lorenzo Miniero

unread,
Jan 24, 2018, 7:08:22 AM1/24/18
to meetecho-janus

Rhythm Chopra

unread,
Jan 24, 2018, 7:17:56 AM1/24/18
to meetecho-janus
I have gone through the link you provided. And `chrome://webrtc-internals` shows the expected logs and graphs.
In case of Firefox, It can detect the streaming mountpoints, but when I request to play the stream, It neither receives any data nor any video frames. Console logs the message `ICE failed, add a TURN server and see about:webrtc for more details`. And `about:webrtc` too doesn't show me any ICE server, it is expected to show.
The strange part is, following link works fine in Firefox too, showing me the ICE servers resolved by it.

But when I use the same demos with my local janus, it works with Chrome but not Firefox.

Thanks for your time.

Lorenzo Miniero

unread,
Jan 24, 2018, 9:08:54 AM1/24/18
to meetecho-janus
Have you also analysed the Admin API info for the Firefox test, as explained in the blog post?

L.

Rhythm Chopra

unread,
Jan 24, 2018, 11:28:39 AM1/24/18
to meetecho-janus
On analysing the admin API for both firefox and chrome sessions, the main difference I think is Firefox doesn't have a remote SDP whereas Chrome does have.
And the component state for Firefox session is `gathering` whereas Chrome says it to be `ready`.

Following are the session info for both browsers :

Lorenzo Miniero

unread,
Jan 25, 2018, 4:23:50 AM1/25/18
to meetecho-janus
The missing remote SDP is obviously the cause, then. Maybe an exception in your JavaScript code that prevents the browser SDP from being sent to Janus? Or maybe Firefox is barfing on the SDP that Janus sends.

L.

Rhythm Chopra

unread,
Jan 25, 2018, 5:05:48 AM1/25/18
to meetecho-janus
As things are working fine in Chrome, I think its the Firefox barfing on SDP. But JavaScript code is same as I downloaded from your demo site and nothing has been changed in it. Moreover, stream on your demo site works fine even in Firefox.
 
Please suggest a solution. What should I do?

Lorenzo Miniero

unread,
Jan 25, 2018, 5:10:16 AM1/25/18
to meetecho-janus
I already told you the possible causes: I'm afraid it's now up to you to investigate what's causing the Firefox SDP not to get to Janus.

L.

Rhythm Chopra

unread,
Jan 25, 2018, 5:19:13 AM1/25/18
to meetecho-janus
Well, can you suggest me with something I can continue to investigate for the resolution of this? I really can't figure out where to start .

Thanks for your time.

Rhythm Chopra

unread,
Feb 23, 2018, 12:07:31 AM2/23/18
to meetecho-janus
Hi,
On further digging, I found that somehow a valid SDP session negotition can't be done by Firefox, because answer created for SDP offer by `RTCPeerConnection.createAnswer()` in `janus.js` contains an attribute `rtpmap: 120 VP8/90000`, where as the one created by Chrome has `rtpmap: 126 H264/90000`, which makes the Chrome for negotiate a valid session and prevents Firefox to do the same because my actual stream is `H264/90000` encoded. 
And Gstreamer Live stream on your demo website is VP8 encoded, so Firefox and Chrome both can play the stream due to valid answer created by both browser. But same is not the case with H264 encoded stream.
Please suggest how can I create a valid answer for SDP offer in Firefox, or is there any other workaround for this?

Regards,
Rhythm 
Reply all
Reply to author
Forward
0 new messages