mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +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.currentRotationAngle = rotationAngle
|
||||||
self.currentAspect = aspect
|
self.currentAspect = aspect
|
||||||
var transform = CGAffineTransform(rotationAngle: CGFloat(rotationAngle))
|
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))
|
transform = transform.scaledBy(x: CGFloat(aspect), y: CGFloat(1.0 / aspect))
|
||||||
}
|
}
|
||||||
videoLayer.setAffineTransform(transform)
|
videoLayer.setAffineTransform(transform)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user