-
Notifications
You must be signed in to change notification settings - Fork 770
OnPlayerErrorChanged never cleared with MediaController #449
Copy link
Copy link
Closed
Labels
Description
Why when adding a Player.Listener to a MediaController or MediaBrowser the onPlayerErrorChanged has not the same behavior as if it was added on a Exoplayer instance ?
Behavior of Exoplayer:
- Play a item that throw an error
- onPlayerErrorChanged(newError)
- Play other item that doesn't throw an error
- onPlayerErrorChanged(null)
Behavior of MediaController / MediaBrowser:
- Play a item that throw an error
- onPlayerErrorChanged(newError)
- Play other item that doesn't throw an error
- Expect a onPlayerErrorChanged(null) but the callback is never called!
Tested on release : 1.0.0, 1.0.2, 1.1.0-beta01
Test / reproduce the issue
To test the behavior you just have to modify and run the demo-session with this modifications
add in assets/catalog.json
{
"id": "video_04",
"title": "Video with error",
"album": "Mango Open Movie project",
"artist": "Blender Foundation",
"genre": "Video",
"source": "https://storage.googleapis.com/wvmedia/clear/h264/tears/unknow.mpd",
"image": "https://storage.googleapis.com/wvmedia/clear/h264/tears/unknow.mpd"
},And add onPlayerErrorChanged callback from the Player.Listener in PlayerActivity.kt
override fun onPlayerErrorChanged(error: PlaybackException?) {
Log.i("MyTag", "error = $error")
val errorMessage = error?.message
playerView.setCustomErrorMessage(errorMessage)
}The custom message is never clear and it will be showed after playing another media item that play correctly.

Reactions are currently unavailable