mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix camera recording delays
This commit is contained in:
parent
b3b2b83365
commit
4e21af5ce4
@ -440,11 +440,10 @@ NSString *const PGCameraAdjustingFocusKey = @"adjustingFocus";
|
||||
});
|
||||
};
|
||||
|
||||
NSTimeInterval delta = CFAbsoluteTimeGetCurrent() - _captureStartTime;
|
||||
if (CFAbsoluteTimeGetCurrent() - _captureStartTime > 0.8)
|
||||
if (CFAbsoluteTimeGetCurrent() - _captureStartTime > 1.5)
|
||||
startRecording();
|
||||
else
|
||||
TGDispatchAfter(0.8 - delta, [[PGCamera cameraQueue] _dispatch_queue], startRecording);
|
||||
TGDispatchAfter(1.5, [[PGCamera cameraQueue] _dispatch_queue], startRecording);
|
||||
|
||||
TGDispatchOnMainThread(^
|
||||
{
|
||||
@ -500,6 +499,8 @@ NSString *const PGCameraAdjustingFocusKey = @"adjustingFocus";
|
||||
[[PGCamera cameraQueue] dispatch:^
|
||||
{
|
||||
strongSelf.captureSession.currentMode = cameraMode;
|
||||
|
||||
_captureStartTime = CFAbsoluteTimeGetCurrent();
|
||||
|
||||
if (strongSelf.finishedModeChange != nil)
|
||||
strongSelf.finishedModeChange();
|
||||
|
Loading…
x
Reference in New Issue
Block a user