mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
[ASVideoNode] Addition of reset method to return to initial state (#2119)
* [ASVideoNode] Addition of reset method to allow video node to return to initial state of placeholder and play button * Implemented pull request review comments for code style
This commit is contained in:
@@ -671,6 +671,19 @@ static NSString * const kRate = @"rate";
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)resetToPlaceholder
|
||||
{
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
|
||||
if (_playerNode != nil) {
|
||||
[_playerNode removeFromSupernode];
|
||||
_playerNode = nil;
|
||||
}
|
||||
|
||||
[_player seekToTime:kCMTimeZero];
|
||||
[self pause];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Playback observers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user