BGVoiceController.h 3.7 KB

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