simplewebrtc / signalmaster

simple socket.io server for webrtc signaling
Other
1.31k stars 486 forks source link

signalmaster + Browserify #11

Closed stephensprinkle-zz closed 10 years ago

stephensprinkle-zz commented 10 years ago

I'm attempting to run the signalmaster server in-browser via a chrome extension by bundling with browserify and am having issues surrounding the EventEmitter -- (note: this may be more of a socket.io question, not sure)

The specific error I'm encountering:

Uncaught TypeError: Cannot read property 'prototype' of undefined

The specific line of code this references:

Store.prototype.__proto__ = EventEmitter.prototype;

_File error is contained in: ./nodemodules/socket.io/lib/store.js

The bundling process goes totally fine w/ the following used for bundling:

browserify --ig require.js > assets/js/libraries/bundle.js

When I reload the extension and check the console in chrome, this is where I see the error.

I'm honestly not sure if bundling up signalmaster and running it in-browser is possible, but any insights you might have would be great!

HenrikJoreteg commented 10 years ago

Signal master uses socket.io server which won't run in a browser. So, this won't work, sorry.

On Thu, Dec 12, 2013 at 5:37 PM, StephenSprinkle notifications@github.com wrote:

I'm attempting to run the singalmaster server in-browser through a chrome extension via browserify and having issues surrounding the EventEmitter -- (note: this may be more of a signal.io question, not sure) The specific error I'm encountering: Uncaught TypeError: Cannot read property 'prototype' of undefined The specific line of code this references: Store.prototype.proto = EventEmitter.prototype; _File error is contained in: ./nodemodules/socket.io/lib/store.js

I'm honestly not sure if bundling up signalmaster and running it in-browser is possible, but any insights you might have would be great!

Reply to this email directly or view it on GitHub: https://github.com/andyet/signalmaster/issues/11

stephensprinkle-zz commented 10 years ago

Gotcha, thanks.

HenrikJoreteg commented 10 years ago

No worries. I like the way you're thinking though :)

On Thu, Dec 12, 2013 at 6:53 PM, StephenSprinkle notifications@github.com wrote:

Gotcha, thanks.

Reply to this email directly or view it on GitHub: https://github.com/andyet/signalmaster/issues/11#issuecomment-30482593