mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASVideoPlayerNode] Added an optional full screen button (#2688)
* full screen button for ASVideoPlayerNode * fixed a small issue when disabling controlsDisabled is set * styling fixed * make videoNode public on ASVidePlayerNode * [ASVideoPlayerNode] fixed an issue when re-enabling the controls the duration time label didn't updated correctly * [ASVideoPlayerNode] Check if CMTime is valid before setting the labels
This commit is contained in:
committed by
Adlai Holler
parent
69e6f4e387
commit
3506cec1c0
@@ -24,6 +24,7 @@ typedef enum {
|
||||
ASVideoPlayerNodeControlTypeElapsedText,
|
||||
ASVideoPlayerNodeControlTypeDurationText,
|
||||
ASVideoPlayerNodeControlTypeScrubber,
|
||||
ASVideoPlayerNodeControlTypeFullScreenButton,
|
||||
ASVideoPlayerNodeControlTypeFlexGrowSpacer,
|
||||
} ASVideoPlayerNodeControlType;
|
||||
|
||||
@@ -50,6 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState;
|
||||
@property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall;
|
||||
@property (nullable, nonatomic, strong, readwrite) NSURL *placeholderImageURL;
|
||||
@property (nonatomic, strong, readonly) ASVideoNode *videoNode;
|
||||
|
||||
//! Defaults to 100
|
||||
@property (nonatomic, assign) int32_t periodicTimeObserverTimescale;
|
||||
@@ -125,6 +127,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#pragma mark - Playback button delegate methods
|
||||
- (UIColor *)videoPlayerNodePlaybackButtonTint:(ASVideoPlayerNode *)videoPlayer;
|
||||
|
||||
#pragma mark - Fullscreen button delegate methods
|
||||
|
||||
- (UIImage *)videoPlayerNodeFullScreenButtonImage:(ASVideoPlayerNode *)videoPlayer;
|
||||
|
||||
|
||||
#pragma mark ASVideoNodeDelegate proxy methods
|
||||
/**
|
||||
@@ -132,6 +138,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* @param videoPlayerNode The ASVideoPlayerNode that was tapped.
|
||||
*/
|
||||
- (void)didTapVideoPlayerNode:(ASVideoPlayerNode *)videoPlayer;
|
||||
|
||||
/**
|
||||
* @abstract Delegate method invoked when fullcreen button is taped.
|
||||
* @param buttonNode The fullscreen button node that was tapped.
|
||||
*/
|
||||
- (void)didTapFullScreenButtonNode:(ASButtonNode *)buttonNode;
|
||||
|
||||
/**
|
||||
* @abstract Delegate method invoked when ASVideoNode playback time is updated.
|
||||
* @param videoPlayerNode The video player node
|
||||
|
||||
Reference in New Issue
Block a user