小编cae*_*evv的帖子

嵌入式 Vimeo (iframe) 全屏无法在 Chrome 中工作

我正在尝试将 vimeo 视频嵌入为 iframe。我正在使用以下代码:

<iframe width="1140" height="570" src="https://player.vimeo.com/video/553469759?autoplay=1&dnt=1" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)

当我将其粘贴到 codepen 或在 firefox 中尝试时,它工作得很好。但它对我来说在 Chrome 中不起作用。当我检查 iframe 的 HTML 时,我可以看到 vimeo 添加了一个类no-fullscreen-support,但它还添加了这些类:

  • js-player-fullscreen
  • with-fullscreen

iframe google-chrome vimeo vimeo-player

3
推荐指数
1
解决办法
3949
查看次数

标签 统计

google-chrome ×1

iframe ×1

vimeo ×1

vimeo-player ×1