-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TypeError: _this.isCollectingLocalStats is not a function (it is undefined) #2489
Comments
…eetJS.isCollectingLocalStats as deprecated with warning to use Statistics.isCollectingLocalStats instead.
Can you reproduce the same error on alpha.jitsi.net? |
Are you using our SDKs or using this library directly? |
Using raw git code pointing main to the index.js. Directly. |
Did you initialize the library by calling |
Yes, sir. Only one time on project initial setup.
|
Sorry, but I am not sure how to check it there as I using react-native mobile app together with latest lib-jitsi-meet code. |
Yeah, I was wondering how is possible jitsi-meet web and mobile already using this and works without a problem, that's why I was asking about some test and I did not see the react-native line. |
Any chance you are calling that before calling |
Chances is 0%. It is calling after JitsiMeetJS.init - 100%. And as you can see JitsiMeetJS.isCollectingLocalStats is defined before calling JitsiMeetJS.createLocalTracks inside saga generators: |
I wonder if |
So it is better to have arrow function or better go with my fix. Thank you! |
I assume yes. It is changing this context. So to be safe, please merge my no context dependent fix ) |
Sorry, I won't do that. As I said, your fix doesn't work because Staristics is not part of the public API. That library is monkeying with this because you are not calling the function directly, as you should. This I see nothing to fix on our end. Use an arrow function please. It's likely you'll run into a myriad of problems, even if you sidestepped this one. |
I think you are wrong here as my fix makes things more clear.
It is sad that you do not see any improvement in my fix. PS Can you please ask some alternative opinion on this? Looks like you do not like changes even for good. |
I appreciate you trying to fix things here. That's why I'm spending some time trying to show you why this fix is not correct. This library is used by tons of customers, you can't just decide "this is better" so I'm deprecating the function. It's a marginal improvement at best, and definitely not worth the churn. Last, you keep ignoring the fact that Statistics is not exposed to the library consumers in UMD form, which means the non-deprecated API is not even reachable. |
I think you are wrong again and did not pay attention to my changes. I've removed deprecated warning as you suggested, because it make sense. So please be more attentive next time. |
After
jitsiConnectionEstablished
I tried to callJitsiMeetJS.createLocalTracks({ devices: ['audio'] });
But got an error:
"error": [TypeError: _this.isCollectingLocalStats is not a function (it is undefined)]
I am using latest [email protected]
The text was updated successfully, but these errors were encountered: