How to play a video in Xamarin Forms? Its possible?

Its possible to play video in xamarin forms?. (Not in separate native code)

I want to play video using portable project.. Its possible in official code or any other 3rd parties available?

Any one suggest me..

Answers

  • XnainaXnaina USMember ✭✭✭
    edited August 2016
  • Thanks @Xnaina . any official API available for videoview?

  • XnainaXnaina USMember ✭✭✭
  • ahmadmadiahmadmadi USMember ✭✭✭

    a great nuget package is called "Rox.Xamarin.Video" which is so far is for free and i hope it stays so :P with it you can save yourself a lot of time and effort.
    The only problem with it, is that you cannot place the video player inside a stacklayout, but instead you have to contain it within a grid or to the page content directly.

  • AdamFisherAdamFisher USMember ✭✭

    You can check out a component I created here: https://components.xamarin.com/view/video-player

    It is a Xamarin Forms control that works across iOS, Android, Windows Phone, UWP. You can respond to video events and control the player all from shared code.

  • Rod_at_RoxRod_at_Rox AUMember ✭✭

    @ahmadmadi said:
    a great nuget package is called "Rox.Xamarin.Video" which is so far is for free and i hope it stays so :P

    We have no intention of charging for the components we make available. We have a range of components that require a license and a subscription, but these are currently only available through our consultancy services.

    I was not aware of the StackLayout issue, although the latest pre-release (2.1.0-pre2) has been optimized for use within a virtualized parent (like ListView, and our own VirtualizedStackPanel), but I will run some tests with a standard StackPanel and see if the issue still exists.

  • AW.0337AW.0337 RUMember ✭✭

    Hello @Rod_at_Rox,

    I am using Your Rox Video Player in my Test-App (want to learn how things work and how to use them, because I'm new to Xamarin), but I can't find any information on the internet how to play back Videos from File System or Streams. Is it possible with Your Rox Video Player? And if so, can You please tell me how and/or provide further information?

    Btw: I've tested many free-of-charge solutions and yours is one of my absolute fav's so far. So great work and keep going :smiley:

    Best regards from Germany
    Alex

  • AW.0337AW.0337 RUMember ✭✭
    edited February 2017

    @AW.0337 said:
    Hello @Rod_at_Rox,

    I am using Your Rox Video Player in my Test-App (want to learn how things work and how to use them, because I'm new to Xamarin), but I can't find any information on the internet how to play back Videos from File System or Streams. Is it possible with Your Rox Video Player? And if so, can You please tell me how and/or provide further information?

    Btw: I've tested many free-of-charge solutions and yours is one of my absolute fav's so far. So great work and keep going :smiley:

    Best regards from Germany
    Alex

    I found out, that this is not possible by design. An (UWP)-App works in a kind of sandbox on the operating system. What I did to get things working was:

    That seems to be the only Way to load mp4-Files from internal servers.

    But:
    UWP-Apps use Microsoft Edge... The Edge-VideoPlayer has the ability to change Subtitles and Languages (if the video supports it) but, while changing language the player freezes very often.

    I would be grateful, if someone could help with further information.

    Regards

  • FaisalAminFaisalAmin USMember ✭✭

    @Rod_at_Rox , can your component play local video? I tried placing it in the root folder but nothing happened. Playing from URL was OK though.

  • y_SBSICy_SBSIC USMember ✭✭✭
    When I am integrating this package in my application I am getting 100+ error in my resources.drawable file in Android application. Please suggest me how can I integrate these packages. I am stuck in this from last 3 days.
    @Xnaina , @ahmadmadi .
    Please suggest.
    Thanks
  • When I I get the video from the file system on Android platform, I get the following error "Can't play this video". Did anyone solve this.

  • FilipHristovskiFilipHristovski USMember

    Hi guys i'm having the same issue i cant play local files. Did you find a solution for this?

  • Kan_nanKan_nan INMember ✭✭
    edited August 2017

    @AdamFisher said:
    You can check out a component I created here: https://components.xamarin.com/view/video-player

    It is a Xamarin Forms control that works across iOS, Android, Windows Phone, UWP. You can respond to video events and control the player all from shared code.

    thnx

  • Kan_nanKan_nan INMember ✭✭

    @Rod_at_Rox said:

    @ahmadmadi said:
    a great nuget package is called "Rox.Xamarin.Video" which is so far is for free and i hope it stays so :P

    We have no intention of charging for the components we make available. We have a range of components that require a license and a subscription, but these are currently only available through our consultancy services.

    I was not aware of the StackLayout issue, although the latest pre-release (2.1.0-pre2) has been optimized for use within a virtualized parent (like ListView, and our own VirtualizedStackPanel), but I will run some tests with a standard StackPanel and see if the issue still exists.

    @Rod_at_Rox I didn't see any Video events . How can I listen to video events like VideoStarted/VideoEnded etc?? Is it possible?

  • AdamFisherAdamFisher USMember ✭✭

    If anyone is interested, the Xamarin.Forms video player component can be found here: https://github.com/adamfisher/Xamarin.Forms.VideoPlayer

  • oguzhanorhaanoguzhanorhaan TRMember ✭✭
    > @AhmedSalah.0079 said:
    > When I I get the video from the file system on Android platform, I get the following error "Can't play this video". Did anyone solve this.

    Did you find anything, I had the same problem :(
Sign In or Register to comment.