native_video_view library

Classes

NativeVideoView
Widget that displays a video player. This widget calls an underlying player in the respective platform, VideoView in Android and AVPlayer in iOS.
VideoFile
Class that represents a video loaded by the controller. Contains the path of the video source source, the sourceType and the video info info from the video.
VideoInfo
Class that contains info attributes of a video file. Contains height, the width and the duration of the file. This class is loaded once the video is loaded in the player.
VideoViewController
Controller used to call the functions that controls the VideoView in Android and the AVPlayer in iOS.

Enums

VideoSourceType
Enum to specify the type of source is loaded in the player.

Typedefs

CompletionCallback = void Function(VideoViewController controller)
Callback that is called when the playback of a video is completed.
ErrorCallback = void Function(VideoViewController controller, int what, int extra, String? message)
Callback that is called when the player had an error trying to load/play the video source. The values what and extra are Android exclusives and message is iOS exclusive.
PreparedCallback = void Function(VideoViewController controller, VideoInfo videoInfo)
Callback that is called when the player finished loading the video source and is prepared to start the playback. The controller and videoInfo is given as parameters when the function is called. The videoInfo parameter contains info related to the file loaded.
ProgressionCallback = void Function(int elapsedTime, int duration)
Callback that indicates the progression of the media being played.
ViewCreatedCallback = void Function(VideoViewController controller)
Callback that is called when the view is created and ready.
VolumeChangedCallback = void Function(double volume)
Callback that indicates that the volume has been changed using the media controller.