-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 🐛 Cannot catch error of preparePlayer (#301) #368
fix: 🐛 Cannot catch error of preparePlayer (#301) #368
Conversation
@@ -42,6 +41,12 @@ class AudioPlayer( | |||
player?.addMediaItem(mediaItem) | |||
player?.prepare() | |||
playerListener = object : Player.Listener { | |||
|
|||
override fun onPlayerError(error: com.google.android.exoplayer2.PlaybackException) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can import this and just use type here
|
||
override fun onPlayerError(error: com.google.android.exoplayer2.PlaybackException) { | ||
super.onPlayerError(error) | ||
result.error(Constants.LOG_TAG, error.message, "Exo-Player Error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exo player error
doesn't look informative.
example/pubspec.yaml
Outdated
@@ -61,7 +64,7 @@ flutter: | |||
- assets/audios/audio2.mp3 | |||
- assets/audios/audio3.mp3 | |||
- assets/audios/audio4.mp3 | |||
|
|||
- assets/audios/audio5.mp3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you forget to remove it?
50f0427
to
1bc547f
Compare
1bc547f
to
d08dc3c
Compare
Fixed #301