[ASVideoNode] issue #1782 Placeholder images are replaced by a blank placeholder. Now checks the .URL property of the parent class as well as the .image to ensure that new placeholders aren't generated.

This commit is contained in:
Gareth Reese
2016-06-21 07:51:58 +01:00
parent e55037354c
commit 062bcf3631
2 changed files with 29 additions and 3 deletions

View File

@@ -151,7 +151,7 @@ static NSString * const kStatus = @"status";
self.player = [AVPlayer playerWithPlayerItem:playerItem];
}
if (self.image == nil) {
if (self.image == nil && self.URL == nil) {
[self generatePlaceholderImage];
}
@@ -284,7 +284,7 @@ static NSString * const kStatus = @"status";
if ([change[NSKeyValueChangeNewKey] integerValue] == AVPlayerItemStatusReadyToPlay) {
self.playerState = ASVideoNodePlayerStateReadyToPlay;
// If we don't yet have a placeholder image update it now that we should have data available for it
if (self.image == nil) {
if (self.image == nil && self.URL == nil) {
[self generatePlaceholderImage];
}
}