Reputation: 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!
Upvotes: 0
Views: 699
Reputation: 799
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>
Upvotes: 0