Android MediaPlayer streaming video setSurface jump back -


i m developing android app can play streaming videos , navigate through app video playing in background.

the video playing on service , watch video set mediaplayer's surface surfacetexture of textureview. no problems here, works fine.

the problem comes when user minimizes player (without problem) , wants re-open it. here, when re-set surface mediaplayer video jumps 1 or 2 seconds , continues reproducing fine. here code when set surface mediaplayer:

    public void onsurfacetextureavailable(surfacetexture surface, int width, int height) {       surfacetexture = new surface(surface);        if (mymusicservice != null) {         mymusicservice.getmediaplayer().setsurface(surfacetexture);       }  } 

i tried surfaceview (instead textureview) same result.

any ideas?

thanks,


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -