ZegoMediaRecordDelegage Protocol Reference

Conforms to NSObject
Declared in zego-api-media-recorder-oc.h

Overview

IO 异常

– onMediaRecord:channelIndex:storagePath: required method

媒体录制回调

- (void)onMediaRecord:(int)errCode channelIndex:(ZegoAPIMediaRecordChannelIndex)index storagePath:(NSString *)path

Parameters

errCode

错误码, 详见 enum ZegoAPIMediaRecordErrorCode。

index

录制通道,详见 enum ZegoAPIMediaRecordChannelIndex。

storagePath

录制文件存储路径

Discussion

  • 设置了媒体录制代理(-setMediaRecordDelegage:),并启动录制后能收到此回调,通知 App 录制是否启动成功,以及启动录制时设置的录制文件保存路径。

Declared In

zego-api-media-recorder-oc.h

– onRecordStatusUpdateFromChannel:storagePath:duration:fileSize:

录制信息更新回调

- (void)onRecordStatusUpdateFromChannel:(ZegoAPIMediaRecordChannelIndex)index storagePath:(NSString *)path duration:(unsigned int)duration fileSize:(unsigned int)size

Parameters

index

录制通道,详见 enum ZegoAPIMediaRecordChannelIndex。

path

录制文件存储路径

duration

录制时长,单位是毫秒

size

文件大小,单位是字节

Discussion

  • 设置了媒体录制代理(-setMediaRecordDelegage:),在媒体录制启动成功后,录制期间会不断收到此回调,此回调的回调频率由启动录制时设置的 interval 参数值决定。

Declared In

zego-api-media-recorder-oc.h