mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Fixing opening stream in landscape
This commit is contained in:
parent
17ef4ae35b
commit
43ce52a26c
@ -548,7 +548,7 @@ final class _MediaStreamVideoComponent: Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
fullScreenBackgroundPlaceholder.removeFromSuperview()
|
||||
// fullScreenBackgroundPlaceholder.removeFromSuperview()
|
||||
} else if component.isFullscreen {
|
||||
if fullScreenBackgroundPlaceholder.superview == nil {
|
||||
insertSubview(fullScreenBackgroundPlaceholder, at: 0)
|
||||
@ -583,8 +583,8 @@ final class _MediaStreamVideoComponent: Component {
|
||||
}
|
||||
// }
|
||||
var aspect = videoView.getAspect()
|
||||
// saveAspect(aspect)
|
||||
if component.isFullscreen {
|
||||
// aspect == 1 the first run
|
||||
if component.isFullscreen && self.hadVideo {
|
||||
if aspect <= 0.01 {
|
||||
aspect = 16.0 / 9 // 3.0 / 4.0
|
||||
}
|
||||
@ -650,6 +650,7 @@ final class _MediaStreamVideoComponent: Component {
|
||||
videoSize = CGSize(width: 16 / 9 * 100.0, height: 100.0).aspectFitted(.init(width: availableSize.width - videoInset * 2, height: availableSize.height))
|
||||
}
|
||||
loadingBlurView.frame = CGRect(origin: CGPoint(x: floor((availableSize.width - videoSize.width) / 2.0), y: floor((availableSize.height - videoSize.height) / 2.0)), size: videoSize)
|
||||
print("[LBVFrame] \(loadingBlurView.frame)")
|
||||
loadingBlurView.layer.cornerRadius = videoCornerRadius
|
||||
|
||||
placeholderView.frame = loadingBlurView.frame
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user