martijn00/ExoPlayerXamarin


Xamarin bindings library for the Google ExoPlayer library

https://baseflow.com

License: MIT

Language: C#

Keywords: android, c-sharp, exoplayer, google-exoplayer, media, mediaplayer, nuget, xamarin


ExoPlayer Plugin for Xamarin

license Build status NuGet NuGet Pre Release GitHub tag MyGet

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.

WARNING: Exoplayer 2.9.0 and up requires Visual Studio 2019 with R8 and D8. Readmore at: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview#d8-r8

Documentation

Using ExoPlayer

The ExoPlayer plugin is available on Nuget.

    SimpleExoPlayer _player;
    var mediaUri = Android.Net.Uri.Parse("https://ia800806.us.archive.org/15/items/Mp3Playlist_555/AaronNeville-CrazyLove.mp3");

    var userAgent = Util.GetUserAgent(context, "ExoPlayerDemo");
    var defaultHttpDataSourceFactory = new DefaultHttpDataSourceFactory(userAgent);
    var defaultDataSourceFactory = new DefaultDataSourceFactory(context, null, defaultHttpDataSourceFactory);
    var extractorMediaSource = new ExtractorMediaSource(mediaUri, defaultDataSourceFactory, new DefaultExtractorsFactory(), null, null);
    var defaultBandwidthMeter = new DefaultBandwidthMeter();
    var adaptiveTrackSelectionFactory = new AdaptiveTrackSelection.Factory(defaultBandwidthMeter);
    var defaultTrackSelector = new DefaultTrackSelector(adaptiveTrackSelectionFactory);

    _player = ExoPlayerFactory.NewSimpleInstance(context, defaultTrackSelector);
    _player.Prepare(extractorMediaSource);
    _player.PlayWhenReady = true;

See the Exoplayer.Droid sample app for further details.

Thanks to

License

  • ExoPlayerXamarin plugin is licensed under MIT

Project Statistics

Sourcerank 13
Repository Size 51.4 MB
Stars 93
Forks 50
Watchers 19
Open issues 5
Dependencies 25
Contributors 9
Tags 28
Created
Last updated
Last pushed

Top Contributors See all

Martijn van Dijk sjoerd0301 Sylvain Gravel Martin Kuckert Softlion (Benjamin Mayrargue) Przemysław Raciborski Adam Kapos Matt Harrington bspinner

Packages Referencing this Repo

Xam.Plugins.Android.ExoPlayer.Gvr
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Core
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.MediaSession
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Cast
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.SmoothStreaming
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Hls
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Dash
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.UI
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.OkHttp
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Jobdispatcher
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Ima
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Rtmp
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Leanback
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer.Cronet
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars
Xam.Plugins.Android.ExoPlayer
Xamarin bindings for ExoPlayer
Latest release 2.9.8 - Updated - 93 stars

Recent Tags See all

2.9.7 July 05, 2019
2.9.7 July 05, 2019
2.9.6 May 09, 2019
2.9.0 September 28, 2018
2.8.8 August 27, 2018
2.8.7 August 14, 2018
2.8.6 August 10, 2018
2.8.5 August 01, 2018
2.8.4 July 10, 2018
2.8.3 June 01, 2018
2.8.2 May 31, 2018
2.8.1.1 May 31, 2018
2.8.1 May 29, 2018
2.8.0 May 10, 2018
2.7.3 April 23, 2018

Something wrong with this page? Make a suggestion

Last synced: 2019-10-08 12:19:12 UTC

Login to resync this repository