var playVimeo = $('.js-play-vimeo');
var Player = new Vimeo.Player($selector, options);
// Button play for Vimeo
playVimeo.click(function(event) {
event.preventDefault();
Player.play();
});
Config options embed vimeo
// Config options embed vimeo
var options = {
id: $idVimeo,
muted: false,
title: false,
byline: false,
portrait: false,
playsinline: true,
transparent: false
};
Event Play.
Player.on('play', function() {
console.log('Played the video!');
});
Event Pause.
Player.on('pause', function() {
console.log('Pause the video!');
});
๐ View repository Javascript โ GitHub
๐ View documentation developer โ Developer vimeo