0
fancybox3でHTML5ビデオを開いた後に自動再生したい。ここFancybox3を使用した自動再生HTML5ビデオ
は私のcodepenです: https://codepen.io/ableslayer/pen/aygGQX
と私のコード:
$(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();
});
}
});
});
ありがとう!これは機能します。しかし、1つのページに複数の動画があるとどうなりますか?それをgetElementByClassに変更することはできますか? – mark
はい。ループオーバーとコールプレイ –