getPlaybackDuration abstract method

Future<int?> getPlaybackDuration()

Gets the actual playback duration of the mixed media file, in milliseconds.

Return value:

  • >0: The actual playback time.
  • <0: Failure.

Notes:

  • The actual playback time refers to the playback time of the song without being affected by stop, jump, double speed, and freeze. For example, if the song stops playing for 30 seconds at 1:30 or skips to 2:00, and then continues to play normally for 2 minutes, the actual playing time is 3 minutes and 30 seconds.
  • Call this API only when audio is mixing.

Implementation

Future<int?> getPlaybackDuration();