Home > Mobile >  Android MediaPlayer why didn't listen to video playback end
Android MediaPlayer why didn't listen to video playback end

Time:09-30

Android MediaPlayer write a video player, setOnCompletionListener method without execution, video playback end not listening!!!!!! Video progress to the last seconds, the video will be back in a few seconds, at the end of the play, the back again a few seconds and so on, is less than video monitoring over!!!!!!

CodePudding user response:

Oneself the top, this problem will be related to video? Not all of the video are so, there is only one way

CodePudding user response:

Just debugging and on getCurrentPosition () to obtain numerical value is greater than the length of the video, and then play in the end all of a sudden jump back to the problem, always back and forth jump!!!!! Why will appear this problem!!!!!! Why would obtain the location of the current video is greater than the total length of video!!!!!! Is an Android bug???

CodePudding user response:

Your problem solved? I also met

CodePudding user response:

With the building Lord, listen less than network streaming over, listen to is OnBufferingUpdateListener and schedule for 100, but the play is over,

CodePudding user response:

//play complete callback
Public void setOnCompletionListener (IMediaPlayer OnCompletionListener l);
  • Related