cjb/serverless-webrtc

Demo is not working

Opened this issue · 11 comments

Jquery appears to throw an error an prevent supplanting the string that was the local offer leaving it empty. Here is the full console log

This appears to be Chrome
jquery-2.0.0.js:4773 Uncaught RangeError: Maximum call stack size exceeded.jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237jQuery.fn.extend.trigger @ jquery-2.0.0.js:5054jQuery.fn.(anonymous function) @ jquery-2.0.0.js:6657(anonymous function) @ bootstrap.js:910jQuery.event.dispatch @ jquery-2.0.0.js:4618elemData.handle @ jquery-2.0.0.js:4302jQuery.event.trigger @ jquery-2.0.0.js:4536jQuery.event.simulate @ jquery-2.0.0.js:4829handler @ jquery-2.0.0.js:4945jQuery.event.special.focus.trigger @ jquery-2.0.0.js:4773jQuery.event.trigger @ jquery-2.0.0.js:4502(anonymous function) @ jquery-2.0.0.js:5055jQuery.extend.each @ jquery-2.0.0.js:590jQuery.fn.jQuery.each @ jquery-2.0.0.js:237
serverless-webrtc.js:156 video1

cjb commented

Thanks! Can you tell me anything about your setup, OS, do you have a webcam and mic that you gave permission for?

I get the stack error on Chrome, but the offer works regardless.

Windows 8.1 running Chrome Version 47.0.2526.73 m. Integrated webcam and mic, but I was not prompted to provide permissions to access either. Unfortunately after trying to setup a room I was presented with an empty offer.

cjb commented

Huh! I'm not on Windows so that could be it. Sorry I don't have any more ideas, would be great if you're able to discover more about this.

I'll do some experiments. Do you have any plans in the works for supporting media streaming ?

Ok so the Uncaught RangeError: Maximum call stack size error occurs because you are attempting to open a modal within a modal causing a recursion error to occur, this can be rectified by replacing

$('#createBtn').click(function () {
  $('#showLocalOffer').modal('show')
  createLocalOffer()
})

with

$('#createBtn').click(function () {
  $('#createOrJoin').modal('hide')
  $('#showLocalOffer').modal('show')
  createLocalOffer()
})

however this does not fix the problem with the creation of the offer which is still empty. I get the video1 console.log, and then nothing. It appears that the getUserMedia in createLocalOffer() does not proc

cjb commented

Yeah, that's why I was asking about permission.. getUserMedia isn't going to work until you give permission for the webcam and mic, so it would make sense for it to be blocked on that. Maybe you have them disabled in settings or something?

Thanks for finding the recursion bug!

In regards to the getUserMedia, the reason its not proc'ing is due to chrome's same origin policy on file:// access

cjb commented

Oh yeah! That's why the README says:

For browsers:

In Chrome (but not Firefox), you'll need to run a local web server rather than just browsing to file:///, like this:
[..]

When you mentioned the demo, I thought you meant you were trying http://cjb.github.io/serverless-webrtc/serverless-webrtc.html , which should work!

cjb commented

Do you have any plans in the works for supporting media streaming ?

No, it's just a signaling demo. I think to make media streaming work you just create a "stream" for your media and addStream() on it.

Durh on my part, got so excited at the top of the readme expecting normal
file:// access to cut it

On Fri, Dec 11, 2015 at 5:14 PM, Chris Ball notifications@github.com
wrote:

Do you have any plans in the works for supporting media streaming ?

No, it's just a signaling demo. I think to make media streaming work you
just create a "stream" for your media and addStream() on it.


Reply to this email directly or view it on GitHub
#16 (comment)
.

cjb commented

It actually used to! It was a bummer when it stopped working in Chrome. I think it still works in Firefox.