changeset 1433:252c35ba2ba3

Audio fragment buffer pool objects have loading progress element
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 17 Dec 2015 10:35:06 +0000
parents 21ed0e7e8b8d
children 35432335cd6c
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();
 		};
 	};