examples/player/player.js
function(val) {
    var self = this;

    // Update the global volume (affecting all Howls).
    Howler.volume(val);

    // Update the display on the slider.
    var barWidth = (val * 90) / 100;
    barFull.style.width = (barWidth * 100) + '%';
    sliderBtn.style.left = (window.innerWidth * barWidth + window.innerWidth * 0.05 - 25) + 'px';
  }
function(val) {
    var self = this;

    // Update the global volume (affecting all Howls).
    Howler.volume(val);

    // Update the display on the slider.
    var barWidth = (val * 90) / 100;
    barFull.style.width = (barWidth * 100) + '%';
    sliderBtn.style.left = (window.innerWidth * barWidth + window.innerWidth * 0.05 - 25) + 'px';
  }
function ( val ) { var self = this ; // Update the global volume (affecting all Howls). Howler . volume ( val ) ; // Update the display on the slider. var barWidth = ( val * 90 ) / 100 ; barFull . style . width = ( barWidth * 100 ) + '%' ; sliderBtn . style . left = ( window . innerWidth * barWidth + window . innerWidth * 0.05 - 25 ) + 'px' ; }
Set the volume and update the volume slider display.
@param  {Number} val Volume between 0 and 1.
Set the volume and update the volume slider display .