Cross platform Xamarin plugin to play and control Audio and Video

License: MIT

Language: C#

Keywords: audio, media, mediamanager, netstandard, nuget, video, xamarin

MediaManager - Cross platform media plugin for Xamarin and Windows

  • Designed to be simple and easy to use
  • Native playback of media files from remote http(s), embedded and local sources
  • Native media notifications and remote controls
  • Queue and playback management by default
  • Playback status (Playing, Buffering, Loading, Paused, Progress)
  • Events for media handling to hook into


Build status GitHub tag NuGet MyGet

Platform Support

Platform Supported Version Player
.Net Standard Yes 2.0+ MediaManager
Xamarin.Forms Yes 3.2+ MediaManager
Xamarin.Android Yes API 16+ ExoPlayer
Xamarin.iOS Yes iOS 10+ AVPlayer
Xamarin.Mac Yes 3.0+ AVPlayer
Xamarin.tvOS Yes 10.0+ AVPlayer
Tizen Yes 4.0+ MediaPlayer
Windows 10 UWP Yes 10+ MediaElement
Windows WPF No


Add the NuGet package to all the projects you want to use it in.

  • In Visual Studio - Tools > NuGet Package Manager > Manage Packages for Solution
  • Select the Browse tab, search for MediaManager
  • Select Plugin.MediaManager
  • Install into each project within your solution

More information on the Xamarin Blog


Call MediaManager.Current from any .Net library or Xamarin project to gain access to APIs.

IMPORTANT: Initialize plugin

Make sure to call Init() in all the native platforms on startup of your app.


Optionally provide the Activity on Android.

public class MainActivity : AppCompatActivity
	protected override void OnCreate(Bundle savedInstanceState)


Play a single media item

await CrossMediaManager.Current.Play("");
await CrossMediaManager.Current.Play("");

Play multiple media items

public IList<string> Mp3UrlList => new[]{

await CrossMediaManager.Current.Play(Mp3UrlList);

Retrieve metadata for media

Depending on the platform and the media item metadata will be extracted from ID3 data in the file.


Add Video Player to the UI

For android we need a videoview

playerView = view.FindViewById<VideoView>(Resource.Id.exoplayerview_activity_video);

For iOS we need to add a VideoView either in code, or in a Xib or Storyboard.

var playerView = new VideoView();

Then for both android and iOS we have to add the player view to the mediaplayer


Control the player

await CrossMediaManager.Current.Play();
await CrossMediaManager.Current.Pause();
await CrossMediaManager.Current.Stop();

await CrossMediaManager.Current.StepForward();
await CrossMediaManager.Current.StepBackward();

await CrossMediaManager.Current.SeekToStart();
await CrossMediaManager.Current.SeekTo(TimeSpan position);

Control the Queue

await CrossMediaManager.Current.PlayPrevious();
await CrossMediaManager.Current.PlayNext();
await CrossMediaManager.Current.PlayPreviousOrSeekToStart();

Retrieve information

CrossMediaManager.Current.MediaPlayer.State == MediaPlayerState.Playing;

Hook into events

event StateChangedEventHandler StateChanged;
event PlayingChangedEventHandler PlayingChanged;
event BufferingChangedEventHandler BufferingChanged;
event MediaItemFinishedEventHandler MediaItemFinished;
event MediaItemChangedEventHandler MediaItemChanged;
event MediaItemFailedEventHandler MediaItemFailed;
event PositionChangedEventHandler PositionChanged;


await CrossMediaManager.Current.*

Platform specific features

Feature Android iOS, Mac, tvOS UWP Tizen
Audio x x x x
Video x x x x
Queue x x x x
Notifications x x x x
Volume x x x x
Media Extraction x x x x
HLS x x
SmoothStreaming x
ChromeCast x
Airplay x
Xamarin.Forms x x x

You can also directly access the native media player if you need it!

//Access ExoPlayer on Android
//iOS, MacOS or tvOS

Building the source code

  • On Windows you need Visual Studio 2019 with the latest Xamarin, .NET Core and UWP installed.
  • On Visual Studio for Mac 2019 multi-target is not supported. Therefor you need to compile from command line on a Mac. Simple go to the folder where the source code is and run: msbuild MediaManager.sln /t:rebuild /p:Configuration=Release



  • You must request AccessWifiState, Internet, ForegroundService and WakeLock permissions
  • Your app must target Android SDK v28 or higher


  • In order for the audio to contiunue to play in the background you have to add the 'Audio, Airplay and Picture in Picture Background mode' and 'Background fetch' to your Info.plist
  • If you are playing audio from a http resource you have to take care of ATS.
  • If you want to display a artwork/cover that is embedded into an MP3 file, make sure that you use ID3 v2.3 (not v2.4).


  • You must request,, and privileges

Project Statistics

Sourcerank 12
Repository Size 7.37 MB
Stars 356
Forks 203
Watchers 45
Open issues 48
Dependencies 19
Contributors 25
Tags 18
Last updated
Last pushed

Top Contributors See all

Martijn van Dijk Felix Schoeler Erlend Angelsen paulppn Joe Martinez Casper Skoubo Mike Rowley Simon Schick Philipp Tischhauser sjoerd0301 Jonas BtrJay Tomasz Cielecki Michael Dan Siegel escamoteur Brandon Minnick Andrei Nick Randolph John Thiriet

Packages Referencing this Repo

Cross platform Xamarin plugin to play and control Audio and Video
Latest release 0.5.9 - Updated - 356 stars
Cross platform Xamarin plugin to play and control Audio and Video
Latest release 0.5.9 - Updated - 356 stars
Package Description
Latest release 1.0.2 - Published - 356 stars
Package Description
Latest release - Updated - 356 stars
Package Description
Latest release 1.0.2 - Published - 356 stars
Reactive extensions for the MediaManager plugin
Latest release 0.4.5 - Updated - 356 stars
Customized XamarinMediaManager
This package is no longer available on NuGet
ExoPlayer supports more advanced video and audio playback. This is based on the MediaManager plugin
Latest release 0.4.5 - Updated - 356 stars
Cross platform Xamarin plugin to play Media from PCL. Currently only supports audio playback on A...
Latest release 0.0.1 - Published - 356 stars
Package Description
Latest release 1.0.2 - Published - 356 stars

Recent Tags See all

0.5.9 May 19, 2019
0.5.1 April 13, 2019
0.5.0 April 11, 2019
0.4.4 August 21, 2017
0.4.3 July 28, 2017
0.4.3 July 28, 2017
0.4.2 July 28, 2017
0.4.2 July 28, 2017
0.4.0 March 17, 2017
0.3.3 February 21, 2017
0.3.2 February 20, 2017
0.3.1 February 20, 2017
0.3.0 February 15, 2017
0.2.0 January 31, 2017
0.1.4 January 27, 2017

Interesting Forks See all

Cross platform Xamarin plugin to play Media from PCL
C# - MIT - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2019-05-19 16:18:46 UTC