Skip to content

Commit

Permalink
fix: Fix fetch plugin with old implementations (shaka-project#5091)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Mar 14, 2023
1 parent 122f5f3 commit 36bcc37
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/net/http_fetch_plugin.js
Expand Up @@ -243,6 +243,16 @@ shaka.net.HttpFetchPlugin = class {
} else {
return false;
}
// Old fetch implementations hasn't body and ReadableStream implementation
// See: https://github.com/shaka-project/shaka-player/issues/5088
if (window.Response) {
const response = new Response('');
if (!response.body) {
return false;
}
} else {
return false;
}
return !!(window.fetch && window.AbortController);
}
};
Expand Down

0 comments on commit 36bcc37

Please sign in to comment.