0
Je souhaite lancer une vidéo HTML5 après l'avoir ouverte sur fancybox3.Lecture vidéo HTML5 avec Fancybox3
voici mon codepen: https://codepen.io/ableslayer/pen/aygGQX
et mon code:
$(document).ready(function() {
$("[data-fancybox]").fancybox({
afterShow: function() {
// After the show-slide-animation has ended - play the vide in the current slide
this.content.find('video').trigger('play')
// Attach the ended callback to trigger the fancybox.next() once the video has ended.
this.content.find('video').on('ended', function() {
$.fancybox.next();
});
}
});
});
Merci! Cela marche. Mais que faire si j'ai plusieurs vidéos dans une seule page? Puis-je le changer en getElementByClass? – mark
Oui. puis bouclez et appelez le jeu –