Mami
Mami

Reputation: 307

VideoView on RecyclerView

I'm developing a social media app which has feed tab based on RecyclerView. On that feed tab I have many types of feedtype like text, photo, photo and text, book, etc... So till now I didn't had any problem about this. On my view holder I've Middle Item Container Panel. I'm putting template which is coming from my feedtypemanager class. So now I need to add videoview for my video feeds. First problem is I'm using rtsp server for streaming. VideoView starting after 15 seconds from seeing that view. Second one is when I scroll down and come up again my VideoView starting from beginnging and I'm waiting 15 seconds again to play that video. So how can I do that view like Instagram fast ? Which protocol I should use and Which VideoPlayer ? Thanks for help.

Upvotes: 1

Views: 2041

Answers (1)

Ashraf Patel
Ashraf Patel

Reputation: 749

I've faced the same issues with videoview,

I would recommend to use Exomedia library and make your life easy with that.

For smooth video playback use some caching mechanism. I would recommend AndroidVideoCache Library.

Use app:useTextureViewBacking="true" for smooth animations and transitions of videoview.

Upvotes: 2

Related Questions