BGTLiveController.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //
  2. // BGTLiveController.h
  3. // BuguLive
  4. //
  5. // Created by xfg on 16/12/5.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. // 腾讯云直播,只处理与SDK有关的业务
  8. #import "STSuspensionWindow.h"
  9. #import "BGLiveServiceController.h"
  10. #import "BGTLiveBeautyView.h"
  11. #import "WMDragView.h"
  12. #import "LivingModel.h"
  13. /**
  14. * 该类只处理与SDK有关的业务,如有接入其他SDK时可参考该类;
  15. * 必须做的操作:1、重写父方法 2、实现FWLiveControllerAble协议
  16. */
  17. @interface BGTLiveController : BGLiveBaseController<FWLiveControllerAble,FWLiveServiceControllerDelegate,ToolsViewDelegate,TCShowLiveTopViewToSDKDelegate,FWTPlayControllerDelegate,FWTPublishControllerDelegate,livePayDelegate,FWTLinkMicPlayControllerDelegate,FWTLinkMicPublishControllerDelegate,FWTLiveBeautyViewDelegate,TCShowLiveViewForSDKDelegate,STSuspensionWindowDelegate,UIGestureRecognizerDelegate>
  18. {
  19. @private
  20. UISlider *_playProgress;
  21. UILabel *_playStart;
  22. UIButton *_btnPlay;
  23. NSInteger _micMaxNum; // 连麦最大数量
  24. MMAlertView *_applyMickingAlert; // 观众申请连麦中的弹窗
  25. MMAlertView *_hostMickingAlert; // 主播收到观众申请连麦中的弹窗
  26. BGTLiveBeautyView *_beautyView; // 美颜视图
  27. ToolsView *_toolsView;
  28. BOOL _isMickAudiencePushing; // 连麦观众是否正在推流
  29. BOOL _isMuted; // 当前是否静音状态
  30. }
  31. // 点播进度条容器视图
  32. @property (nonatomic, strong) UIView *reLiveProgressView;
  33. // 直播业务层
  34. @property (nonatomic, strong) BGLiveServiceController *liveServiceController;
  35. // 腾讯云直播的主播控制类
  36. @property (nonatomic, strong) BGTLinkMicPublishController *publishController;
  37. // 腾讯云直播的观众控制类
  38. @property (nonatomic, strong) BGTLinkMicPlayController *linkMicPlayController;
  39. @property (nonatomic, strong) BGTLinkMicPlayController *linkSecondMicPlayController;
  40. @property(nonatomic, strong) UIImageView *firstImgView;
  41. @property(nonatomic, strong) UIImageView *secondImgView;
  42. @property(nonatomic, strong) UIImageView *thirdImgView;
  43. @property(nonatomic, strong) UIViewController *currentVC;
  44. // 腾讯云直播的观众控制类、点播(回放、回播)
  45. @property (nonatomic, strong) BGTPlayController *playController;
  46. // 观众是否连麦申请中
  47. @property (nonatomic, assign) BOOL isApplyMicking;
  48. // 主播正在应答连麦申请中
  49. @property (nonatomic, assign) BOOL isResponseMicking;
  50. // 返回竖屏按钮
  51. @property (nonatomic, strong) UIButton *backVerticalBtn;
  52. //上下滑动直播间
  53. @property(nonatomic, strong) UIScrollView *liveScrollView;
  54. @property(nonatomic, assign) NSInteger now_LiveIndex;
  55. @property(nonatomic, strong) LivingModel *nowModel;
  56. //悬浮view
  57. @property(nonatomic, strong) WMDragView *hoverView;
  58. @property (nonatomic,assign) CGPoint startPoint;
  59. @property (nonatomic,strong) UIPanGestureRecognizer *panGestureRecognizer;
  60. @property (nonatomic,assign) CGFloat previousScale;
  61. @property(nonatomic, assign) BOOL mg_isHost;
  62. // 开始推流、拉流
  63. - (void)startLiveRtmp:(NSString *)playUrlStr;
  64. // 结束推流、拉流
  65. - (void)stopLiveRtmp;
  66. // 获取当前直播质量
  67. - (NSString *)getLiveQuality;
  68. // 获取当前视频容器视图的父视图
  69. - (UIView *)getPlayViewBottomView;
  70. // 设置静音 YES:设置为静音
  71. - (void)setSDKMute:(BOOL)bEnable;
  72. @end