Mercurial > hg > webaudioevaluationtool
diff core.js @ 1742:d23c39d5625a
Bug #1256 Fix: Safari does not use 'this' on the buffer.onended to reference to the buffer, but to the Window. Now uses event. Tested on chrome OSX as well.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Sat, 30 May 2015 11:19:28 +0100 |
parents | bbab0bf29e5c |
children | d141519a99f2 |
line wrap: on
line diff
--- a/core.js Sat May 30 10:51:55 2015 +0100 +++ b/core.js Sat May 30 11:19:28 2015 +0100 @@ -547,7 +547,7 @@ this.bufferNode.loop = audioEngineContext.loopPlayback; this.bufferNode.onended = function() { // Safari does not like using 'this' to reference the calling object! - this.owner.metric.stopListening(audioEngineContext.timer.getTestTime()); + event.srcElement.owner.metric.stopListening(audioEngineContext.timer.getTestTime()); }; if (this.bufferNode.loop == false) { this.metric.startListening(audioEngineContext.timer.getTestTime());