Author: Not specified Language: text
Description: Made a Web Based Soundboard (v2) Timestamp: 2013-06-19 11:45:06 +0000
View raw paste Parent paste by: GX Reply
  1. //Had to change one line to get it to work
  2. Key.prototype.setValues = function(wav, dscr, col) {
  3.         this.wav = wav || '';
  4.         this.dscr = dscr || wav;
  5.         this.col = col;
  6.         if(this.wav != '') {
  7.                 this.audio = [];
  8.                 this.audio[0] = new Audio();
  9.                 this.audio[0].setAttribute("src",'/' + this.wav); //This was changed -AE
  10.                 this.audio[0].addEventListener("play",  bind(this, this.onplay));
  11.                 this.audio[0].addEventListener("ended",  bind(this, this.onplayend));
  12.         }
  13.         this.el.className = "key outer";
  14.         this.dscrEl.innerHTML = this.dscr;
  15.         this.el.style.background = this.col;
  16.  
  17. };
View raw paste Parent paste by: GX Reply