1 year ago
#339457
georgeos
Flutter webview doesn't load big videos
I'm displaying videos using a webview, but sometimes they aren't loaded.
I've tried different options but result is the same. I think it's related specifically to big videos like this:
https://ipfs.blockfrost.dev/ipfs/QmPD4hiWn9gtYwMFP35DqesJVqPBGjVPzADNG5TLe6tmwd
My code is really simple and works for other pages (even smaller videos):
final Completer<WebViewController> _controller = Completer<WebViewController>();
@override
Widget build(BuildContext context) {
return WebView(
initialUrl: "https://ipfs.blockfrost.dev/ipfs/QmWQmwZCP5Q2uXg4Ekh5Rna7ezd81cNQLbNKv8USVpTebA",
javascriptMode: JavascriptMode.unrestricted,
initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
}
);
}
This is the log when I try to load this page (it's a video):
D/mali_winsys(17719): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/mali_winsys(17719): native_window_api_disconnect failed: -19
D/HwCustConnectivityManagerImpl(17719): isBlockNetworkRequestByNonAis, INVALID_SUBSCRIPTION_ID
D/ConnectivityManager(17719): requestNetwork and the calling app is: com.my_app.my_app
D/HwCustConnectivityManagerImpl(17719): isBlockNetworkRequestByNonAis, INVALID_SUBSCRIPTION_ID
W/libEGL (17719): EGLNativeWindowType 0x7cc5831010 disconnect failed
D/mali_winsys(17719): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
E/ (17719): [ZeroHung]zrhung_get_config: Get config failed for wp[0x0008]
And sometimes this is added to the log:
W/chromium(17719): [WARNING:spdy_session.cc(3541)] Received HEADERS for invalid stream 3
W/chromium(17719): [WARNING:spdy_session.cc(3541)] Received HEADERS for invalid stream 5
Does somebody has any idea what is the problem?
flutter
webview
flutterwebviewplugin
0 Answers
Your Answer