You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(AndroidAudioError, null, java.lang.IllegalStateException
at android.media.MediaPlayer.prepareAsync(Native Method)
at n9.i.d()
at n9.o.N()
at m9.m.J()
at m9.m.n()
at m9.m$b.b()
at m9.m$b.invoke()
at m9.m$d.invokeSuspend()
at kotlin.coroutines.jvm.internal.a.resumeWith()
at d9.d1.run()
at kotlinx.coroutines.internal.n.run()
at kotlinx.coroutines.scheduling.k.run()
at kotlinx.coroutines.scheduling.a.M()
at kotlinx.coroutines.scheduling.a$c.d()
at kotlinx.coroutines.scheduling.a$c.n()
at kotlinx.coroutines.scheduling.a$c.run()
, null)
at StandardMethodCodec.decodeEnvelope(message_codecs.dart:652)
at MethodChannel._invokeMethod(platform_channel.dart:310)
at AudioPlayer.stop(audioplayer.dart:226)
at AudioPlayer.release(audioplayer.dart:242)
at AudioPlayer.dispose(audioplayer.dart:405)
at AudioManager._disposeMusic(audio_manager.dart:112)
at AudioManager.dispose(audio_manager.dart:99)
Related issues / more information
No response
Working on PR
no way
The text was updated successfully, but these errors were encountered:
Checklist
Current bug behaviour
After the update to audioplayers 5.2.1, there is constant crash of IlllegalStateException on Android 6.0.1 devices.
Expected behaviour
The player should play the audio from assets.
Steps to reproduce
flutter run
on the code sampleCode sample
Future play(String fileName, {bool loop = false}) async {
if (_audioPlayer.state == PlayerState.disposed) {
_audioPlayer = AudioPlayer();
}
await _audioPlayer.release();
_audioPlayer.play(AssetSource('sounds/$fileName'), volume: _volume);
if (loop) {
_audioPlayer.setReleaseMode(ReleaseMode.loop);
}
}
Affected platforms
Android
Platform details
Platform: Android 6.0.1
AudioPlayers Version
5.2.1
Build mode
release
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(AndroidAudioError, null, java.lang.IllegalStateException
at android.media.MediaPlayer.prepareAsync(Native Method)
at n9.i.d()
at n9.o.N()
at m9.m.J()
at m9.m.n()
at m9.m$b.b()
at m9.m$b.invoke()
at m9.m$d.invokeSuspend()
at kotlin.coroutines.jvm.internal.a.resumeWith()
at d9.d1.run()
at kotlinx.coroutines.internal.n.run()
at kotlinx.coroutines.scheduling.k.run()
at kotlinx.coroutines.scheduling.a.M()
at kotlinx.coroutines.scheduling.a$c.d()
at kotlinx.coroutines.scheduling.a$c.n()
at kotlinx.coroutines.scheduling.a$c.run()
, null)
at StandardMethodCodec.decodeEnvelope(message_codecs.dart:652)
at MethodChannel._invokeMethod(platform_channel.dart:310)
at AudioPlayer.stop(audioplayer.dart:226)
at AudioPlayer.release(audioplayer.dart:242)
at AudioPlayer.dispose(audioplayer.dart:405)
at AudioManager._disposeMusic(audio_manager.dart:112)
at AudioManager.dispose(audio_manager.dart:99)
Related issues / more information
No response
Working on PR
no way
The text was updated successfully, but these errors were encountered: