Skip to content

Commit

Permalink
fix: Fix internal network filter for HEAD requests (shaka-project#6660)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed May 23, 2024
1 parent e7b893b commit d816e7c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -3178,10 +3178,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget {

/** @type {shaka.net.NetworkingEngine.OnResponse} */
const onResponse_ = (type, response, context) => {
const bytesDownloaded = response.data.byteLength;
const stats = getStats();
if (stats) {
stats.addBytesDownloaded(bytesDownloaded);
if (response.data) {
const bytesDownloaded = response.data.byteLength;
const stats = getStats();
if (stats) {
stats.addBytesDownloaded(bytesDownloaded);
}
}
};

Expand Down

0 comments on commit d816e7c

Please sign in to comment.