mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix video message recording preview and haptic feedback on message options menu presentation
This commit is contained in:
parent
c1b6004478
commit
45b0700230
@ -220,8 +220,6 @@ const NSInteger TGVideoCameraRetainedBufferCount = 16;
|
||||
[self _enableVideoStabilization];
|
||||
|
||||
_videoBufferOrientation = _videoConnection.videoOrientation;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)destroyCaptureSession
|
||||
@ -232,7 +230,23 @@ const NSInteger TGVideoCameraRetainedBufferCount = 16;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:_applicationWillEnterForegroundObserver];
|
||||
_applicationWillEnterForegroundObserver = nil;
|
||||
|
||||
|
||||
[_captureSession beginConfiguration];
|
||||
[_captureSession removeOutput:_videoOutput];
|
||||
[_captureSession removeInput:_videoInput];
|
||||
[_captureSession removeOutput:_audioOutput];
|
||||
[_captureSession removeInput:_audioInput];
|
||||
[_captureSession commitConfiguration];
|
||||
|
||||
_audioInput = nil;
|
||||
_audioDevice = nil;
|
||||
_audioOutput = nil;
|
||||
_audioConnection = nil;
|
||||
|
||||
_videoInput = nil;
|
||||
_videoDevice = nil;
|
||||
_videoOutput = nil;
|
||||
_videoConnection = nil;
|
||||
_captureSession = nil;
|
||||
}
|
||||
}
|
||||
|
@ -833,7 +833,7 @@ typedef enum
|
||||
|
||||
_didPlayToEndObserver = [[TGObserverProxy alloc] initWithTarget:self targetSelector:@selector(playerItemDidPlayToEndTime:) name:AVPlayerItemDidPlayToEndTimeNotification object:_player.currentItem];
|
||||
|
||||
_videoView = [[TGModernGalleryVideoView alloc] initWithFrame:_previewView.frame player:_player];
|
||||
_videoView = [[TGModernGalleryVideoView alloc] initWithFrame: CGRectInset(_previewView.frame, -1.0, -1.0) player:_player];
|
||||
[_previewView.superview insertSubview:_videoView belowSubview:_previewView];
|
||||
|
||||
UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(unmutePressed)];
|
||||
@ -950,6 +950,7 @@ typedef enum
|
||||
{
|
||||
[_capturePipeline stopRecording:completed];
|
||||
[_buttonHandler ignoreEventsFor:1.0f andDisable:true];
|
||||
[_capturePipeline stopRunning];
|
||||
}
|
||||
|
||||
- (void)finishWithURL:(NSURL *)url dimensions:(CGSize)dimensions duration:(NSTimeInterval)duration liveUploadData:(id )liveUploadData thumbnailImage:(UIImage *)thumbnailImage isSilent:(bool)isSilent scheduleTimestamp:(int32_t)scheduleTimestamp
|
||||
|
Loading…
x
Reference in New Issue
Block a user