Personlist is my model from where I will populate the link of the videos but I don't know how I bind video player with a model.
That is the main issue.
As you have defined an ItemTemplate, each of the elements in the PersonList collection is represented by the ItemTemplate, so you bind to the PersonList element object :-
@Jenine I can't use MediaManager because it has no .NET Standard support, but if you are on Android, try using ExoPlayer (I think they have a separate package you could pull in for that). Don't use the old stock video player on Android devices.
@Jenine Were you able to load the videos in list view smoothly? I am facing the same problem.
Can you please share with us if you found any solution for the same.
I need to design audio and Video player in listview cell same like Above screenshot. Should I take Separate layout of Listview. We receive Either Audio or video From the API.
Answers
What have you tried so far?
Hi Paul, thanks for your response.
inside each cell of the list view, I've tried to bring Video player using the code here.
This player inside a list view. However, it didn't work. !
I'm trying to do this layout. It's like Music.ly Home Page. Similarly, this app would work.
Would highly appreciate if any directions can be provided.
Not sure why URL's and the code is not showing up in my response.
Hi Paul,
Thanks for your response.
inside each cell of the list view, I've tried to bring Video player using the code here. (https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/video-player/source-bindings).
This player inside a list view. However, it didn't work. !
I'm trying to do this layout. It's like Music.ly Home Page. Similarly, this app would work. Please refer the link (https://us.v-cdn.net/5019960/uploads/editor/90/jw0awfilemxp.png "")
Would highly appreciate if any directions can be provided.
Have you been able to get a simple video player working?
yes, But I want it in each listview cell. This is not working
Why do you think it is not working? What code are you trying?
Please refer to the attachment. This is what I've tried.
What does the PersonList look like? Also you need to Bind the source of the VideoView to a property in the PersonList objects.
How are you setting the source for the VideoView?
Personlist is my model from where I will populate the link of the videos but I don't know how I bind video player with a model.
That is the main issue.
As you have defined an ItemTemplate, each of the elements in the PersonList collection is represented by the ItemTemplate, so you bind to the PersonList element object :-
<forms:VideoView HeightRequest="202" WidthRequest="202" Source="{Binding Link}"/>
You already do something very similar for the Label's Text property.
Thanks, Paul, For answering my colleague's post.
We are trying to achieve the following.
is Xamarin Form have any limitation in rendering videos in list view custom cell?
any suggestion is much appreciated.
@Jenine - so there is NOT a problem with the list view component, it's just that the videos take time to load and display?
Yes, you are right. Just wondering how to show using Xamarin.Forms a list of videos responsive similar to music.ly.
@Jenine I can't use MediaManager because it has no .NET Standard support, but if you are on Android, try using ExoPlayer (I think they have a separate package you could pull in for that). Don't use the old stock video player on Android devices.
@Jenine Were you able to load the videos in list view smoothly? I am facing the same problem.
Can you please share with us if you found any solution for the same.
I need to design audio and Video player in listview cell same like Above screenshot. Should I take Separate layout of Listview. We receive Either Audio or video From the API.
Please share inputs.
Thanks in advance.