setScreenCaptureVolume method

Future<int?> setScreenCaptureVolume(
  1. int volume
)

@valid Available since 3.60. @detail api @author shiyayun @brief Adjusts the volume of audio captured during screen sharing.
This method only changes the volume of audio data and does not affect the hardware volume of the local device. @param volume The ratio of the capture volume to the original volume, in the range of 0, 400, in %, with built-in overflow protection.
To ensure better call quality, it is recommended to set the volume value to 0, 100.
- 0: Mute - 100: Original volume. To ensure the audio quality, we recommend 0, 100. - 400: Four times the original volume with signal-clipping protection. @return - 0: Success. - < 0: Fail. See ReturnStatus{@link #ReturnStatus} for more details. @note You can use this interface to set the capture volume before or after enabling screen audio capture.

Implementation

Future<int?> setScreenCaptureVolume(int volume) async {
  $a() => ($instance as $p_a.RTCEngine).setScreenCaptureVolume(volume);
  $i() => ($instance as $p_i.ByteRTCEngine).setScreenCaptureVolume(volume);

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}