nunohorta / ExoPlayerXamarin

Xamarin bindings library for the Google ExoPlayer library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExoPlayer Plugin for Xamarin

Xamarin bindings library for the Google ExoPlayer library.

For more information on ExoPlayer see the Android Developer documentation.

Plugin is available on Nuget.

Documentation

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.

Thanks to

License

  • ExoPlayerXamarin plugin is licensed under MIT

About

Xamarin bindings library for the Google ExoPlayer library

License:Other


Languages

Language:C# 100.0%