Rox.Xamarin.Video 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:
----------------
xmlns:roxv="clr-namespace:Rox;assembly=Rox.Xamarin.Video.Portable"

<roxv:VideoView AutoPlay="True" LoopPlay="True" ShowController="True" Source="http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4" />
****************
Sample Application is now available at:
----------------
https://github.com/Rod-at-Rox/RoxXamarinVideo
****************
In your iOS project "AppDelegate" code file, you must call "Rox.VideoIos.Init()" before "Xamarin.Forms.Forms.Init()". It should look something like:
----------------
Rox.VideoIos.Init();

global::Xamarin.Forms.Forms.Init();

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)
****************

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

Requires NuGet 2.8.1 or higher.

Install-Package Rox.Xamarin.Video -Version 2.0.0
dotnet add package Rox.Xamarin.Video --version 2.0.0
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Rox.Xamarin.Video, 2.0.0"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes

[2.0.0]
- 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

[1.0.0]
- 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 2.3.0.107

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.0 36,613 10/18/2016
2.0.0 1,331 8/3/2016
1.0.0 1,192 7/17/2016