Skip to content

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

Notifications You must be signed in to change notification settings

ben622/GifVideo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
ben622
Jan 12, 2021
e53120b · Jan 12, 2021

History

13 Commits
Dec 11, 2020
Dec 10, 2020
Jan 12, 2021
Dec 11, 2020
Nov 27, 2020
Jan 12, 2021
Dec 10, 2020
Nov 27, 2020
Nov 27, 2020
Nov 27, 2020
Nov 27, 2020

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