I am writing an application to play youtube videos using streaming.
First method:
I am getting the RTSP URL to the video using GData APIs. Here is the code t
Sometimes Uri.parse return "null" because cant parse an rtsp protocol instead of http protocol.
Look it with an Log in logcat Uri.parse(rtspURL).toString()
and you will see nothing written. or only make Log.d("tag", Uri.parse);
and the same will be return.
Try to find another way to parse (create) an Uri.
I'd try with that and run:
String urlVideo = <your rtspURL>
VideoView video = (VideoView)findViewById(R.id.VideoView01);
Log.d(tag , urlVideo);
video.setVideoURI(Uri.parse(urlVideo));
MediaController mc = new MediaController(this);
video.setMediaController(mc);
video.requestFocus();
video.start();
mc.show();
do you have the access to the internet? if not, please add the Internet permission to the manifest file
<uses-permission android:name="android.permission.INTERNET" />
and also please try these URIs:
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
http://www.wowza.com/_h264/BigBuckBunny_175k.mov