How to play video in video player in xamarin forms?


I am working in xamarin forms. I am trying to play video in Video Player. For the same I have used this sample code from github

but problem is when I put “” link to VideoPlayer_CustomRender.cs file Video is play properly. but when I put any youtube link this is not working and show me the error “Can’t play this video”. I want to achieve this functionality specially in android.

I can’t understand what is happening?

Source: Xamarin.ios Questions

Categorised as Uncategorised Tagged , , , ,


You can check out the video player component on the Xamarin Forms component store. It allows you to render the native video player on iOS, Android, and Windows Phone.

It also allows you to play YouTube videos using an included XAML extension called YouTubeVideoIdExtension. Note that this is experimental since you should be using the official Google APIs to integrate and get the correct source URLs.

The code snippet below shows the simplest example of just dropping it in and using it. You also have the ability to hook into events like playing, paused, stopped, completed, etc. You can control volume, autoplay, and repeat among other things.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns=""
             Title="Basic Video Player">

    <o:VideoPlayer Source="" />


Disclaimer: This is my component.

Colby Dicki

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us