From 47f0a31ff4b402c29df690fd222ecaf8f5e106c1 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Thu, 29 May 2025 15:50:08 +1200 Subject: [PATCH] Enable timeout on non android devices --- materialious/src/lib/sabr/shakaHttpPlugin.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/materialious/src/lib/sabr/shakaHttpPlugin.ts b/materialious/src/lib/sabr/shakaHttpPlugin.ts index 598a5b1e..6ee23e8c 100644 --- a/materialious/src/lib/sabr/shakaHttpPlugin.ts +++ b/materialious/src/lib/sabr/shakaHttpPlugin.ts @@ -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;