I'm using ExoPlayer which show captured videos , but when front_camera is captured a video , display as flipped .
I've tried to do flip the exoplayerView exoPlayerView.scaleX= -1f
private fun videoPlayingMode() {
capturedImageView.visibility = View.GONE
exoPlayerView.visibility = View.VISIBLE
//exoPlayerView.scaleX= -1f
}
I've also implement flip function to convert captured image to flip but I could not implement this for captured video .
private fun flip(src: Bitmap): Bitmap {
// create new matrix for transformation
val matrix = Matrix()
matrix.preScale(-1.0f, 1.0f)
// return transformed image
return Bitmap.createBitmap(src, 0, 0, src.width, src.height, matrix, true)
}
I expect the when capture a video with front camera , video should not be flipped. Note: I've also using CameraKit library and I'm not using TextureView