fuck audio for microdummies

beta.r3js.org
-=yb4f310 2018-01-18 14:01:41 +01:00
parent 4b479b599d
commit 3bc46a2d6f
1 changed files with 15 additions and 11 deletions

View File

@ -80,19 +80,23 @@ GameLib.D3.Audio.prototype.createInstance = function() {
console.log('loading audio : ' + this.name);
//Load a sound and set it as the Audio object's buffer
audioLoader.load(
this.apiUrl + this.path + '?ts=' + Date.now(),
function( buffer ) {
if (document.documentMode || /Edge/.test(navigator.userAgent)) {
GameLib.Component.prototype.createInstance.call(this);
} else {
audioLoader.load(
this.apiUrl + this.path + '?ts=' + Date.now(),
function (buffer) {
console.log('loaded audio: ' + this.name);
console.log('loaded audio: ' + this.name);
this.instance.setBuffer(buffer);
this.instance.setLoop(this.loop);
this.instance.setVolume(this.volume);
GameLib.Component.prototype.createInstance.call(this);
}.bind(this)
);
}
this.instance.setBuffer( buffer );
this.instance.setLoop( this.loop );
this.instance.setVolume( this.volume );
GameLib.Component.prototype.createInstance.call(this);
}.bind(this)
);
};
/**