setDevice abstract method

Future<void> setDevice(
  1. String deviceIdUTF8
)

通过设备 ID 指定视频采集设备。

插拔设备不会改变设备 ID。 该方法仅适用于 Windows 和 macOS。

  • deviceIdUTF8 设备 ID。可通过调用 enumerateVideoDevices 方法获取。 最大长度为 MaxDeviceIdLengthType 。

Returns 方法成功调用时,无返回值;方法调用失败时,会抛出 AgoraRtcException 异常,你需要捕获异常并进行处理。详见错误码了解详情和解决建议。

Implementation

Future<void> setDevice(String deviceIdUTF8);