You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letfetch=shaka.net.HttpFetchPlugin.fetch_;letpromise=fetch(uri,init).then(function(response){clearTimeout(timeout);letheaders={};/** @type {Headers} */letresponseHeaders=response.headers;responseHeaders.forEach(function(value,key){// Since IE/Edge incorrectly return the header with a leading new line// character ('\n'), we trim the header here.headers[key.trim()]=value;});constreader=response.body.getReader();letloaded=0;returnnewReadableStream({start(controller){reader.read().then(functionprocessData(result){if(result.done){controller.close();return;}controller.enqueue(result.value);loaded+=result.value.byteLength;// progress = loaded / sizeTotalreturnreader.read().then(processData);});}});}).then((stream)=>newResponse(stream)).then((response)=>{returnresponse.arrayBuffer().then(function(arrayBuffer){returnshaka.net.HttpPluginUtils.makeResponse(headers,arrayBuffer,response.status,uri,response.url,requestType);});}).catch(function(error){
...
Split off from #1051:
We need progress events from Fetch so that after #1051, we don't have to prefer XHR again.
The text was updated successfully, but these errors were encountered: