Skip to content

Render the video as GIF to get a better playback experience in Recycler View.将视频以GIF进行渲染播放,以获得在RecyclerView中更优秀的播放体验.

ben622/GifVideo

Repository files navigation

Download

Rendering and playing the video in the form of gif in Android will greatly improve the response efficiency of your application. For example, playing multiple video files in the recyclerview at the same time will not cause sliding and freezing. It will be easy to use gifvideo.You can download and install gifvideo demo here

How do I use gifvideo?

Add dependencies in build.gradle

implementation 'com.ben.android:gifvideo:$VERSION'
VideoView videoView = new VideoView(context);
//set auto play
videoView.setAutoPlay(true)     //default true
//set filepath
videoView.setPath(path);
//start play
videoView.start();
//you can also control the pause or play by yourself
//videoView.start();
//videoView.stop();

//Remember to release resources
videoView.recycle();

About

Render the video as GIF to get a better playback experience in Recycler View.将视频以GIF进行渲染播放,以获得在RecyclerView中更优秀的播放体验.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published