From b6514d791e688d5770496094b90930ee58b71956 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Fri, 7 Aug 2020 03:08:33 +1000 Subject: [PATCH] Negate @available with else. --- darwin/Classes/AudioPlayer.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/darwin/Classes/AudioPlayer.m b/darwin/Classes/AudioPlayer.m index a474917..696ff45 100644 --- a/darwin/Classes/AudioPlayer.m +++ b/darwin/Classes/AudioPlayer.m @@ -541,7 +541,8 @@ //__weak __typeof__(self) weakSelf = self; //typeof(self) __weak 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) queue:nil usingBlock:^(CMTime time) { @@ -869,7 +870,8 @@ } [_player play]; [self updatePosition]; - if (!@available(macOS 10.12, iOS 10.0, *)) { + if (@available(macOS 10.12, iOS 10.0, *)) {} + else { if (_bufferUnconfirmed && !_player.currentItem.playbackBufferFull) { [self enterBuffering:@"play, _bufferUnconfirmed && !playbackBufferFull"]; [self broadcastPlaybackEvent];