GKDYVideoView.h
2.03 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//
// GKDYVideoView.h
// GKDYVideo
//
// Created by QuintGao on 2018/9/23.
// Copyright © 2018 QuintGao. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GKDYVideoControlView.h"
#import <NELivePlayerFramework/NELivePlayerController.h>
NS_ASSUME_NONNULL_BEGIN
#ifdef DEBUG
#define MYLog(FORMAT, ...) fprintf(stderr,"%s\n",[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
#else
#define MYLog(...)
#endif
@class GKDYVideoView;
@protocol GKDYVideoViewDelegate <NSObject>
@optional
- (void)videoView:(GKDYVideoView *)videoView didClickIcon:(ATRecord *)model;
- (void)videoView:(GKDYVideoView *)videoView didClickPraise:(ATRecord *)model;
- (void)videoView:(GKDYVideoView *)videoView didClickComment:(ATRecord *)model;
- (void)videoView:(GKDYVideoView *)videoView didClickShare:(ATRecord *)model;
- (void)videoView:(GKDYVideoView *)videoView didScrollIsCritical:(BOOL)isCritical;
- (void)videoView:(GKDYVideoView *)videoView didPanWithDistance:(CGFloat)distance isEnd:(BOOL)isEnd;
- (void)loadMoreData:(NSInteger)index;
- (void)indexChanged:(NSInteger)index;
- (void)startPlay: (UIView *)view url: (NSString *)url next: (NSArray *)nextUrls;
- (void)pausePlayer;
- (void)resumePlayer;
- (void)stopPlayer;
- (void)dismissPlayer;
- (void)removeVideo;
@end
@interface GKDYVideoView : UIView
@property (nonatomic, weak) id<GKDYVideoViewDelegate> delegate;
@property (nonatomic, strong) ATRecord *viewModel;
@property (nonatomic, strong) UIButton *backBtn;
// 当前播放内容的视图
@property (nonatomic, strong) GKDYVideoControlView *currentPlayView;
// 当前播放内容的索引
@property (nonatomic, assign) NSInteger currentPlayIndex;
@property (nonatomic, weak) NELivePlayerController *netPlayer;
- (instancetype)initWithVC:(UIViewController *)vc isPushed:(BOOL)isPushed;
- (void)setModels:(NSArray *)models index:(NSInteger)index;
- (void)appendModels:(NSArray *)models;
- (void)pause;
- (void)resume;
- (void)destoryPlayer;
- (void)frontControl;
@end
NS_ASSUME_NONNULL_END