15 Kasım 2016 Salı

VideoView Sınıfı

constructor
Şöyle yaparız.
VideoView videoView = (VideoView) findViewById(R.id.video_view);
getDuration metoud
Şöyle yaparız.
long duration=videoView.getDuration();
seekTo metoud
Şöyle yaparız.
videoView.seekTo(int msec);
setMediaController metodu
Şöyle yaparız.
videoView.setMediaController(new MediaController(this, true));
setVideoPath metodu
Şöyle yaparız.
String uri = "http://.../content.mp4";
videoView.setVideoPath (uri);
setVideoURI metodu
Şöyle yaparız.
Uri uri = Uri.parse("android.resource://" +
 getPackageName() + "/" + R.raw.phsplash);
videoView.setVideoURI (uri);
start metodu
Şöyle yaparız.
videoView.start();

Hiç yorum yok:

Yorum Gönder