getEffectDuration abstract method

Future<int> getEffectDuration(
  1. String filePath
)

Retrieves the duration of the audio effect file.

Call this method after joining a channel.

  • filePath File path: Android: The file path, which needs to be accurate to the file name and suffix. Agora supports URL addresses, absolute paths, or file paths that start with /assets/. You might encounter permission issues if you use an absolute path to access a local file, so Agora recommends using a URI address instead. For example : content://com.android.providers.media.documents/document/audio%3A14441 Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example : C:\music\audio.mp4. iOS or macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.

Returns The total duration (ms) of the specified audio effect file, if the method call succeeds. < 0: Failure.

Implementation

Future<int> getEffectDuration(String filePath);