Uri uri = Uri.parse(URLPath);
vv.setVideoURI(uri);
vv.setOnCompletionListener(new OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
//play next one
}
});
vv.setOnErrorListener(new OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
return false;
}
});
Above code is for playing remote video with VideoView(vv).
It works while on high speed network.
But if low speed network is used such as 3G, playback will fail often, and outside the activity. t seems streaming is slower than user playback. The error code is (1,-1004).
What can I do to replace outside activity with pause and wait for streaming?