mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
b1e91b3c72
@ -348,7 +348,6 @@ public protocol PresentationGroupCall: class {
|
|||||||
func lowerHand()
|
func lowerHand()
|
||||||
func requestVideo()
|
func requestVideo()
|
||||||
func disableVideo()
|
func disableVideo()
|
||||||
func requestScreencast()
|
|
||||||
func disableScreencast()
|
func disableScreencast()
|
||||||
func switchVideoCamera()
|
func switchVideoCamera()
|
||||||
func updateDefaultParticipantsAreMuted(isMuted: Bool)
|
func updateDefaultParticipantsAreMuted(isMuted: Bool)
|
||||||
|
@ -2527,7 +2527,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||||||
self.videoCapturer?.switchVideoInput(isFront: self.useFrontCamera)
|
self.videoCapturer?.switchVideoInput(isFront: self.useFrontCamera)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func requestScreencast() {
|
private func requestScreencast() {
|
||||||
if self.screencastCallContext != nil {
|
if self.screencastCallContext != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -25,16 +25,14 @@ final class VoiceChatCameraPreviewController: ViewController {
|
|||||||
private let cameraNode: GroupVideoNode
|
private let cameraNode: GroupVideoNode
|
||||||
private let shareCamera: (ASDisplayNode) -> Void
|
private let shareCamera: (ASDisplayNode) -> Void
|
||||||
private let switchCamera: () -> Void
|
private let switchCamera: () -> Void
|
||||||
private let shareScreen: () -> Void
|
|
||||||
|
|
||||||
private var presentationDataDisposable: Disposable?
|
private var presentationDataDisposable: Disposable?
|
||||||
|
|
||||||
init(context: AccountContext, cameraNode: GroupVideoNode, shareCamera: @escaping (ASDisplayNode) -> Void, switchCamera: @escaping () -> Void, shareScreen: @escaping () -> Void) {
|
init(context: AccountContext, cameraNode: GroupVideoNode, shareCamera: @escaping (ASDisplayNode) -> Void, switchCamera: @escaping () -> Void) {
|
||||||
self.context = context
|
self.context = context
|
||||||
self.cameraNode = cameraNode
|
self.cameraNode = cameraNode
|
||||||
self.shareCamera = shareCamera
|
self.shareCamera = shareCamera
|
||||||
self.switchCamera = switchCamera
|
self.switchCamera = switchCamera
|
||||||
self.shareScreen = shareScreen
|
|
||||||
|
|
||||||
super.init(navigationBarPresentationData: nil)
|
super.init(navigationBarPresentationData: nil)
|
||||||
|
|
||||||
@ -71,10 +69,6 @@ final class VoiceChatCameraPreviewController: ViewController {
|
|||||||
self.controllerNode.switchCamera = { [weak self] in
|
self.controllerNode.switchCamera = { [weak self] in
|
||||||
self?.switchCamera()
|
self?.switchCamera()
|
||||||
}
|
}
|
||||||
self.controllerNode.shareScreen = { [weak self] in
|
|
||||||
self?.shareScreen()
|
|
||||||
self?.dismiss()
|
|
||||||
}
|
|
||||||
self.controllerNode.dismiss = { [weak self] in
|
self.controllerNode.dismiss = { [weak self] in
|
||||||
self?.presentingViewController?.dismiss(animated: false, completion: nil)
|
self?.presentingViewController?.dismiss(animated: false, completion: nil)
|
||||||
}
|
}
|
||||||
@ -136,7 +130,6 @@ private class VoiceChatCameraPreviewControllerNode: ViewControllerTracingNode, U
|
|||||||
|
|
||||||
var shareCamera: (() -> Void)?
|
var shareCamera: (() -> Void)?
|
||||||
var switchCamera: (() -> Void)?
|
var switchCamera: (() -> Void)?
|
||||||
var shareScreen: (() -> Void)?
|
|
||||||
var dismiss: (() -> Void)?
|
var dismiss: (() -> Void)?
|
||||||
var cancel: (() -> Void)?
|
var cancel: (() -> Void)?
|
||||||
|
|
||||||
@ -248,11 +241,6 @@ private class VoiceChatCameraPreviewControllerNode: ViewControllerTracingNode, U
|
|||||||
strongSelf.shareCamera?()
|
strongSelf.shareCamera?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.screenButton.pressed = { [weak self] in
|
|
||||||
if let strongSelf = self {
|
|
||||||
strongSelf.shareScreen?()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
self.cancelButton.pressed = { [weak self] in
|
self.cancelButton.pressed = { [weak self] in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.cancel?()
|
strongSelf.cancel?()
|
||||||
|
@ -185,6 +185,10 @@ final class GroupVideoNode: ASDisplayNode {
|
|||||||
|
|
||||||
let transition: ContainedViewLayoutTransition = .immediate
|
let transition: ContainedViewLayoutTransition = .immediate
|
||||||
transition.updateTransformRotation(view: self.videoView.view, angle: angle)
|
transition.updateTransformRotation(view: self.videoView.view, angle: angle)
|
||||||
|
|
||||||
|
// TODO: properly fix the issue
|
||||||
|
// On iOS 13 and later metal layer transformation is broken if the layer does not require compositing
|
||||||
|
self.videoView.view.alpha = 0.995
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3358,12 +3362,6 @@ public final class VoiceChatController: ViewController {
|
|||||||
}
|
}
|
||||||
}, switchCamera: { [weak self] in
|
}, switchCamera: { [weak self] in
|
||||||
self?.call.switchVideoCamera()
|
self?.call.switchVideoCamera()
|
||||||
}, shareScreen: { [weak self] in
|
|
||||||
guard let strongSelf = self else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
self?.call.requestScreencast()
|
|
||||||
})
|
})
|
||||||
strongSelf.controller?.present(controller, in: .window(.root))
|
strongSelf.controller?.present(controller, in: .window(.root))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user