Player class
A Player to open & play a Media or Playlist from file, network or asset.
Use Player constructor to create a new instance of a Player. Provide a unique id while instanciating.
Player player = Player(id: 0);
Use various methods & event streams available to control & listen to events of the playback.
Constructors
Properties
- audioTrackCount → int
-
Gets audio track count from current MediaSource
no setter
- bufferingProgress ↔ double
-
Current buffering progress of the Media.
getter/setter pair
-
bufferingProgressController
↔ StreamController<
double> -
getter/setter pair
-
bufferingProgressStream
↔ Stream<
double> -
Stream to listen to current buffering progress of the Media.
getter/setter pair
-
commandlineArguments
↔ List<
String> -
Commandline arguments passed to this instance of Player.
getter/setter pair
- current ↔ CurrentState
-
State of the current & opened MediaSource in Player instance.
getter/setter pair
-
currentController
↔ StreamController<
CurrentState> -
Internally used StreamControllers,
getter/setter pair
-
currentStream
↔ Stream<
CurrentState> -
Stream to listen to current & opened MediaSource state of the Player instance.
getter/setter pair
- error ↔ String
-
Last error received.
getter/setter pair
-
errorController
↔ StreamController<
String> -
getter/setter pair
-
errorStream
↔ Stream<
String> -
Stream to listen to error events.
getter/setter pair
- general ↔ GeneralState
-
Volume & Rate state of the Player instance.
getter/setter pair
-
generalController
↔ StreamController<
GeneralState> -
getter/setter pair
-
generalStream
↔ Stream<
GeneralState> -
Stream to listen to volume & rate state of the Player instance.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int
-
Id associated with the Player instance.
getter/setter pair
- playback ↔ PlaybackState
-
Playback state of the Player instance.
getter/setter pair
-
playbackController
↔ StreamController<
PlaybackState> -
getter/setter pair
-
playbackStream
↔ Stream<
PlaybackState> -
Stream to listen to playback state of the Player instance.
getter/setter pair
- position ↔ PositionState
-
Position & duration state of the Player instance.
getter/setter pair
-
positionController
↔ StreamController<
PositionState> -
getter/setter pair
-
positionStream
↔ Stream<
PositionState> -
Stream to listen to position & duration state of the Player instance.
getter/setter pair
- preferredVideoDimensions ↔ VideoDimensions?
-
Explicit video dimensions according to which the pixel buffer will be retrieved & rendered inside the
Video
widget.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- videoDimensions ↔ VideoDimensions
-
Dimensions of the currently playing video.
getter/setter pair
-
videoDimensionsController
↔ StreamController<
VideoDimensions> -
getter/setter pair
-
videoDimensionsStream
↔ Stream<
VideoDimensions> -
Stream to listen to dimensions of currently playing video.
getter/setter pair
Methods
-
add(
Media source) → void - Appends Media to the Playlist of the Player instance.
-
dispose(
) → void - Destroys the instance of Player & closes all StreamControllers in it.
-
insert(
int index, Media source) → void - Inserts Media to the Playlist of the Player instance at specific index.
-
jumpToIndex(
int index) → void - Jumps to Media at specific index in the Playlist opened. Pass index as parameter.
-
move(
int initialIndex, int finalIndex) → void -
Moves Media already present in the Playlist of the Player from
initialIndex
tofinalIndex
. -
next(
) → void - Jumps to the next Media in the Playlist opened.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
MediaSource source, {bool autoStart = true}) → void - Opens a new media source into the player.
-
pause(
) → void - Pauses opened MediaSource,
-
play(
) → void - Plays opened MediaSource,
-
playOrPause(
) → void - Play or Pause opened MediaSource,
-
previous(
) → void - Jumps to the previous Media in the Playlist opened.
-
remove(
int index) → void - Removes Media from the Playlist at a specific index.
-
seek(
Duration duration) → void - Seeks the Media currently playing in the Player instance, to the provided Duration.
-
setAudioTrack(
int track) → void - Sets Current Audio Track for the current MediaSource
-
setDevice(
Device device) → void - Sets playback Device for the instance of Player.
-
setEqualizer(
Equalizer equalizer) → void - Sets Equalizer for the Player.
-
setHWND(
int hwnd) → void -
setPlaylistMode(
PlaylistMode playlistMode) → void - Changes Playlist playback mode.
-
setRate(
double rate) → void - Sets playback rate of the Media currently playing in the Player instance.
-
setUserAgent(
String userAgent) → void - Sets user agent for dart_vlc player.
-
setVolume(
double volume) → void - Sets volume of the Player instance.
-
stop(
) → void - Stops the Player.
-
takeSnapshot(
File file, int width, int height) → void - Saves snapshot of a video to a desired File location.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited