Using VideoView for streaming or progressive-download video

is it possible to play video as progressive download, or by streaming, simply by using setVideoPath or setVideoURI, as in VideoViewDemo in the API samples? It should. It certainly works with MediaPlayer, and VideoView is just a ~200 line wrapper around MediaPlayer and a SurfaceView. The VideoViewDemo code suggests using setVideoURI for streaming, but I’m … Read more

how to play video from url

It has something to do with your link and content. Try the following two links: String path=”http://www.ted.com/talks/download/video/8584/talk/761″; String path1=”http://commonsware.com/misc/test2.3gp”; Uri uri=Uri.parse(path1); VideoView video=(VideoView)findViewById(R.id.VideoView01); video.setVideoURI(uri); video.start(); Start with “path1”, it is a small light weight video stream and then try the “path”, it is a higher resolution than “path1”, a perfect high resolution for the mobile … Read more

How to play .mp4 video in videoview in android?

Finally it works for me. private VideoView videoView; videoView = (VideoView) findViewById(R.id.videoView); Uri video = Uri.parse(“http://www.servername.com/projects/projectname/videos/1361439400.mp4”); videoView.setVideoURI(video); videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { mp.setLooping(true); videoView.start(); } });

Videoview Pausing and resuming

You can use this @Override public void onPause() { Log.d(TAG, “onPause called”); super.onPause(); stopPosition = videoView.getCurrentPosition(); //stopPosition is an int videoView.pause(); } @Override public void onResume() { super.onResume(); Log.d(TAG, “onResume called”); videoView.seekTo(stopPosition); videoView.start(); //Or use resume() if it doesn’t work. I’m not sure } original post

Position Video Inside a VideoView

Try using a FrameLayout instead. I’m not sure why, but if I use a Linear or Relative in my code it won’t center, but FrameLayout does. Here is the XML that fit my video to the screen, preserving the ratio and centering it: <FrameLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”@drawable/bg”> <!– Video player –> <VideoView android:id=”@+id/surface_view” android:layout_width=”fill_parent” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)