playSoundFileFromURL(soundFileURL){
    let audioPlayerElement = this._audioPlayerElement;
    let fileURL = (arguments.length === 1) ? soundFileURL : this._soundFileURL;
    
    try {
      if (fileURL == undefined){
        throw "bars.js : The URL to the sound file is undefined.";
      }
      
      audioPlayerElement.src = fileURL;
      audioPlayerElement.crossOrigin = 'anonymous'; 
      audioPlayerElement.controls = true;
      audioPlayerElement.play();
      
    } catch(error) {
      console.error("bars.js : Error when attempting to play a sound file from a URL.");
      console.error(error);
    }

    this.createAudioObjects();
  }
/**
   * Loads a sound file from soundFileURL. 
   * Then creates the audio objects for music visualisation and plays the music.
   */
Loads a sound file from soundFileURL.
Then creates the audio objects for music visualisation and plays the music.
Loads a sound file from soundFileURL . Then creates the audio objects for music visualisation and plays the music .
playSoundFileFromURL(soundFileURL){
    let audioPlayerElement = this._audioPlayerElement;
    let fileURL = (arguments.length === 1) ? soundFileURL : this._soundFileURL;
    try {
      if (fileURL == undefined){
        throw "bars.js : The URL to the sound file is undefined.";
      }
      audioPlayerElement.src = fileURL;
      audioPlayerElement.crossOrigin = 'anonymous'; 
      audioPlayerElement.controls = true;
      audioPlayerElement.play();
    } catch(error) {
      console.error("bars.js : Error when attempting to play a sound file from a URL.");
      console.error(error);
    }
    this.createAudioObjects();
  }
playSoundFileFromURL ( soundFileURL ) { let audioPlayerElement = this . _audioPlayerElement ; let fileURL = ( arguments . length === 1 ) ? soundFileURL : this . _soundFileURL ; try { if ( fileURL == undefined ) { throw "bars.js : The URL to the sound file is undefined." ; } audioPlayerElement . src = fileURL ; audioPlayerElement . crossOrigin = 'anonymous' ; audioPlayerElement . controls = true ; audioPlayerElement . play ( ) ; } catch ( error ) { console . error ( "bars.js : Error when attempting to play a sound file from a URL." ) ; console . error ( error ) ; } this . createAudioObjects ( ) ; }
Loads a sound file from soundFileURL.
Loads a sound file from soundFileURL .