I have built the exoplayer into a simple app for playing short videos that are interspersed with dynamically selected items. This device will be in a bus that travels around the island and the interspersed ads are triggered by the GPS location so that as a tourist point of interest video is shown as the bus is in the vicinity. I have the GPS code working to recognise when a particular POI is close by, but I don't know how to manipulate the playlist.
Is there a way to query the playlist to find out which item is playing and to insert another item into the list to play next? I see at
https://exoplayer.dev/playlists.html there are calls to modify and query the playlist, are these accessible using Java? If so I would like to also explore the ad insertion options at
https://exoplayer.dev/ad-insertion.html
What are the events triggered by Exoplayer? I see Player_Ready, which fires as each media item is ready to play and Player_Complete which fires after the playlist has finished, but neither seem to return any specific information about which index has completed and counting these events and comparing to the Playlist would be less than optimal. I assume these events are a result of the code shown in
https://exoplayer.dev/listening-to-player-events.html Again, can some of the other listeners be accessed in B4A using Java?
Finally, I note the player has some repeat mode options, namely Player.REPEAT_MODE_ALL, which would be handy in this application. Are these accessable in the current ExoPlayer?
Thanks,
Kev