Skip to content
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

watchRTC as a feature for Jitsi meet #13527

Merged
merged 6 commits into from
Jul 20, 2023
Merged

Conversation

subhamcyara
Copy link
Contributor

Following PR contains changes required to add watchRTC as a feature for jitsi meet.

This involves adding

  • watchRTC SDK package (npm i @testrtc/watchrtc-sdk).
  • configuration to enable watchRTC which includes a watchRTCEnabled flag.
  • watchRTCConfigParams for initializing the SDK.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@saghul
Copy link
Member

saghul commented Jul 4, 2023

Can you PTAL @andrei-gavrilescu ?

@andrei-gavrilescu
Copy link
Contributor

andrei-gavrilescu commented Jul 5, 2023

Looks good to me. One thing to consider is that lib-jitsi-meet users won't have this functionality, that's why we're currently moving rtcstats to lib-jitsi-meet as well see: jitsi/lib-jitsi-meet#2305 and #13508

* Class that controls the watchRTC flow, because it overwrites and proxies global function it should only be
* initialized once.
*/
class watchRTCHandler {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. use PascalCase for class name. Also I think there are a couple of linting errors around, consider running the linter.

switch (action.type) {
case LIB_WILL_INIT: {
if (isRtcstatsEnabled(state)) {
logger.error("Cannot initialize WatchRTC when RTCStats is enabled.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be printed for all users using rtcstats, isn't it?
If this is the case, please drop it.

@saghul
Copy link
Member

saghul commented Jul 5, 2023

Looks good to me. One thing to consider is that lib-jitsi-meet users won't have this functionality, that's why we're currently moving rtcstats to lib-jitsi-meet as well see: jitsi/lib-jitsi-meet#2305 and #13508

Agreed. It should also be less code I think.

@subhamcyara can you pl move it to LJM, following the lead of rtcstats?

@subhamcyara
Copy link
Contributor Author

Looks good to me. One thing to consider is that lib-jitsi-meet users won't have this functionality, that's why we're currently moving rtcstats to lib-jitsi-meet as well see: jitsi/lib-jitsi-meet#2305 and #13508

Agreed. It should also be less code I think.

@subhamcyara can you pl move it to LJM, following the lead of rtcstats?

@saghul
As far as I see it, it's okay for lib-jitsi-meet users to not have this functionality. This integration is only regarding the iframe API including JaaS. If any user happens to use lib-jitsi-meet, watchRTC would not require any kind of integration with lib-jitsi-meet as it is required with jitsi-meet to work.

@saghul
Copy link
Member

saghul commented Jul 5, 2023

While that is technically correct we've seen lib-Jitsi-meet customers ask for a builtin stats system since they want to leverage it.

Since we went in that direction it makes sense that all stats implementations follow suit.

@subhamcyara
Copy link
Contributor Author

Yes totally agree. I would follow the lead of how it is done with rtcstats and modify.
Thanks.

@subhamcyara
Copy link
Contributor Author

@saghul @andrei-gavrilescu
As directed, I have modified to move watchrtc to LJM. Also on LJM's side jitsi/lib-jitsi-meet#2311
Please let me know your feedback.
Thanks.

@saghul
Copy link
Member

saghul commented Jul 11, 2023

Thank you!

@andrei-gavrilescu
Copy link
Contributor

LGTM!

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@saghul saghul merged commit 470e987 into jitsi:master Jul 20, 2023
@damencho
Copy link
Member

@saghul Can we remove the error log we keep printing after this PR:

2023-07-20T21:41:40.910Z [modules/watchRTC/WatchRTC.ts] <Object.start>:  WatchRTC is enabled but it has not been configured.

I was commenting about it earlier but seems this was not fixed.

@damencho
Copy link
Member

Actually the print is in ljm PR

@subhamcyara
Copy link
Contributor Author

jitsi/lib-jitsi-meet#2325
I took care of the log here. Apologies for missing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants