mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-08 21:49:41 +00:00
[ASVideoPlayerNode] Expose the placeholder image for the video player node
This commit is contained in:
parent
1d356242fd
commit
09a344b669
@ -49,6 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign, readwrite) BOOL muted;
|
||||
@property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState;
|
||||
@property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall;
|
||||
@property (nullable, atomic, strong, readwrite) NSURL *placeholderImageURL;
|
||||
|
||||
//! Defaults to 100
|
||||
@property (nonatomic, assign) int32_t periodicTimeObserverTimescale;
|
||||
|
@ -76,6 +76,9 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
||||
@end
|
||||
|
||||
@implementation ASVideoPlayerNode
|
||||
|
||||
@dynamic placeholderImageURL;
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if (!(self = [super init])) {
|
||||
@ -771,6 +774,16 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
||||
return _videoNode.shouldAggressivelyRecoverFromStall;
|
||||
}
|
||||
|
||||
- (void) setPlaceholderImageURL:(NSURL *)placeholderImageURL
|
||||
{
|
||||
_videoNode.URL = placeholderImageURL;
|
||||
}
|
||||
|
||||
- (NSURL*) placeholderImageURL
|
||||
{
|
||||
return _videoNode.URL;
|
||||
}
|
||||
|
||||
- (void)setShouldAggressivelyRecoverFromStall:(BOOL)shouldAggressivelyRecoverFromStall
|
||||
{
|
||||
if (_shouldAggressivelyRecoverFromStall == shouldAggressivelyRecoverFromStall) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user