【问题标题】:customize a youtube video not to go fullscreen on play on mobile自定义 youtube 视频不要在移动设备上全屏播放
【发布时间】:2017-09-20 15:09:35
【问题描述】:

是否可以播放响应移动设备的 youtube 视频,而不是在播放播放按钮后全屏显示。换句话说,在定义的 div 框中播放。

<p>
<div class="w3-row w3-padding-0">
    <div id="topleftfadein"  class="w3-col s12 l12 m12 w3-margin-bottom animated fadeInLeft slower w3-white">
        <div class="videoWrapperOuter">
        <div id="yt1" class="videoWrapperInner">
    <iframe src="https://www.youtube.com/embed/TMEmv9uienU?autoplay=1&modestbranding=1&controls=0"
    frameborder="0" allowfullscreen></iframe>
    </div>
    </div>
</div>
</div>

【问题讨论】:

    标签: css video responsive-design html5-video


    【解决方案1】:

    根据 YouTube 的 IFrame Player API,将 &amp;playsinline=1 添加到您的 iframe src

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-30
      • 2021-09-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多