更新时间:2024-01-25 GMT+08:00
分享

设备管理

setSpeakerModel

- (int)setSpeakerModel:(HWRtcSpeakerModel)speakerModel;

功能说明

设置声音播放模式。成功加入房间后才能调用。

请求参数

speakerModel:声音播放模式,具体请参见HWRtcSpeakerModel

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode

只支持iphone。

setCameraConfig

- (int)setCameraConfig:(HWRTCCameraConfig) config;

功能说明

设置相机的相关参数,如默认使用的摄像头方向

【请求参数】

config:相机的相关参数,具体请参见HWRTCCameraConfig

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode

switchCamera

- (int)switchCamera;

功能说明

切换前后镜头。开启摄像头后调用才生效。

【请求参数】

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode

只支持iphone。

recordingDeviceTest

- (int)recordingDeviceTest:(int)intervalInMilliseconds;

功能说明

音频采集设备测试。

请求参数

intervalInMilliseconds:音量回调周期,单位毫秒,范围100到10000。推荐200ms,可以自行调节。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

    只支持macOS。

finishRecordingDeviceTest

- (int)finishRecordingDeviceTest;

功能说明

结束音频采集设备测试。

请求参数

无。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

    只支持macOS。

playbackDeviceTest

-(int)playbackDeviceTest:(NSString* _Nonnull)testAudioFilePath;

功能说明

音频播放设备测试。

请求参数

testAudioFilePath:测试音频文件,只支持WAV格式。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

    只支持macOS。

finishPlaybackDeviceTest

- (int)finishPlaybackDeviceTest;

功能说明

结束音频播放设备测试。

请求参数

无。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

    只支持macOS。

echoTest

- (int)echoTest:(int)intervalInMilliseconds;

功能说明

音频设备回路测试。

请求参数

intervalInMilliseconds:音量回调周期,单位毫秒,范围100到10000。推荐200ms,客户可以自行调节。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

    只支持macOS。

finishEchoTest

- (int)finishEchoTest;

功能说明

结束音频设备回路测试。

请求参数

无。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

    只支持macOS。

cameraDeviceTest

- (int)cameraDeviceTest:(HWRtcVideoCanvas * _Nonnull)local;

功能说明

结束音频设备回路测试。

请求参数

local:预览视图,具体请参见HWRtcVideoCanvas

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode

finishCameraDeviceTest

- (int)finishCameraDeviceTest;

功能说明

结束视频采集设备测试。

请求参数

无。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HRTCErrorCode
分享:

    相关文档

    相关产品