From 4a010337f69e077a3d0a67f7de99a44f25d6cef5 Mon Sep 17 00:00:00 2001 From: Eric Jensen Date: Tue, 19 Apr 2016 13:21:06 -0700 Subject: [PATCH] Limit resuming of buffering videos to those that are visible --- AsyncDisplayKit/ASVideoNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 5170e2e19f..297f3ced59 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -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 } }