0

我有一个 Fotorama 幻灯片,我需要观众全程观看。它当前设置为自动播放并在最后一张幻灯片上停止。但是,当您单击幻灯片或在移动设备上触摸它时,放映会停止并且不会恢复。我该如何避免这种情况?我尝试使用 data-stopautoplayonthouch="false" 但没有帮助。

这是我的照片:

<div class="fotorama"
 data-width="100%"
 data-height="100%"
 data-margin="0"
 data-fit="cover"
 data-nav="none"
 data-autoplay="1500"
 data-arrows="false"
 data-click="false"
 data-swipe="false"
 data-stopautoplayontouch="false">

我还添加了这个以使最后一张幻灯片上的节目停止:

$('.fotorama').on('fotorama:showend', function (e, fotorama) {
if (fotorama.size - fotorama.activeIndex === 1) {
    fotorama.stopAutoplay();
}
});

有什么建议么?

艺术,举个例子:

<body>

<div class="fotorama"
 data-width="100%"
 data-height="100%"
 data-margin="0"
 data-fit="cover"
 data-nav="none"
 data-autoplay="1500"
 data-arrows="false"
 data-click="false"
 data-swipe="false"
 data-stopautoplayontouch="false">

 <a href="_images/clients.jpg"></a>
 <a href="_images/consulting.jpg"></a>
 <a href="_images/debrief.jpg"></a>
 </div>

<script>'use strict';
$('.fotorama').on('fotorama:showend', function (e, fotorama) {
if (fotorama.size - fotorama.activeIndex === 1) {
    fotorama.stopAutoplay();
}
});

</script>
</body>
4

1 回答 1

0

It’s a Fotorama bug. Will fix it soon. Track it here: https://github.com/artpolikarpov/fotorama/issues/192

于 2014-02-07T18:18:31.037 回答