EZUIKit  2.0
 全部  函数 属性
EZUIPlayer.h
1 //
2 // EZUIPlayer.h
3 // EZUIKit
4 //
5 // Created by linyong on 2017/2/7.
6 // Copyright © 2017年 linyong. All rights reserved.
7 //
8 
9 #import <UIKit/UIKit.h>
10 
11 @class EZUIPlayer;
12 @class EZUIError;
13 
14 typedef enum
15 {
16  EZUIKIT_PLAYMODE_LIVE = 0,//预览
17  EZUIKIT_PLAYMODE_REC,//回放
18  EZUIKIT_PLAYMODE_MAX //越界标识,默认值
19 }EZUIKitPlayMode;//播放器模式
20 
21 @protocol EZUIPlayerDelegate <NSObject>
22 
23 @optional
24 
31 - (void) EZUIPlayer:(EZUIPlayer *) player didPlayFailed:(EZUIError *) error;
32 
38 - (void) EZUIPlayerPlaySucceed:(EZUIPlayer *) player;
39 
47 - (void) EZUIPlayer:(EZUIPlayer *) player previewWidth:(CGFloat) pWidth previewHeight:(CGFloat) pHeight;
48 
53 - (void) EZUIPlayerPrepared:(EZUIPlayer *) player;
54 
59 - (void) EZUIPlayerFinished:(EZUIPlayer *) player;
60 
66 - (void) EZUIPlayerPlayTime:(NSDate *) osdTime;
67 
68 @end
69 
71 @interface EZUIPlayer : NSObject
72 
73 @property (nonatomic,readonly) UIView *previewView;
74 @property (nonatomic,weak) id<EZUIPlayerDelegate> mDelegate;
75 @property (nonatomic,strong) UIView *customIndicatorView;
76 @property (nonatomic,readonly) NSMutableArray *recordList;//录像列表
77 
84 + (EZUIPlayer *) createPlayerWithUrl:(NSString *) url;
85 
95 + (EZUIPlayer *) createPlayerWithSerial:(NSString *) serial
96  cameraNo:(NSUInteger) cameraNo
97  verifyCode:(NSString *) verifyCode
98  hd:(BOOL) isHd;
99 
106 + (EZUIKitPlayMode) getPlayModeWithUrl:(NSString *) urlStr;
107 
113 - (void) setEZOpenUrl:(NSString *) urlStr;
114 
118 - (void) startPlay;
119 
123 - (void) stopPlay;
124 
128 - (void) pausePlay;
129 
133 - (void) resumePlay;
134 
140 - (void) seekToTime:(NSDate *) time;
141 
145 - (void) releasePlayer;
146 
152 - (void) setPreviewFrame:(CGRect) frame;
153 
154 @end
NSMutableArray * recordList
默认为系统自带加载动画,如用户自定义需自行控制动画,设置为nil则无加载动画
Definition: EZUIPlayer.h:76
void startPlay()
Definition: EZUIPlayer.h:21
void stopPlay()
播放器类
Definition: EZUIPlayer.h:71
UIView * customIndicatorView
代理
Definition: EZUIPlayer.h:75
void releasePlayer()
void pausePlay()
错误信息类
Definition: EZUIError.h:73
id< EZUIPlayerDelegate > mDelegate
展示画面的视图
Definition: EZUIPlayer.h:74
void resumePlay()