var vimeoVideoModal = function(id) { // Use Vimeo video id
var video = $('[data-vimeo]').val(id)[0];
var videoPlayer = $f(video);
var videoPlay = $('body').find("[data-vimeo-play='" + id + "']");
var videoStop = $('body').find("[data-vimeo-stop='" + id + "']");
// When the player is ready, add listeners for pause, finish, and playProgress
videoPlayer.addEvent('ready', function() {
videoPlayer.addEvent('pause');
});
// Call the API when a button is pressed
videoPlay.bind('click', function() {
videoPlayer.api('play');
});
// Call the API when a button is pressed
videoStop.bind('click', function() {
videoPlayer.api('pause');
});
};
vimeoVideoModal(276118844);
## Visit the link below for instructions:
### https://www.analyticsmania.com/google-tag-manager-recipes/vimeo/
##### *Note: Unfortunately, this will not work with Lity Lightbox. Use the javascript file found here as a workaround using Bootstrap's Modal lightbox.