properly handle videos in case the pixels arent square (wtf)

This commit is contained in:
tibbi 2019-08-18 12:03:10 +02:00
parent 9b0567e7bc
commit 170decd866

View file

@ -365,7 +365,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
mExoPlayer!!.addVideoListener(object : SimpleExoPlayer.VideoListener {
override fun onVideoSizeChanged(width: Int, height: Int, unappliedRotationDegrees: Int, pixelWidthHeightRatio: Float) {
mVideoSize.x = width
mVideoSize.y = height
mVideoSize.y = (height / pixelWidthHeightRatio).toInt()
setVideoSize()
}