Mercurial > hg > webaudioevaluationtool
changeset 796:f69ec262337a
Audio fragment buffer pool objects have loading progress element
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Thu, 17 Dec 2015 10:35:06 +0000 |
parents | a75a4e0af44f |
children | b7862798441d |
files | core.js |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Wed Dec 16 14:00:11 2015 +0000 +++ b/core.js Thu Dec 17 10:35:06 2015 +0000 @@ -803,6 +803,14 @@ } }); }; + this.progress = 0; + this.progressCallback = function(event){ + if (event.lengthComputable) + { + this.progress = event.loaded / event.total; + } + }; + this.xmlRequest.addEventListener("progress", this.progressCallback); this.xmlRequest.send(); }; };