//
//  TTVideoView.h
//  DFTTFramework
//
//  Created by 路鹏 on 2017/4/19.
//  Copyright © 2017年 路鹏. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TTVideocfg.h"
#import "DFTTNS_ENUM.h"

typedef void(^TTVideoViewSuccessBlock)(NSString *success);
typedef void(^TTVideoViewFailBlock)(NSString *fail);

@interface TTVideoView : UIView
@property (nonatomic, assign) id delegate;
@property (nonatomic, assign) BOOL isScroll;            //是否可以滑动(动态控制)

/** 初始化方法 */
- (instancetype)initWithFrame:(CGRect)frame withNewsType:(TTVideocfg *)newscfg withSuccessBlock:(TTVideoViewSuccessBlock)successBlock withFailBlock:(TTVideoViewFailBlock)failBlock;
- (void)stopPlay;
- (void)refreshCurrentTab;
- (void)scrollToIndex:(NSUInteger)index;
@end


@protocol TTVideoViewDelegate <NSObject>

@optional
/** 新闻列表点击代理回调 */
- (void)TTVidelView:(TTVideoView *)newsView CellClickWithNewsListModel:(id)newsListModel withNewsListCellType:(TTNewsListViewCellPushViewType)pushViewType;
//视频打开回调
- (void)TTVideoView:(TTVideoView *)videoView WillOpenNewsPageUrl:(NSString *)url NewsModel:(id)model PushType:(TTNewsListViewCellPushViewType)type;

/** 返回按钮点击 */
- (void)TTNewsViewBackBtnClick:(TTVideoView *)newsView;
/** 执行返回顶部方法回调 */
- (void)TTNewsViewBackToTop:(TTVideoView *)newsView;
@end
