mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASVideoNode, ASVideoPlayerNode] Add video composition and audio mix capabilities (#1800)
* [ASVideoNode] Add delegate method called when the currentItem is set. * [ASVideoNode] Add videoComposition and audioMix properties to the ASVideoNode. * [ASVideoPlayerNode] Add new initialiser with videoComposition and audioMix, and forward new delegate method. * [ASVideoPlayerNode] Forward missing ASVideoNodeDelegate methods.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#import <AsyncDisplayKit/ASButtonNode.h>
|
||||
#import <AsyncDisplayKit/ASNetworkImageNode.h>
|
||||
|
||||
@class AVAsset, AVPlayer, AVPlayerItem;
|
||||
@class AVAsset, AVPlayer, AVPlayerItem, AVVideoComposition, AVAudioMix;
|
||||
@protocol ASVideoNodeDelegate;
|
||||
|
||||
typedef enum {
|
||||
@@ -41,6 +41,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (BOOL)isPlaying;
|
||||
|
||||
@property (nullable, atomic, strong, readwrite) AVAsset *asset;
|
||||
@property (nullable, atomic, strong, readwrite) AVVideoComposition *videoComposition;
|
||||
@property (nullable, atomic, strong, readwrite) AVAudioMix *audioMix;
|
||||
|
||||
@property (nullable, atomic, strong, readonly) AVPlayer *player;
|
||||
@property (nullable, atomic, strong, readonly) AVPlayerItem *currentItem;
|
||||
@@ -121,6 +123,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* @param videoNode The videoNode
|
||||
*/
|
||||
- (void)videoNodeDidFinishInitialLoading:(ASVideoNode *)videoNode;
|
||||
/**
|
||||
* @abstract Delegate method invoked when the AVPlayerItem for the asset has been set up and can be accessed throught currentItem.
|
||||
* @param videoNode The videoNode.
|
||||
* @param currentItem The AVPlayerItem that was constructed from the asset.
|
||||
*/
|
||||
- (void)videoNode:(ASVideoNode *)videoNode didSetCurrentItem:(AVPlayerItem *)currentItem;
|
||||
/**
|
||||
* @abstract Delegate method invoked when the video node has recovered from the stall
|
||||
* @param videoNode The videoNode
|
||||
|
||||
Reference in New Issue
Block a user