| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- //
- // TCShowLiveTopView.h
- // TCShow
- //
- // Created by AlexiChen on 16/4/14.
- // Copyright © 2016年 AlexiChen. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "UserModel.h"
- #import "AudienceEnteringTipView.h"
- @interface TCShowLiveTimeView : UIView
- {
- @protected
- MenuButton *_hostHeadBtn;
- UIImageView *_hostVImgView;
- UILabel *_liveTitle;
- UILabel *_liveAudience;
-
- BOOL _isHost; // 是否主播
- }
- @property (nonatomic, readonly) MenuButton *hostHeadBtn; // 主播头像
- @property (nonatomic, readonly) UIImageView *hostVImgView; // 主播认证图标
- @property (nonatomic, readonly) UILabel *liveTitle; // 直播Live
- @property (nonatomic, readonly) UILabel *liveAudience; // 观众数
- @property (nonatomic, strong) UIButton *liveFollow; // 关注按钮
- @property (nonatomic, assign) NSInteger watchNumber; // 观众数量
- @property (nonatomic, weak) id<FWShowLiveRoomAble> liveItem;
- @property(nonatomic, strong) UILabel *roomId;
- /**
- 初始化房间信息等
-
- @param liveItem 房间信息
- @param liveController 直播VC
- @return self
- */
- - (instancetype)initWith:(id<FWShowLiveRoomAble>)liveItem liveController:(id<FWLiveControllerAble>)liveController;
- /**
- 请求完接口后,刷新直播间相关信息
-
- @param liveItem 视频Item
- @param liveInfo get_video2接口获取下来的数据实体
- */
- - (void)refreshLiveItem:(id<FWShowLiveRoomAble>)liveItem liveInfo:(CurrentLiveInfo *)liveInfo;
- - (void)onImUsersEnterLive;
- - (void)onImUsersExitLive;
- @end
- //==========================================================
- @class TCShowLiveTopView;
- @protocol TCShowLiveTopViewDelegate <NSObject>
- @optional
- // 点击用户头像
- - (void)onTopView:(TCShowLiveTopView *)topView userModel:(UserModel *)userModel;
- // 点击关注按钮
- - (void)followAchor:(TCShowLiveTopView *)topView;
- // 进入印票排行榜
- - (void)goToContributionList:(TCShowLiveTopView *)topView;
- // 进入守护排行榜
- - (void)goToWardPopView:(TCShowLiveTopView *)topView;
- // 点击VIP
- - (void)goToVipPopView:(TCShowLiveTopView *)topView;
- // 最新点击+ -跳转
- - (void)onTopView:(TCShowLiveTopView *)topView andCount:(int)count;
- // ykk 控制半VC退出
- - (void)clickTopViewUserHeaderMustQuitAllHalfVC:(TCShowLiveTopView*)topView;
- -(void)userlistRefresh;
- @end
- @protocol TCShowLiveTopViewToSDKDelegate <NSObject>
- @required
- // 推拉流请求所的码率
- - (void)refreshKBPS:(TCShowLiveTopView *)topView;
- @end
- @interface TCShowLiveTopView : UIView<UICollectionViewDataSource,UICollectionViewDelegate>
- {
-
- @protected
-
- TCShowLiveTimeView *_timeView;
- UICollectionView *_collectionView;
- UILabel *_ticketNameLabel;
- UIImageView *_moreImgView;
- UIImageView *_moreWardImgView;
-
- UIImageView *_numRightImgView;//右边人气值
- UILabel *_numRightTitleL;//右边人气数值
- UILabel *_numRightSubTitleL;//右边人气数值描述
-
- __weak id<FWShowLiveRoomAble> _liveItem; // 开启、观看直播传入的实体
- NetHttpsManager *_httpManager;
-
- NSTimer *_liveRateTimer; // 刷新当前推拉流请求所的码率定时器
-
- BOOL _isHost; // 是否主播
- NSString *_groupIdStr; // 群聊ID
-
- }
- @property (nonatomic, readonly) TCShowLiveTimeView *timeView;
- @property (nonatomic, strong) UICollectionView *collectionView;
- @property (nonatomic, weak) id<TCShowLiveTopViewDelegate> toServicedelegate;
- @property (nonatomic, weak) id<TCShowLiveTopViewToSDKDelegate> toSDKDelegate;
- @property (nonatomic, copy) NSString *is_private; // 是否是私密
- @property (nonatomic, strong) NSMutableArray *userArray; // 用户列表
- @property (nonatomic, assign) int has_admin; // 通过这个成员变量来判断是否是管理员(判断是否有加减号)
- @property (nonatomic, assign) BOOL isShowFollowBtn; // 是否显示关注按钮
- // 账号
- @property (nonatomic, strong) UILabel *accountLabel;
- // 印票
- @property (nonatomic, strong) UIView *otherContainerView;
- // 守护
- @property (nonatomic, strong) UIView *wardContainerView;
- @property (nonatomic, strong) UILabel *ticketNumLabel; // 印票数
- @property (nonatomic, strong) UILabel *wardNumLabel; //守护数
- @property (nonatomic, strong) UIButton *wardBtn;//贵族按钮
- @property (nonatomic, strong) UIButton *vipBtn;//VIP按钮
- // 推拉流码率
- @property (nonatomic, strong) UIView *kbpsContainerView;
- @property (nonatomic, strong) UILabel *kbpsRecvLabel;
- @property (nonatomic, strong) UILabel *kbpsSendLabel;
- // 最高价(竞拍)
- @property (nonatomic, strong) UILabel *titleNameLabel;
- @property (nonatomic, strong) UILabel *priceLabel;
- @property (nonatomic, strong) UIView *priceView;
- @property (nonatomic, strong) UIImageView *otherMoreView;
- @property(nonatomic, copy) void (^clickVipBlock)(BOOL isClick);
- @property (nonatomic, strong) NSDictionary *wardJson;
- //获取守护列表数据
- - (void)requestWardData;
- /**
- 初始化房间信息等
-
- @param liveItem 房间信息
- @param liveController 直播VC
- @return self
- */
- - (instancetype)initWith:(id<FWShowLiveRoomAble>)liveItem liveController:(id<FWLiveControllerAble>)liveController;
- /**
- 请求完接口后,刷新直播间相关信息
-
- @param liveItem 视频Item
- @param liveInfo get_video2接口获取下来的数据实体
- */
- - (void)refreshLiveItem:(id<FWShowLiveRoomAble>)liveItem liveInfo:(CurrentLiveInfo *)liveInfo;
- // 观众进入直播间
- - (void)onImUsersEnterLive:(UserModel *)userModel;
- // 观众退出直播间
- - (void)onImUsersExitLive:(UserModel *)userModel;
- // 更新otherContainerView的frame
- - (void)relayoutOtherContainerViewFrame;
- /**
- 首次获取观众列表
- @param responseJson get_video接口的数据
- */
- - (void)refreshAudienceList:(NSDictionary *)responseJson;
- /**
- 初始化观众数量、列表
- @param watch_number 观众数量
- */
- - (void)setupLiveAudience:(NSString *)watch_number;
- /**
- 刷新观众列表
- @param customMessageModel Model
- */
- - (void)refreshLiveAudienceList:(CustomMessageModel *)customMessageModel;
- /**
- 刷新印票数量
- @param ticketCount 印票数量
- */
- - (void)refreshTicketCount:(NSString *)ticketCount;
- //刷新人气值
- - (void)refreshHostNumCount:(NSString *)numCount;
- // 开始直播
- - (void)startLive;
- // 暂停直播
- - (void)pauseLive;
- // 重新开始直播
- - (void)resumeLive;
- // 结束直播
- - (void)endLive;
- @end
|