问题描述
我正在使用 InAppWebView 通过监听 onLoadResource 来制作视频下载器应用程序,并抓取用户播放的视频和 iframe 中的视频,由于跨源策略,我无法获取 iframe 中的 url ( .mp4、.m3u8......),我确实将allowUniversalAccessFromFileURLs 和allowFileAccessFromFileURLs 设置为true 但没有结果我无法获得iframe 调用的资源:/,这是我的初始选项:
initialOptions: InAppWebViewGroupOptions(
android: AndroidInAppWebViewOptions(
supportMultipleWindows: true,offscreenPreRaster: true,allowUniversalAccessFromFileURLs: true,allowFileAccessFromFileURLs: true,),crossplatform: InAppWebViewOptions(
uSEOnLoadResource: true,debuggingEnabled: true,userAgent:
"Mozilla/5.0 (Linux; Android 9; Redmi Note 8) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/84.0.4147.125 Mobile Safari/537.36",javaScriptEnabled: true,javaScriptCanopenWindowsAutomatically: true,)),
如果有人非常熟悉 inappwebview 或 Flutter 会告诉我如何在 Flutter 中禁用跨源策略或如何在不使用代理的情况下监听我的应用程序 http 请求......,我将不胜感激
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)