man*_*ish 6 youtube iframe youtube-api cordova youtube-iframe-api
我有一个youtube的网址:
<iframe class="embed-responsive-item" ng-src="https://www.youtube.com/embed/s7gJ74ARN84" allowfullscreen=""></iframe>
Run Code Online (Sandbox Code Playgroud)
如果我在我的本地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.
Run Code Online (Sandbox Code Playgroud)
解:
它不是在模拟器中工作,而是在移动设备上工作,这是我的最终目标.
| 归档时间: |
|
| 查看次数: |
14218 次 |
| 最近记录: |