腾讯云视频通话功能的设备管理接口类
| interface ManageLiteAV::ITRTCDeviceCollection |
Public 成员函数 | |
| UInt32 | getCount () |
| String ^ | getDeviceName (UInt32 index) |
| String ^ | getDevicePID (UInt32 index) |
| void | release () |
| UInt32 getCount | ( | ) |
| String ^ getDeviceName | ( | UInt32 | index | ) |
| String ^ getDevicePID | ( | UInt32 | index | ) |
| void release | ( | ) |
遍历完设备后,调用release释放资源。
| interface ManageLiteAV::ITRTCDeviceInfo |
Public 成员函数 | |
| String ^ | getDeviceName () |
| String ^ | getDevicePID () |
| void | release () |
| String ^ getDeviceName | ( | ) |
| String ^ getDevicePID | ( | ) |
| void release | ( | ) |
获取完设备信息后,调用release释放资源。
| class ManageLiteAV::ITXDeviceManager |
Public 成员函数 | |
| ITXDeviceManager () | |
| ITRTCDeviceCollection ^ | getDevicesList (TRTCDeviceType type) |
| int | setCurrentDevice (TRTCDeviceType type, String^ deviceId) |
| ITRTCDeviceInfo ^ | getCurrentDevice (TRTCDeviceType type) |
| int | setCurrentDeviceVolume (TRTCDeviceType type, UInt32 volume) |
| UInt32 | getCurrentDeviceVolume (TRTCDeviceType type) |
| int | setCurrentDeviceMute (TRTCDeviceType type, bool mute) |
| bool | getCurrentDeviceMute (TRTCDeviceType type) |
| int | startCameraDeviceTest (IntPtr view) |
| int | stopCameraDeviceTest () |
| int | startMicDeviceTest (UInt32 interval) |
| int | stopMicDeviceTest () |
| int | startSpeakerDeviceTest (String^ filePath) |
| int | stopSpeakerDeviceTest () |
|
protected |
| ITXDeviceManager | ( | ) |
| ITRTCDeviceInfo ^ getCurrentDevice | ( | TRTCDeviceType | type | ) |
获取当前使用的设备
| type | 设备类型,根据设备类型获取当前设备信息。详见 TRTCDeviceType 定义 |
| bool getCurrentDeviceMute | ( | TRTCDeviceType | type | ) |
查询当前设备是否静音
| type | 设备类型,根据设备类型获取当前设备状态。详见TRTCDeviceType定义。 |
type 只支持 TRTCDeviceTypeMic、TRTCDeviceTypeSpeaker
| UInt32 getCurrentDeviceVolume | ( | TRTCDeviceType | type | ) |
获取当前设备的音量
| type | 设备类型,根据设备类型获取当前设备音量。详见TRTCDeviceType定义。 |
type 只支持 TRTCDeviceTypeMic、TRTCDeviceTypeSpeaker
| ITRTCDeviceCollection ^ getDevicesList | ( | TRTCDeviceType | type | ) |
获取设备列表
| type | 设备类型,指定需要获取哪种设备的列表。详见TRTCDeviceType定义。 |
| int setCurrentDevice | ( | TRTCDeviceType | type, |
| String^ | deviceId | ||
| ) |
指定当前设备
| type | 设备类型,根据设备类型指定当前设备。详见 TRTCDeviceType 定义。 |
| deviceId | 从 getDevicesList 中得到的设备 ID |
type 只支持 TRTCDeviceTypeMic、TRTCDeviceTypeSpeaker、TRTCDeviceTypeCamera
| int setCurrentDeviceMute | ( | TRTCDeviceType | type, |
| bool | mute | ||
| ) |
设置当前设备是否静音
| type | 设备类型,根据设备类型设置当前设备状态。详见TRTCDeviceType定义。 |
| mute | 是否静音/禁画 |
type 只支持 TRTCDeviceTypeMic、TRTCDeviceTypeSpeaker
| int setCurrentDeviceVolume | ( | TRTCDeviceType | type, |
| UInt32 | volume | ||
| ) |
设置当前设备的音量
| type | 设备类型,根据设备类型获取当前设备音量。详见TRTCDeviceType定义。 |
| volume | 音量大小 |
type 只支持 TRTCDeviceTypeMic、TRTCDeviceTypeSpeaker
| int startCameraDeviceTest | ( | IntPtr | view | ) |
开始摄像头测试
| view | 预览控件所在的父控件 |
在测试过程中可以使用 setCurrentCameraDevice 接口切换摄像头。
| int startMicDeviceTest | ( | UInt32 | interval | ) |
开始麦克风测试
| interval | 音量回调间隔 |
| int startSpeakerDeviceTest | ( | String^ | filePath | ) |
开始扬声器测试
该方法播放指定的音频文件测试播放设备是否能正常工作。如果能听到声音,说明播放设备能正常工作。
| filePath | 声音文件的路径 |
| int stopCameraDeviceTest | ( | ) |
结束摄像头测试
| int stopMicDeviceTest | ( | ) |
结束麦克风测试
| int stopSpeakerDeviceTest | ( | ) |
停止扬声器测试
|
strong |