getEffectDuration abstract method
Gets the total duration of the specified sound effect file.
This method must be called after joining a channel.
filePathFile path: Android: File path, must include the file name and extension. Supports URL of online files, URI of local files, absolute paths, or paths starting with /assets/. Accessing local files via absolute path may cause permission issues. It is recommended to use URI. For example: content://com.android.providers.media.documents/document/audio%3A14441. Windows: Absolute path or URL to the audio file, must include the file name and extension. For example: C:\music\audio.mp4. iOS or macOS: Absolute path or URL to the audio file, must include the file name and extension. For example: /var/mobile/Containers/Data/audio.mp4.
Returns If the method call succeeds, returns the duration of the specified sound effect file (milliseconds). < 0: The method call fails. See Error Codes for details and resolution suggestions.
Implementation
Future<int> getEffectDuration(String filePath);