I'm using the Xamarin Android Player emulator to test the app I'm developing. The emulator doesn't play video at all. There's a black screen in place of the videoview.
I've written very simple code just to test the video playback. The code is below:
namespace Training
{
[Activity(Label = "", Icon = "@drawable/icon", Theme = "@style/MyTheme")]
class videotest : ActionBarActivity
{
private Android.Support.V7.Widget.Toolbar mToolbar;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.videotest);
mToolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
SetSupportActionBar(mToolbar);
SupportActionBar.Title = "";
var videoView = FindViewById<VideoView>(Resource.Id.SampleVideoView);
var uri = Android.Net.Uri.Parse("http://www.printopack.somee.com/Uploaded/Grad2.mp4");
videoView.SetVideoURI(uri);
videoView.Start();
}
}
}
Try testing it on a real device. When I was working with video views in Xamarin.Android the same thing happened to me on the emulator but on a real device it worked just fine.