From 86e054b20fabb5934e09d0bcb096840dd28d69fd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 Mar 2016 21:22:21 +0100 Subject: [PATCH] Improve progress bar --- client/angular/videos/components/add/videos-add.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/angular/videos/components/add/videos-add.component.ts b/client/angular/videos/components/add/videos-add.component.ts index 3a7b02133..9926aed63 100644 --- a/client/angular/videos/components/add/videos-add.component.ts +++ b/client/angular/videos/components/add/videos-add.component.ts @@ -36,10 +36,13 @@ export class VideosAddComponent implements OnInit { progressall: (e, data) => { this.progressBar.value = data.loaded; - this.progressBar.max = data.total; + // The server is a little bit slow to answer (has to seed the video) + // So we add more time to the progress bar (+10%) + this.progressBar.max = data.total + (0.1 * data.total); }, done: (e, data) => { + this.progressBar.value = this.progressBar.max; console.log('Video uploaded.'); // Print all the videos once it's finished