Rox.Xamarin.Video 2.1.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 controls.

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 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)
- TimeSpan Duration { get; } (The duration of the video, available after video has loaded)
- bool FullScreen { get; set; } (View the video in full screen mode)
- bool LoopPlay { get; set; } (Start playing the video again from the start, once it has finished)
- bool Muted { get; set; } (Mutes the volume)
- TimeSpan Position { get; set; } (The current position of the video during playback, available after video has loaded)
- TimeSpan PositionInterval { get; set; } (The interval at which to update the current position of the video during playback, PositionInterval of TimeSpan.Zero will disable timer)
- bool ShowController { get; set; } (Determines if the built-in controller is visible)
- ImageSource Source { get; set; } (The source of the video to load, See Xamarin article "Working with Images")
- VideoStateType VideoState { get; } (The current state of the VideoView: Empty, Error, Buffering, Playing, Paused, Stopped)
- 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)
****************

Requires NuGet 2.8.1 or higher.

Install-Package Rox.Xamarin.Video -Version 2.1.0
dotnet add package Rox.Xamarin.Video --version 2.1.0
<PackageReference Include="Rox.Xamarin.Video" Version="2.1.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.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

[2.1.0]
- VideoView is now optimised for virtualization
- Fixed Android namespace issue
- Fixed Android VideoView in landscape mode is left aligned instead of being center aligned
- StreamImageSource property is implemented in Android
- StreamImageSource property is implemented in iOS
- PropertyChanges are reflected from the built-in controller in UWP (not implemented in Android and iOS)
- Created FullScreen property, implemented in UWP (not implemented in Android and iOS)
- Created Duration property, implemented in UWP (not implemented in Android and iOS)
- Created Position property,implemented in UWP (not implemented in Android and iOS)
- Created PositionInterval property, implemented in UWP (not implemented in Android and iOS)
- Updated sample application
- Changed packages.config to project.json
- Target Profile259
- Built against Xamarin.Forms 2.3.2.127
- Dependency on Xamarin Forms 1.0.0.0

Known Issues:
- Not all PropertyChanges are not reflected from the built-in controller in Android.
- Not all PropertyChanges are not reflected from the built-in controller in iOS.
- VideoState.Buffering is only implemented in UWP and will return VideoState.Stopped, or VideoState.Playing if AutoPlay=True, in Android and iOS
- FullScreen property is not implemented in Android.
- FullScreen property is not implemented in iOS.
- Duration property is not implemented in Android.
- Duration property is not implemented in iOS.
- Position property is not implemented in Android.
- Position property is not implemented in iOS.
- PositionInterval property is not implemented in Android.
- PositionInterval property is not implemented in iOS.
- Sample application uses a bad technique by binding the VideoView.Position to the SliderControl, this is not recommended as drag events should be used.

[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
- Built against Xamarin.Forms 2.3.0.107
- Dependency on Xamarin Forms 2.0.0.0

[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
- Built against Xamarin.Forms 2.3.0.107
- Dependency on Xamarin Forms 2.3.0.107

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.0 26,770 10/18/2016
2.0.0 920 8/3/2016
1.0.0 694 7/17/2016