From dca2956c47768f190433932e584a9ffe7085d048 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Wed, 31 May 2023 19:42:54 -0400 Subject: [PATCH] Fix video not loading on iOS Looks like Twitch made some updates to their mobile player on iOS where it will first navigate to a bunch of URLs (probably related to ads or analytics based on the domains). This resulted in the `NavigationDelegate` not picking this up and preventing the loading by default. To fix, I've just removed the `NavigationDelegate` because it's legacy code that really isn't needed anymore. --- lib/screens/channel/video/video_store.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/screens/channel/video/video_store.dart b/lib/screens/channel/video/video_store.dart index 3de10835..6b1ddb8b 100644 --- a/lib/screens/channel/video/video_store.dart +++ b/lib/screens/channel/video/video_store.dart @@ -54,13 +54,6 @@ abstract class VideoStoreBase with Store { ..setNavigationDelegate( NavigationDelegate( onPageFinished: (_) => initVideo(), - // Used for preventing accidental navigation in the webview. - onNavigationRequest: (request) { - if (request.url.startsWith('https://player.twitch.tv')) { - return NavigationDecision.navigate; - } - return NavigationDecision.prevent; - }, ), ) ..loadRequest(Uri.parse(videoUrl));