LiState enum

State of the LiPlayer

This is the state machine of ijkplayer. LiPlayer has the same state as native ijkplayer. The state changed after method called or when some error occurs. One state can only change into the new state it can reach.

For example, idle can't becomes asyncPreparing directly.

Inheritance
Available extensions

Values

idle → const LiState

The state when a LiPlayer is just created. Native ijkplayer memory and objects also be alloced or created when a LiPlayer is created.

initialized → const LiState

After call LiPlayer.setDataSource on state idle, the state becomes initialized.

asyncPreparing → const LiState

There're many tasks to do during prepare, such as detect stream info in datasource, find and open decoder, start decode and refresh thread. So ijkplayer export a async api prepareAsync. When LiPlayer.prepareAsync is called on state initialized, ths state changed to asyncPreparing immediately. After all task in prepare have finished, the state changed to prepared. Additionally, if any error occurs during prepare, the state will change to error.

prepared → const LiState

After finish all the heavy tasks during LiPlayer.prepareAsync, the state becomes prepared from asyncPreparing.

  • seekTo() -> self
  • start() -> started
  • reset() -> idle
  • release() -> end
started → const LiState
paused → const LiState
completed → const LiState
stopped → const LiState
error → const LiState
end → const LiState
  • release() -> self

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<LiState>
A constant List of the values in this enum, in order of their declaration.