setVolume method
Set the volume of the player.
volume: The volume to set between 0 and 1.
Implementation
bool setVolume(double volume) {
if (!disposed) {
if (volume < 0) {
volume = 0;
} else if (volume > 1) {
volume = 1;
}
if (this.volume.value != volume) {
this.volume.value = volume;
_setVolume();
return true;
}
}
return false;
}