mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Various Fixes
This commit is contained in:
parent
36ea9c8691
commit
0172b53721
@ -114,7 +114,7 @@
|
|||||||
if (widescreenWidth == 926.0f)
|
if (widescreenWidth == 926.0f)
|
||||||
{
|
{
|
||||||
_topPanelOffset = 34.0f;
|
_topPanelOffset = 34.0f;
|
||||||
_topPanelHeight = 77.0f;
|
_topPanelHeight = 48.0f;
|
||||||
_bottomPanelOffset = 94.0f;
|
_bottomPanelOffset = 94.0f;
|
||||||
_bottomPanelHeight = 140.0f;
|
_bottomPanelHeight = 140.0f;
|
||||||
_modeControlOffset = -2.0f;
|
_modeControlOffset = -2.0f;
|
||||||
|
@ -2596,8 +2596,9 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func requestVideo(capturer: OngoingCallVideoCapturer) {
|
func requestVideo(capturer: OngoingCallVideoCapturer, useFrontCamera: Bool = true) {
|
||||||
self.videoCapturer = capturer
|
self.videoCapturer = capturer
|
||||||
|
self.useFrontCamera = useFrontCamera
|
||||||
|
|
||||||
self.hasVideo = true
|
self.hasVideo = true
|
||||||
if let videoCapturer = self.videoCapturer {
|
if let videoCapturer = self.videoCapturer {
|
||||||
|
@ -3501,6 +3501,7 @@ public final class VoiceChatController: ViewController {
|
|||||||
guard let strongSelf = self, ready else {
|
guard let strongSelf = self, ready else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
var isFrontCamera = true
|
||||||
let videoCapturer = OngoingCallVideoCapturer()
|
let videoCapturer = OngoingCallVideoCapturer()
|
||||||
let input = videoCapturer.video()
|
let input = videoCapturer.video()
|
||||||
if let videoView = strongSelf.videoRenderingContext.makeView(input: input, blur: false) {
|
if let videoView = strongSelf.videoRenderingContext.makeView(input: input, blur: false) {
|
||||||
@ -3510,7 +3511,7 @@ public final class VoiceChatController: ViewController {
|
|||||||
let controller = VoiceChatCameraPreviewController(sharedContext: strongSelf.context.sharedContext, cameraNode: cameraNode, shareCamera: { [weak self] _, unmuted in
|
let controller = VoiceChatCameraPreviewController(sharedContext: strongSelf.context.sharedContext, cameraNode: cameraNode, shareCamera: { [weak self] _, unmuted in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.call.setIsMuted(action: unmuted ? .unmuted : .muted(isPushToTalkActive: false))
|
strongSelf.call.setIsMuted(action: unmuted ? .unmuted : .muted(isPushToTalkActive: false))
|
||||||
(strongSelf.call as! PresentationGroupCallImpl).requestVideo(capturer: videoCapturer)
|
(strongSelf.call as! PresentationGroupCallImpl).requestVideo(capturer: videoCapturer, useFrontCamera: isFrontCamera)
|
||||||
|
|
||||||
if let (layout, navigationHeight) = strongSelf.validLayout {
|
if let (layout, navigationHeight) = strongSelf.validLayout {
|
||||||
strongSelf.animatingButtonsSwap = true
|
strongSelf.animatingButtonsSwap = true
|
||||||
@ -3519,7 +3520,8 @@ public final class VoiceChatController: ViewController {
|
|||||||
}
|
}
|
||||||
}, switchCamera: { [weak self] in
|
}, switchCamera: { [weak self] in
|
||||||
Queue.mainQueue().after(0.1) {
|
Queue.mainQueue().after(0.1) {
|
||||||
self?.call.switchVideoCamera()
|
isFrontCamera = !isFrontCamera
|
||||||
|
videoCapturer.switchVideoInput(isFront: isFrontCamera)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
strongSelf.controller?.present(controller, in: .window(.root))
|
strongSelf.controller?.present(controller, in: .window(.root))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user