Android Media Player Error (100.0)

I have read all the error codes given on the Internet.

The error indicates:

const PVMFStatus PVMFInfoLast = 100; "End of Range Placeholder"

But I could not handle this error, thanks for the help.

+6
android android-mediaplayer android-video-player
Aug 16 '12 at 11:05
source share
2 answers

Deploy OnErrorListener in your class.

inside the body of the write class

video_view.setOnErrorListener(this); 

then overwrite the OnError method (MediaPlayer mp, int what, int extra) with this method

 @Override public boolean onError(MediaPlayer mp, int what, int extra) { if (what == 100) { video_view.stopPlayback(); Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class); startActivity(inn); } else if (what == 1) { pb2.setVisibility(View.GONE); Log.i("My Error ", "handled here"); video_view.stopPlayback(); Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class); startActivity(inn); } else if(what == 800) { video_view.stopPlayback(); Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class); startActivity(inn); } else if (what == 701) { video_view.stopPlayback(); Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class); startActivity(inn); } else if(what == 700) { video_view.stopPlayback(); Toast.makeText(getApplicationContext(), "Bad Media format ", Toast.LENGTH_SHORT).show(); Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class); startActivity(inn); } else if (what == -38) { video_view.stopPlayback(); Intent inn = new Intent(HelloInterruptVideoStream.this,TabAct.class); startActivity(inn); } return false; } 
+12
Aug 16 '12 at 11:45
source share
β€” -

I ran into this problem on Android 1.5.

 mMP = new MediaPlayer(); mMP.setOnCompletionListener(new CompletionListener()); mMP.setOnErrorListener(new ErrorListener()); final FileInputStream fileInStream = new FileInputStream(mFileName); mMP.setDataSource(fileInStream.getFD()); mMP.prepare(); mMP.play(); 
 01-14 01:57:26.248: W/MediaPlayer(1971): MediaPlayer server died! 01-14 01:57:26.258: E/MediaPlayer(1971): error (100, 0) 01-14 01:57:26.258: E/MediaPlayer(1971): Error (100,0) 

This occurs when the duration of mp3 files is less than 1 second. This is android.media.MediaPlayer error.

The solution is to make mp3 files lasting longer than 1 second.

+8
Sep 13 '12 at 6:28
source share



All Articles