iframe 在 Android 上的 Ionic 应用程序中不起作用

Rog*_*nds 3 html iframe android cordova ionic-framework

在我的 Ionic 项目中,我想为 Vimeo 视频添加 iframe。当我在我的本地主机和我的服务器上测试应用程序时,这工作正常,但在 Android 上它似乎不起作用。它说由于以下错误,网页无法加载:'net::ERR_FILE_NOT_FOUND'。

这是 iframe 代码:

<iframe src="//player.vimeo.com/video/VIDEO-ID-HERE" width="WIDTH" height="HEIGHT" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)

我已经添加了白名单插件,它可以很好地处理对其他站点的 Ajax 请求,但是 iframe 似乎仍然不起作用。有什么建议?

Rog*_*nds 5

知道了。只需在链接之前添加 http:// 就足以让它工作。现在它看起来像这样:

<iframe src="http://player.vimeo.com/video/VIDEO-ID-HERE" width="WIDTH" height="HEIGHT" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)