getPlaybackDuration method
@detail api
@brief Gets the actual playback duration of the mixed media file, in milliseconds.
@return
- >0: Success, the actual playback time.
- < 0: Failed.
@note
- 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 and the interval set by setProgressInterval:{@link #ByteRTCMediaPlayer#setProgressInterval} is above 0.
- The API is valid for audio file, not PCM data.
Implementation
FutureOr<int> getPlaybackDuration() async {
return await nativeCall('getPlaybackDuration', []);
}