Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
Added flag to disable generating thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrdebosz committed Jun 25, 2020
1 parent 82a99f6 commit 5609d0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/ASVideoNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ NS_ASSUME_NONNULL_BEGIN
@property BOOL muted;
@property BOOL shouldAggressivelyRecoverFromStall;

@property BOOL shouldDisablePlaceholderImage;

@property (readonly) ASVideoNodePlayerState playerState;
//! Defaults to 10000
@property int32_t periodicTimeObserverTimescale;
Expand Down
4 changes: 2 additions & 2 deletions Source/ASVideoNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ - (void)prepareToPlayAsset:(AVAsset *)asset withKeys:(NSArray<NSString *> *)requ
[self.delegate videoNode:self didSetCurrentItem:playerItem];
}

if (self.image == nil && self.URL == nil) {
if (self.image == nil && self.URL == nil && !self.shouldDisablePlaceholderImage) {
[self generatePlaceholderImage];
}
}
Expand Down Expand Up @@ -338,7 +338,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
}
}
// If we don't yet have a placeholder image update it now that we should have data available for it
if (self.image == nil && self.URL == nil) {
if (self.image == nil && self.URL == nil && !self.shouldDisablePlaceholderImage) {
[self generatePlaceholderImage];
}
}
Expand Down

0 comments on commit 5609d0f

Please # to comment.