FijkState enum Null safety

State of the FijkPlayer

This is the state machine of ijkplayer. FijkPlayer 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.

Constants

asyncPreparing → const FijkState

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 FijkPlayer.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.

const FijkState(2)
completed → const FijkState
const FijkState(6)
end → const FijkState
  • release() -> self
const FijkState(9)
error → const FijkState
const FijkState(8)
idle → const FijkState

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

const FijkState(0)
initialized → const FijkState

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

const FijkState(1)
paused → const FijkState
const FijkState(5)
prepared → const FijkState

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

  • seekTo() -> self
  • start() -> started
  • reset() -> idle
  • release() -> end
const FijkState(3)
started → const FijkState
const FijkState(4)
stopped → const FijkState
const FijkState(7)
values → const List<FijkState>

A constant List of the values in this enum, in order of their declaration.

const List<FijkState>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

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