Play video in Android listview
I am trying to play videos on my list like Vine or Instgram. I am trying to use a TextureView with a media player, except that when attaching a TextureView to a media player, there are issues where the texture image is not reused by the GetView method. Scrolling down on my texture list creates some old incorrect videos.
Does anyone know how to play videos in ListViews (not using VideoView !!!) ??
source to share
I just want to give you some advice.
You can use WebView inside listview element and use javascript to play video. you can find a javascript game in html
http://www.w3schools.com/tags/av_prop_autoplay.asp
Hope my advice helps you with something.
source to share
Found a solution to this problem. I need to use TexutreView with MediaPlayer and I need to dynamically add TextureView to every item in the list. I also need to make sure that I remove any previous TexutreView that was previously attached to the item in the list before adding a new one dynamically. Also, I need to make sure that I only play one MediaPlayer at a time on the list to avoid any strange behavior (for example, the video may play in the wrong position).
source to share