Skip to content
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

Cannot catch error of preparePlayer #301

Open
jt274 opened this issue May 24, 2024 · 1 comment
Open

Cannot catch error of preparePlayer #301

jt274 opened this issue May 24, 2024 · 1 comment

Comments

@jt274
Copy link

jt274 commented May 24, 2024

Describe the bug
When an error is thrown by controller.preparePlayer, it cannot be caught. Experiencing this on Android, have not tested on iOS.

For example, when trying to play a file in an invalid format on Android, the console shows the error:

Playback error
com.google.android.exoplayer2.ExoPlaybackException: Source error

However, a try/catch block or catchError does not fire, and the code is blocked without further execution.

To Reproduce
Steps to reproduce the behavior:

  1. Run controller.preparePlayer using an invalid file
  2. Try to catch error using catchError or try/catch block.
  3. Catch does not work

Expected behavior
Catch should catch any player errors and continue code execution.

@dev3-tech
Copy link

dev3-tech commented May 29, 2024

yes i faced same thing while controller.preparePlayer.
PlatformException(AudioWaveforms, Couldn't read into buffer. Error Domain=com.apple.coreaudio.avfaudio Code=-50 "(null)" UserInfo={false condition=buffer.frameCapacity != 0}, null, null)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants