桌面上的 Vimeo 视频取消静音按钮

发布于 2025-01-12 19:43:52 字数 213 浏览 6 评论 0原文

我在 Squarespace 上设置 Vimeo 的嵌入数据时遇到问题。

我已经将 iframe 代码设置为 autoplay = 1 和 muted=1,并且它在移动设备上运行良好。当我在移动设备上播放视频时,它会显示点击按钮以取消视频静音。

然而,在桌面上,视频仅显示播放/暂停按钮,没有取消静音按钮。

有人遇到这个麻烦吗?你有什么解决办法吗?

谢谢!

I have trouble when setting embed data for Vimeo on Squarespace.

I have set the iframe code with autoplay = 1 and muted=1 and it works fine on mobile. When I play the video on mobile, it will show the button tap to unmute the video.

However, on the desktop, the video only shows the button to play/pause and has no button to unmute it.

Is there anyone getting into this trouble and do you have any solution for it?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对你再特殊 2025-01-19 19:43:52

试试这个可能对你有帮助

var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('play', function() {
    console.log('video played');
});
<!DOCTYPE html>
<html>
<head>
<title>Iframe video Test</title>
</head>
<body>
<iframe id="vidz" src="https://player.vimeo.com/video/401649410?h=11d74aa27c&portrait=0" width="450" height="253" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen=""></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
</body>
</html>

try this might be helpful for you

var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('play', function() {
    console.log('video played');
});
<!DOCTYPE html>
<html>
<head>
<title>Iframe video Test</title>
</head>
<body>
<iframe id="vidz" src="https://player.vimeo.com/video/401649410?h=11d74aa27c&portrait=0" width="450" height="253" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen=""></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
</body>
</html>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文