Xamarin Android Player helps simulate, debug, demo or run Android apps in a fast and hassle-free environment. Xamarin Android Player has deep integration with Visual Studio and Xamarin Studio and a native user interface on both Mac & Windows. Running Android on an x86 virtual machine using hardware accelerated virtualization and OpenGL, Xamarin. However with that said, Visual Studio on the Mac is coming along very nicely so if you are doing a lot of development on a Mac like I do, I almost live 100 percent in Visual Studio on the Mac, so they're both great experiences to use.' And Xamarin Live Player, no doubt, will continue to generate oohs and aahs from his audiences.
I am excited to announce a cross-platform video player. This new Xamarin Forms component gives developers the ability to render the native video player for iOS, Android, and Windows Phone all from XAML, shared code, or a portable class library (PCL). I find video encoding and streaming to be a fun challenge no matter what I am developing for and was excited to learn there is currently no comprehensive solution to cross-platform video playback with Xamarin Forms.
I am hoping developers will enjoy improved productivity when developing mobile applications requiring video because you can now control many aspects of the playback experience from shared code. For example, you can register for events (Playing, Paused, Stopped, TimeElapsed, etc.) all from a single shared code base. The goal is to provide video playback that’s easy to use without having to handle the idiosyncrasies of each platform’s media framework.
Getting Started
If you are a Xamarin mobile developer, the only thing you need to do to get a working native video player on every platform is to install the component following the getting started section. Literally the one line declaration below is sufficient to supercharge your apps with video.
Specifying the Video Source
You may notice the Source property takes a VideoSource object. This was built to have very similar design and behavior to Xamarin’s ImageSource class. You could literally follow the tutorial for working with images and just swap out the word ImageSource for VideoSource. This means you have the ability to specify a video’s file location as a local file system path, a remote URL or as an embedded resource from an assembly.
When working with embedded resources though, I took it one step further and made it a little more extensible when attempting to locate resources. The order of searching assemblies to find embedded resources when calling VideoSource.FromResource(“MyVideo.mp4”) has the same behavior as calling ImageSource.FromResource(…) but the entry assembly (your iOS, Android, or Windows Phone proxy application) is also searched in the event no other match is found.
Playing YouTube and Vimeo Videos
The major video hosting sites allow developers to play content hosted by them in the applications they build. The Xamarin Forms video player sample application (called Chill Player) comes with some convenience XAML markup extensions that can convert YouTube and Vimeo video ID’s into the playback stream URLs compatible with the video player on each platform.
It’s important to note that using direct stream URLs in this manner may be against the terms of use for these sites. As such, this experimental feature is merely a convenience and will likely see low priority support going forward. Both YouTube and Vimeo expose public APIs which you are encouraged to integrate for use with this video player component.
Visual Studio Android Sdk
Trial
You can download the sample application and run it on all three platforms to try out the demo. The trial version limits video playback to 15 seconds. You can download the trial on Nuget.org. In trial mode, the video player just fails after 15 seconds of playback.
Xamarin Android Player For Mac
Support
If you need support and have purchased at least one copy of the component, you can open and browse tickets here.