WFCUConferenceManager.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //
  2. // WFCUConferenceManager.h
  3. // WFChatUIKit
  4. //
  5. // Created by Tom Lee on 2021/2/15.
  6. // Copyright © 2020 WildFireChat. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "WFCUConferenceCommandContent.h"
  10. #if WFCU_SUPPORT_VOIP
  11. extern NSString *kMuteStateChanged;
  12. @class WFZConferenceInfo;
  13. @class WFCUConferenceHistory;
  14. @protocol WFCUConferenceManagerDelegate <NSObject>
  15. -(void)onChangeModeRequest:(BOOL)isAudience;
  16. -(void)onReceiveCommand:(WFCUConferenceCommandType)commandType content:(WFCUConferenceCommandContent *)commandContent fromUser:(NSString *)sender;
  17. -(void)showToast:(NSString *)text;
  18. @end
  19. @interface WFCUConferenceManager : NSObject
  20. + (WFCUConferenceManager *)sharedInstance;
  21. @property (nonatomic, weak) id<WFCUConferenceManagerDelegate> delegate;
  22. @property (nonatomic, strong)WFZConferenceInfo *currentConferenceInfo;
  23. - (void)muteAudio:(BOOL)mute;
  24. - (void)muteVideo:(BOOL)mute;
  25. - (void)muteAudioVideo:(BOOL)mute;
  26. - (void)enableAudioDisableVideo;
  27. - (void)startScreansharing:(UIView *)view withAudio:(BOOL)withAudio;
  28. - (void)stopScreansharing;
  29. - (void)leaveConference:(BOOL)destroy;
  30. - (void)request:(NSString *)userId changeModel:(BOOL)isAudience inConference:(NSString *)conferenceId;
  31. - (void)addHistory:(WFZConferenceInfo *)info duration:(int)duration;
  32. - (NSArray<WFCUConferenceHistory *> *)getConferenceHistoryList;
  33. - (NSString *)linkFromConferenceId:(NSString *)conferenceId password:(NSString *)password;
  34. //主持人要求全部静音,allowMemberUnmute是否允许自主解除静音。
  35. - (void)requestRecording:(BOOL)recording;
  36. //展示带有单选框的alertview
  37. - (void)presentCommandAlertView:(UIViewController *)controller message:(NSString *)message actionTitle:(NSString *)actionTitle cancelTitle:(NSString *)cancelTitle contentText:(NSString *)contentText checkBox:(BOOL)checkBox actionHandler:(void (^)(BOOL checked))actionHandler cancelHandler:(void (^)(void))cancelHandler;
  38. - (void)joinChatroom;
  39. @property(nonatomic, assign)BOOL failureJoinChatroom;
  40. @property(nonatomic, assign)BOOL isOwner;
  41. //主持人要求全部静音,allowMemberUnmute是否允许自主解除静音。
  42. - (BOOL)requestMuteAll:(BOOL)allowMemberUnmute;
  43. //主持人中止全部静音,unmute是否解除静音。
  44. - (BOOL)requestUnmuteAll:(BOOL)unmute;
  45. //主持人要求成员更改mute状态。
  46. - (BOOL)requestMember:(NSString *)memberId Mute:(BOOL)isMute;
  47. //成员拒绝解除静音请求
  48. - (void)rejectUnmuteRequest;
  49. //成员申请解除静音,true是取消
  50. - (void)applyUnmute:(BOOL)isCancel isAudio:(BOOL)isAudio;
  51. //主持人批准成员的unmute的请求
  52. - (BOOL)approveMember:(NSString *)memberId unmute:(BOOL)isReject isAudio:(BOOL)isAudio;
  53. //主持人批准所有成员的unmute的请求
  54. - (BOOL)approveAllMemberUnmute:(BOOL)isReject isAudio:(BOOL)isAudio;
  55. //举手
  56. - (void)handup:(BOOL)handup;
  57. //把用户举手放下
  58. - (void)putMemberHandDown:(NSString *)memberId;
  59. //把所有用户举手放下
  60. - (void)putAllHandDown;
  61. //取消焦点用户
  62. - (BOOL)requestCancelFocus;
  63. //设置焦点用户
  64. - (BOOL)requestFocus:(NSString *)focusedUserId;
  65. //是否申请了unmute audio,等待主持人的批准
  66. @property(nonatomic, assign)BOOL isApplyingUnmuteAudio;
  67. //是否申请了unmute video,等待主持人的批准
  68. @property(nonatomic, assign)BOOL isApplyingUnmuteVideo;
  69. //主持人收到的申请unmute音频的请求
  70. @property(nonatomic, strong)NSMutableArray<NSString *> *applyingUnmuteAudioMembers;
  71. //主持人收到的申请unmute视频频的请求
  72. @property(nonatomic, strong)NSMutableArray<NSString *> *applyingUnmuteVideoMembers;
  73. //是否举手
  74. @property(nonatomic, assign)BOOL isHandup;
  75. //是否全部关闭麦克风
  76. @property(nonatomic, assign)BOOL isMuteAllAudio;
  77. //是否全部关闭摄像头
  78. @property(nonatomic, assign)BOOL isMuteAllVideo;
  79. //主持人收到的举手的请求
  80. @property(nonatomic, strong)NSMutableArray<NSString *> *handupMembers;
  81. //是否直播中
  82. - (BOOL)isBroadcasting;
  83. @property(nonatomic, assign)BOOL isAllowUnmuteAudioWhenMuteAll;
  84. @property(nonatomic, assign)BOOL isAllowUnMuteVideoWhenMuteAll;
  85. @end
  86. #endif