Merge pull request #1586 from Bnyro/master

different player error behavior
This commit is contained in:
Bnyro 2022-10-18 14:59:17 +02:00 committed by GitHub
commit c477bb3f56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -896,12 +896,12 @@ class PlayerFragment : BaseFragment() {
* Catch player errors to prevent the app from stopping * Catch player errors to prevent the app from stopping
*/ */
override fun onPlayerError(error: PlaybackException) { override fun onPlayerError(error: PlaybackException) {
Toast.makeText(
context,
error.localizedMessage,
Toast.LENGTH_LONG
).show()
super.onPlayerError(error) super.onPlayerError(error)
try {
exoPlayer.play()
} catch (e: Exception) {
e.printStackTrace()
}
} }
}) })