closePlayer
closePlayer method
Close an open player.
Must be called when finished with a Player, to release all the resources. It is safe to call this procedure at any time.
- If the Player is not open, this verb will do nothing
- If the Player is currently in play or pause mode, it will be stopped before.
Return
- Returns a Future which is completed when the function is done.
example
@override
void dispose()
{
if (myPlayer != null)
{
myPlayer.closePlayer();
myPlayer = null;
}
super.dispose();
}
See also
Implementation
Future<void> closePlayer() async {
await _lock.synchronized(() {
return _closePlayer();
});
}