PlayerState constructor

const PlayerState({
  1. Playlist playlist = const Playlist([]),
  2. bool playing = false,
  3. bool completed = false,
  4. Duration position = Duration.zero,
  5. Duration duration = Duration.zero,
  6. double volume = 100.0,
  7. double rate = 1.0,
  8. double pitch = 1.0,
  9. bool buffering = false,
  10. Duration buffer = Duration.zero,
  11. PlaylistMode playlistMode = PlaylistMode.none,
  12. AudioParams audioParams = const AudioParams(),
  13. VideoParams videoParams = const VideoParams(),
  14. double? audioBitrate,
  15. AudioDevice audioDevice = const AudioDevice('auto', ''),
  16. List<AudioDevice> audioDevices = const [AudioDevice('auto', '')],
  17. Track track = const Track(),
  18. Tracks tracks = const Tracks(),
  19. int? width,
  20. int? height,
  21. List<String> subtitle = const ['', ''],
})

PlayerState

Instantaneous state of the Player.

Implementation

const PlayerState({
  this.playlist = const Playlist([]),
  this.playing = false,
  this.completed = false,
  this.position = Duration.zero,
  this.duration = Duration.zero,
  this.volume = 100.0,
  this.rate = 1.0,
  this.pitch = 1.0,
  this.buffering = false,
  this.buffer = Duration.zero,
  this.playlistMode = PlaylistMode.none,
  this.audioParams = const AudioParams(),
  this.videoParams = const VideoParams(),
  this.audioBitrate,
  this.audioDevice = const AudioDevice('auto', ''),
  this.audioDevices = const [AudioDevice('auto', '')],
  this.track = const Track(),
  this.tracks = const Tracks(),
  this.width,
  this.height,
  this.subtitle = const ['', ''],
});