I'm building a chat application for a LAN. I use WebRTC but can't get Firefox and Google chrome to interoperate. I don't know the exact parameters i should pass to RTCPeerConnection createOffer/createAnswer.
I made the tests below with Firefox 31 and Google Chrome 36 in the same computer Fedora Linux 20
RTCPeerConnection is created like:
pc = new RTCPeerConnection(null, RTC_PC_OPTIONS);
answers/offers are created like:
pc.createOffer(onsuccess, onfail, CONSTRAINTS);
My question is: which parameters (RTC_PC_OPTIONS
and CONSTRAINTS
) should i pass to get interoperability between the two browsers?
RTC_PC_OPTIONS = undefined
CONSTRAINTS = undefined
FFx2FFx FFx2Chrome Chrome2FFx Chrome2Chrome
------- ---------- ---------- -------------
dataChannel setup ok ok ok ok
dataChannel send/recv ok ok ok ok
Video stream ok ok err [1] ok
MDN recomands this value for RTC_PC_OPTIONS
RTC_PC_OPTIONS = {
optional: [
{DtlsSrtpKeyAgreement: true},
{RtpDataChannels: true}
]
};
CONSTRAINTS = undefined
FFx2FFx FFx2Chrome Chrome2FFx Chrome2Chrome
------- ---------- ---------- -------------
dataChannel setup ok err [2] err [3] ok
dataChannel send/recv ok - - ok
Video stream ok - - err [4]
^~~~~~~~~~~~~~~~^
^
i used datachannel to do signaling for the video TRCPeerConnection,
that is why these were not tested
RTC_PC_OPTIONS = undefined
CONSTRAINTS = { 'mandatory': { 'OfferToReceiveAudio': true, 'OfferToReceiveVideo': true } }
FFx2FFx FFx2Chrome Chrome2FFx Chrome2Chrome
------- ---------- ---------- -------------
dataChannel setup ok ok ok err [5]
dataChannel send/recv ok ok ok -
Video stream err [6] ok err [6] -
chrome receives the answer. But onaddstream is not triggred in firefox
Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set data send codecs..
chrome gets this error: Failed to parse SessionDescription. m=application 35224 RTP/SAVPF Expects at least 4 fields.
FFx gets this error: ICE failed, see about:webrtc for more details
In about:webrtc
:
Local candidate Remote candidate ICE State Priority Nominated Selected
a.b.c.d:35224/udp(host) a.b.c.d:45895/udp(host) frozen 9115005270282354000
Uncaught NetworkError: Failed to execute 'send' on 'RTCDataChannel': Could not send data
chrome_2 gets the error:
Uncaught SyntaxError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': The ICE candidate could not be added.
Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set data send codecs.
So, a few things:
Try it with FF Beta, and Nightly (http://nightly.mozilla.org/). And when you report things like this, please indicate what versions of browser you're using! :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With