WebView Content Security Policy

后端 未结 1 411
逝去的感伤
逝去的感伤 2021-01-04 10:30

I want to load a video from Vimeo in a WebView. It works, but the preview image doesn\'t load and I get this error:

I/chromium: [INFO:CONSOLE(0)] \"Re

相关标签:
1条回答
  • 2021-01-04 10:51

    Add the following to Content-Security-Policy meta tag img-src directive:

    android-webview-video-poster:
    

    As in:

    <meta http-equiv="Content-Security-Policy" content="default-src * gap:; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src *; img-src * data: blob: android-webview-video-poster:; style-src * 'unsafe-inline';">
    
    0 讨论(0)
提交回复
热议问题