TCShowLiveBottomView.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //
  2. // TCShowLiveBottomView.h
  3. // TCShow
  4. //
  5. // Created by AlexiChen on 16/4/14.
  6. // Copyright © 2016年 AlexiChen. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "JSBadgeView.h"
  10. typedef NS_ENUM(NSInteger, TCShowLiveFunctionType)
  11. {
  12. EFunc_GIFT = 3, // 礼物
  13. EFunc_CONNECT_MIKE = 4, // 连麦
  14. EFunc_SHARE = 5, // 分享 ==》待定
  15. EFunc_CHART = 6, // 私信
  16. EFunc_INPUT = 7, // 显示消息输入
  17. EFunc_STARSHOP = 8, // 星店按钮 ==》主播放里面,观众放外面
  18. EFunc_AUCTION = 9, // 竞拍按钮 ==》主播放里面,观众放外面
  19. EFunc_SALES_SUSWINDOW = 10, // 缩放 悬浮 window btn
  20. EFunc_GAMES = 11, // 游戏按钮
  21. EFunc_BEGINGAMES = 12, // 发牌
  22. EFunc_LIVEPAY = 13, // 付费
  23. EFunc_MENTION = 14, // 提档
  24. EFunc_SWITCHGAMEVIEW = 15, // 游戏视图显示或隐藏
  25. EFunc_SWITCH_BANNER = 16, // 上庄下庄控制按钮
  26. EFunc_GRAB_BANNER = 17, // 玩家抢庄
  27. EFunc_MYSHOP = 18, // 我的小店按钮
  28. EFunc_MORETOOLS = 19, // 更多功能
  29. EFunc_FULL_SCREEN = 20, // 全屏
  30. EFunc_PK = 21, // PK
  31. EFunc_WISH = 22, // 心愿
  32. EFunc_SHOP = 23, // 购物车
  33. EFunc_CLOSE = 24, //关闭直播间按钮
  34. EFunc_RED_PACK = 25, //红包
  35. };
  36. @class TCShowLiveBottomView;
  37. @protocol TCShowLiveBottomViewDelegate <NSObject>
  38. @optional
  39. - (void)onBottomViewClickMenus:(TCShowLiveBottomView *)bottomView fromButton:(UIButton *)button;
  40. @end
  41. @protocol TCShowLiveBottomViewMultiDelegate <NSObject>
  42. - (void)onBottomView:(TCShowLiveBottomView *)bottomView operateCameraOf:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  43. - (void)onBottomView:(TCShowLiveBottomView *)bottomView operateMicOf:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  44. - (void)onBottomView:(TCShowLiveBottomView *)bottomView switchToMain:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  45. - (void)onBottomView:(TCShowLiveBottomView *)bottomView cancelInteractWith:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  46. @end
  47. @interface TCShowLiveBottomView : BGBaseView
  48. {
  49. @protected
  50. id<AVMultiUserAble> _showUser; // 多人互动时才会用到
  51. NSMutableArray *_showFuncs;
  52. CGFloat _lastFloatBeauty; // 主要为界面上重新条开时一致
  53. CGRect _heartRect;
  54. MenuButton *_msgMenuBtn; // 发送消息按钮
  55. MenuButton *_starShopBtn; // 星店按钮
  56. MenuButton *_gamesBtn; // 插件中心按钮
  57. CurrentLiveInfo *_liveInfo;
  58. }
  59. @property (nonatomic, weak) id<TCShowLiveBottomViewDelegate> delegate;
  60. @property (nonatomic, weak) id<TCShowLiveBottomViewMultiDelegate> multiDelegate;
  61. @property (nonatomic, assign) CGRect heartRect; // 点亮起始位置、大小
  62. @property (nonatomic, copy) NSString *heartImgViewName; // 点亮图片名字
  63. @property (nonatomic, assign) BOOL isHost; // 是否主播
  64. @property (nonatomic, assign) BOOL canSendLightMsg; // 当前是否能够发送点赞
  65. @property (nonatomic, assign) NSInteger lightCount; // 点亮数量
  66. @property (nonatomic, strong) UIView *menusBottomView; // 用来放菜单的视图
  67. @property (nonatomic, strong) MenuButton *beginGameBtn; // 开始游戏按钮
  68. @property (nonatomic, strong) MenuButton *auctionBtn; // 竞拍按钮
  69. @property (nonatomic, strong) MenuButton *switchGameViewBtn; // 游戏视图开关
  70. @property (nonatomic, strong) MenuButton *switchBankerBtn; // 开启上庄,下庄
  71. @property (nonatomic, strong) MenuButton *grabBankerBtn; // 抢庄
  72. @property (nonatomic, strong) MenuButton *moreToolsBtn; // 更多功能
  73. @property(nonatomic, strong) MenuButton *shopBtn;//购物车按钮
  74. @property (nonatomic, strong) JSBadgeView *jsbadge; // 私聊的消息角标
  75. @property (nonatomic, strong) JSBadgeView *bjsbadge; // 上庄、下庄的消息角标
  76. @property (nonatomic, assign) NSInteger bankMessage; // 上庄、下庄的消息数量
  77. #if kSupportIMMsgCache
  78. @property (nonatomic, strong) NSMutableArray *praiseImageCache;
  79. @property (nonatomic, strong) NSMutableArray *praiseAnimationCache;
  80. #endif
  81. /**
  82. 请求完接口后,刷新直播间相关信息
  83. @param liveItem 视频Item
  84. @param liveInfo get_video2接口获取下来的数据实体
  85. */
  86. - (void)refreshLiveItem:(id<FWShowLiveRoomAble>)liveItem liveInfo:(CurrentLiveInfo *)liveInfo;
  87. - (void)addLiveFunc:(NSInteger)liveType; // 视频类型,对应的枚举:FW_LIVE_TYPE
  88. - (void)showLight; //显示点亮
  89. - (void)showLikeHeart;
  90. #if kSupportIMMsgCache
  91. - (void)showLikeHeart:(AVIMCache *)cache;
  92. #endif
  93. - (void)updateShowFunc;
  94. // 开始直播
  95. - (void)startLive;
  96. // 暂停直播
  97. - (void)pauseLive;
  98. // 重新开始直播
  99. - (void)resumeLive;
  100. // 结束直播
  101. - (void)endLive;
  102. @end