HyphenateSDK  3.6.1
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 "EMCallVideoView.h"
25 
26 @class EMError;
27 
35 typedef enum {
36  EMConferenceModeNormal = 0,
37  EMConferenceModeLarge,
38 } EMConferenceMode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
39 
47 @protocol IEMConferenceManager <NSObject>
48 
49 @optional
50 
51 #pragma mark - Delegate
52 
66 - (void)addDelegate:(id<EMConferenceManagerDelegate>)aDelegate
67  delegateQueue:(dispatch_queue_t)aQueue;
68 
80 - (void)removeDelegate:(id<EMConferenceManagerDelegate>)aDelegate;
81 
82 #pragma mark - Conference
83 
99 - (void)setAppkey:(NSString *)aAppkey
100  username:(NSString *)aUsername
101  token:(NSString *)aToken;
102 
120 - (NSString *)getMemberNameWithAppkey:(NSString *)aAppkey
121  username:(NSString *)aUserName;
122 
138 - (void)getConference:(NSString *)aConfId
139  password:(NSString *)aPassword
140  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
141 
157 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
158  password:(NSString *)aPassword
159  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
160 
161 
181 - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
182  password:(NSString *)aPassword
183  record:(BOOL)isRecord
184  mergeStream:(BOOL)isMerge
185  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
186 
202 - (void)joinConferenceWithConfId:(NSString *)aConfId
203  password:(NSString *)aPassword
204  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
205 
219 - (void)joinConferenceWithTicket:(NSString *)aTicket
220  completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
221 
237 - (void)publishConference:(EMCallConference *)aCall
238  streamParam:(EMStreamParam *)aStreamParam
239  completion:(void (^)(NSString *aPubStreamId, EMError *aError))aCompletionBlock;
240 
256 - (void)unpublishConference:(EMCallConference *)aCall
257  streamId:(NSString *)aStreamId
258  completion:(void (^)(EMError *aError))aCompletionBlock;
259 
277 - (void)subscribeConference:(EMCallConference *)aCall
278  streamId:(NSString *)aStreamId
279  remoteVideoView:(EMCallRemoteVideoView *)aRemoteView
280  completion:(void (^)(EMError *aError))aCompletionBlock;
281 
297 - (void)unsubscribeConference:(EMCallConference *)aCall
298  streamId:(NSString *)aStreamId
299  completion:(void (^)(EMError *aError))aCompletionBlock;
300 
326 - (void)changeMemberRoleWithConfId:(NSString *)aConfId
327  member:(EMCallMember *)aMember
328  role:(EMConferenceRole)toRole
329  completion:(void (^)(EMError *aError))aCompletionBlock;
330 
346 - (void)kickMemberWithConfId:(NSString *)aConfId
347  memberNames:(NSArray<NSString *> *)aMemberNameList
348  completion:(void (^)(EMError *aError))aCompletionBlock;
349 
363 - (void)destroyConferenceWithId:(NSString *)aConfId
364  completion:(void (^)(EMError *aError))aCompletionBlock;
365 
379 - (void)leaveConference:(EMCallConference *)aCall
380  completion:(void (^)(EMError *aError))aCompletionBlock;
381 
397 - (void)startMonitorSpeaker:(EMCallConference *)aCall
398  timeInterval:(long long)aTimeMillisecond
399  completion:(void (^)(EMError *aError))aCompletionBlock;
400 
412 - (void)stopMonitorSpeaker:(EMCallConference *)aCall;
413 
414 #pragma mark - Update
415 
427 - (void)updateConferenceWithSwitchCamera:(EMCallConference *)aCall;
428 
442 - (void)updateConference:(EMCallConference *)aCall
443  isMute:(BOOL)aIsMute;
444 
458 - (void)updateConference:(EMCallConference *)aCall
459  enableVideo:(BOOL)aEnableVideo;
460 
478 - (void)updateConference:(EMCallConference *)aCall
479  streamId:(NSString *)aStreamId
480  remoteVideoView:(EMCallRemoteVideoView *)aRemoteView
481  completion:(void (^)(EMError *aError))aCompletionBlock;
482 
496 - (void)updateConference:(EMCallConference *)aCall
497  maxVideoKbps:(int)aMaxVideoKbps;
498 
499 #pragma mark - Input Video Data
500 
519 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
520  rotation:(UIDeviceOrientation)aRotation
521  conference:(EMCallConference *)aCall
522  publishedStreamId:(NSString *)aPubStreamId
523  completion:(void (^)(EMError *aError))aCompletionBlock;
524 
545 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
546  sampleBufferTime:(CMTime)aTime
547  rotation:(UIDeviceOrientation)aRotation
548  conference:(EMCallConference *)aCall
549  publishedStreamId:(NSString *)aPubStreamId
550  completion:(void (^)(EMError *aError))aCompletionBlock;
551 
552 
572 - (void)setConferenceAttribute:(NSString *)attrKey
573  value:(NSString *)attrValue
574  completion:(void(^)(EMError *aError))aCompletionBlock;
575 
593 - (void)deleteAttributeWithKey:(NSString *)aKey
594  completion:(void(^)(EMError *aError))aCompletionBlock;
595 
596 
625 - (EMError *)startAudioMixing:(NSURL *)aFileURL loop:(int)aLoop sendMix:(BOOL)isSendMix;
626 
627 
642 
660 - (EMError *)adjustAudioMixingVolume:(int)aVolume;
661 
675 - (void)muteRemoteAudio:(NSString *)aStreamId mute:(BOOL)isMute;
676 
690 - (void)muteRemoteVideo:(NSString *)aStreamId mute:(BOOL)isMute;
691 
692 
703 - (void)enableStatistics:(BOOL)isEnable;
704 
705 #pragma mark - EM_DEPRECATED_IOS 3.5.2
706 
728 - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
729  conference:(EMCallConference *)aCall
730  publishedStreamId:(NSString *)aPubStreamId
731  format:(EMCallVideoFormat)aFormat
732  rotation:(int)aRotation
733  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoSampleBuffer:rotation:conference:publishedStreamId:completion:");
734 
756 - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
757  conference:(EMCallConference *)aCall
758  publishedStreamId:(NSString *)aPubStreamId
759  format:(EMCallVideoFormat)aFormat
760  rotation:(int)aRotation
761  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoPixelBuffer:sampleBufferTime:rotation:conference:publishedStreamId:completion:");
762 
788 - (void)inputVideoData:(NSData *)aData
789  conference:(EMCallConference *)aCall
790  publishedStreamId:(NSString *)aPubStreamId
791  widthInPixels:(size_t)aWidth
792  heightInPixels:(size_t)aHeight
793  format:(EMCallVideoFormat)aFormat
794  rotation:(int)aRotation
795  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete");
796 
797 #pragma mark - EM_DEPRECATED_IOS 3.4.3
798 
806 @property (nonatomic) EMConferenceMode mode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
807 
821 - (void)createAndJoinConferenceWithPassword:(NSString *)aPassword
822  completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -[EMConferenceManagerDelegate createAndJoinConferenceWithType:password:completion:]");
823 
843 - (void)inviteUserToJoinConference:(EMCallConference *)aCall
844  userName:(NSString *)aUserName
845  password:(NSString *)aPassword
846  ext:(NSString *)aExt
847  error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE, 在demo层自定义实现");
848 
849 
867 - (void)changeMemberRoleWithConfId:(NSString *)aConfId
868  memberNames:(NSArray<NSString *> *)aMemberNameList
869  role:(EMConferenceRole)aRole
870  completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_5_0, 3_6_0, "Use -[changeMemberRoleWithConfId:memberName:role:completion]");
871 
872 @end
873 
874 
875 #endif /* IEMConferenceManager_h */
Definition: EMCallConference.h:77
Definition: EMError.h:26
Definition: EMConferenceManagerDelegate.h:36
Definition: IEMConferenceManager.h:47
Definition: EMCallConference.h:38
Definition: EMCallVideoView.h:41
Definition: EMCallStream.h:125
EMConferenceMode mode EM_DEPRECATED_IOS(3_1_0, 3_4_3,"Use -DELETE")