-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error happens due to janus.js file #2529
Comments
My guess is that this is fixed in #2531? |
Unfortunately it seems that error appeared after this fix, before everything worked good. |
There seems to be another reason for the solution. There seems to be a problem with the default branch.
|
That's not a fix. That's saying "I checked out an old branch", and so doesn't really help with the issue. |
I just started running into this too. I'm gonna do the workaround for now, but in the interest of getting this solved, I took a look at the different versions of
In the package.json for |
Sorry for the commentspam, but I've got the fix. Update the webpack plugin config example in the "Using janus.js as JavaScript module" docs to the following: const webpack = require('webpack');
module.exports = {
plugins: [
// janus.js does not use 'import' to access to the functionality of webrtc-adapter,
// instead it expects a global object called 'adapter' for that.
// Let's make that object available.
new webpack.ProvidePlugin({ adapter: ['webrtc-adapter', 'default'] })
]
} Getting the CLA approved by my new job might be a bit complicated, but if anyone whos already CLA'd can drop in this one-line docs change, it'll fix this issue. |
Thanks for the feedback @chrisuehlinger! From what you're saying, it seems reasonable to revert the adapter version to what it was before (6.4.0?) in the |
I’m not sure what changed between webrtc-adapter v6 and v7, it could be that one of your contributors bumped the version because of something important that comes up when like, working with RTCRtpTransceivers or something else deep in the weeds (webrtc-adapter doesn’t have a lot of release notes). Or maybe not, and it’s fine. But with the fast changing WebRTC browser APIs, I imagine you wouldn’t want to fall behind on adapter versions. I totally get the idea of stemming the tide of complaints by just downgrading the version, but I would also point out that anyone who is using Janus with webpack has to know about that doc, otherwise there’s no way they could’ve gotten it working in the first place (I personally don’t have any other deps that use webpack.ProvidePlugin). |
Fair enough! I'll update the docs myself later this morning using your proposed text, then 👍 Thanks again! |
Actually, the docs had already been updated, in #2519... I haven't regenerated them yet, which is why the online docs still show the old and deprecated syntax. I'll do that now, and close this issue. |
That's right. Sorry for the misunderstanding. In @chrisuehlinger comment, I noticed a configuration issue, so I checked it and found a mistake. Thank you, @lminiero and @chrisuehlinger . |
Hi!
The error occurs due to the following issue in the janus.js file:
TypeError: Cannot read property 'browser' of undefined
350 line:
if(Janus.webRTCAdapter.browserDetails.browser === 'safari' &&
Janus.webRTCAdapter.browserDetails.version >= 605)
Previously everything work perfectly, tried to open the project on another devices, re-install dependencies and janus-gateway, but the problem remains.
Thank you for the answer in advance!
The text was updated successfully, but these errors were encountered: