public class VideoViewExample extends Activity {
MediaController mc;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView v =(VideoView)findViewById(R.id.video);
String url ="rtsp://stream.the.sk/live/aztv/aztv-hm.3gp";
mc = new MediaController(VideoViewExample.this);
mc.setMediaPlayer(v);
v.setVideoPath(url);
v.setMediaController(mc);
v.requestFocus();
v.start();
mc.show();
}
}
I am not able to play video on emulator,it is showing Sorry, this video cannot be played. If I hit "OK" it goes back to the home screen. What is the exact solution for this?