From 145c034ad85aaff39f263c991de9bc01e2e95e33 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Tue, 26 Jan 2021 20:50:58 +0500 Subject: [PATCH] Fix video rotation --- submodules/MediaPlayer/Sources/MediaPlayerNode.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/MediaPlayer/Sources/MediaPlayerNode.swift b/submodules/MediaPlayer/Sources/MediaPlayerNode.swift index d8abad3a3f..d56c56aee9 100644 --- a/submodules/MediaPlayer/Sources/MediaPlayerNode.swift +++ b/submodules/MediaPlayer/Sources/MediaPlayerNode.swift @@ -103,7 +103,7 @@ public final class MediaPlayerNode: ASDisplayNode { self.currentRotationAngle = rotationAngle self.currentAspect = aspect var transform = CGAffineTransform(rotationAngle: CGFloat(rotationAngle)) - if abs(rotationAngle).remainder(dividingBy: Double.pi / 2.0) > 0.1 { + if abs(rotationAngle).remainder(dividingBy: Double.pi) > 0.1 { transform = transform.scaledBy(x: CGFloat(aspect), y: CGFloat(1.0 / aspect)) } videoLayer.setAffineTransform(transform)