setVolume method

Future<void> setVolume(
  1. double volume
)

Change the output volume

The parameter is a floating point number between 0 and 1. Volume can be changed when player is running or before startPlayer.

Example:

await myPlayer.setVolume(0.1);

Implementation

Future<void> setVolume(double volume) async {
  await _lock.synchronized(() async {
    await _setVolume(volume);
  });
}