TCShowVoiceBottomView.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. //
  2. // TCShowLiveBottomView.h
  3. // TCShow
  4. //
  5. // Created by AlexiChen on 16/4/14.
  6. // Copyright © 2016年 AlexiChen. All rights reserved.
  7. //2
  8. #import <UIKit/UIKit.h>
  9. #import "JSBadgeView.h"
  10. typedef NS_ENUM(NSInteger, TCShowVoiceFunctionType)
  11. {
  12. EFunc_VOICE_GIFT = 1, // 礼物
  13. EFunc_VOICE_CONNECT_MIKE = 2, // 连麦
  14. EFunc_VOICE_CHART = 3, // 私信
  15. EFunc_VOICE_INPUT = 4, // 聊天
  16. EFunc_VOICE_GAME = 30, // 游戏
  17. EFunc_VOICE_MORE = 6, // 游戏
  18. EFunc_VOICE_FACE = 31, // 表情
  19. EFunc_VOICE_MUSIC = 32, // 音乐
  20. };
  21. @class TCShowVoiceBottomView;
  22. @protocol TCShowVoiceBottomViewDelegate <NSObject>
  23. @optional
  24. - (void)onBottomViewClickMenus:(TCShowLiveBottomView *)bottomView fromButton:(UIButton *)button;
  25. @end
  26. @protocol TCShowVoiceBottomViewMultiDelegate <NSObject>
  27. - (void)onBottomView:(TCShowVoiceBottomView *)bottomView operateCameraOf:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  28. - (void)onBottomView:(TCShowVoiceBottomView *)bottomView operateMicOf:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  29. - (void)onBottomView:(TCShowVoiceBottomView *)bottomView switchToMain:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  30. - (void)onBottomView:(TCShowVoiceBottomView *)bottomView cancelInteractWith:(id<AVMultiUserAble>)user fromButton:(UIButton *)button;
  31. @end
  32. @interface TCShowVoiceBottomView : BGBaseView
  33. {
  34. @protected
  35. id<AVMultiUserAble> _showUser; // 多人互动时才会用到
  36. NSMutableArray *_showFuncs;
  37. CGFloat _lastFloatBeauty; // 主要为界面上重新条开时一致
  38. CGRect _heartRect;
  39. MenuButton *_msgMenuBtn; // 发送消息按钮
  40. MenuButton *_starShopBtn; // 星店按钮
  41. MenuButton *_gamesBtn; // 插件中心按钮
  42. CurrentLiveInfo *_liveInfo;
  43. }
  44. @property (nonatomic, weak) id<TCShowVoiceBottomViewDelegate> delegate;
  45. @property (nonatomic, weak) id<TCShowVoiceBottomViewMultiDelegate> multiDelegate;
  46. @property (nonatomic, assign) CGRect heartRect; // 点亮起始位置、大小
  47. @property (nonatomic, copy) NSString *heartImgViewName; // 点亮图片名字
  48. @property (nonatomic, assign) BOOL isHost; // 是否主播
  49. @property (nonatomic, assign) BOOL canSendLightMsg; // 当前是否能够发送点赞
  50. @property (nonatomic, assign) NSInteger lightCount; // 点亮数量
  51. @property (nonatomic, strong) UIView *menusBottomView; // 用来放菜单的视图
  52. @property (nonatomic, strong) MenuButton *beginGameBtn; // 开始游戏按钮
  53. @property (nonatomic, strong) MenuButton *auctionBtn; // 竞拍按钮
  54. @property (nonatomic, strong) MenuButton *switchGameViewBtn; // 游戏视图开关
  55. @property (nonatomic, strong) MenuButton *switchBankerBtn; // 开启上庄,下庄
  56. @property (nonatomic, strong) MenuButton *grabBankerBtn; // 抢庄
  57. @property (nonatomic, strong) MenuButton *moreToolsBtn; // 更多功能
  58. @property(nonatomic, strong) MenuButton *shopBtn;//购物车按钮
  59. @property (nonatomic, strong) JSBadgeView *jsbadge; // 私聊的消息角标
  60. @property (nonatomic, strong) JSBadgeView *bjsbadge; // 上庄、下庄的消息角标
  61. @property (nonatomic, assign) NSInteger bankMessage; // 上庄、下庄的消息数量
  62. #if kSupportIMMsgCache
  63. @property (nonatomic, strong) NSMutableArray *praiseImageCache;
  64. @property (nonatomic, strong) NSMutableArray *praiseAnimationCache;
  65. #endif
  66. /**
  67. 请求完接口后,刷新直播间相关信息
  68. @param liveItem 视频Item
  69. @param liveInfo get_video2接口获取下来的数据实体
  70. */
  71. - (void)refreshLiveItem:(id<FWShowLiveRoomAble>)liveItem liveInfo:(CurrentLiveInfo *)liveInfo;
  72. - (void)addLiveFunc:(NSInteger)liveType; // 视频类型,对应的枚举:FW_LIVE_TYPE
  73. - (void)showLight; //显示点亮
  74. - (void)showLikeHeart;
  75. #if kSupportIMMsgCache
  76. - (void)showLikeHeart:(AVIMCache *)cache;
  77. #endif
  78. - (void)updateShowFunc;
  79. // 开始直播
  80. - (void)startLive;
  81. // 暂停直播
  82. - (void)pauseLive;
  83. // 重新开始直播
  84. - (void)resumeLive;
  85. // 结束直播
  86. - (void)endLive;
  87. @end