I have followed the Xamarin documentation and can play a video using the VideoView if it has an URL, However, there is no documentation for playing local files and I would like to play a video that has been copied into my Assets or Resource folder. Here is the code for the videoView URL.
VideoView videoView = FindViewById<VideoView> (Resource.Id.video); var uri = Android.Net.Uri.Parse ("http:// path here all works good"); videoView.SetVideoURI (uri); videoView.RequestFocus (); videoView.Start ();
I have tried changing the Uri to the path of the video, I have also tried :
videoView.SetVideoPath("/Video/Assets/big_buck_bunny.mp4"); in place of videoView.SetVideoURI (uri);
None of these methods seem to work, Am I missing something out of the path string? or perhaps not saving the video to the correct folder? Upon running the emulator and any android device just a warning message is displayed saying "cannot play this video". Any help would be greatly appreciated.