BlingVideoPlayerController class

Constructors

BlingVideoPlayerController({String? dataSource, String? package, bool isLooping = false, bool autoPlay = true, bool? mixWithOthers, Future<ClosedCaptionFile>? closedCaptionFile, Widget? prepare, Alignment? alignment, BoxFit? fit})
assets://xxxxx file://xxxxxx http、https ://xxxx

Properties

alignment Alignment?
This parameter overrides BlingVideoPlayer alignment
getter/setter pair
aspectRatio double
The video aspect
no setter
autoPlay bool
Set whether to automatically play the video after initialization
getter/setter pair
duration Duration?
The total duration of the video。The video hasn't been initialized yet if it's null
no setter
fit BoxFit?
Set the screen mode of the video. This parameter overrides BlingVideoPlayer fit
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isBuffering bool
The value is true when buffer duration < position duration
no setter
isLooping bool
Sets whether or not the video should loop after playing once.
getter/setter pair
onBufferedStream Stream<Duration>
Stream of change on video buffered,
no setter
onIsBufferingStream Stream<bool>
The video is buffering The value is true when buffer duration < position duration
no setter
onPlayerStateChanged Stream<BlVideoPlayerState>
Stream of change on video player state
no setter
onPositionStream Stream<Duration>
Stream of change on video current duration
no setter
onProgressStream Stream<double>
Stream of change on video progress
no setter
onValueStream Stream<VideoPlayerValue>
Stream of change on video_player
no setter
package String?
This parameter overrides BlingVideoPlayer alignment Only set for BlingVideoPlayer.assets videos. The package that the asset was loaded from.
getter/setter pair
position Duration?
The current playing position of the video。The video hasn't been initialized yet if it's null
no setter
prepare Widget?
You can use prepare to placeholder the video before initialization is successful
getter/setter pair
progress double
The current playing progress of the video
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
The video size, default value is Size.zero。
no setter
state BlVideoPlayerState
The current playing state op the video
no setter
videoPlayerController → VideoPlayerController?
Android: exoplayer, ios:AVFoundation
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() Future<void>
play() Future<void>
release() → void
reset() Future<void>
seekTo(Duration position) Future<void>
setAssetsSource(String assetsPath, {String? package, bool isLooping = false, bool autoPlay = true, bool? mixWithOthers, Future<ClosedCaptionFile>? closedCaptionFile, Widget? prepare, Alignment? alignment, BoxFit? fit}) Future<void>
setDataSource(String dataSource, {String? package, bool isLooping = false, bool autoPlay = true, bool? mixWithOthers, Future<ClosedCaptionFile>? closedCaptionFile, Widget? prepare, Alignment? alignment, BoxFit? fit}) Future<void>
setFileSource(String filePath, {bool isLooping = false, bool autoPlay = true, bool? mixWithOthers, Future<ClosedCaptionFile>? closedCaptionFile, Widget? prepare, Alignment? alignment, BoxFit? fit}) Future<void>
setProgress(double progress) Future<void>
setSpeed(double speed) Future<void>
ios platform : See https://developer.apple.com/library/archive/qa/qa1772/_index.html for an explanation of For releases of OS X prior to 10.9 and releases of iOS prior to 7.0, indicates whether the item can be played at rates greater than 1.0. Starting with OS X 10.9 and iOS 7.0, all AVPlayerItems with status AVPlayerItemReadyToPlay can be played at rates between 1.0 and 2.0, inclusive, even if canPlayFastForward is NO; for those releases canPlayFastForward indicates whether the item can be played at rates greater than 2.0.
setVolume(double volume) Future<void>
stop() Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited