getVolume method

Future<int?> getVolume(
  1. int effectId
)

@detail api @brief Gets the current volume. @param effectId Audio effect ID @return - >0: Success, the current volume value. - < 0: Failed. @note Call this API after start{@link #IAudioEffectPlayer#start}.

Implementation

Future<int?> getVolume(int effectId) async {
  $a() => ($instance as $p_a.IAudioEffectPlayer).getVolume(effectId);
  $i() => ($instance as $p_i.ByteRTCAudioEffectPlayer).getVolume(effectId);

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