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.
This commit is contained in:
Tommy Chow
2023-05-31 19:42:54 -04:00
parent 9bfcd49037
commit dca2956c47

View File

@ -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));