CNLivePlayerController.h 1.33 KB
//
//  CNLivePlayerController.h
//  SCIOLiveCN
//
//  Created by 李长浩 on 2017/6/1.
//  Copyright © 2017年 李长浩. All rights reserved.
//

#import <CNLivePlayerSDK/CNLiveMoviePlayerController.h>
#import "ZXVideo.h"

#define kZXVideoPlayerOriginalWidth  MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
#define kZXVideoPlayerOriginalHeight (kZXVideoPlayerOriginalWidth * (9.0 / 16.0))

@class CNLivePlayerController;

@protocol CNLivePlayerControllerDelegate <NSObject>
- (void)shareButtonCNLivePlayerController:(CNLivePlayerController *)view;

@end

@interface CNLivePlayerController : CNLiveMoviePlayerController

@property (nonatomic, weak) id<CNLivePlayerControllerDelegate> delegate;

@property (nonatomic, assign) CGRect frame;
/// video model
@property (nonatomic, strong, readwrite) ZXVideo *video;
/// 竖屏模式下点击返回
@property (nonatomic, copy) void(^videoPlayerGoBackBlock)(void);
/// 将要切换到竖屏模式
@property (nonatomic, copy) void(^videoPlayerWillChangeToOriginalScreenModeBlock)(void);
/// 将要切换到全屏模式
@property (nonatomic, copy) void(^videoPlayerWillChangeToFullScreenModeBlock)(void);

// 配置播放器
- (void)configPlayerWithFrame:(CGRect)frame isLiving:(BOOL)isLiving;

/// 展示播放器
- (void)showInView:(UIView *)view;

- (void)stopShow;

@end