Android Webview - Apple Music iframe 无法加载

标签 android html iframe android-webview apple-music

我有一个提要,它给我一个与 Apple Music 相关的 iframe。它还具有与 Spotify 和其他相关的 iframe。所有其他 iframe 加载都没有问题,但 apple music 没有。

这是我为 Apple Music 使用的 iframe

<iframe allow="autoplay *; encrypted-media *;" frameborder="0" height="450" style="width:100%;max-width:660px;overflow:hidden;background:transparent;" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-storage-access-by-user-activation allow-top-navigation-by-user-activation" src="https://embed.music.apple.com/us/album/outer-peace/1438769910?app=music&at=1010lpzb"></iframe>

我正在构建 html 文档,然后使用 mWebView.loadDataWithBaseURL() 将其加载到 WebView 中。相同的 iframe 在网页或 w3schools 等网站上加载正常,没有问题。

我在这里错过了什么?很乐意提供所需的任何详细信息。

最佳答案

这就是我猜的结果。

你应该在 Manifest 的标签中添加 android:hardwareAccelerated="true"

如果这不能解决你的问题 引用这个Link可能会有帮助!

关于Android Webview - Apple Music iframe 无法加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54324234/

相关文章:

java - 获取页面适配器内的屏幕尺寸?

android - 如何在android studio中安装Uber的nullaway静态分析工具?

android - 如何使用带有 nfc 的 android 支付 api?

javascript - IE中绑定(bind)IFRAME的 'load'事件时,this.contentDocument未定义

android - workstatus 观察者始终处于排队状态

javascript - 序列化 HTMLDocument 然后在服务器中渲染它?

html - CSS : Sub Class is not working

javascript - D3js Canvas 和线条不可见

javascript - 将 iframe 的内容设置为 polymer 元素

javascript - 无法从 Youtube IFrame 更改焦点