html5从youtube分享处理的播放拦截播放失败怎么解决

从youtube视频右下角点击分享获取的播放链接嵌套到自己的网站上播放失败应该怎么解决!

原分享链接:

<iframe width="800" height="500" src="https://www.youtube.com/embed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

成功播放链接:

<div class="youtube">
  <iframe width="100%" class="elementor-video-iframe" src="https://www.youtube.com/embed"       frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>       </iframe>
</div>

css样式:

.youtube{padding-bottom: 57%;position: relative;}
.elementor-video-iframe{max-width: 100%;width: 100%;border: none;position: absolute;height: 100%;}
以上是编程学习网小编为您介绍的“html5从youtube分享处理的播放拦截播放失败怎么解决”的全面内容,想了解更多关于 前端知识 内容,请继续关注编程基础学习网。

本文标题为:html5从youtube分享处理的播放拦截播放失败怎么解决

基础教程推荐