setCurrentDeviceVolume method

int setCurrentDeviceVolume(
  1. TXMediaDeviceType type,
  2. int volume
)
override

Setting the Volume of the Current Device (for Desktop OS)

This API is used to set the capturing volume of the mic or playback volume of the speaker, but not the volume of the camera.

  • Parameters:
    • volume(int):
      • Volume. Value range: 0-100; default: 100.
    • type(TXMediaDeviceType):
      • Device type.

Implementation

int setCurrentDeviceVolume(TXMediaDeviceType type, int volume) {
  if (_only_support_desktop) {
    return _deviceFFIBindings.set_current_device_volume(_nativePointer, type.value(), volume);
  } else {
    debugPrint("device-manager-api not support");
    return -1;
  }
}