Tip: After the article is written, the table of contents can be automatically generated. How to generate it can refer to the help document on the right
Article directory
1.video_player (official plug-in)
video_player is a Flutter plugin for application development in the Flutter development framework. When using the VideoPlayer component in the video_player plug-in for video playback during project development, the VideoPlayerController component needs to control the playback of the video. VideoPlayerController provides various methods and properties as shown in the table.
Code example:
Video initialization (very important)
You can set loop playback and set the sound during initialization
Define the video playback component as follows
The button component is as follows:
Implementation of the playback button:
2. chewie (third-party plug-in)
chewie is an unofficial third-party video player plug-in. Compared with the official video_player video player plug-in, it adds a video playback control bar and full-screen display function. And there is no need to manually add a play button, it comes with play, pause button, progress bar, sound, and video controls in full-screen mode.
Code example: