cjb / serverless-webrtc

A demo of using WebRTC with no signaling server.
Other
1.54k stars 239 forks source link

The "offer" block stays empty on all modern browsers #28

Closed xem closed 8 years ago

xem commented 8 years ago

When I visit https://cjb.github.io/serverless-webrtc/serverless-webrtc.html with Chrome or Firefox, the offer block stays empty. Chrome's console says:

This appears to be Chrome
jquery-2.0.0.js:4773 Uncaught RangeError: Maximum call stack size exceeded.trigger @ jquery-2.0.0.js:4773trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055each @ jquery-2.0.0.js:590each @ jquery-2.0.0.js:237trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302trigger @ jquery-2.0.0.js:4536simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945trigger @ jquery-2.0.0.js:4773trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055each (....)
serverless-webrtc.js:156 video1
serverless-webrtc.js:176 Error adding stream to pc1: [object NavigatorUserMediaError]

Firefox's console says:

This appears to be Firefoxadapter.js:8:3
Les interfaces WebRTC comportant le préfixe « moz » (mozRTCPeerConnection, mozRTCSessionDescription, mozRTCIceCandidate) sont obsolètes.serverless-webrtc.js:13:10
RTCIceServer.url is deprecated! Use urls instead.serverless-webrtc.js:13
L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.jquery-2.0.0.js:4859:28
onaddstream is deprecated! Use peerConnection.ontrack instead.serverless-webrtc.js:194
RTCIceServer.url is deprecated! Use urls instead.serverless-webrtc.js:238
onaddstream is deprecated! Use peerConnection.ontrack instead.serverless-webrtc.js:297
video1serverless-webrtc.js:156:3
navigator.mozGetUserMedia a été remplacé par navigator.mediaDevices.getUserMediaserverless-webrtc.js:161:2
Error adding stream to pc1: NotFoundError: The object can not be found here.serverless-webrtc.js:176:5

On Edge I can't even click on "Create" (error = "object expected")

Is there a solution? Am I the only one having this issue?

xem commented 8 years ago

I tried here: http://konklone.io/serverless-webrtc/serverless-webrtc.html The "offers" and "answers" appear, but then the connection never succeeds

cjb commented 8 years ago

I'll check it out, but it seems to be working here in Chrome. Any chance you're refusing permission to use the camera somehow?

xem commented 8 years ago

Thanks! I have no camera, I thought it was a textual chat demo?

cjb commented 8 years ago

Ah, I added camera support too, but I guess it broke the no-camera case. You could revert the last few commits to go back to text only.

xem commented 8 years ago

Indeed, I tried with a webcam and microphone. The demo first asks permission to access them and then it displays the offer. Why in this order? Is it possible to make it work with or without micro/cam ?

cjb commented 8 years ago

It's in that order because the offer specifies whether there'll be audio or video.

I'd guess it's possible, though I don't know exactly how.

xem commented 8 years ago

thanks for the explanations, I close the bug and I start a Github project with some friends to make a minimal serverless webrtc engine. If you want to join us, you're welcome of course :)

https://github.com/xem/miniWebRTC