PlayerState class

PlayerState

Instantaneous state of the Player.

Constructors

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

Properties

audioBitrate double?
Audio bitrate of the currently playing Media.
final
audioDevice AudioDevice
Currently selected AudioDevice.
final
audioDevices List<AudioDevice>
Currently available AudioDevices.
final
audioParams AudioParams
Audio parameters of the currently playing Media. e.g. sample rate, channels, etc.
final
buffer Duration
Current buffer position. This indicates how much of the stream has been decoded & cached by the demuxer.
final
buffering bool
Whether buffering or not.
final
completed bool
Whether end of currently playing Media has been reached.
final
duration Duration
Current playback duration.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Currently playing video's height.
final
pitch double
Current pitch.
final
playing bool
Whether playing or not.
final
playlist Playlist
Currently opened Medias.
final
playlistMode PlaylistMode
Current playlist mode.
final
position Duration
Current playback position.
final
rate double
Current playback rate.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitle List<String>
Currently displayed subtitle.
final
track Track
Currently selected video, audio & subtitle track.
final
tracks Tracks
Currently available video, audio & subtitle tracks.
final
videoParams VideoParams
Video parameters of the currently playing Media. e.g. width, height, rotation, etc.
final
volume double
Current volume.
final
width int?
Currently playing video's width.
final

Methods

copyWith({Playlist? playlist, bool? playing, bool? completed, Duration? position, Duration? duration, double? volume, double? rate, double? pitch, bool? buffering, Duration? buffer, PlaylistMode? playlistMode, AudioParams? audioParams, VideoParams? videoParams, double? audioBitrate, AudioDevice? audioDevice, List<AudioDevice>? audioDevices, Track? track, Tracks? tracks, int? width, int? height, List<String>? subtitle}) PlayerState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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