dist/melonjs.js
function soundLoadError(sound_name, onerror_cb) {
         // check the retry counter
         if (retry_counter++ > 3) {
           // something went wrong
           var errmsg = "melonJS: failed loading " + sound_name;

           if (me.sys.stopOnAudioError === false) {
             // disable audio
             me.audio.disable(); // call error callback if defined

             if (onerror_cb) {
               onerror_cb();
             } // warning


             console.log(errmsg + ", disabling audio");
           } else {
             // throw an exception and stop everything !
             throw new Error(errmsg);
           } // else try loading again !

         } else {
           audioTracks[sound_name].load();
         }
       }
function soundLoadError(sound_name, onerror_cb) {
         // check the retry counter
         if (retry_counter++ > 3) {
           // something went wrong
           var errmsg = "melonJS: failed loading " + sound_name;

           if (me.sys.stopOnAudioError === false) {
             // disable audio
             me.audio.disable(); // call error callback if defined

             if (onerror_cb) {
               onerror_cb();
             } // warning


             console.log(errmsg + ", disabling audio");
           } else {
             // throw an exception and stop everything !
             throw new Error(errmsg);
           } // else try loading again !

         } else {
           audioTracks[sound_name].load();
         }
       }
function soundLoadError ( sound_name , onerror_cb ) { // check the retry counter if ( retry_counter ++ > 3 ) { // something went wrong var errmsg = "melonJS: failed loading " + sound_name ; if ( me . sys . stopOnAudioError === false ) { // disable audio me . audio . disable ( ) ; // call error callback if defined if ( onerror_cb ) { onerror_cb ( ) ; } // warning console . log ( errmsg + ", disabling audio" ) ; } else { // throw an exception and stop everything ! throw new Error ( errmsg ) ; } // else try loading again ! } else { audioTracks [ sound_name ] . load ( ) ; } }
event listener callback on load error
@ignore
event listener callback on load error