getAudioFileInfo abstract method

Future<int?> getAudioFileInfo(
  1. String filePath
)

Gets the information of a specified audio file. After calling this method successfully, the SDK triggers the requestAudioFileInfo callback to report the information of an audio file, such as audio duration. You can call this method multiple times to get the information of multiple audio files. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. Call this method after joining a channel.

Param filePath The file path: Android: The file path, including the filename extensions. To access an online file, Agora supports using a URL address; to access a local file, Agora supports using a URI address, an absolute path, or a path that starts 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 filename extensions) of the audio file. For example: C:\music\audio.mp4. iOS or macOS: The absolute path or URL address (including the filename extensions) of the audio file. For example: /var/mobile/Containers/Data/audio.mp4.

return 0: Success. < 0: Failure.

Implementation

Future<int?> getAudioFileInfo(String filePath);