hi
i want to know about duration of a video clip on a website without downloading the clip
is this code do the correct :
i want to know about duration of a video clip on a website without downloading the clip
is this code do the correct :
Java:
v = (VideoView) findViewById(R.id.videoView1);
v.setVideoPath("clip url");
v.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
long duration = v.getDuration();
Toast.makeText(getApplicationContext(), duration + "", 500).show();
}
});