I am trying to use vlc player in my Xamarin.android project and install
-VideoLAN.LibVLC.Android
-LibVLCSharp
and use it like
Bundle extras = Intent.Extras;
this.VideoPath = extras.GetString(INTENT_KEY_PARAM_VIDEO_PATH);
Core.Initialize();
_libVLC = new LibVLC();
_mediaPlayer = new MediaPlayer(_libVLC);
_videoView.MediaPlayer = _mediaPlayer;
var mediaUri = Android.Net.Uri.Parse(this.VideoPath);
var m = new Media(_libVLC, mediaUri.ToString(), FromType.FromPath);
var configuration = new MediaConfiguration();
configuration.EnableHardwareDecoding();
m.AddOption(":fullscreen");
m.AddOption(":codec=avcodec");
m.AddOption(configuration);
m.AddOption(":file-caching=1500");
_mediaPlayer.Media = m;
_videoView.MediaPlayer.Play(m);
it's work fine in first run but if i click on video for second time or open another video it's grey and pixeled