web: Don't auto-panic on browsers without ReadableStream (#11699)
* web: Don't auto-panic on browsers without ReadableStream * web: Add comment explaining Pale Moon issue * web: Simplify ReadableStream check
This commit is contained in:
parent
494902cf39
commit
9a093d20be
|
@ -68,7 +68,11 @@ async function fetchRuffle(
|
||||||
? new URL("../dist/ruffle_web-wasm_extensions_bg.wasm", import.meta.url)
|
? new URL("../dist/ruffle_web-wasm_extensions_bg.wasm", import.meta.url)
|
||||||
: new URL("../dist/ruffle_web_bg.wasm", import.meta.url);
|
: new URL("../dist/ruffle_web_bg.wasm", import.meta.url);
|
||||||
const wasmResponse = await fetch(wasmUrl);
|
const wasmResponse = await fetch(wasmUrl);
|
||||||
if (progressCallback) {
|
// The Pale Moon browser currently lacks support for ReadableStream.
|
||||||
|
// Unfortunately, currently it also lacks a sufficient WASM runtime.
|
||||||
|
// If this becomes the last thing Pale Moon lacks, allow Ruffle to work.
|
||||||
|
const readableStreamDefined = typeof ReadableStream === "function";
|
||||||
|
if (progressCallback && readableStreamDefined) {
|
||||||
const contentLength =
|
const contentLength =
|
||||||
wasmResponse?.headers?.get("content-length") || "";
|
wasmResponse?.headers?.get("content-length") || "";
|
||||||
let bytesLoaded = 0;
|
let bytesLoaded = 0;
|
||||||
|
|
Loading…
Reference in New Issue