HenrikJoreteg / webrtcsupport

Browser module to detect support for WebRTC and extract proper constructors.
55 stars 33 forks source link

Add AMD support - doesn't work requireJS , 'module' is undefined #16

Open kashifshamaz21 opened 9 years ago

kashifshamaz21 commented 9 years ago

Hi, When using webrtcsupport with RequireJS, the browser throws up error:

Uncaught ReferenceError: module is not defined

This is of course because "module" isnt globally available in a browser environment. Can we add an AMD wrapper so that it can work with multiple envs - commonJS, RequireJS, as vanilla js. I'll try and run this with browserify to see if it can convert it to a UMD js. Will keep you posted on how that goes.