How can I change the volume before I play a file in my OW app?

I am trying to set the volume for a specific audio file BEFORE I’m playing it.

When I’m using setVolumeById(id, volume, callback) method, I get an error:

Cannot find sound with id 5d507392f46993173bbcd94e184dbab4".

As I don’t have a file ID yet. How can I change the volume before I play the file?

Your flow should be:

  1. Call overwolf.media.audio.create to load the file and get an id.
  2. Call setVolumeById .
  3. Call play.

Generally - I think that you can use native HTML/JS to play audio, it would be better as it has farther more control options.