2

I have built the commonjs version of Janus.js and have got it imported into a node backend. But it causes endless errors. Seems they are errors because it's only intended to run in the browser. I have gotten through some of them by adding:

const fetch = require("node-fetch")
const WebSocket = require('ws')
const adapter = require('webrtc-adapter')

But more keep coming. This seems like something I shouldn't have to do. But I can't find anything in the janus javascript documentation that mentions nodejs. Is there some build flag or something I am missing about getting a janus.js commonjs module that will work in node without edits?

rygo6
  • 1,929
  • 22
  • 30

0 Answers0