【发布时间】:2015-07-29 21:41:17
【问题描述】:
我有一个 youtube 的网址:
<iframe class="embed-responsive-item" ng-src="https://www.youtube.com/embed/s7gJ74ARN84" allowfullscreen=""></iframe>
如果我在我的本地 html 文件中使用它,它会运行良好。但是,当我将相同内容粘贴到 phonegap ios app html 页面并在 ios 模拟器中运行时,它会在我单击视频时显示以下错误:
Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "file://".
The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "file". Protocols must match.
解决方案:
它不是在模拟器中工作,而是在移动设备中工作,这是我的最终目标。
【问题讨论】:
标签: cordova iframe youtube youtube-api youtube-iframe-api