我有一个YouTube的URL:
<iframe class="embed-responsive-item" ng-src="https://www.youtube.com/embed/s7gJ74ARN84" allowfullscreen=""></iframe>
如果我在我的本地HTML文件中使用它,那么它会很好地播放。 但是当我将相同的内容粘贴到phonegap ios应用程序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.
解决方案:
虽然在模拟器中无法工作,但在移动设备上却可以,而这正是我的终极目标。