Android SurfaceView Video Overlap
In my app, I'm displaying local videos using a SurfaceView. However, I
noticed a strange (rare) bug when switching between videos: they both
overlap.
Screenshot:
Sometimes the old video (top black video) stays still and sometimes it
still continues playing. (with no audio)
How do I fix this? I was previously using a VideoView and still had this
issue. My VideoFragment is recreated everytime I open a new video. I tried
releasing the video in the onPause() of the fragment but still no luck.
@Override
public void onPause()
{
super.onPause();
if (player != null && Video.getDownloaded())
{
if(player.isPlaying())
player.stop();
controller.hide();
player.release();
}
}
Thanks in Advance,
~Pkmmte Xeleon
No comments:
Post a Comment