diff --git a/just_audio/darwin/Classes/AudioPlayer.m b/just_audio/darwin/Classes/AudioPlayer.m index 8bc0082bf..fef0e3a09 100644 --- a/just_audio/darwin/Classes/AudioPlayer.m +++ b/just_audio/darwin/Classes/AudioPlayer.m @@ -344,7 +344,7 @@ - (int)getBufferedPosition { } - (int)getDuration { - if (_processingState == none) { + if (_processingState == none || _processingState == loading) { return -1; } else if (_indexedAudioSources && _indexedAudioSources.count > 0) { int v = (int)(1000 * CMTimeGetSeconds(_indexedAudioSources[_index].duration));