From 8f4fb65730eba551f3b03d671111d8f458e3cfbc Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 31 May 2020 18:36:59 +0200 Subject: Activate video option --- html/downtube.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'html/downtube.js') diff --git a/html/downtube.js b/html/downtube.js index abe62b8..f79443e 100644 --- a/html/downtube.js +++ b/html/downtube.js @@ -28,7 +28,7 @@ function on_start() { return; } if (this.status != 200) { - set_status("Server Error while retrieving filename"); + set_status("Server Error while retrieving filename, " + filename + ", status: " + this.status + " " + this.statusText); return; } @@ -68,11 +68,15 @@ function get_file(filename) { // run on data received back xhr.onreadystatechange = function() { + if (this.readyState == 3) { + set_status("Please wait while downloading " + filename + " ..."); + return; + } if (this.readyState != 4) { return; } if (this.status != 200) { - set_status("Server Error while retrieving " + filename); + set_status("Server Error while retrieving " + filename + ", status: " + this.status + " " + this.statusText); return; } @@ -107,6 +111,6 @@ function get_file(filename) { xhr.responseType = 'blob'; xhr.send(xmlDocument); - set_status("Please wait while retrieving " + filename + " ..."); + set_status("Please wait while server prepares " + filename + " ..."); } -- cgit v1.2.3