Rox.Xamarin.Video 2.0.0

There is a newer version of this package available.
See the version list below for details.

Requires NuGet 2.8.1 or higher.

dotnet add package Rox.Xamarin.Video --version 2.0.0
NuGet\Install-Package Rox.Xamarin.Video -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rox.Xamarin.Video" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rox.Xamarin.Video --version 2.0.0
#r "nuget: Rox.Xamarin.Video, 2.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rox.Xamarin.Video as a Cake Addin
#addin nuget:?package=Rox.Xamarin.Video&version=2.0.0

// Install Rox.Xamarin.Video as a Cake Tool
#tool nuget:?package=Rox.Xamarin.Video&version=2.0.0

View videos in Xamarin Forms with the VideoView control. Supports Android, iOS, and UWP.

The VideoView control uses native controls on each platform. VideoView for Android, AVPlayerViewController for iOS, and MediaElement for UWP.

The VideoView control in its simplest form can be used with the built-in controller. The VideoView control can also be bound to your own custom controller. It is not currently recommended that both the built-in controller and a custom controller are used at the same time.

The VideoView.Source property is of type ImageSource. This means you can set the VideoView.Source in the same way you would set the Image.Source property, including being able to use ImageSource.FromResource().
XAML Usage:

<roxv:VideoView AutoPlay="True" LoopPlay="True" ShowController="True" Source="" />
Sample Application is now available at:
In your iOS project "AppDelegate" code file, you must call "Rox.VideoIos.Init()" before "Xamarin.Forms.Forms.Init()". It should look something like:


LoadApplication(new MyVideoApplication());
The VideoView has the following methods:
- Task Start(); (Start and Resume playing the video)
- Task Pause(); (Pause and Resume playing the video)
- Task Stop(); (Stop playing the video)
The VideoView has the following bindable properties:
- bool AutoPlay { get; set; } (Automatically starts playing the video, when video has finished loading)
- bool LoopPlay { get; set; } (Start playing the video again from the start, once it has finished)
- bool Muted { get; set; } (Mutes the volume)
- bool ShowController { get; set; } (Determines if the built-in controller is visible)
- VideoStateType VideoState { get; } (Empty, Error, Buffering, Playing, Paused, Stopped)
- ImageSource Source { get; set; } (See Xamarin article "Working with Images")
- double Volume { get; set; } (The sound level of the audio, from 0 to 1)
- ICommand PropertyChangedCommand { get; set; } (Executes a command when any of the VideoView properties change)

Product Versions
MonoAndroid monoandroid10
Universal Windows Platform uap10
Xamarin.iOS xamarinios10
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 48,610 10/18/2016
2.0.0 1,906 8/3/2016
1.0.0 1,757 7/17/2016

- Renamed VideoView.VideoSource (string) to VideoView.Source (ImageSource)
- Created PropertyChangedCommand property
- Volume property implemented on all platforms
- Muted property implemented on all platforms
- VideoState property implemented on all platforms
- Added sample application to GIT

Known Issues:
- StreamImageSource property is not implemented for Android and iOS (implemented for UWP)
- PropertyChanges are not reflected from the built-in controller
- VideoState.Buffering is only implemented in UWP and will return VideoState.Stopped, or VideoState.Playing if AutoPlay=True, on Android and iOS
- VideoView in landscape mode is left aligned instead of being center aligned on Android

- Working with ShowController set to true
- Source property is called VideoSource and is a string, can be URI, FileName implemented for iOS and UWP
- Supports AutoPlay, LoopPlay, VideoSource, Start, Pause, Stop
- Muted, Volume, and VideoState only implemented in UWP
- Dependency on Xamarin Forms