You are trying to play a WMV format. http://developer.android.com/guide/appendix/media-formats.html
On Tue, Dec 15, 2009 at 11:42 AM, Valentino XM <shourai...@gmail.com> wrote: > this is the code. appreciate if anyone can tell me whats wrong. > > package info.shouraig.com; > > import java.io.IOException; > > import android.app.Activity; > import android.media.MediaPlayer; > import android.net.Uri; > import android.os.Bundle; > import android.util.Log; > import android.widget.MediaController; > import android.widget.VideoView; > > public class XSO7 extends Activity { > public final static String RTSP = "rtsp://rtsp.youtube.com/watch? > v=8bmWwxixT0Y"; > > /** Called when the activity is first created. */ > �...@override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > > // ***VideoView to video element > > VideoView videoView = (VideoView) > findViewById(R.id.videoViewXS07); > Log.v("video", "***Video to Play::" + RTSP); > MediaController mc = new MediaController(this); > mc.setAnchorView(videoView); > Uri video = Uri.parse(RTSP); > videoView.setMediaController(mc); > videoView.setVideoURI(video); > videoView.start(); > videoView.setVideoURI(Uri.parse("file:///sdcard/ > video.XSCycling2.wmv")); > videoView = new VideoView(this); > MediaPlayer mp = new MediaPlayer(); > try { > mp.setDataSource(RTSP); > } catch (IllegalArgumentException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (IllegalStateException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > try { > mp.prepare(); > } catch (IllegalStateException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > mp.start(); > > } > } > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > To post to this group, send email to android-beginners@googlegroups.com > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en