forked from facebookarchive/AsyncDisplayKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASVideoNode.h
More file actions
46 lines (33 loc) · 1.62 KB
/
ASVideoNode.h
File metadata and controls
46 lines (33 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <AsyncDisplayKit/AsyncDisplayKit.h>
@protocol ASVideoNodeDelegate;
// If you need ASVideoNode, please use AsyncDisplayKit master until this comment is removed.
// As of 1.9.6, ASVideoNode accidentally triggers creating the AVPlayerLayer even before playing
// the video. Using a lot of them intended to show static frame placeholders will be slow.
@interface ASVideoNode : ASControlNode
@property (atomic, strong, readwrite) AVAsset *asset;
@property (atomic, strong, readonly) AVPlayer *player;
@property (atomic, strong, readonly) AVPlayerItem *currentItem;
// When autoplay is set to true, a video node will play when it has both loaded and entered the "visible" interfaceState.
// If it leaves the visible interfaceState it will pause but will resume once it has returned
@property (nonatomic, assign, readwrite) BOOL shouldAutoplay;
@property (nonatomic, assign, readwrite) BOOL shouldAutorepeat;
@property (nonatomic, assign, readwrite) BOOL muted;
@property (atomic) NSString *gravity;
@property (atomic) ASButtonNode *playButton;
@property (atomic, weak, readwrite) id<ASVideoNodeDelegate> delegate;
- (void)play;
- (void)pause;
- (BOOL)isPlaying;
@end
@protocol ASVideoNodeDelegate <NSObject>
@optional
- (void)videoPlaybackDidFinish:(ASVideoNode *)videoNode;
- (void)videoNodeWasTapped:(ASVideoNode *)videoNode;
@end