Negate @available with else.

This commit is contained in:
Ryan Heise 2020-08-07 03:08:33 +10:00
parent 01f76ee39c
commit b6514d791e
1 changed files with 4 additions and 2 deletions

View File

@ -541,7 +541,8 @@
//__weak __typeof__(self) weakSelf = self; //__weak __typeof__(self) weakSelf = self;
//typeof(self) __weak weakSelf = self; //typeof(self) __weak weakSelf = self;
__unsafe_unretained typeof(self) weakSelf = self; __unsafe_unretained typeof(self) weakSelf = self;
if (!@available(macOS 10.12, iOS 10.0, *)) { if (@available(macOS 10.12, iOS 10.0, *)) {}
else {
_timeObserver = [_player addPeriodicTimeObserverForInterval:CMTimeMake(200, 1000) _timeObserver = [_player addPeriodicTimeObserverForInterval:CMTimeMake(200, 1000)
queue:nil queue:nil
usingBlock:^(CMTime time) { usingBlock:^(CMTime time) {
@ -869,7 +870,8 @@
} }
[_player play]; [_player play];
[self updatePosition]; [self updatePosition];
if (!@available(macOS 10.12, iOS 10.0, *)) { if (@available(macOS 10.12, iOS 10.0, *)) {}
else {
if (_bufferUnconfirmed && !_player.currentItem.playbackBufferFull) { if (_bufferUnconfirmed && !_player.currentItem.playbackBufferFull) {
[self enterBuffering:@"play, _bufferUnconfirmed && !playbackBufferFull"]; [self enterBuffering:@"play, _bufferUnconfirmed && !playbackBufferFull"];
[self broadcastPlaybackEvent]; [self broadcastPlaybackEvent];