Video class
Video plugin for playing HLS stream using native player. autoPlay flag
controls whether to start playback as soon as player is ready. To show/hide
player controls, use showControls flag. The title and subtitle are
used for lock screen info panel on both iOS & Android. The isLiveStream
flag is only used on iOS to change the scrub-bar look on lock screen info
panel. It has no affect on the actual functionality of the plugin. Defaults
to false. Use preferredAudioLanguage to set select HLS manifest language
on player init. If the preferredAudioLanguage value changes during widget
rebuild, the player would automatically switch to new language. Use position
to set start position for player seek bar. Changing position during widget
rebuild will make player seek to new position. Use onViewCreated callback
to get notified once the underlying PlatformView
is setup. The
desiredState enum can be used to control play/pause. If the value change,
the widget will make sure that player is in sync with the new state. Use
textTracks to pass a list of TextTrack sources to the player (optional).
This is only used for Android ExoPlayer. For iOS please embed text tracks
into the HLS manifest, no more configuration required on iOS side.
- Inheritance
Constructors
-
Video({Key? key, bool autoPlay = false, bool loop = false, bool showControls = true, String? url, String? title = "", String? subtitle = "", String? preferredAudioLanguage = "mul", String? preferredTextLanguage = "", bool isLiveStream = false, double position = -1, Function? onViewCreated, PlayerState desiredState = PlayerState.PLAYING, List<
TextTrack> ? textTracks}) -
const
Properties
- autoPlay → bool
-
final
- desiredState → PlayerState
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLiveStream → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loop → bool
-
final
- onViewCreated → Function?
-
final
- position → double
-
final
- preferredAudioLanguage → String?
-
final
- preferredTextLanguage → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showControls → bool
-
final
- subtitle → String?
-
final
-
textTracks
→ List<
TextTrack> ? -
final
- title → String?
-
final
- url → String?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _VideoState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited