Xam.Plugins.Android.ExoPlayer.MediaSession
2.19.1
Requires NuGet 2.14 or higher.
dotnet add package Xam.Plugins.Android.ExoPlayer.MediaSession --version 2.19.1
NuGet\Install-Package Xam.Plugins.Android.ExoPlayer.MediaSession -Version 2.19.1
<PackageReference Include="Xam.Plugins.Android.ExoPlayer.MediaSession" Version="2.19.1" />
paket add Xam.Plugins.Android.ExoPlayer.MediaSession --version 2.19.1
#r "nuget: Xam.Plugins.Android.ExoPlayer.MediaSession, 2.19.1"
// Install Xam.Plugins.Android.ExoPlayer.MediaSession as a Cake Addin #addin nuget:?package=Xam.Plugins.Android.ExoPlayer.MediaSession&version=2.19.1 // Install Xam.Plugins.Android.ExoPlayer.MediaSession as a Cake Tool #tool nuget:?package=Xam.Plugins.Android.ExoPlayer.MediaSession&version=2.19.1
ExoPlayer Plugin for Xamarin
Xamarin bindings library for the Google ExoPlayer library.
ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.
Support
- Feel free to open an issue. Make sure to use one of the templates!
- Commercial support is available. Integration with your app or services, samples, feature request, etc. Email: hello@baseflow.com
- Powered by: baseflow.com
Documentation
- The developer guide provides a wealth of information.
- The class reference documents ExoPlayer classes.
- The release notes document the major changes in each release.
- Follow our developer blog to keep up to date with the latest ExoPlayer developments!
Using ExoPlayer
The ExoPlayer plugin is available on Nuget.
var HttpDataSourceFactory = new DefaultHttpDataSource.Factory().SetAllowCrossProtocolRedirects(true);
var MainDataSource = new ProgressiveMediaSource.Factory(HttpDataSourceFactory);
var Exoplayer = new IExoPlayer.Builder(Context).SetMediaSourceFactory(MainDataSource).Build();
MediaItem mediaItem = MediaItem.FromUri(Android.Net.Uri.Parse("https://ia800806.us.archive.org/15/items/Mp3Playlist_555/AaronNeville-CrazyLove.mp3"));
Exoplayer.AddMediaItem(mediaItem);
Exoplayer.Prepare();
Exoplayer.PlayWhenReady = true;
See the Exoplayer.Droid sample app for further details.
IMPORTANT: Exoplayer 2.9.0 and up requires Visual Studio 2019 with R8 and D8. You also need to enable AAPT2. Readmore at: https://devblogs.microsoft.com/xamarin/androids-d8-dexer-and-r8-shrinker/
Thanks to
- Nathan Barger for doing the initial porting work
- MKuckert for helping with bindings and samples
- bspinner for helping with bindings and samples
License
- ExoPlayerXamarin plugin is licensed under MIT
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-android33.0 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. net8.0-android was computed. |
-
net6.0-android33.0
- Xam.Plugins.Android.ExoPlayer.Common (>= 2.19.1)
- Xamarin.AndroidX.Media (>= 1.6.0.1)
-
net7.0-android33.0
- Xam.Plugins.Android.ExoPlayer.Common (>= 2.19.1)
- Xamarin.AndroidX.Media (>= 1.6.0.1)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Xam.Plugins.Android.ExoPlayer.MediaSession:
Package | Downloads |
---|---|
Plugin.MediaManager
Cross platform .NET Xamarin plugin to play and control Audio and Video |
|
CommunityToolkit.Maui.MediaElement
MediaElement is a view for playing video and audio in your .NET MAUI app. |
|
Draugas.MediaManager
Cross platform Xamarin plugin to play and control Audio and Video |
|
BVXamarin
The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms. |
|
Plugin.MediaManager.Android.Fix
MediaManager with Android 12 patch and exo player 2.14 update |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Xam.Plugins.Android.ExoPlayer.MediaSession:
Repository | Stars |
---|---|
CommunityToolkit/Maui
The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
|
|
Baseflow/XamarinMediaManager
Cross platform Xamarin plugin to play and control Audio and Video
|
|
jerry08/Anikin
A multi-platform app to stream/download videos.
|
Version | Downloads | Last updated |
---|---|---|
2.19.1 | 61,929 | 8/28/2023 |
2.19.1-xamarin1 | 131 | 8/29/2023 |
2.18.11 | 30,030 | 2/23/2023 |
2.18.10 | 857 | 2/16/2023 |
2.18.10-xamarin1 | 296 | 3/23/2023 |
2.18.9 | 483 | 2/6/2023 |
2.18.9-xamarin.1 | 1,497 | 2/6/2023 |
2.18.8 | 627 | 12/8/2022 |
2.18.7 | 291 | 12/7/2022 |
2.18.6 | 334 | 11/29/2022 |
2.18.5 | 381 | 11/18/2022 |
2.18.4 | 337 | 11/15/2022 |
2.18.3 | 580 | 9/2/2022 |
2.16.1 | 476 | 9/2/2022 |
2.14.6 | 2,640 | 8/29/2022 |
2.14.3 | 498 | 8/11/2022 |
2.14.2 | 443 | 8/9/2022 |
2.11.8 | 289,410 | 8/10/2020 |
2.11.7 | 477 | 8/10/2020 |
2.11.6 | 729 | 6/24/2020 |
2.11.4 | 1,443 | 3/4/2020 |
2.11.3 | 562 | 2/24/2020 |
2.9.8 | 71,996 | 10/8/2019 |
2.9.7 | 7,226 | 7/5/2019 |
2.9.6 | 3,834 | 5/9/2019 |
2.9.0 | 952 | 9/28/2018 |
2.8.8 | 26,405 | 8/27/2018 |
2.8.7 | 917 | 8/14/2018 |
2.8.6 | 884 | 8/10/2018 |
2.8.5 | 907 | 8/1/2018 |
2.8.4 | 1,035 | 7/10/2018 |
2.8.3 | 1,045 | 6/1/2018 |
2.8.2 | 967 | 5/31/2018 |
2.8.1 | 908 | 5/29/2018 |
2.8.0 | 1,008 | 5/10/2018 |
2.7.3 | 964 | 4/23/2018 |
2.7.2 | 1,052 | 4/5/2018 |
2.6.0 | 1,012 | 11/28/2017 |
2.5.3 | 1,004 | 9/25/2017 |
2.5.2 | 978 | 9/13/2017 |
2.5.1.2 | 991 | 8/22/2017 |
2.5.1.1 | 948 | 8/21/2017 |
2.5.1 | 966 | 8/21/2017 |