音视频设备相关事件回调
更多...
#import <JRTCMediaDeviceCallback.h>
◆ onAudioError:
| - (void) onAudioError: |
|
(NSString *) |
error |
|
◆ onAudioInerruptAndResume:
| - (void) onAudioInerruptAndResume: |
|
(bool) |
interrupt |
|
声音中断/恢复回调
闹钟和系统来电会占用音频设备,音频中断或恢复时会收到此回调
- 参数
-
◆ onAudioRouteTypeChanged:
◆ onCameraUpdate
摄像头变化回调
摄像头状态发生变化会收到此回调,例如打开、关闭、切换摄像头
◆ onFileAudioInputDidFinish
| - (void) onFileAudioInputDidFinish |
|
|
|
◆ onMemoryAvailable:
| - (void) onMemoryAvailable: |
|
(double) |
memorySize |
|
上报剩余可用内存回调
周期性上报一次内存剩余情况
- 参数
-
◆ onRenderReceived:ratio:
◆ onRenderResized:ratio:
◆ onRenderStart:ratio:
◆ onRingPlayFinish
| - (void) onRingPlayFinish |
|
|
|
◆ onScreenCaptureStart
| - (void) onScreenCaptureStart |
|
|
|
屏幕采集开始回调,如果应用外屏幕采集,则在插件倒计时结束后回调
◆ onScreenCaptureStop
| - (void) onScreenCaptureStop |
|
|
|
◆ onSnapshotComplete:width:height:
| - (void) onSnapshotComplete: |
|
(NSString *) |
file |
| width: |
|
(int) |
width |
| height: |
|
(int) |
height |
|
|
| |
截图完成回调
- 参数
-
| file | 截图路径 |
| width | 图片像素宽 |
| height | 图片像素高 |
◆ onTessarEvent:extraInfo:
| - (void) onTessarEvent: |
|
(int) |
eventCode |
| extraInfo: |
|
(NSString *) |
extraInfo |
|
|
| |
天赛事件上报,包含警告和错误事件
- 参数
-
| eventCode | 天赛事件码 |
| extraInfo | 事件其他信息 |
◆ onVideoCaptureDidStart:ratio:
| - (void) onVideoCaptureDidStart: |
|
(NSString *) |
streamId |
| ratio: |
|
(CGFloat) |
ratio |
|
|
| |
◆ onVideoCaptureRecordEnd:duration:
| - (void) onVideoCaptureRecordEnd: |
|
(NSString *) |
filePath |
| duration: |
|
(long) |
duration |
|
|
| |
视频录制结束回調
- 注解
- 如果用户使用了JRTCRecord模块,那么该回调失效,被
onVideoCaptureRecordEnd 接管
- 参数
-
| filePath | 录制文件本地路径 分片录制情况下,表示第一个录制文件的文件路径 |
| duration | 录制时长,单位:ms 分片录制情况下,表示所有分片录制文件的总时长 |
◆ onVideoCaptureRecordError:
| - (void) onVideoCaptureRecordError: |
|
(NSString *) |
error |
|
◆ onVideoCaptureRecordFileSlice:isLast:
| - (void) onVideoCaptureRecordFileSlice: |
|
(NSString *) |
filePath |
| isLast: |
|
(bool) |
isLast |
|
|
| |
◆ onVideoError:
| - (void) onVideoError: |
|
(NSString *) |
errorDetail |
|
视频异常,渲染错误,包括摄像头采集错误、屏幕采集错误等回调
- 参数
-
◆ onVideoError:errorDetail:
视频异常,渲染错误,包括摄像头采集错误、屏幕采集错误等回调
- 参数
-
| errorType | 异常类型 |
| errorDetail | 异常详细描述 |