Several improvements of the ExoPlayer component

Hello everyone,
when I used the ExoPlayer component for my music player, I found several issues

1. SeekTo is not working as expected

I discovered that the functionality is more like “SeekBy” because the player position is set by adding the position value to the player’s current position

2. The player stops when the screen turns off

See the issue described here

3. The player doesn’t react to headphone buttons

Not really an issue, but I think that the component should take control over that. Maybe with MediaSession as described here Headset Fastforward and Rewind not working · Issue #5719 · google/ExoPlayer · GitHub

4. Executing seekTo immediately after setSource does not work

Doing so will still start the file from the beginning. If I execute seekTo with a delay of more than 100 ms, the player player starts at the right position

Please verify that I’m not the only one with these issues

1 Like

see this thread


Yes, set the ExoPlayer.Source in another block beforehand or use a timer. Otherwise also ExoPlayer.Duration is not executed correctly. So put ExoPlayer.Source e.g. already at Screen.Initialize.

Due to the serious issues in standby / background, however, I strongly recommend that you no longer use the ExoPlayer (at least temporarily until there may be a fix, but I honestly have little hope).

1 Like

For the devs Troubleshooting - ExoPlayer

Unfortunately, this does not solve the problem.