PlayerController class
Methods
addListener (VoidCallback listener )
→ void
Register a closure to be called when the object changes.
inherited
dispose ()
→ void
Calling this will stop the player, it will dispose player in native and
also dispose the the controller.
override
getDuration ([DurationType ? durationType ])
→ Future <int >
Return maximum
duration for DurationType.max and
current
duration for DurationType.current for playing content.
The duration is in milliseconds, if no duration is available -1 is returned.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners ()
→ void
Call all the registered listeners.
inherited
pausePlayer ()
→ Future <void >
Use this to pause the playing audio.
preparePlayer (String path , [double ? volume ])
→ Future <void >
Call this to prepare player with optional volume
parameters (has to be between 0.0 to 1.0).
removeListener (VoidCallback listener )
→ void
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
seekTo (int progress )
→ Future <void >
Moves the media to specified time position. pass progress parameter in milliseconds.
setPlayerState (PlayerState state )
→ void
setVolume (double volume )
→ Future <bool >
Sets valume for this player. Dosen't throw Exception.
Returns false if it couldn't set the volume
.
startPlayer ({FinishMode finishMode = FinishMode.stop })
→ Future <void >
Use this function to start the player to play/resume the audio.
stopAllPlayers ()
→ void
This method is to free all players resources
all at once.
stopPlayer ()
→ Future <void >
Use this to stop player. After calling this, resources are freed
.
toString ()
→ String
A string representation of this object.
inherited
audio_waveforms_fix 0.0.1