|
JRTCSDK-iOS v2601.0
多方通话 API 文档
|
音视频设备相关事件回调 更多...
#include <JRTCMediaDeviceCallback.h>
实例方法 | |
| (void) | - onAudioError: |
| (void) | - onAudioRouteTypeChanged: |
| (void) | - onAudioInerruptAndResume: |
| (void) | - onCameraUpdate |
| (void) | - onVideoCaptureDidStart:ratio: |
| (void) | - onVideoCaptureDidStart:ratio:width:height: |
| (void) | - onRenderReceived:ratio: |
| (void) | - onRenderResized:ratio: |
| (void) | - onRenderStart:ratio: |
| (void) | - onScreenCaptureStart |
| (void) | - onScreenCaptureStop |
| (void) | - onVideoError: |
| (void) | - onVideoError:errorDetail: |
| (void) | - onSnapshotComplete:width:height: |
| (void) | - onMemoryAvailable: |
| (void) | - onRingPlayFinish |
| (void) | - onFileAudioInputDidFinish |
| (void) | - onTessarEvent:extraInfo: |
| (void) | - onVideoCaptureRecordEnd:duration: |
| (void) | - onVideoCaptureRecordFileSlice:isLast: |
| (void) | - onVideoCaptureRecordError: |
| (void) | - onCaptureBrightnessChanged: |
音视频设备相关事件回调
| - (void) onAudioError: | (NSString *) | error |
音频异常
| error | 异常信息 |
| - (void) onAudioInerruptAndResume: | (bool) | interrupt |
声音中断/恢复回调
闹钟和系统来电会占用音频设备,音频中断或恢复时会收到此回调
| interrupt | 中断或恢复
|
| - (void) onAudioRouteTypeChanged: | (JRTCMediaDeviceAudioRouteType) | audioRouteType |
音频输出通道变化回调
| audioRouteType | 音频输出通道类型 |
| - (void) onCameraUpdate |
摄像头变化回调
摄像头状态发生变化会收到此回调,例如打开、关闭、切换摄像头
| - (void) onCaptureBrightnessChanged: | (int) | value |
光线明暗度检测结果回调
| value | 当前平均亮度,范围(0 ~ 255) |
| - (void) onFileAudioInputDidFinish |
本地文件音频源输入完成回调
| - (void) onMemoryAvailable: | (double) | memorySize |
上报剩余可用内存回调
周期性上报一次内存剩余情况
| memorySize | 当前剩余可用内存空间(MB) |
| - (void) onRenderReceived: | (JRTCMediaDeviceVideoCanvas *) | canvas | |
| ratio: | (CGFloat) | ratio |
收到第一帧数据回调
| canvas | 视图渲染对象 |
| ratio | 宽高比 |
| - (void) onRenderResized: | (JRTCMediaDeviceVideoCanvas *) | canvas | |
| ratio: | (CGFloat) | ratio |
数据宽高比例变化回调
| canvas | 视图渲染对象 |
| ratio | 宽高比 |
| - (void) onRenderStart: | (JRTCMediaDeviceVideoCanvas *) | canvas | |
| ratio: | (CGFloat) | ratio |
渲染开始回调
| canvas | 视图渲染对象 |
| ratio | 宽高比 |
| - (void) onRingPlayFinish |
音频播放完成
| - (void) onScreenCaptureStart |
屏幕采集开始回调,如果应用外屏幕采集,则在插件倒计时结束后回调
| - (void) onScreenCaptureStop |
屏幕采集结束回调
| - (void) onSnapshotComplete: | (NSString *) | file | |
| width: | (int) | width | |
| height: | (int) | height |
截图完成回调
| file | 截图路径 |
| width | 图片像素宽 |
| height | 图片像素高 |
| - (void) onTessarEvent: | (int) | eventCode | |
| extraInfo: | (NSString *) | extraInfo |
天赛事件上报,包含警告和错误事件
| eventCode | 天赛事件码 |
| extraInfo | 事件其他信息 |
| - (void) onVideoCaptureDidStart: | (NSString *) | streamId | |
| ratio: | (CGFloat) | ratio |
视频采集开始回调
| streamId | 视频流ID |
| ratio | 宽高比 |
| - (void) onVideoCaptureDidStart: | (NSString *) | streamId | |
| ratio: | (CGFloat) | ratio | |
| width: | (int) | width | |
| height: | (int) | height |
视频采集开始回调
| streamId | 视频流ID |
| ratio | 宽高比 |
| width | 宽 |
| height | 高 |
| - (void) onVideoCaptureRecordEnd: | (NSString *) | filePath | |
| duration: | (long) | duration |
视频录制结束回調
onVideoCaptureRecordEnd 接管| filePath | 录制文件本地路径 分片录制情况下,表示第一个录制文件的文件路径 |
| duration | 录制时长,单位:ms 分片录制情况下,表示所有分片录制文件的总时长 |
| - (void) onVideoCaptureRecordError: | (NSString *) | error |
| - (void) onVideoCaptureRecordFileSlice: | (NSString *) | filePath | |
| isLast: | (bool) | isLast |
分片录制文件录制完成回调
onVideoCaptureRecordFileSlice 接管| filePath | 录制文件本地路径 |
| isLast | 表示是否最后一个录制文件 |
| - (void) onVideoError: | (NSString *) | errorDetail |
视频异常,渲染错误,包括摄像头采集错误、屏幕采集错误等回调
| errorDetail | 异常详细描述 |
| - (void) onVideoError: | (JRTCMediaDeviceVideoErrorType) | errorType | |
| errorDetail: | (NSString *) | errorDetail |
视频异常,渲染错误,包括摄像头采集错误、屏幕采集错误等回调
| errorType | 异常类型 |
| errorDetail | 异常详细描述 |