VideoPlayerAdapter class abstract
Pluggable backend for video playback. Implement against your preferred
player package (video_player, chewie, media_kit, etc.) so
media_pro itself stays free of video-engine dependencies.
One adapter instance corresponds to one video. Created via NetworkVideo.adapterFactory and disposed when the widget unmounts.
Constructors
Properties
- aspectRatio → double?
-
Aspect ratio derived from the video's intrinsic size. Null until
initialized.
no setter
-
durationStream
→ Stream<
Duration?> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initializedStream
→ Stream<
bool> -
Emits
trueonce initialize has completed successfully.no setter -
playingStream
→ Stream<
bool> -
no setter
-
positionStream
→ Stream<
Duration> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildView(
) → Widget - Returns the rendered video surface. Called every frame, so cache internally — don't rebuild the underlying player widget here.
-
dispose(
) → Future< void> -
initialize(
String source) → Future< void> -
Load and prepare the video at
source. Resolves once playback can start. After this completes, aspectRatio should be available. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> -
play(
) → Future< void> -
seek(
Duration position) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited