Android Question How to reset/clear cache of Exoplayer to immediately restart playing of video stream?

JohnC

Expert
Licensed User
Longtime User
My app plays streaming video from a remote server I own.

My app has the ability to remotely configure (in real-time) the video "source" that the remote server should be streaming. Meaning, I can remotely tell the server which video source to play and can switch among multiple video sources to stream.

The problem is that when my app tells the remote server to stream a different source video, it takes 10-15 seconds before I see the new video source playing inside of exoplayer due to exoplayer caching the video stream.

What is the best practice/method to restart Exoplayer so it will restart-playing the stream so that there is minimal delay to start seeing the new video (after the server switched it's input to the new video as remotely directed by my app)?

I found this, but again, not being a java expert I don't know how to implement this in B4A:

 

JohnC

Expert
Licensed User
Longtime User
I tried that, but it does not eliminate the 10-15 delay for some reason.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…