java - Android VideoView thumbnail refresh after programmatically seeking on certain devices -


in application have programatically skip video position according user input.

the problem i'm having when video paused , seek specified value thumbnail not refresh (the videoview still displays image paused).

this happens on devices such galaxy s4, htc 1 or nexus 10 (maybe related api or resolution, not sure), while works expected on galaxy s2, nexus 7 , other lower-end devices.

i've tried "hacky" approach such starting , pausing video no success (the image in videoview not update).

i'm hoping bit more experience can tell me if there way refresh video's thumbnail programmatically.

you can use seekoncompletedlistener of underlaying mediaplayer of videoview , pause right after seeked.

void seek(int position) {     videoview1.start();     videoview1.seekto(position); }  videoview1.setonpreparedlistener(new onpreparedlistener() {             @override             public void onprepared(mediaplayer mp) {                 // todo auto-generated method stub                 mp.setonseekcompletelistener(new mediaplayer.onseekcompletelistener()  {                      @override                     public void onseekcomplete(mediaplayer mp) {                             videoview1.pause();                                      }                  });             }          }); 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -