HyphenateSDK  3.7.4
IEMConferenceManager.h
1 
15 #ifndef IEMConferenceManager_h
16 #define IEMConferenceManager_h
17 
18 #import <Foundation/Foundation.h>
19 #import <AVFoundation/AVFoundation.h>
20 
21 #import "EMCallConference.h"
22 #import "EMConferenceManagerDelegate.h"
23 
24 #import "EMLocalAudioDataDelegate.h"
25 #import "EMRemoteAudioDataDelegate.h"
26 
27 #import "EMCallVideoView.h"
28 #import "EMWaterMarkOption.h"
29 #import "EMWhiteboard.h"
30 
38 @interface RoomConfig:NSObject
46 @property (nonatomic) EMConferenceType confrType;
54 @property (nonatomic) BOOL isMerge;
62 @property (nonatomic) BOOL isRecord;
70 @property (nonatomic) BOOL isSupportWechatMiniProgram;
78 @property (nonatomic) NSString* nickName;
86 @property (nonatomic) NSString* ext;
94 @property (nonatomic) NSInteger maxTalkerCount ;
102 @property (nonatomic) NSInteger maxVideoCount;
110 @property (nonatomic) NSInteger maxAudienceCount;
118 @property (nonatomic) NSInteger maxPubDesktopCount;
126 @property (nonatomic) LiveConfig* liveConfig;
127 @end
128 
136 typedef NS_ENUM(NSInteger,EMWBLayout)
137 {
145  EMWBLayoutBottom,
153  EMWBLayoutRight,
161  EMWBLayoutTop,
162  EMWBLayoutUnknown = -1,
163 };
164 
165 typedef NS_ENUM(NSInteger,EMUplaodPattern){
166  TOP,
167  BEFORE,
168  AFTER,
169  END
170 };
171 
172 typedef NS_ENUM(NSInteger,EMGlobalButton){
173  ALL = 0,
174  NO_UPLAOD
175 };
176 
184 @interface EMWhiteboardConfig : NSObject
192 @property (nonatomic) BOOL interact;
200 @property (nonatomic) EMWBLayout layout;
208 @property (nonatomic) NSString* ratio;
216 @property (nonatomic) EMUplaodPattern pattern;
224 @property (nonatomic) EMGlobalButton button;
225 @end
226 
227 @class EMError;
228 
236 typedef enum {
237  EMConferenceModeNormal = 0,
238  EMConferenceModeLarge,
239 } EMConferenceMode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
240 
248 @protocol IEMConferenceManager <NSObject>
249 
250 @optional
251 
252 #pragma mark - Delegate
253 
267 - (void)addDelegate:(id<EMConferenceManagerDelegate>)aDelegate
268  delegateQueue:(dispatch_queue_t)aQueue;
269 
281 - (void)removeDelegate:(id<EMConferenceManagerDelegate>)aDelegate;
282 
296 - (void)addLocalAudioDataDelegate:(id<EMLocalAudioDataDelegate>)aDelegate
297  delegateQueue:(dispatch_queue_t)aQueue;
298 
310 - (void)removeLocalAudioDataDelegate:(id<EMLocalAudioDataDelegate>)aDelegate;
311 
325 - (void)addRemoteAudioDataDelegate:(id<EMRemoteAudioDataDelegate>)aDelegate
326  delegateQueue:(dispatch_queue_t)aQueue;
327 
339 - (void)removeRemoteAudioDataDelegate:(id<EMRemoteAudioDataDelegate>)aDelegate;
340 
341 #pragma mark - Conference
342 
358 - (void)setAppkey:(NSString *)aAppkey
359  username:(NSString *)aUsername
360  token:(NSString *)aToken;
361 
379 - (NSString *)getMemberNameWithAppkey:(NSString *)aAppkey
380  username:(NSString *)aUserName;
381 
397 - (void)getConference:(NSString *)aConfId
398  password:(NSString *)aPassword
399  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
400 
416 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
417  password:(NSString *)aPassword
418  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
419 
420 
440 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
441  password:(NSString *)aPassword
442  record:(BOOL)isRecord
443  mergeStream:(BOOL)isMerge
444  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
445 
467 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
468  password:(NSString *)aPassword
469  record:(BOOL)isRecord
470  mergeStream:(BOOL)isMerge
471  isSupportWechatMiniProgram:(BOOL)isSupportWechatMiniProgram
472  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
473 
503 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
504  password:(NSString *)aPassword
505  record:(BOOL)isRecord
506  mergeStream:(BOOL)isMerge
507  isSupportWechatMiniProgram:(BOOL)isSupportWechatMiniProgram
508  liveConfig:(LiveConfig*)aLiveConfig
509  maxVideoCount:(NSInteger)aMaxVideoCount
510  maxTalkerCount:(NSInteger)aMaxTalkerCount
511  maxAudienceCount:(NSInteger)aMaxAudienceCount
512  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
530 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
531  password:(NSString *)aPassword
532  confrConfig:(RoomConfig*)aConfrConfig
533  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
549 - (void)joinConferenceWithConfId:(NSString *)aConfId
550  password:(NSString *)aPassword
551  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
552 
570 - (void)joinConferenceWithConfId:(NSString *)aConfId
571  password:(NSString *)aPassword
572  role:(EMConferenceRole)aRole
573  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
591 -(void)joinRoom:(NSString*)roomName
592  password:(NSString*)aPassword
593  role:(EMConferenceRole)role
594  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
614 -(void)joinRoom:(NSString*)roomName
615  password:(NSString*)aPassword
616  role:(EMConferenceRole)role
617  roomConfig:(RoomConfig*)roomConfig
618  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
632 - (void)joinConferenceWithTicket:(NSString *)aTicket
633  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
634 
650 - (void)publishConference:(EMCallConference *)aCall
651  streamParam:(EMStreamParam *)aStreamParam
652  completion:(void (^)(NSString *aPubStreamId, EMError *aError))aCompletionBlock;
653 
669 - (void)unpublishConference:(EMCallConference *)aCall
670  streamId:(NSString *)aStreamId
671  completion:(void (^)(EMError *aError))aCompletionBlock;
672 
690 - (void)subscribeConference:(EMCallConference *)aCall
691  streamId:(NSString *)aStreamId
692  remoteVideoView:(EMCallRemoteVideoView *)aRemoteView
693  completion:(void (^)(EMError *aError))aCompletionBlock;
694 
710 - (void)unsubscribeConference:(EMCallConference *)aCall
711  streamId:(NSString *)aStreamId
712  completion:(void (^)(EMError *aError))aCompletionBlock;
713 
739 - (void)changeMemberRoleWithConfId:(NSString *)aConfId
740  member:(EMCallMember *)aMember
741  role:(EMConferenceRole)toRole
742  completion:(void (^)(EMError *aError))aCompletionBlock;
743 
769 - (void)changeMemberRoleWithConfId:(NSString *)aConfId
770  memberName:(NSString *)aMemberName
771  role:(EMConferenceRole)toRole
772  completion:(void (^)(EMError *aError))aCompletionBlock;
773 
789 - (void)kickMemberWithConfId:(NSString *)aConfId
790  memberNames:(NSArray<NSString *> *)aMemberNameList
791  completion:(void (^)(EMError *aError))aCompletionBlock;
792 
806 - (void)destroyConferenceWithId:(NSString *)aConfId
807  completion:(void (^)(EMError *aError))aCompletionBlock;
808 
822 - (void)leaveConference:(EMCallConference *)aCall
823  completion:(void (^)(EMError *aError))aCompletionBlock;
824 
840 - (void)startMonitorSpeaker:(EMCallConference *)aCall
841  timeInterval:(long long)aTimeMillisecond
842  completion:(void (^)(EMError *aError))aCompletionBlock;
843 
855 - (void)stopMonitorSpeaker:(EMCallConference *)aCall;
856 
872 - (void)updateConference:(EMCallConference*)aCall
873  setRegions:(NSArray<LiveRegion*>*)aReagionList
874  completion:(void(^)(EMError *aError))aCompletionBlock;
875 
893 - (void)updateConference:(EMCallConference*)aCall
894  liveId:(NSString*)aLiveId
895  setRegions:(NSArray<LiveRegion*>*)aReagionList
896  completion:(void(^)(EMError *aError))aCompletionBlock;
897 
913 - (void)addConferenceLive:(EMCallConference*)aCall
914  LiveCfg:(LiveConfig*)aLiveConfig
915  completion:(void(^)(EMError *aError))aCompletionBlock;
916 
934 - (void)enableRecordLiveStream:(EMCallConference*)aCall
935  liveId:(NSString*)aLiveId
936  enabled:(BOOL)aEnabled
937  completion:(void(^)(EMError *aError))aCompletionBlock;
938 
954 - (void)deleteConferenceLive:(EMCallConference*)aCall
955  liveId:(NSString*)aLiveId
956  completion:(void(^)(EMError *aError))aCompletionBlock;
957 
973 - (void)requestTobeSpeaker:(EMCallConference *)aCall adminId:(NSString *)aAdminId completion:(void (^)(EMError *aError))aCompletionBlock;
974 
990 - (void)requestTobeAdmin:(EMCallConference *)aCall adminId:(NSString *)aAdminId completion:(void (^)(EMError *aError))aCompletionBlock;
991 
1009 - (void)setMuteMember:(EMCallConference *)aCall
1010  memId:(NSString *)aMemId
1011  mute:(BOOL)aMute
1012  completion:(void (^)(EMError *aError))aCompletionBlock;
1013 
1031 - (void)responseReqSpeaker:(EMCallConference *)aCall
1032  memId:(NSString *)aMemId
1033  result:(NSInteger)aResult
1034  completion:(void (^)(EMError *aError))aCompletionBlock;
1035 
1053 - (void)responseReqAdmin:(EMCallConference *)aCall memId:(NSString *)aMemId result:(NSInteger)aResult completion:(void (^)(EMError *aError))aCompletionBlock;
1054 
1055 #pragma mark - Update
1056 
1068 - (void)updateConferenceWithSwitchCamera:(EMCallConference *)aCall;
1069 
1083 - (void)updateConference:(EMCallConference *)aCall
1084  isMute:(BOOL)aIsMute;
1085 
1099 - (void)updateConference:(EMCallConference *)aCall
1100  enableVideo:(BOOL)aEnableVideo;
1101 
1119 - (void)updateConference:(EMCallConference *)aCall
1120  streamId:(NSString *)aStreamId
1121  remoteVideoView:(EMCallRemoteVideoView *)aRemoteView
1122  completion:(void (^)(EMError *aError))aCompletionBlock;
1123 
1137 - (void)updateConference:(EMCallConference *)aCall
1138  maxVideoKbps:(int)aMaxVideoKbps;
1139 
1140 #pragma mark - Input Video Data
1141 
1160 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
1161  rotation:(UIDeviceOrientation)aRotation
1162  conference:(EMCallConference *)aCall
1163  publishedStreamId:(NSString *)aPubStreamId
1164  completion:(void (^)(EMError *aError))aCompletionBlock;
1165 
1186 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
1187  sampleBufferTime:(CMTime)aTime
1188  rotation:(UIDeviceOrientation)aRotation
1189  conference:(EMCallConference *)aCall
1190  publishedStreamId:(NSString *)aPubStreamId
1191  completion:(void (^)(EMError *aError))aCompletionBlock;
1192 
1193 
1213 - (void)setConferenceAttribute:(NSString *)attrKey
1214  value:(NSString *)attrValue
1215  completion:(void(^)(EMError *aError))aCompletionBlock;
1216 
1234 - (void)deleteAttributeWithKey:(NSString *)aKey
1235  completion:(void(^)(EMError *aError))aCompletionBlock;
1236 
1256 - (void)createWhiteboardRoomWithUsername:(NSString *_Nonnull)aUsername
1257  userToken:(NSString *_Nonnull)aToken
1258  roomName:(NSString *_Nonnull)aRoomName
1259  roomPassword:(NSString *_Nonnull)aPassword
1260  interact:(BOOL)aInteract
1261  completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
1282 - (void)createWhiteboardRoomWithUsername:(NSString *_Nonnull)aUsername
1283  userToken:(NSString *_Nonnull)aToken
1284  roomName:(NSString *_Nonnull)aRoomName
1285  roomPassword:(NSString *_Nonnull)aPassword
1286  config:(EMWhiteboardConfig* )aWBConfig
1287  completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
1288 
1304 - (void)destroyWhiteboardRoomWithUsername:(NSString *)aUsername
1305  userToken:(NSString *)aToken
1306  roomId:(NSString *)aRoomId
1307  completion:(void(^)(EMError *aError))aCompletionBlock;
1308 
1326 - (void)joinWhiteboardRoomWithId:(NSString *)aRoomId
1327  username:(NSString *)aUsername
1328  userToken:(NSString *)aToken
1329  roomPassword:(NSString *)aPassword
1330  completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
1331 
1349 - (void)joinWhiteboardRoomWithName:(NSString *)aRoomName
1350  username:(NSString *)aUsername
1351  userToken:(NSString *)aToken
1352  roomPassword:(NSString *)aPassword
1353  completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
1354 
1376 - (void)updateWhiteboardRoomWithRoomId:(NSString *)aRoomId
1377  username:(NSString *)aUsername
1378  userToken:(NSString *)aToken
1379  intract:(BOOL)aInteract
1380  allUsers:(BOOL)aAll
1381  serventIds:(NSArray<NSString *>*)aServentIds
1382  completion:(void(^)(EMError *aError))aCompletionBlock;
1383 
1412 - (EMError *)startAudioMixing:(NSURL *)aFileURL loop:(int)aLoop sendMix:(BOOL)isSendMix;
1413 
1414 
1429 
1447 - (EMError *)adjustAudioMixingVolume:(int)aVolume;
1448 
1449 
1463 - (void)muteRemoteAudio:(NSString *)aStreamId mute:(BOOL)isMute;
1464 
1478 - (void)muteRemoteVideo:(NSString *)aStreamId mute:(BOOL)isMute;
1479 
1490 - (void)enableStatistics:(BOOL)isEnable;
1491 
1504 - (void)muteAll:(BOOL)mute
1505  completion:(void(^)(EMError *aError))aCompletionBlock;
1506 #pragma mark - 自定义音频数据
1507 
1519 - (int) inputCustomAudioData:(NSData*)data;
1520 
1521 #pragma mark - Watermark
1533 - (void)addVideoWatermark:(EMWaterMarkOption*)option;
1542 - (void)clearVideoWatermark;
1543 
1544 #pragma mark - EM_DEPRECATED_IOS 3.5.2
1545 
1567 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
1568  conference:(EMCallConference *)aCall
1569  publishedStreamId:(NSString *)aPubStreamId
1570  format:(EMCallVideoFormat)aFormat
1571  rotation:(int)aRotation
1572  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoSampleBuffer:rotation:conference:publishedStreamId:completion:");
1573 
1595 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
1596  conference:(EMCallConference *)aCall
1597  publishedStreamId:(NSString *)aPubStreamId
1598  format:(EMCallVideoFormat)aFormat
1599  rotation:(int)aRotation
1600  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoPixelBuffer:sampleBufferTime:rotation:conference:publishedStreamId:completion:");
1601 
1627 - (void)inputVideoData:(NSData *)aData
1628  conference:(EMCallConference *)aCall
1629  publishedStreamId:(NSString *)aPubStreamId
1630  widthInPixels:(size_t)aWidth
1631  heightInPixels:(size_t)aHeight
1632  format:(EMCallVideoFormat)aFormat
1633  rotation:(int)aRotation
1634  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete");
1635 
1636 #pragma mark - EM_DEPRECATED_IOS 3.4.3
1637 
1645 @property (nonatomic) EMConferenceMode mode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
1646 
1660 - (void)createAndJoinConferenceWithPassword:(NSString *)aPassword
1661  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -[EMConferenceManagerDelegate createAndJoinConferenceWithType:password:completion:]");
1662 
1682 - (void)inviteUserToJoinConference:(EMCallConference *)aCall
1683  userName:(NSString *)aUserName
1684  password:(NSString *)aPassword
1685  ext:(NSString *)aExt
1686  error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE, 在demo层自定义实现");
1687 
1688 
1706 - (void)changeMemberRoleWithConfId:(NSString *)aConfId
1707  memberNames:(NSArray<NSString *> *)aMemberNameList
1708  role:(EMConferenceRole)aRole
1709  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_5_0, 3_6_0, "Use -[changeMemberRoleWithConfId:memberName:role:completion]");
1710 
1711 @end
1712 
1713 
1714 #endif /* IEMConferenceManager_h */
Definition: EMCallConference.h:295
Definition: EMCallConference.h:247
Definition: EMCallVideoView.h:42
Definition: EMError.h:27
Definition: EMCallStream.h:126
Definition: EMWaterMarkOption.h:19
Definition: IEMConferenceManager.h:185
Definition: EMWhiteboard.h:14
Definition: EMCallConference.h:218
Definition: EMCallConference.h:104
Definition: IEMConferenceManager.h:39
NSInteger maxTalkerCount
Definition: IEMConferenceManager.h:94
BOOL isSupportWechatMiniProgram
Definition: IEMConferenceManager.h:70
BOOL isMerge
Definition: IEMConferenceManager.h:54
NSString * ext
Definition: IEMConferenceManager.h:86
BOOL isRecord
Definition: IEMConferenceManager.h:62
NSInteger maxPubDesktopCount
Definition: IEMConferenceManager.h:118
NSString * nickName
Definition: IEMConferenceManager.h:78
EMConferenceType confrType
Definition: IEMConferenceManager.h:46
NSInteger maxAudienceCount
Definition: IEMConferenceManager.h:110
LiveConfig * liveConfig
Definition: IEMConferenceManager.h:126
NSInteger maxVideoCount
Definition: IEMConferenceManager.h:102
Definition: EMConferenceManagerDelegate.h:37
Definition: EMLocalAudioDataDelegate.h:13
Definition: EMRemoteAudioDataDelegate.h:13
Definition: IEMConferenceManager.h:248
EMConferenceMode mode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE")