gpt4 book ai didi

cordova - 阻止来源为 "https://www.youtube.com"的框架访问来源为 "file://"的框架

转载 作者:行者123 更新时间:2023-12-02 20:54:26 25 4
gpt4 key购买 nike

我有一个 YouTube 网址:

<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.

解决方案:

它不是在模拟器中工作,而是在移动设备上工作,这是我的最终目标。

最佳答案

@曼尼什,由于您已经处理了 CORS 问题,因此您收到的错误如下:

The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "file". Protocols must match.

既然不是CORS,那你把iframe去掉了吗?如果这有效,也许您需要的是隐藏的 <div> .

杰西

关于cordova - 阻止来源为 "https://www.youtube.com"的框架访问来源为 "file://"的框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30302288/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com