BGTLinkMicPlayController.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // BGTLinkMicPlayController.h
  3. // BuguLive
  4. //
  5. // Created by xfg on 16/12/5.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. //
  8. #import "BGTPlayController.h"
  9. #import "TLiveMickListModel.h"
  10. #import "TCShowLiveView.h"
  11. #import <TXLiteAVSDK_Professional/TRTCCloud.h>
  12. @protocol ITCLivePushListener <NSObject>
  13. @optional
  14. - (void)onLivePushEvent:(NSString*)pushUrl withEvtID:(int)evtID andParam:(NSDictionary*)param;
  15. @optional
  16. - (void)onLivePushNetStatus:(NSString*)pushUrl withParam:(NSDictionary*)param;
  17. @end
  18. @interface TCLivePushListenerImpl: NSObject<TXLivePushListener>
  19. @property (nonatomic, strong) NSString *pushUrl;
  20. @property (nonatomic, weak) id<ITCLivePushListener> delegate;
  21. @end
  22. @protocol FWTLinkMicPlayControllerDelegate <NSObject>
  23. @required
  24. /*
  25. * 观众端连麦结果
  26. * isSucc:是否上麦
  27. * userID:当前用户ID
  28. */
  29. - (void)pushMickResult:(BOOL)isSucc userID:(NSString *)userID;
  30. @end
  31. @interface BGTLinkMicPlayController : BGTPlayController
  32. @property (nonatomic, weak) id<FWTLinkMicPlayControllerDelegate> linkMicPlayDelegate;
  33. @property (nonatomic, strong) NSMutableArray *playItemArray; // 连麦窗口视图列表
  34. @property (nonatomic, copy) NSString *push_rtmp2; // 腾讯云直播的小主播的 push_rtmp 推流地址(由大主播传给小主播)
  35. @property (nonatomic, copy) NSString *play_rtmp_acc; // 腾讯云直播的大主播的 rtmp_acc 播放地址(由大主播传给小主播)
  36. @property (nonatomic, assign) BOOL isClickedMickBtn; // 是否点击过连麦按钮(主要判断连麦观众是否中途有闪退过)
  37. @property (nonatomic, strong) NSMutableSet *linkMemeberSet; // 连麦观众列表
  38. @property (nonatomic, strong) TXLivePush *txLivePush; // SDK推流类
  39. @property (nonatomic,strong) TRTCCloud * trtcCloud;
  40. // 开始连麦
  41. - (void)startVideoLiveLinkMic;
  42. // 停止连麦
  43. - (void)stopLinkMic;
  44. // 结束视频
  45. - (void)endVideo;
  46. // 调整连麦窗口
  47. - (void)adjustPlayItem:(TLiveMickListModel *)mickListModel;
  48. //语音连麦
  49. - (void)adjustPlayItemVoiceUserList:(NSArray *)userlist;
  50. //声网dev
  51. //@property(nonatomic, strong) NSString *agora_token;
  52. //@property(nonatomic, strong) NSString *roomIDStr;
  53. @property (nonatomic, strong) CurrentLiveInfo *liveInfo; // 当前直播间信息
  54. -(void)updateLianMaiCoin;
  55. #pragma mark - 以下字段确定使用中
  56. /** // 是否正在等待连麦中... */
  57. @property (nonatomic, assign) BOOL isWaitingResponse;
  58. /** 是否正在连麦中,该字段使用中 */
  59. @property (nonatomic,assign) BOOL isLinkingMic;
  60. @end