mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Limit resuming of buffering videos to those that are visible
This commit is contained in:
@@ -242,7 +242,7 @@ static NSString * const kStatus = @"status";
|
||||
}
|
||||
}
|
||||
} else if ([keyPath isEqualToString:kPlaybackLikelyToKeepUpKey]) {
|
||||
if (_shouldBePlaying && [change[NSKeyValueChangeNewKey] boolValue] == true) {
|
||||
if (_shouldBePlaying && [change[NSKeyValueChangeNewKey] boolValue] == true && ASInterfaceStateIncludesVisible(self.interfaceState)) {
|
||||
[self play]; // autoresume after buffer catches up
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user