I have a Vimeo iframe video in Bootstrap video. I need to have it start playing when I trigger modal and stop playing when a modal is closed. Currently I can have in start p
I accomplished this by calling both the Bootstrap Modal API and Vimeo API, code below. You will need to include Vimeo's Froogaloop script as well, also below.
$('.modal').on('hidden.bs.modal', function () {
player.api('pause');
})
$('.modal').on('shown.bs.modal', function () {
player.api('play');
})