//
//  HJPlayerView.h
//  2clip
//
//  Created by mac on 16/1/3.
//  Copyright 漏 2016骞?huijimuhe. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Video.h"
#import "HJMHPlayerProgressView.h"

@class HJMHPlayerView;

@protocol HJMHPlayerViewDelegate<NSObject>
@optional
- (void)playerTouchPlayerButton:(HJMHPlayerView*)UIView;
@end

typedef void(^handle)();

@interface HJMHPlayerView : UIView

//娣″嚭鏃堕棿
@property (nonatomic, assign) CGFloat fadeTime;
@property (nonatomic, weak) id<HJMHPlayerViewDelegate> delegate;
@property (nonatomic, strong) handle returnBlock;

- (instancetype)initWithVideo:(Video*)video videoTime:(NSInteger)videoTime;
//- (void)setWithTitle:(NSString*)title videoTime:(NSInteger)videoTime;

- (void)showPlayer;
- (void)hiddenPlayer;
/**
 *  鐢ㄤ簬鏇存柊鍙傛暟
 *
 */
- (void)updateValue:(handle) block;
/**
 *  鏇存柊鏃堕棿
 *  @param time 浼犻€掔鏁? */
- (void)updateCurrentTime:(CGFloat)currentTime bufferTime:(CGFloat)bufferTime allTime:(NSInteger)allTime;

@end
// 鐗堟潈灞炰簬鍘熶綔鑰?// http://code4app.com (cn) http://code4app.net (en)
// 鍙戝竷浠g爜浜庢渶涓撲笟鐨勬簮鐮佸垎浜綉绔? Code4App.com