1

I'm using VideoView in my app and I need an mp4 video to be looped. I'm already using this method to loop my video.

vid.setOnPreparedListener(new OnPreparedListener(){
        @Override
        public void onPrepared(MediaPlayer mp) {
            mp.setLooping(true); 
        }
});

It works on Nexus 7 and on simulator with API level 16, but on the main device (the only difference is Android 4.0.3), where it's going to be used, video only plays once and doesn't loop. Any suggestions?

  • any errors printed out anywhere? – radai Feb 18 '13 at 16:08
  • Maybe you could try to create a OnCompletionListener, set it to your mediaplayer and then just initiate playback again when the video is done playing. – Slickelito Feb 18 '13 at 16:23
  • No errors, according to the device (which is some myAudio9 tablet) everything is ok. It works fine on other 4.0.3 devices like Xperia Neo V. OnCompletionListener was useful but only to reload the whole activity. It looks like buffer is empty after stopping the video. – kazalagoopagoo Feb 19 '13 at 14:57
  • Did you ever find a solution for this problem? I'm running into something that sounds very similar. – David Berry Oct 12 '16 at 17:33

0 Answers0