mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-15 18:59:54 +00:00
replaced deprecated methods
This commit is contained in:
parent
053b14992c
commit
3d5385dad3
@ -19,7 +19,6 @@ typedef enum {
|
||||
ASVideoNodePlayerStatePlaybackLikelyToKeepUpButNotPlaying,
|
||||
ASVideoNodePlayerStatePlaying,
|
||||
ASVideoNodePlayerStateLoading,
|
||||
ASVideoNodePlayerStatePlaying,
|
||||
ASVideoNodePlayerStatePaused,
|
||||
ASVideoNodePlayerStateFinished
|
||||
} ASVideoNodePlayerState;
|
||||
|
||||
@ -107,7 +107,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)didTapVideoPlayerNode:(ASVideoPlayerNode *)videoPlayer;
|
||||
/**
|
||||
* @abstract Delegate method invoked when ASVideoNode playback time is updated.
|
||||
* @param videoPlayerNode The video node that was tapped.
|
||||
* @param videoPlayerNode The video player node
|
||||
* @param second current playback time.
|
||||
*/
|
||||
- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer didPlayToTime:(CMTime)time;
|
||||
@ -119,7 +119,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* @param toSate ASVideoNode new state.
|
||||
* @discussion This method is called after each state change
|
||||
*/
|
||||
- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer willChangeVideoNodeState:(ASVideoNodePlayerState)state toVideoNodeState:(ASVideoNodePlayerState)toSate;
|
||||
- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer willChangeVideoNodeState:(ASVideoNodePlayerState)state toVideoNodeState:(ASVideoNodePlayerState)toState;
|
||||
|
||||
/**
|
||||
* @abstract Delegate method is invoked when ASVideoNode decides to change state.
|
||||
|
||||
@ -368,7 +368,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)videoNode:(ASVideoNode *)videoNode didPlayToSecond:(NSTimeInterval)second
|
||||
- (void)videoNode:(ASVideoNode *)videoNode didPlayToTimeInterval:(NSTimeInterval)timeInterval
|
||||
{
|
||||
//TODO: ask Max about CMTime problem in ASVideoNode Header file
|
||||
//as we said yesterday, we must use CMTime in ASVideoNode instead of NSTimeInterval
|
||||
@ -382,22 +382,22 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
||||
}
|
||||
|
||||
if (_elapsedTextNode) {
|
||||
[self updateElapsedTimeLabel:second];
|
||||
[self updateElapsedTimeLabel:timeInterval];
|
||||
}
|
||||
|
||||
if (_scrubberNode) {
|
||||
[(UISlider*)_scrubberNode.view setValue:(second/ CMTimeGetSeconds(_duration) ) animated:NO];
|
||||
[(UISlider*)_scrubberNode.view setValue:( timeInterval / CMTimeGetSeconds(_duration) ) animated:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)videoPlaybackDidFinish:(ASVideoNode *)videoNode
|
||||
- (void)videoDidPlayToEnd:(ASVideoNode *)videoNode
|
||||
{
|
||||
if (_delegateFlags.delegateVideoNodePlaybackDidFinish) {
|
||||
[_delegate videoPlayerNodeDidPlayToEnd:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)videoNodeWasTapped:(ASVideoNode *)videoNode
|
||||
- (void)didTapVideoNode:(ASVideoNode *)videoNode
|
||||
{
|
||||
if (_delegateFlags.delegateDidTapVideoPlayerNode) {
|
||||
[_delegate didTapVideoPlayerNode:self];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user