Vimeo Popup Video Does Not Open HTML

Asked

Viewed 89 times

-1

I’m trying to run a video of Vimeo on a website I’m working on. He opens the popup video when you click the button, but the message appears:

"This video may have been moved or deleted." But the video is there.

Follows code:

<a href="https://vimeo.com/317760843" class="icon popup-vimeo d-flex justify-content-center align-items-center">
     <span class="icon-play">
</a>

Could you help me please?

  • What code opens the popup?

  • Guy I tested here using the standard modal of Bootstrap 4 and worked right...

1 answer

0

To run a Vimeo video from your website, you need to use their API.

<div id="vimeo-video"></div>

<script src="https://player.vimeo.com/api/player.js"></script>

<script>
  var options = {
    id: 317760843,
    width: 640,
    loop: true
   };

  var player = new Vimeo.Player('vimeo-video', options);

  player.setVolume(0);

  player.on('play', function() {
    console.log('played the video!');
  });
</script>

This options id is the number in the URL https://vimeo.com/317760843 When the video loads, it will appear in div with id 'Vimeo-video'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.