CameraView icon indicating copy to clipboard operation
CameraView copied to clipboard

Can the camera be prepared in other thread to avoid UI glitches while opening?

Open usmanrana-ilsa opened this issue 3 years ago • 7 comments

Currently whenever camera open/close is called the UI stucks. Can we prepare camera preview in some other thread to atleast reduce jerks specially when camera is in ViewPager fragment similar to instagram.

Version used

2.7.2

usmanrana-ilsa avatar Jan 25 '22 14:01 usmanrana-ilsa

This issue has been automatically marked as stale because it has not had activity in the last 20 days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.

stale[bot] avatar Apr 17 '22 00:04 stale[bot]

@usmanrana-ilsa do you have solve this problem?

anggit97 avatar Apr 21 '22 07:04 anggit97

In my case I was doing some other operations too during swipe on page. Holding them unless camera fragment is resumed improved the performance. Otherwise camera is preparing in main thread and that would cause some glitch. Almost similar behavior is observed in Instagram camera as well.

usmanrana07 avatar Apr 21 '22 07:04 usmanrana07

im using view pager with 3 fragments. when page is swiped, i'm not doing any operation. but its still show some glitch (showing overlay gray, before camera preview is loaded). do you experience it? @usmanrana07

anggit97 avatar Apr 21 '22 07:04 anggit97

yes, CameraView isn't resuming from last paused preview, but shows shuttering effect while resume again

usmanrana07 avatar Apr 21 '22 07:04 usmanrana07

How to solve the problem of slow focus when opening?

tashaerxing avatar Apr 24 '22 06:04 tashaerxing

open or resume camera preview when the page is done swiping and that can help you.

SweetD3v avatar Apr 26 '22 12:04 SweetD3v