mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-09 14:10:05 +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, readwrite) BOOL muted;
|
||||||
@property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState;
|
@property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState;
|
||||||
@property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall;
|
@property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall;
|
||||||
|
@property (nullable, atomic, strong, readwrite) NSURL *placeholderImageURL;
|
||||||
|
|
||||||
//! Defaults to 100
|
//! Defaults to 100
|
||||||
@property (nonatomic, assign) int32_t periodicTimeObserverTimescale;
|
@property (nonatomic, assign) int32_t periodicTimeObserverTimescale;
|
||||||
|
@ -76,6 +76,9 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ASVideoPlayerNode
|
@implementation ASVideoPlayerNode
|
||||||
|
|
||||||
|
@dynamic placeholderImageURL;
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
if (!(self = [super init])) {
|
if (!(self = [super init])) {
|
||||||
@ -771,6 +774,16 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
|||||||
return _videoNode.shouldAggressivelyRecoverFromStall;
|
return _videoNode.shouldAggressivelyRecoverFromStall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setPlaceholderImageURL:(NSURL *)placeholderImageURL
|
||||||
|
{
|
||||||
|
_videoNode.URL = placeholderImageURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSURL*) placeholderImageURL
|
||||||
|
{
|
||||||
|
return _videoNode.URL;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setShouldAggressivelyRecoverFromStall:(BOOL)shouldAggressivelyRecoverFromStall
|
- (void)setShouldAggressivelyRecoverFromStall:(BOOL)shouldAggressivelyRecoverFromStall
|
||||||
{
|
{
|
||||||
if (_shouldAggressivelyRecoverFromStall == shouldAggressivelyRecoverFromStall) {
|
if (_shouldAggressivelyRecoverFromStall == shouldAggressivelyRecoverFromStall) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user