VlcPlayerValue class
The duration, current position, buffering state, error state and settings of a VlcPlayerController.
Constructors
- VlcPlayerValue({required Duration duration, Size size = Size.zero, Duration position = Duration.zero, PlayingState playingState = PlayingState.initializing, bool isInitialized = false, bool isPlaying = false, bool isLooping = false, bool isBuffering = false, bool isEnded = false, bool isRecording = false, double bufferPercent = 0.0, int volume = _maxVolume, double playbackSpeed = 1.0, double videoScale = 1.0, int audioTracksCount = 1, int activeAudioTrack = 1, int audioDelay = 0, int spuTracksCount = 0, int activeSpuTrack = -1, int spuDelay = 0, int videoTracksCount = 1, int activeVideoTrack = 0, String recordPath = '', String errorDescription = VlcPlayerValue.noError})
- Constructs a video with the given values. Only duration is required. The rest will initialize with default values when unset.
- VlcPlayerValue.erroneous(String? errorDescription)
-
Returns an instance with the playing state error
and the given
errorDescription
.factory - VlcPlayerValue.uninitialized()
-
Returns an instance with a
null
Duration.factory
Properties
- activeAudioTrack → int
-
The index of active audio track in media
final
- activeSpuTrack → int
-
The index of active subtitle track in media
final
- activeVideoTrack → int
-
The index of active video track in media
final
- aspectRatio → double
-
Returns
size.width
/size.height
when the player is initialized, or1.0.
when the player is not initialized or the aspect ratio would be less than or equal to 0.0.no setter - audioDelay → int
-
The time delay of active audio track in millisecond
final
- audioTracksCount → int
-
The number of audio tracks in media
final
- bufferPercent → double
-
The buffer percent if the video is buffering.
final
- duration → Duration
-
The total duration of the video.
final
- errorDescription → String
-
A description of the error if present.
final
- hasError → bool
-
Indicates whether or not the video is in an error state. If this is true
errorDescription should have information about the problem.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBuffering → bool
-
True if the video is currently buffering.
final
- isEnded → bool
-
True if the video is ended
final
- isInitialized → bool
-
Indicates whether or not the vlc is ready to play.
final
- isLooping → bool
-
True if the video is looping.
final
- isPlaying → bool
-
True if the video is playing. False if it's paused or stopped.
final
- isRecording → bool
-
True if the video is recording.
final
- playbackSpeed → double
-
The current speed of the playback.
final
- playingState → PlayingState
-
The playing state of player
final
- position → Duration
-
The current playback position.
final
- recordPath → String
-
The path of recorded file
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size
-
The size of the currently loaded video.
final
- spuDelay → int
-
The time delay of active subtitle track in millisecond
final
- spuTracksCount → int
-
The number of subtitle tracks in media
final
- videoScale → double
-
The video scale
final
- videoTracksCount → int
-
The number of video tracks in media
final
- volume → int
-
The current volume of the playback.
final
Methods
-
copyWith(
{Duration? duration, Size? size, Duration? position, PlayingState? playingState, bool? isInitialized, bool? isPlaying, bool? isLooping, bool? isBuffering, bool? isEnded, bool? isRecording, double? bufferPercent, int? volume, double? playbackSpeed, double? videoScale, int? audioTracksCount, int? activeAudioTrack, int? audioDelay, int? spuTracksCount, int? activeSpuTrack, int? spuDelay, int? videoTracksCount, int? activeVideoTrack, String? recordPath, String? errorDescription}) → VlcPlayerValue -
Returns a new instance that has the same values as this current instance,
except for any overrides passed in as arguments to
copyWidth
. -
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
Constants
- noError → const String
- Define no error string
- unknownError → const String