You can set up a user interface control for the player’s volume.
This ensures that the media resource has successfully loaded. If the player is not in the PREPARED state, attempting to call the following methods throws an IllegalStateException.
The parameter for the setVolume method represents the requested actual volume level expressed as a percentage of the maximum level.
void setVolume(int volume) throws IllegalStateException;