From 362977c36025006b93997cfde0529db04c664ec9 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Mon, 23 Dec 2024 14:37:33 -0500 Subject: [PATCH] fix video crashing app on some Android devices Forces Hybrid Composition in the webview. By default the webview uses Texture Layer Hybrid Composition which was causing crashes on my Pixel 7 and likely other devices reported by users. https://pub.dev/packages/webview_flutter#platformview-implementation-on-android --- lib/screens/channel/video/video.dart | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/screens/channel/video/video.dart b/lib/screens/channel/video/video.dart index 80dd6627..0abe01b9 100644 --- a/lib/screens/channel/video/video.dart +++ b/lib/screens/channel/video/video.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import 'package:frosty/screens/channel/video/video_store.dart'; import 'package:simple_pip_mode/simple_pip.dart'; import 'package:webview_flutter/webview_flutter.dart'; +import 'package:webview_flutter_android/webview_flutter_android.dart'; /// Creates a [WebView] widget that shows a channel's video stream. class Video extends StatefulWidget { @@ -43,9 +44,18 @@ class _VideoState extends State