Volume:
50
Description:
Change the volume of sound.
Result:
Volume changes with input.
Code:
var source = null; function onload() { var engine = new jWebAudio.SoundEngine(); source = engine.addSoundSource({ 'url': '../../examples/resource/a.ogg', 'preLoad': true, 'callback': function() { source.sound.play(); }, 'volume': 50 }); } function volumeChange() { var vol = document.getElementById('volume').value; // set volume source.sound.setVolume(parseInt(vol)); // get volume document.getElementById('output').innerHTML = source.sound.getVolume(); }