jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.16k stars 6.59k forks source link

Microphone and Camera buttons not working #14794

Open tevincent opened 1 month ago

tevincent commented 1 month ago

What happened?

Hello,

The first time I'm joining a call, just after installing the app, camera and microphone buttons are not working. Is that a known issue ? Or did I forget to implement something ?

The way I'm able to reproduce it is:

I have attached a video to show the problem.

Thanks !

Platform

Browser / app / sdk version

9.2.2

Relevant log output

No response

Reproducibility

More details?

No response

tevincent commented 1 month ago

https://github.com/jitsi/jitsi-meet/assets/149579879/f74f79c3-ae09-41db-8149-2f3e66e7c2a0

saghul commented 1 month ago

Hey there! How did you integrate the SDK into your app? Did you use our Activity?

tevincent commented 1 month ago

So the way we integrate the SDK is we have our own activities where you can enter the name of the user etc. And then when the user type the name, we launch the JitsyMeetActivity like this:

 private fun launchRoom(roomName: String, userInfo: JitsiMeetUserInfo) {
        val options = JitsiMeetConferenceOptions.Builder()
            .setRoom(roomName)
            .setServerURL(serverURL)
            .setUserInfo(userInfo)
            .setAudioMuted(true)
            .setVideoMuted(true)
            .build()
        JitsiMeetActivity.launch(this, options)
        finish()
    }
saghul commented 1 month ago

That looks all good! Anything in adb logcat ? Do other toolbar buttons work?

tevincent commented 1 month ago

In the logs, if I press the microphone button, I have nothing but if I press the camera button, I always have this: ExternalAPI Sending event: VIDEO_MUTED_CHANGED with data: {"muted":0}

All the other buttons are working. Here is our repo:

https://github.com/Infomaniak/android-infomaniak-meet

The only difference is that I'm trying to update to the latest version of the SDK, which is 9.2.2.

P.S: Thanks for the prompt response!

saghul commented 1 month ago

Very odd, I don't see anything obvious on the surface :-/ I wonder if it has to do with some support library version mismatch...

tevincent commented 1 month ago

You mean the support library version I'm using is not the right one ?

saghul commented 1 month ago

I don't know 100%, it could be, I guess. It doesn't make much sense TBH.

tevincent commented 1 month ago

I just tried to update everything to the latest version, same issue.

saghul commented 1 month ago

Can you please share the entire logcat output?

tevincent commented 1 month ago

Here it is. log_meet.txt

saghul commented 1 month ago

Can yoy adding .setFeatureFlag("resolution", 360) on the conference options to see if it makes a difference?

tevincent commented 1 month ago

Just tried, same.

saghul commented 1 month ago

I assume this happens on several devices and not just this one, right?

tevincent commented 1 month ago

I tried on my emulator, Android 14 and on a Pixel Phone, also on Android 14.

saghul commented 1 month ago

Does the official Jitsi Meet app exhibit the same issue?

tevincent commented 1 month ago

Nope. Everything is working fine on the Jitsi Meet App.

tevincent commented 1 month ago

One thing to note is that it works fine with SDK 8.6.0. For instance, when starting a call, it requests microphone permission, and upon acceptance, it immediately unmutes the microphone. However, with SDK 9.2.2, accepting the permission has no effect. Additionally, on SDK 8.6.0, clicking the camera button prompts for permission.

tevincent commented 1 month ago

One more info. I tried all versions from 8.6.6 to 9.2.2 and the problem is only on the version 9.2.2. Hope it helps !

saghul commented 1 month ago

@Calinteodor does this ring a bell?

tevincent commented 1 month ago

Another info, the problem is only on device above API 32. Everything is working fine from API32 and downward. Tested with the latest SDK, 9.2.2.

Calinteodor commented 1 month ago

I don't seem to repro this while testing with the sample app https://github.com/jitsi/jitsi-meet-sdk-samples/tree/master/android. Can you try it yourself @tevincent ? Thanks.

tevincent commented 1 month ago

It seems to work. One thing that might be interested. If I do this in my app:

...
.setFeatureFlag("prejoinpage.enabled", true)
...

I can enable microphone and camera. But if this is false, I cannot. So there's no issue on the prejoin page but there's one on the call page.

I cannot really do the same thing in the sample since I have to login on Jitsi meet etc.

EDIT: I was able to reproduce the same way on the sample. I'll link a video.

tevincent commented 1 month ago

Here it is:

https://github.com/jitsi/jitsi-meet/assets/149579879/6244986e-6a8a-4428-b09a-90c850848dec

Calinteodor commented 1 month ago

Yep. But after enabling video and audio in Prejoin you can do the same inside the conference, right?

tevincent commented 1 month ago

Nope. You can see I tried to click several times on the camera and microphone icons and nothing happens.

Calinteodor commented 1 month ago

If you have prejoin page enabled on your app, I am asking.

Calinteodor commented 1 month ago

So enable prejoin page flag on your app and try muting and unmuting inside the conference.

tevincent commented 1 month ago

Oh ok my bad. Yes if I have the prejoin screen and I enable the microphone and camera, in the conference screen, everything works as expected.

Calinteodor commented 1 month ago

Cool. Thank you! Will take a look.

Calinteodor commented 1 month ago

Ok. I took another look and I tested using the sample app. Disabled prejoin page, started muted with both video and audio.

https://github.com/jitsi/jitsi-meet/assets/26413496/ed66b45f-faca-4731-94bb-39a8a8dafa7f

Everything seems to be in order. Can you check the sample app again? First, just the way it is. After that try adding your configuration to the sample app, step by step. I suggest you use your own server and not meet.jit.si because that has authentication enabled. If you want to use our server, just create a meeting on web and join it from android as another participant.

tevincent commented 1 month ago

Let me try again. But did you try the first time you launch the app ? Because I can see it didn't ask for any permission in your video. Because in my case, if it's a fresh install -> launch app -> call, I have the issue but then it's working.

tevincent commented 1 month ago

Do you want me to push a branch with the bug ? I can reproduce easily.

Here is an example with a modified sample (fresh install, our server, device on API34):

https://github.com/jitsi/jitsi-meet/assets/149579879/eae222eb-d020-475c-9266-2e95f1736fba

Calinteodor commented 1 month ago

Let me try again. But did you try the first time you launch the app ? Because I can see it didn't ask for any permission in your video. Because in my case, if it's a fresh install -> launch app -> call, I have the issue but then it's working.

Let me try a fresh start.

Calinteodor commented 1 month ago

Let me try again. But did you try the first time you launch the app ? Because I can see it didn't ask for any permission in your video. Because in my case, if it's a fresh install -> launch app -> call, I have the issue but then it's working.

Let me try a fresh start.

Sorry, but I still don't repro the bug. Microphone mutes/unmutes as expected. I get all the permission notifications and allow them. Nothing unexpected. Can you send your server url so I can test with that, too?

tevincent commented 1 month ago

Here it is: https://kmeet.infomaniak.com/

Let me know if you want me to create a branch with the modification to reproduce the bug.

Calinteodor commented 1 month ago

Here it is: https://kmeet.infomaniak.com/

Let me know if you want me to create a branch with the modification to reproduce the bug.

Let's do that and I will check your code changes on the sample app.

tevincent commented 1 month ago

Here it is: https://github.com/jitsi/jitsi-meet-sdk-samples/pull/236

Calinteodor commented 1 month ago

I tested using meet.jit.si server and everything works as expected. When I test using your server, the problem is reproducible. I don't know what setting on your side could cause this issue. @saghul @tevincent maybe you can give us more insight on your server configuration? Oh and I disabled prejoin as well and I get all the permissions. On your server I don't get the permissions for audio and video.

saghul commented 1 month ago

What versions of the server components are you running @tevincent ?

tevincent commented 1 month ago

That's crazy. How the configuration of the server could impact the behavior of the microphone and camera button ? Especially if it's not working only with one specific version of the SDK.

tevincent commented 1 month ago

What versions of the server components are you running @tevincent ?

Let me get back to you when I get the answer.

EDIT: They told me 8615. Is that ok?

saghul commented 1 month ago

https://github.com/jitsi/jitsi-meet/releases/tag/stable%2Fjitsi-meet_8615

So that is 1 year old.

It should work, but we might have messed up something inadvertently.

Let's try something to validate that a server update would "solve" it: please join a meeting in alpha.jitsi.net with your app. Does it work?

Note: alpha uses the latest of everything and meetings are destroyed after 5 minutes.

tevincent commented 1 month ago

Just tried with https://alpha.jitsi.net. The microphone button seems to be working but not the camera button.

https://github.com/jitsi/jitsi-meet/assets/149579879/394d1575-1d10-446b-a023-36b1d2832f98

saghul commented 1 month ago

@Calinteodor

Calinteodor commented 1 month ago

This is very weird. I took another look using the sample android kotlin app with prejoin page disabled and server set to https://alpha.jitsi.net/. Mute audio/video buttons work as expected.