Video playback plugin in Flutter

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


1.video_player (official plug-in)

insert image description here
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.
insert image description here
Code example:
Video initialization (very important)
insert image description hereYou can set loop playback and set the sound during initialization
insert image description here

Define the video playback component as follows
insert image description here
The button component is as follows:
insert image description here
Implementation of the playback button:
insert image description here

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.

insert image description here
Code example:
insert image description here

Guess you like

Origin blog.csdn.net/m0_59056822/article/details/128536903