Forum Xamarin.Android

Playing video using VideoView vs. Starting alternative mediaplayer app

Hi there,
I'm having some difficulties using VideoView. When I try to run the following code:
VideoView vv = FindViewById<VideoView> (Resource.Id.videoView1); vv.SetMediaController (new MediaController (this)); var uri = Android.Net.Uri.Parse ("/storage/sdcard1/Movies/movie1.avi");//command); vv.SetVideoURI (uri); vv.RequestFocus (); vv.Start ();
I get "Can't play this video" Error.
I tried playing different file types - avi, mp4 etc. That's not the problem.
I would like to use this method so I could also add play/pause buttons.
If that's, for some reason, not possible I would like to play my video using another app - in my case, bsPlayer.
Please help me - how to use these two different methods correctly and error-free :)

Answers

  • Facing the same isuue.Someone please help

  • TomKieronskiTomKieronski AUUniversity ✭✭

    From my own recent experience I suggest try several video formats. Reason being I found that I could for instance play video locally using MediaPlayer but the same file using VideoView from URL would not play. I then tried someone's URL from sample code and it worked fine. This kind of leads me to believe that it is a codec issue of some sort.

Sign In or Register to comment.