Adding Dynamically VideoView to UI.
Hello,
I'm trying to add a VideoView Dynamically from Code (C#) without adding a VideoView in XAML.
I can hear the audio but the video is totally black.
The code is as this:
VideoView videoView1;
In the OnAppearing() Method
videoView1 = new VideoView();
videoView1.MediaPlayer = new MediaPlayer(_libVlc);
homeGrid.Children.Add(videoView1, 0, 0);
videoView1.MediaPlayer.Play(new Media(_libVlc, VIDEO_URL, Media.FromType.FromLocation));
In the XAML file i have a simple Grid named homeGrid with 1 row and 1 column.
If i try this code (without the new VideoView()) with a VideoView declared in the XAML the video play fine.
Im missing something or it is not supported yet?
I Am using Xamarin.Forms and testing on Android.