Skip to content

Commit

Permalink
Bugfix: Fragment LoadStats total set to 0 with progressive: true (#…
Browse files Browse the repository at this point in the history
…5054)

Fixes #5050

Co-authored-by: Rob Walch <rob@jwplayer.com>
  • Loading branch information
robwalch and Rob Walch committed Nov 28, 2022
1 parent f967317 commit 31fd1f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/fetch-loader.ts
Expand Up @@ -133,7 +133,10 @@ class FetchLoader implements Loader<LoaderContext> {
self.performance.now(),
stats.loading.first
);
stats.loaded = stats.total = responseData[LENGTH];
const total = responseData[LENGTH];
if (total) {
stats.loaded = stats.total = total;
}

const loaderResponse = {
url: response.url,
Expand Down

0 comments on commit 31fd1f5

Please sign in to comment.