In complete video You have to put Listener for video properties.
This are the basic funda for playing video in android.
So this are the code below.
vd is the VideoView variable.
First of all pass uri.
Uri uri = Uri.parse("PATH OF VIDEO");
Then set media controller And set video uri ....
This are the basic funda for playing video in android.
So this are the code below.
vd is the VideoView variable.
First of all pass uri.
Uri uri = Uri.parse("PATH OF VIDEO");
Then set media controller And set video uri ....
MediaController mc = new MediaController(this);
vd.setMediaController(mc);
vd.setVideoURI(uri);
vd.start();
Now On complete video setoncompletelistner properties on VideoView this code below....vd.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.v("log_tag","Complete Video");
}
});
No comments:
Post a Comment