Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting access to media player cache

I want to move a progressively streamed mp3 file to sd card once it is completely loaded. Is there any way of achieving that.

I've seen that the MediaPlayer completely downloads the whole file while progressive streaming and then we can seek to any part of file. I want to move a fully streamed file to external storage so that future playback do not waste data and battery.

like image 705
Rahul Verma Avatar asked Oct 03 '12 02:10

Rahul Verma


People also ask

How do I turn off Media Player on Android?

1 Answer. Show activity on this post. MediaPlayer has an OnCompletionListener callback you can register to get notified when playback stops.


1 Answers

The idea is to create a proxy that the media player can read from, instead of reading data directly from the web.

I used danikula/AndroidVideoCache which is very simple to build/use. I used it for Audio not Video, but its just the same.

like image 166
Asaf Pinhassi Avatar answered Oct 17 '22 10:10

Asaf Pinhassi