Fix unknown duration bug in web.

This commit is contained in:
Ryan Heise 2020-09-18 12:16:02 +10:00
parent 4b4082bcb5
commit c13efc0cbd
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ class Html5AudioPlayer extends JustAudioPlayer {
if (_shuffleModeEnabled) {
_audioSourcePlayer?.shuffle(0, _index);
}
return (await _currentAudioSourcePlayer.load()).inMilliseconds;
return (await _currentAudioSourcePlayer.load())?.inMilliseconds;
}
Future<Duration> loadUri(final Uri uri) async {