I'm new to android development and I am trying to play multiple videos in a listview. Currently, each listview row item is a VideoView. This approach has not worked as the VideoViews act abnormally when I begin to scroll. I've researched here, here, here and discovered that VideoViews and TextureViews don't work well within ListViews and ScrollViews. How are apps like vine and instagram able to play videos in listviews? Any help is greatly appreciated?
How Do I Play Video in ListView like Instagram and Vine?
12.1k Views Asked by DollaBill At
2
There are 2 best solutions below
0
Karan sharma
On
Although the answer is late but i think it might help someone searching for the same. There is a sample app from the github that has implementation for this requirement.:-
https://github.com/danylovolokh/VideoPlayerManager
For understanding of code refer to the following link it is really helpful for you:-
The problem is that there are some limitations in VideoView in listview
and handling playbacks so this library implement is the VideoView based on the TextureView. Here is it how it looks like
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in LISTVIEW
- Android :EditText inside ListView always update first item in the listview
- Android FragmentPagerAdapter Circular listview
- dynamically inflating views into listView items. odd behaviour
- Button to save certain listview
- ListView: Image shift when using StateImageIndex
- Android Cannot disable listview header dividers
- Link button Delete from ListView and DB in C#
- Android: Empty textview for first item in a listview
- Android Studio cannot recognize "setAdapter()" method
- Open a webpage on list view click
- Need help linking listview to an ArrayAdapter error: Cannot resolve method'SetListAdapter(android.widget.ArrayAdapter<java.lang.String>)'
- How to set data context of ViewModela View's xaml?
- notifydataSetChanged working but only showing 1 result in listview Android
- How to change the contents of listview on item click?
- WPF: get my object after ListView context menu right click instead of item index
Related Questions in INSTAGRAM
- Cannot interact with public Instagram user feed
- Why does Instagram's pagination return the same page over and over?
- Python Script for Just logging in to Instagram
- What is the most efficient way to embed multiple Instagram photos?
- Try to get instagram API
- search image in instagram with image id
- Instagram Authentication no longer shows sign in inputs just serves instagram.com
- Instagram authentication error
- Converting code from Objective-C to Swift
- New(ish) requirements for Instagram API POST endpoint
- Timezone of Instagram medias
- Developer signup - Instagram
- instagram subscription tag steps on Real-time Photo Updates
- loop on data returned after deserializing
- How to make my userscript work on specific pages of a site that uses the history api?
Related Questions in ANDROID-VIDEOVIEW
- Android: Video Player Like Dailymotion App
- local videos on android not playing when device resolution is lower
- Only play rtsp video using VideoView or MediaPlayer after 3 minutes or more
- Android video player can't open file on some devices
- Android Full Width in Video View
- How can i place my videos on my own server and make URL of them using net-beans
- Playing a video on Android device
- Android VideoView resizing won't resize video
- Access videos both in internal storage and external SD card - Android
- display videoview defined inside a fragment in full screen
- android drawing rectangle on videoview and getting the co-ordinates
- How to resume video after a pause call in videoview android
- videoView seekTo not working after video edited using ffmpeg library - android
- Android VideoView looping with blending
- Android: NullPointerException when trying to load videoview through AsyncTask
Related Questions in VINE
- Vine API - User Data based on Anchor
- How Do I Play Video in ListView like Instagram and Vine?
- Is there a way to find a Vine URL wiht just the video address
- Post video to Vine on iOS
- Display Vines in Bootstrap collapse modules
- Open a vine url in vine app using vine://
- How to make my vine video with sound not muted at the start
- Vine: programmatically control playback
- Disabling Embedded Vine Autoplay
- Vine API Request Returns 500 Internal Server Error
- XMLHttpRequest cannot load https://api.vineapp.com/timelines/popular. No 'Access-Control-Allow-Origin' header is present on the requested resource
- Get vine short URL from video URL
- How to get Vine video url
- How to upload video to Vine programmatically on iOS?
- Video and Image Filter Like Instagram in Android
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
For playing videos in Listview, you need to open Video on Item Click of ListView then you can retrieve your video url in String like:
Now pass this myUrl to next Activity and just set this String as a
Now in your next Activity retrieve it as a
In some case, for setting VideoView,you can use:
as from Android Scrollview having videoview is giving problem
Instead of VideoView you can also try using TextureView for reference you can see number 2 reference:
For more reference for video streaming ... you can check the following url: 1>http://developer.samsung.com/android/technical-docs/Android-Media-Streaming-Tutorial
2>http://developer.android.com/reference/android/view/TextureView.html