I am writing a WebRTC application and have the following problem:
I want to use the adapter.js library.
I have the following index.html:
require
is used (and defined) in Node.js environments to load modules. (Not exclusively, for more information check here).
If you downloaded an adapter.js version from here and include it the way you do (via script
tags), you can simple delete the require(...)
line and you should be good to go.
Edit: added an example
console.log(adapter.browserDetails.browser);
<script src="http://webrtc.github.io/adapter/adapter-latest.js"></script>
if you have checked installing adapter js? check
npm webrtc-adapter --version
if not showing up in node, install it to your app
npm install --save webrtc-adapter