Skip to content

Latest commit

 

History

History
73 lines (56 loc) · 3.24 KB

README.md

File metadata and controls

73 lines (56 loc) · 3.24 KB

MediaManager - Cross platform media plugin for Xamarin and Windows

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

Setup & Usage

Build Status:

Build status GitHub tag NuGet MyGet

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+

Example Usage

Add the NuGet package to your PCL

  • 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.

IMPORTANT

Android:

  • You must request AccessWifiState, Internet, MediaContentControl and WakeLock 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 the MediaManagerImplementation.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, and http://tizen.org/privilege/externalstorage privileges

Contributors