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

support video calls without webview #2368

Open
lfom opened this issue May 2, 2023 · 12 comments
Open

support video calls without webview #2368

lfom opened this issue May 2, 2023 · 12 comments
Labels
android Related to Android app enhancement New feature or request

Comments

@lfom
Copy link

lfom commented May 2, 2023

Hi, there!

When I try to make a video call using the Android client, it connects fine but it does not show any video stream, just a black background. Audio seems to work fine, and the iOS client also displays both incoming and outgoing video fine.

Looking at the log, it seems to be some error with OMX. Other messengers on the same phone work fine, and I also have the same problem with another Android 11 device.

I will attach a ZIP with some device info and the errors log from when I start the call. Please feel free to request for any other info.

Regards

file_6930844680861305931.zip

Edit: I forgot to add, using SimpleX v5.0(117), default config, no SOCKS5. I have not tried calls before so I cannot say if it worked in the past or not.

@shumvgolove shumvgolove added bug Something isn't working android Related to Android app labels May 3, 2023
@avently
Copy link
Collaborator

avently commented May 3, 2023

but it does not show any video stream

Just to confirm, no incoming video and no outgoing?

If, at the same time, you see both streams on iOS, it means VP8 codec on Android exists and works fine. I tested the situation when there is no needed codec available and in this case no successfull connection happens. In your situation the connection is working.

  1. What WebView app do you have on the phone? Mine is called Android System WebView
  2. Can you try to update it and re-check how it works in SimpleX?
  3. Can you install Android System WebView or other one from Google Play and choose newly install WebVIew in developer settings? And re-test.
  4. What do you see at this page in a VP8 codec block (this link needs to be opened from any browser on your phone)? https://lab.html5test.com/codecs
  5. Do you have a custom ROM? If so, could you try to find similar issues on Telegram groups or in any place where you found the ROM?

@lfom
Copy link
Author

lfom commented May 3, 2023

@avently Hey, thank you for your time reviewing this issue.

Yes, SimpleX Android does not show incoming or outgoing video, while the iOS version shows both fine.

  1. Bromite WebView;
  2. Version 108.0.5359.156 (1671415660) is the latest version as of now as far as I know;
  3. It's a bit complicated to do it here but I can try if it will help, but as the screenshot below shows I think VP8 support works, also other apps that use WebRTC like Matrix clients;
  4. I'll attach a screenshot, but a WebView based browser showed the same as Firefox or Vivaldi, for instance;
  5. Yes, it's a custom ROM: HavocOS/Android 11. It'd be hard to look for similar problems online (as I said before, it's the only problem regarding videos I've found do far), but if there's some other tests or logcat errors that would help troubleshooting then I can try to do it (I know a bit about Android development).

PS: I know it is probably a PITA to support custom ROMs, but I think that many users that look for privacy-focused apps like SimpleX Chat are probably using at least a degoogled ROM, if not things like GraphenoOS, CalyxOS or /e/.

Screenshot_20230503-120948_Pure_Browser_1

@lfom
Copy link
Author

lfom commented May 3, 2023

Update: videos worked fine using Android System Webview Version 100.0.4896.127 (489612703).

@avently
Copy link
Collaborator

avently commented May 3, 2023

also other apps that use WebRTC like Matrix clients

We doing WebRTC calls via Webview on Android. Other apps probably rely on external library that implements WebRTC without WebView (like we have on iOS, but not on Android). This is a key difference.

Update: videos worked fine using Android System Webview Version 100.0.4896.127 (489612703).

Thank you for checking this! Looks like we found the reason, probably something was removed/disabled in Bromite's version of WebView. Unfortunetely, it's out of scope since I can't control third-party app.

@lfom
Copy link
Author

lfom commented May 3, 2023

Thank you for checking this! Looks like we found the reason, probably something was removed/disabled in Bromite's version of WebView. Unfortunetely, it's out of scope since I can't control third-party app.

Thank you again for your reply. Sure, I understand that you cannot control it but, as I said, I'd say that probably this would affect many other users with degoogled phones. As an example, Element for Android uses Opus for voice messages, that is supposed to be builtin on Android only from A12, so many users with other ROMs would have problems and even crashes because of the missing libraries, so they opted to add it to the app since it is open source and can be added to any project anyway.

Could you please link to some test or document that would explain how to troubleshoot this or at least pinpoint what is not working?

@IzumiSenaSora
Copy link

We doing WebRTC calls via Webview on Android. Other apps probably rely on external library that implements WebRTC without WebView (like we have on iOS, but not on Android). This is a key difference.

Are you guys going to implement external library that implements WebRTC without WebView? Unlike ios Android have custom roms which have different WebView... Some are up to date and some even Don't get update at all... So i think it will be better to implement WebRTC without WebView by adding external library!

@epoberezkin epoberezkin added enhancement New feature or request and removed bug Something isn't working labels May 7, 2023
@epoberezkin epoberezkin changed the title Video Calls: No Video on Android support video calls without webview May 7, 2023
@djlalle
Copy link

djlalle commented Apr 16, 2024

hello, I got the same problem with grapheneos, when I do a video call I got just a black screen.
did you find a workaround?
thanks :)

@avently
Copy link
Collaborator

avently commented Apr 16, 2024

djlalle

hello, I got the same problem with grapheneos, when I do a video call I got just a black screen. did you find a workaround? thanks :)

In some of the previous versions there was a problem with asking camera permission when a user already denied it. Make sure that you granted permission for using a camera, just in case. It can be done in settings of your Android in apps section where SimpleX is located. If you granted but still no video, it probably means that your WebView has disabled some required features.

IzumiSenaSora

Are you guys going to implement external library that implements WebRTC without WebView?

Not now, since it requires a lot of work/time. Currently, we're making enhancements to the overall calls experience on all supported platforms.

@djlalle
Copy link

djlalle commented Apr 16, 2024

In some of the previous versions there was a problem with asking camera permission when a user already denied it. Make sure that you granted permission for using a camera, just in case. It can be done in settings of your Android in apps section where SimpleX is located. If you granted but still no video, it probably means that your WebView has disabled some required features.

thanks for the fast reply
I had already granted all the permissions.
I'm using the latest grapheneos, did anyone managed to make the video calls work with grapheneos?
strange that no one got the same problem, simplex should be loved from grapheneos users :)

@avently
Copy link
Collaborator

avently commented Apr 16, 2024

I fixed similar issue for desktop Firefox recently. It sounds the same to me after reading this issue again.
https://github.com/simplex-chat/simplex-chat/pull/4034/files#diff-565eb6a89167855df198fb95ef679463978030c63b0748779eb32c6d9ed89743R580

So maybe you'll see a result on mobile too, let's see when next beta comes to you with this PR I made before.

@djlalle
Copy link

djlalle commented Apr 16, 2024

thanks a lot :)
should I try to install the next beta?
https://github.com/simplex-chat/simplex-chat/releases

@avently
Copy link
Collaborator

avently commented Apr 16, 2024

The beta with actual code (which include the code from that PR) is not released yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Related to Android app enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants
@epoberezkin @avently @lfom @shumvgolove @IzumiSenaSora @djlalle and others