Call from Firefox to Chrome does not work
It is really strange that, when I run the step7 branch, the call from Chrome to Firefox works fine but not the opposite way. When I run the client on Chrome(Version 32.0.1700.102) then run the another client on Firefox to set up the communication, the answer and offer message passed by the server,even the candidate messages including data/video/audio passed fine and got by both client. but the stream is not showing on the video tag on Chrome side page. I am not sure what's the problem it is. The Firefox I am using is FF nightly 29.0a1 and FF 26.0 both not work.
PS: Since I test the project locally so I do not using TURN server, but I do not think it would be a problem, I hope so :)
Comments (16)
-
-
repo owner Thanks for pointing this out.
I'm a bit snowed under, so haven't had time for a proper look, but I think it may be that, as I recall, createOffer() and createAnswer() now have three parameters in Firefox. I've committed a patch separately, with an extra null argument where required.
-
reporter Thanks for reply.
I notice the null parameter part, so I add some error handling function as second argument, but it works from chrome to firefox but not firefox to chrome calling which is strange. When I check the communication log, the reason is because the wrong sdp, there is no value for 'id' filed, I wonder because the createAnswer() is not set correct local sdp back. Then it makes a bit hard to fix I think :(
-
@samdutton, I have a question about the code lab, the video part is working well in both browsers(firefox, chrome), But the chatting part (made by using data channel ) is not working in firefox. Does the chat application work in firefox?, If yes, how is it? If no, what I'll have to do make it run in firefox?. Please do advise about this.
-
I fixed the "TypeError: Argument 2 of mozRTCPeerConnection.createOffer is not an object", I still have this issue as Brian Chen reported on 2014-02-14. Any hint on how to fix it? thanks.
-
Can you please share the logs from chrome://webrtc-internals and i can take a look.
/Vikas
-
I had same problem... there is no value for 'id' field...
Mr. Chen!! did you fix that issue?
if you did.. please share the info...
-
reporter Sorry about that. I have no time to dig into this issue in these couple month. Maybe I will have time in the next month. Kim, I have no solution for this issue yet.
-
Thanks for answering fast :)
Is there any other site that i can learn webRTC beside codelab...?
This site is very easy to learn but... has some issues.... :(
-
reporter I did some search about learning WebRTC before. As far as I know, this repository is the best place to learn WebRTC by code. Although there is some issues in the code , it is still quite nice. If you want to find some project seed to work your own project on WebRTC, I would say it is impossible to do that. Because most of issue right now is from the differences of different browser implementation. Since WebRTC is not standard web API yet, it will always have some problem when you try to build your project on different browsers. I would suggest you that go through the code from Google source code : https://code.google.com/p/webrtc/source/browse/#svn%2Fstable%2Fsamples%2Fjs%2Fapprtc%2Fjs This is the Google apprtc application for WebRTC test. It is maintained by Google but there are a lot of issues there as well. But most of the other project related to WebRTC is based on the code there.
-
repo owner Hi @jkom and @br1anchen – if you have a chance, could you share the logs from chrome://webrtc-internals by clicking on the Download button.
Thanks.
-
reporter Hi @webrtc , I shared my chrome://webrtc-internals log and firefox error log on Google Drive. Hope it is useful to you to see what is wrong there. Google Drive Address
-
repo owner Thanks Brian. @marwahvikas – could you take a look at this when you get a moment?
-
Hello, I found your code source https://bitbucket.org/webrtc/codelab and I want to know how I can do to use it for multi-users? Because when I test it's just for 2 users (localstream and remotestream), but if I want to put one or two more users, what I have to change?
-
@samdutton I believe you rewrote the code to be the following:
pc.createAnswer(setLocalAndSendMessage, null, sdpConstraints);
However, I've found that Firefox errors out by having a null callback. The following code should fix the issue:
function doAnswer() { console.log('Sending answer to peer.'); pc.createAnswer(setLocalAndSendMessage, handleCreateAnswerError, sdpConstraints); } function setLocalAndSendMessage(sessionDescription) { sessionDescription.sdp = preferOpus(sessionDescription.sdp); pc.setLocalDescription(sessionDescription); console.log('setLocalAndSendMessage sending message' , sessionDescription); sendMessage(sessionDescription); } function handleCreateAnswerError(error) { console.log('createAnswer() error: ', e); }
More information on my Stack Overflow answer here: http://stackoverflow.com/questions/23090561/webrtc-createanswer-works-on-chrome-but-fires-an-error-with-firefox/28175713#28175713
-
after rewriting the code also . still the Firefox errors out by having a null callback!!!!!!
- Log in to comment
This error message(TypeError: Argument 2 of mozRTCPeerConnection.createOffer is not an object.) comes when you try connect application from Firefox to Chrome.
And when you try to Chrome to Firefox, this one comes
TypeError: Argument 2 of mozRTCPeerConnection.createAnswer is not an object.