0
I need to show a video for a URL, such as a youtube link, using the tool Videoview, or similar.
I did some research on this, and I got this code, but it didn’t work, I always get the message that I could not run the video.
I already gave permission and checked the internet connection and everything is ok, I tested the APP both in emulator, and mobile.
If anyone can help me with this I’d 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);
}
}