meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.19k stars 2.47k forks source link

missing export in janus.js and janus.nojquery.js files #2605

Closed Qvatra closed 3 years ago

Qvatra commented 3 years ago

Hello, I was trying to import janus-gateway client-side by doing the following: const { Janus } = require('janus-gateway/html/janus.nojquery.js');

the problem is that Janus object is not beeing exported so nothing is get binded and I cant access Janus.init function in my context.

wouldnt it be better to export Janus object in both janus.js and janus.nojquery.js files by adding: exports.Janus = Janus; ?

lminiero commented 3 years ago

Not sure what version you're trying, but we haven't had a janus.nojquery.js in the repo in years.

Qvatra commented 3 years ago

@lminiero hi, thanks for reply!

By running npm i janus-gateway@latest this is what installed: "janus-gateway": "^0.2.3", that package has both janus.js and janus.nojquery.js in node_modules/janus-gateway/html folder

lminiero commented 3 years ago

That's not our package and not something we maintain, and 0.2.3 is incredibly old. Closing as not an issue.

lminiero commented 3 years ago

I think the npm folder in tis repo is what you're looking for, for up-to-date stuff.

Qvatra commented 3 years ago

@lminiero, ok thank you. doest is mean that the intended way of having janus.js in my project is copy pasting that file? or is there npm package that you support?

lminiero commented 3 years ago

Not familiar with that code, please check the docs: https://janus.conf.meetecho.com/docs/js-modules