html - 在 iframe 中显示 Youtube 视频

标签 html security iframe youtube youtube-api

网站 example1.com 嵌入了 Youtube 视频。网站 example2.com 有一个显示 example1.comiframe。似乎由于 Youtube 政策,该视频可以从 example1.com 观看,但不能从 example2.com(在 iframe 内)观看。有没有办法让它工作?谢谢

最佳答案

我试过了,它成功了......

创建 a.html 并粘贴此代码

<iframe width="560" height="315" src="http://www.youtube.com/embed/m7dSteMFhZI" frameborder="0" allowfullscreen></iframe>

创建 b.html 并添加此代码

<iframe width="600" height="350" src="a.php" frameborder="0" allowfullscreen></iframe>

关于html - 在 iframe 中显示 Youtube 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13636577/

相关文章:

javascript - 动态渲染 .mht 文件,无需加载/iframe/嵌入

html - 我如何在 TWebBrowser 中以 HTML 格式显示 rss 提要的输出?

java - 目录遍历安全问题

python-3.x - 查找或构建 python 安全分析器

javascript - 通过 iframe 脚本加载器避免全局污染?

jquery - SVG 元素内嵌入 iframe

javascript - html5 占位符与 jquery - javascript 输入值请参阅占位符

javascript - 如何优雅地停止html5视频播放

javascript - Body bgcolor 属性权重

Oracle 在用户使用相同密码时锁定用户