mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
properly handle videos in case the pixels arent square (wtf)
This commit is contained in:
@@ -365,7 +365,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||||||
mExoPlayer!!.addVideoListener(object : SimpleExoPlayer.VideoListener {
|
mExoPlayer!!.addVideoListener(object : SimpleExoPlayer.VideoListener {
|
||||||
override fun onVideoSizeChanged(width: Int, height: Int, unappliedRotationDegrees: Int, pixelWidthHeightRatio: Float) {
|
override fun onVideoSizeChanged(width: Int, height: Int, unappliedRotationDegrees: Int, pixelWidthHeightRatio: Float) {
|
||||||
mVideoSize.x = width
|
mVideoSize.x = width
|
||||||
mVideoSize.y = height
|
mVideoSize.y = (height / pixelWidthHeightRatio).toInt()
|
||||||
setVideoSize()
|
setVideoSize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user