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

OVP 2.22.0 - Switching between back-camera and front camera does not work on few or most Android mobiles, whereas it works well on iPhones #751

Open
mallikarjungurav opened this issue Sep 20, 2022 · 4 comments
Labels

Comments

@mallikarjungurav
Copy link

Describe the bug
We recently upgraded from OVP 2.17.0 to OVP 2.22.0.
Switching between back camera and front camera was working as expected in OVP 2.17.0 on all Android and iPhone devices.

Expected behavior
In OVP 2.22.0, when switching from back camera to front camera and from front camera to back camera multiple times, streaming should be seamlessly done by the selected camera.

Wrong current behavior
Since the upgrade to OVP 2.22.0, switching between back-camera and front camera does not work on few or most Android mobiles, whereas it works well on iPhones. We use the creation of new publisher approach to switch the camera.

Our web app streaming functionality works well when loaded for first time. It gets hold of the back camera as default and does the live streaming. When we switch camera from back to front for first time, streaming works well with front camera, but when we switch again from front camera to back camera, it does not work.

It stops the streaming and shows the default UI, when again switching the camera it starts streaming from front camera. So, once it captures the front camera it does not switch to back camera again, but front camera works well every time we switch camera.

OpenVidu tutorial where to replicate the error
OpenVidu demo portal does not have switch camera capability, so unable to reproduce the issue there. However, on CE development container and as well as OV Professional, we were able to produce the issue with below steps:

  1. Load the back camera of mobile and do live-streaming by using Samsung M30.
  2. Once the streaming is established, switch to front camera.
  3. When streaming is established, again switch to back camera. This will not work.
  4. Again switch to front camera, and it works again with front camera.
  5. Switch to back camera again, it will not work, and this behaviour continues.

OpenVidu deployment info
How is your OpenVidu Server instance deployed when you get the bug. A couple of possible examples are listed below:

IMPORTANT NOTE: please, if you think the bug might be related to OpenVidu Server side, specify here if you are also getting the error by using OpenVidu Server Demos instance. This instance is publicly available (use it only for this test, because it is not secure!!!): URL: https://demos.openvidu.io:4443, SECRET: MY_SECRET

Client device info (if applicable)
Android mobiles with Chrome 105, specifically Samsung.

Device Name Android Version Result (Live Streaming)
Samsung M30 10 Failed
Samsung F62 12 Failed
Samsung Galaxy M12 12 Failed
OnePlus 8 Pro 12 Passed
OnePlus 8 12 Passed
Oppo 10 and 12 Passed
Vivo 10 Failed

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here. For example, attach any useful logs related to the issue.

@cruizba
Copy link
Member

cruizba commented Sep 21, 2022

Did you check that your openvidu-browser dependency is in the same version as OpenVidu Server?

@mallikarjungurav
Copy link
Author

Yes we reverified the openvidu-browser dependency and OpenVidu Server and our backend server dependencies.
All are at 2.22.0. Moreover, camera switch works well with iPhone devices and few of the android devices but it is not working on few of the android devies as listed in Client Device Info section.

@mallikarjungurav
Copy link
Author

@cruizba
Any finding on this issue please?

@cruizba
Copy link
Member

cruizba commented Sep 24, 2022

I am thinking that maybe this is related with this similar issue: https://openvidu.discourse.group/t/issue-when-switching-cameras-on-specific-android-devices-device-already-in-use/4185/4 , the person on the issue managed to solve a similar issue.

Also, we have demo here https://demos.openvidu.io/openvidu-call/ (OpenVidu Call) which let you change the camera while in a session. You can check it there if you want.

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

No branches or pull requests

2 participants