I'm trying to record a video from Android's front camera while displaying on surface view as well.
What I found out with the front camera is that it mirror flips the video during recording, even though the surface view shows a normal view.
Is there any way I can prevent this or fix it?
I read upon other stackoverflow articles like How to keep android from inverting the image from the front facing camera?
But it seems to be only talking about taking photos with the front camera and reversing the image, which I already fixed using matrix myself. However, it seems like using a matrix for a video does not work.
In my case, I just need to horizontal-flip when playing it. When recording it's already flipped for mirror effect and as I see it's not possible to modify it. However below code solved my problem when playing.
videoPlayer.setScaleX(-1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With