Enable timeout on non android devices

This commit is contained in:
WardPearce
2025-05-29 15:50:08 +12:00
parent 3e7d798faf
commit 47f0a31ff4
+7 -7
View File
@@ -100,13 +100,13 @@ export class HttpFetchPlugin {
});
const timeoutMs = request.retryParameters.timeout;
if (timeoutMs) {
// const timer = new shaka.util.Timer(() => {
// abortStatus.timedOut = true;
// controller.abort();
// });
// timer.tickAfter(timeoutMs / 1000);
// op.finally(() => timer.stop());
if (timeoutMs && Capacitor.getPlatform() !== 'android') {
const timer = new shaka.util.Timer(() => {
abortStatus.timedOut = true;
controller.abort();
});
timer.tickAfter(timeoutMs / 1000);
op.finally(() => timer.stop());
}
return op;