getAudioFileInfo method

  1. @override
Future<void> getAudioFileInfo(
  1. String filePath
)

Gets the information of a specified audio file.

Since v4.2.0

After calling this method successfully, the SDK triggers the RtcEngineEventHandler.requestAudioFileInfoCallback 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.

Note

Parameter filePath 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.

Implementation

@override
Future<void> getAudioFileInfo(String filePath) {
  return _invokeMethod('getAudioFileInfo', {
    'filePath': filePath,
  });
}