#import <IEMCallManager.h>
◆ addDelegate:delegateQueue:
添加回调代理
- 参数
-
aDelegate | 要添加的代理 |
aQueue | 执行代理方法的队列 |
◆ addVideoWatermark:
开启水印功能
- 参数
-
option | 水印配置项,包括图片URL,marginX,marginY以及起始点 |
◆ answerIncomingCall:
- (EMError *) answerIncomingCall: |
|
(NSString *) |
aCallId |
|
|
optional |
◆ clearVideoWatermark
- (void) clearVideoWatermark |
|
|
|
|
optional |
◆ endCall:reason:
- (EMError *) endCall: |
|
(NSString *) |
aCallId |
reason: |
|
(EMCallEndReason) |
aReason |
|
|
| |
|
optional |
◆ forceEndAllCall
强制结束所有通话 使用场景:做了某些错误操作造成Call UI已经消失但是没有释放掉EMCallManager中维护的EMCallSession,造成再次调用方法[IEMCallManager startCall:remoteName:ext:completion:]返回错误EMErrorCallBusy,如果这时无法调用方法[IEMCallManager endCall:reason:],可以调用该方法
◆ getCallOptions
◆ inputCustomAudioData:
- (int) inputCustomAudioData: |
|
(NSData *) |
data |
|
|
optional |
自定义外部音频数据,PCM格式,一个音频采样16bit,每次最大100ms数据
- 参数
-
- 返回
- int 返回值,0为写入成功,其他失败,-1为enable未启动,-2为channels错误,必须为1,-3为缓冲已满
◆ inputVideoData:callId:widthInPixels:heightInPixels:format:rotation:completion:
- (void) inputVideoData: |
|
(NSData *) |
aData |
callId: |
|
(NSString *) |
aCallId |
widthInPixels: |
|
(size_t) |
aWidth |
heightInPixels: |
|
(size_t) |
aHeight |
format: |
|
(EMCallVideoFormat) |
aFormat |
rotation: |
|
(int) |
aRotation |
completion: |
|
(3_2_2) |
|
|
|
(3_5_2) |
|
|
|
("Delete") |
EM_DEPRECATED_IOS |
|
|
| |
|
optional |
自定义本地视频数据
- 参数
-
aData | 视频数据 |
aCallId | 1v1会话实例ID,即[EMCallSession callId] |
aWidth | 宽度 |
aHeight | 高度 |
aFormat | 视频格式 |
aRotation | 旋转角度0~360,默认0 |
aCompletionBlock | 完成后的回调 |
◆ inputVideoPixelBuffer:callId:format:rotation:completion:
自定义本地视频数据
- 参数
-
aPixelBuffer | 视频像素缓冲区 |
aCallId | 1v1会话实例ID,即[EMCallSession callId] |
aFormat | 视频格式 |
aRotation | 旋转角度0~360,默认0 |
aCompletionBlock | 完成后的回调 |
◆ inputVideoPixelBuffer:sampleBufferTime:rotation:callId:completion:
- (void) inputVideoPixelBuffer: |
|
(CVPixelBufferRef) |
aPixelBuffer |
sampleBufferTime: |
|
(CMTime) |
aTime |
rotation: |
|
(UIDeviceOrientation) |
aRotation |
callId: |
|
(NSString *) |
aCallId |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
|
optional |
自定义本地视频数据
- 参数
-
aPixelBuffer | 视频像素缓冲区 |
aCallId | 1v1会话实例ID,即[EMCallSession callId] |
aTime | 视频原始数据时间戳,CMTime time = CMSampleBufferGetPresentationTimeStamp((CMSampleBufferRef)sampleBuffer); |
aRotation | 旋转方向 |
aCompletionBlock | 完成后的回调 |
◆ inputVideoSampleBuffer:callId:format:rotation:completion:
- (void) inputVideoSampleBuffer: |
|
(CMSampleBufferRef) |
aSampleBuffer |
callId: |
|
(NSString *) |
aCallId |
format: |
|
(EMCallVideoFormat) |
aFormat |
rotation: |
|
(int) |
aRotation |
completion: |
|
(3_2_2) |
|
|
|
(3_5_2) |
|
|
|
(") |
Delete |
|
|
(Use -inputVideoSampleBuffer:rotation:callId:completion:") |
EM_DEPRECATED_IOS |
|
|
| |
|
optional |
自定义本地视频数据
- 参数
-
aSampleBuffer | 视频采样缓冲区 |
aCallId | 1v1会话实例ID,即[EMCallSession callId] |
aFormat | 视频格式 |
aRotation | 旋转角度0~360,默认0 |
aCompletionBlock | 完成后的回调 |
◆ inputVideoSampleBuffer:rotation:callId:completion:
- (void) inputVideoSampleBuffer: |
|
(CMSampleBufferRef) |
aSampleBuffer |
rotation: |
|
(UIDeviceOrientation) |
aRotation |
callId: |
|
(NSString *) |
aCallId |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
|
optional |
自定义本地视频数据
- 参数
-
aSampleBuffer | 视频采样缓冲区 |
aRotation | 旋转方向 |
aCallId | 1v1会话实例ID,即[EMCallSession callId] |
aCompletionBlock | 完成后的回调 |
◆ removeDelegate:
◆ setBuilderDelegate:
◆ setCallOptions:
◆ startCall:remoteName:ext:completion:
- (void) startCall: |
|
(EMCallType) |
aType |
remoteName: |
|
(NSString *) |
aRemoteName |
ext: |
|
(NSString *) |
aExt |
completion: |
|
(void(^)(EMCallSession *aCallSession, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
optional |
发起实时会话
- 参数
-
aType | 通话类型 |
aRemoteName | 被呼叫的用户(不能与自己通话) |
aExt | 通话扩展信息,会传给被呼叫方 |
aCompletionBlock | 完成的回调 |
◆ startCall:remoteName:record:mergeStream:ext:completion:
- (void) startCall: |
|
(EMCallType) |
aType |
remoteName: |
|
(NSString *) |
aRemoteName |
record: |
|
(BOOL) |
isRecord |
mergeStream: |
|
(BOOL) |
isMerge |
ext: |
|
(NSString *) |
aExt |
completion: |
|
(void(^)(EMCallSession *aCallSession, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
optional |
发起实时会话
- 参数
-
aType | 通话类型 |
aRemoteName | 被呼叫的用户(不能与自己通话) |
isRecord | 是否开启服务端录制 |
isMerge | 录制时是否合并数据流 |
aExt | 通话扩展信息,会传给被呼叫方 |
aCompletionBlock | 完成的回调 |
◆ startVideoCall:completion:
- (void) startVideoCall: |
|
(NSString *) |
aUsername |
completion: |
|
(3_1_0) |
|
|
|
(3_2_0) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMCallManager startCall:remoteName:ext:completion:] |
|
|
| |
|
optional |
发起视频会话
- 参数
-
aUsername | 被呼叫的用户(不能与自己通话) |
aCompletionBlock | 完成的回调 |
◆ startVoiceCall:completion:
- (void) startVoiceCall: |
|
(NSString *) |
aUsername |
completion: |
|
(3_1_0) |
|
|
|
(3_2_0) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMCallManager startCall:remoteName:ext:completion:] |
|
|
| |
|
optional |
发起语音会话
- 参数
-
aUsername | 被呼叫的用户(不能与自己通话) |
aCompletionBlock | 完成的回调 |
该协议的文档由以下文件生成: