mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Video message recording improvements
This commit is contained in:
@@ -651,10 +651,10 @@ private final class CameraScreenComponent: CombinedComponent {
|
||||
|
||||
let startRecording = {
|
||||
self.resultDisposable.set((camera.startRecording()
|
||||
|> deliverOnMainQueue).start(next: { [weak self] duration in
|
||||
|> deliverOnMainQueue).start(next: { [weak self] recordingData in
|
||||
if let self, let controller = self.getController() {
|
||||
controller.updateCameraState({ $0.updatedDuration(duration) }, transition: .easeInOut(duration: 0.1))
|
||||
if duration > 59.0 {
|
||||
controller.updateCameraState({ $0.updatedDuration(recordingData.duration) }, transition: .easeInOut(duration: 0.1))
|
||||
if recordingData.duration > 59.0 {
|
||||
self.stopVideoRecording()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user