I am using webview_flutter: ^1.0.0 package in my flutter app and I get this bellow warning:
E/libEGL (16177): call to OpenGL ES API with no current context (logged once per thread) I/chromium(16177): [INFO:CONSOLE(0)] "Refused to load the image 'android-webview-video-poster:default_video_poster/-1319672160645029230' because it violates the following Content Security Policy directive: "img-src 'self' data: https://i.vimeocdn.com https://secure-b.vimeocdn.com https://f.vimeocdn.com https://vimeo.com https://secure.gravatar.com https://i0.wp.com https://i1.wp.com https://i2.wp.com https://pagead2.googlesyndication.com https://player.vimeo.com https://*.ci.vimeows.com https://f.vimeocdn.com". I/chromium(16177): ", source: https://player.vimeo.com/video/111111111 (0)
Here is my code:
class WebViewVideoPlayerWidget extends StatefulWidget {
static const routName = '/vimeoPlayerWidget-page';
@override
_WebViewVideoPlayerWidgetState createState() => _WebViewVideoPlayerWidgetState();
}
class _WebViewVideoPlayerWidgetState extends State<WebViewVideoPlayerWidget> {
@override
void initState() {
AutoOrientation.landscapeAutoMode();
super.initState();
if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
}
String iframeUrl = "https://player.vimeo.com/video/462891972";
@override
Widget build(BuildContext context) {
final length = MediaQuery.of(context).size;
SystemChrome.setEnabledSystemUIOverlays ([]);
return Scaffold(
body: Container(
height: length.height,
width: length.width,
child: WebView(
javascriptMode: JavascriptMode.unrestricted,
initialUrl: iframeUrl,
),
),
);
}
@override
void dispose() {
AutoOrientation.landscapeAutoMode();
AutoOrientation.portraitUpMode();
super.dispose();
}
}
How can I fix the error?