mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Fix video rotation
This commit is contained in:
parent
0fbb849637
commit
145c034ad8
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user