- Designed to be simple and easy to use
- Stand alone for easy integration with existing projects and frameworks
- Native playback of media files from remote and local sources
- Native media notifications and remote controls
- Playback status (Playing, Buffering, Loading, Paused, Progress)
- Available on NuGet: https://www.nuget.org/packages/Plugin.MediaManager/
- Install into each project that utilizes MediaManager
- More information on the Xamarin Blog
Platform Support
Platform | Supported | Version |
---|---|---|
Xamarin.iOS | Yes | iOS 7+ |
Xamarin.Android | Yes | API 9+ |
Windows 10 UWP | Yes | 10+ |
Windows WPF | No | |
.Net Framework | Yes | 4.5 |
.Net Standard | Future | |
Xamarin.Mac | Yes | 3.0+ |
Xamarin.tvOS | Yes | 10.0+ |
Tizen | Yes | 4.0+ |
- 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
Call MediaManager.Current from any .Net library or Xamarin project to gain access to APIs.
await CrossMediaManager.Current.Play("http://www.montemagno.com/sample.mp3");
See Sample for more details.
Android:
- You must request
AccessWifiState
,Internet
,MediaContentControl
andWakeLock
permissions
iOS:
- In order for the audio to contiunue to play in the background you have to add the Audio and Airplay Background mode to your Info.plist
- If you want to enable RemoteControl features, you will have to override
UIApplication.RemoteControlReceived(UIEvent)
and forward the event to theMediaManagerImplementation.MediaRemoteControl.RemoteControlReceived(UIEvent)
method. See the sample application for more details. - 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).
Tizen:
- You must request
http://tizen.org/privilege/internet
,http://tizen.org/privilege/mediastorage
, andhttp://tizen.org/privilege/externalstorage
privileges