Xamarin bindings library for the Google ExoPlayer library.
For more information on ExoPlayer see the Android Developer documentation.
Plugin is available on Nuget.
protected Com.Google.Android.Exoplayer.IExoPlayer mediaPlayer;
if (mediaPlayer == null)
{
mediaPlayer = Com.Google.Android.Exoplayer.ExoPlayerFactory.NewInstance(1);
}
Android.Net.Uri soundString = Android.Net.Uri.Parse("http://www.montemagno.com/sample.mp3");
FrameworkSampleSource sampleSource = new FrameworkSampleSource(this, soundString, null);
TrackRenderer aRenderer = MediaCodecAudioTrackRenderer(sampleSource, MediaCodecSelector.Default);
mediaPlayer.Prepare(aRenderer);
mediaPlayer.PlayWhenReady = true;
See the Exoplayer.Droid sample app.
- Nathan Barger for doing the initial porting work
- MKuckert for helping with bindings and samples
- bspinner for helping with bindings and samples
- ExoPlayerXamarin plugin is licensed under MIT