Provide a volume control

You can set up a user interface control for the player’s volume.

  1. Wait for the PSDK to call your PlaybackEventListener.onPrepared callback.

    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.

  2. Call setVolume to set the audio volume.

    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;