I need to display a video by a URL , such as a YouTube link using the VideoView tool,
I did some research on this, and I got this code, but it did not work, I always get the message that the video could not be executed.
I already gave permission and checked the internet connection and everything is ok, I tested the APP in both the emulator and the cell phone.
If anyone can help me with this I will be very grateful!
My code:
public void playVideo()
{
try
{
string url = "https://www.youtube.com/watch?v=2lkBFpyo1Mc";
nvidCamera.SetVideoURI(Android.Net.Uri.Parse(url));
nvidCamera.RequestFocus();
nvidCamera.Start();
}
catch (Exception ex)
{
alertShow("Ocorreu um problema: " + ex, false);
}
}