0

How to start playing audio from file, that is still downloading with Android MediaPlayer. After click of the play button I need to start download audio file from URL and play it at the same time. Can MediaPlayer do that? I think, I need to start playing from URL and the same time start download file. When file will be downloaded I think that I need to create URI of downloaded file and reset MediaPlayer with the new data source - URI of downloaded file.

  • How about ExoPlayer? https://developer.android.com/guide/topics/media/exoplayer – shrimpcolo Oct 08 '21 at 10:27
  • @tancolo i see that player but my app using media player already. Maybe i can start download file and create byte array for this file? But i don't know can byte array modifing in run-time? – Maksym Tsikal Oct 08 '21 at 10:34
  • I searched it on stackoverflow, https://stackoverflow.com/questions/12041994/progressive-audio-caching-library-for-android maybe it's helpful to you. – shrimpcolo Oct 08 '21 at 11:01

0 Answers0