попап в конце видео

remotes/origin/feature/end-video-popup-28-05-19
gzbender 7 years ago
parent e53e67cd3c
commit a9003418f5
  1. 5
      web/src/js/modules/content.js

@ -24,13 +24,13 @@ function getVideoPopup($videoEl){
} }
$(document).ready(function () { $(document).ready(function () {
$('.js-video').each(async function (){ $('.js-video').each(function (){
const $iframe = $(this); const $iframe = $(this);
if($iframe.data('isYoutube')){ if($iframe.data('isYoutube')){
} }
if($iframe.data('isVimeo')){ if($iframe.data('isVimeo')){
await loadScript('https://player.vimeo.com/api/player.js'); loadScript('https://player.vimeo.com/api/player.js').then(() => {
const player = new Vimeo.Player(this); const player = new Vimeo.Player(this);
player.on('pause', function(data) { player.on('pause', function(data) {
if(data.percent == 1){ if(data.percent == 1){
@ -46,6 +46,7 @@ $(document).ready(function () {
$p.animate({opacity: 0}, 800).then(() => {$p.hide();}); $p.animate({opacity: 0}, 800).then(() => {$p.hide();});
} }
}); });
});
} }
}); });
}); });

Loading…
Cancel
Save