Error playing "song title" prepare failed.: status=0x1 (IOException)
I get this error almost every time I start to play a new song after it has buffered enough to start playing. Anybody else run into this? How do I fix it?
Moderator: moderators
mediaPlayer.setDataSource(file.getPath());
FileInputStream fis = new FileInputStream(file);
mediaPlayer.setDataSource(fis.getFD());
aksarfevad wrote:Confirmed here as well. I did a google search came up with this: http://www.remwebdevelopment.com/dev/a63/Playing-Audio-error-PVMFErrNotSupported-Prepare-failed-status0x1-.html
Sindre: looks like you should be using a FileInputStream. I checked out the Android project source and found (in Rev:2133 line 479):
- Code: Select all
mediaPlayer.setDataSource(file.getPath());
and replaced it with:and added the import for java.io.FileInputStream . This fixed the issue for me initially, though I'd run it for a few days and on a few servers before assuming it works in all cases.
- Code: Select all
FileInputStream fis = new FileInputStream(file);
mediaPlayer.setDataSource(fis.getFD());
Users browsing this forum: No registered users and 5 guests