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];