PlatformPlayer class abstract

PlatformPlayer

This class provides the interface for platform specific Player implementations. The platform specific implementations are expected to implement the methods accordingly.

The subclasses are then used in composition with the Player class, based on the platform the application is running on.

Constructors

PlatformPlayer({required PlayerConfiguration configuration})
PlatformPlayer

Properties

audioBitrateController StreamController<double?>
final
audioDeviceController StreamController<AudioDevice>
final
audioDevicesController StreamController<List<AudioDevice>>
final
audioParamsController StreamController<AudioParams>
final
bufferController StreamController<Duration>
final
bufferingController StreamController<bool>
final
completedController StreamController<bool>
final
completer Completer<void>
Completer to wait for initialization of this instance.
final
configuration PlayerConfiguration
User defined configuration for Player.
final
durationController StreamController<Duration>
final
errorController StreamController<String>
final
handle Future<int>
no setter
hashCode int
The hash code for this object.
no setterinherited
heightController StreamController<int?>
final
isVideoControllerAttached bool
bool for signaling VideoController (from package:media_kit_video) initialization.
getter/setter pair
logController StreamController<PlayerLog>
final
pitchController StreamController<double>
final
playingController StreamController<bool>
final
playlistController StreamController<Playlist>
final
playlistModeController StreamController<PlaylistMode>
final
positionController StreamController<Duration>
final
rateController StreamController<double>
final
release List<Future<void> Function()>
Publicly defined clean-up Functions which must be called before dispose.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state PlayerState
Current state of the player.
getter/setter pair
stream PlayerStream
Current state of the player available as listenable Streams.
getter/setter pair
subtitleController StreamController<List<String>>
final
trackController StreamController<Track>
final
tracksController StreamController<Tracks>
final
videoControllerCompleter Completer<void>
Completer for signaling VideoController (from package:media_kit_video) initialization.
final
videoParamsController StreamController<VideoParams>
final
volumeController StreamController<double>
final
waitForPlayerInitialization Future<void>
Future<void> to wait for initialization of this instance.
no setter
waitForVideoControllerInitializationIfAttached Future<void>
Future<void> to wait for VideoController (from package:media_kit_video) initialization.
no setter
widthController StreamController<int?>
final

Methods

add(Media media) Future<void>
dispose() Future<void>
jump(int index) Future<void>
move(int from, int to) Future<void>
next() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(Playable playable, {bool play = true}) Future<void>
pause() Future<void>
play() Future<void>
playOrPause() Future<void>
previous() Future<void>
remove(int index) Future<void>
screenshot({String? format = 'image/jpeg'}) Future<Uint8List?>
seek(Duration duration) Future<void>
setAudioDevice(AudioDevice audioDevice) Future<void>
setAudioTrack(AudioTrack track) Future<void>
setPitch(double pitch) Future<void>
setPlaylistMode(PlaylistMode playlistMode) Future<void>
setRate(double rate) Future<void>
setShuffle(bool shuffle) Future<void>
setSubtitleTrack(SubtitleTrack track) Future<void>
setVideoTrack(VideoTrack track) Future<void>
setVolume(double volume) Future<void>
stop() Future<void>
Stops the Player. Unloads the current Media or Playlist from the Player. This method is similar to dispose but does not release the resources & Player is still usable.
toString() String
A string representation of this object.
inherited

Operators

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