Topic: Jarallax video: no repeat

twentyfour pro asked 5 years ago


Good afternoon everybody,

I created a jarallax video that can be set through the WordPress Customiser. So far, so good: everything is working. Except for the fact that the video loops. I don't want it to loop but on the reference page, it states that the default is no-repeat?

https://mdbootstrap.com/docs/jquery/css/parallax/#options

I use this code:

div class="jarallax" data-jarallax-video="mp4:./video/local-video.mp4,webm:./video/local-video.webm,ogv:./video/local-video.ogv"> Your content here... /div

Does anyone has any idea how to stop this video from repeating?

Thanks


twentyfour pro answered 5 years ago


Hi Milolaj,

yes I tried several options like speed and such, but it doesn't seem to work. Nothing I try to change, like speed: -1, affects the data-jarallax-video. I solved it using jQuery and I remove the "loop" attribute after the DOM loaded. But that's not really the proper way to do it.


Mikołaj Smoleński staff answered 5 years ago


Hi there again,

Did You try to set videoEndTime value?

Best regards


twentyfour pro answered 5 years ago


Hi @Mikolaj,

unfortunately I don't have those attributes. I'm using the data-jarallax-video attribute instead of video and source. This is how the documentation describes it. Also according to the documentation here on mdbootstrap.com, I should implement the following:

$('.jarallax').jarallax({ videoLoop: false, });

But alhtough it loads perfectly, it has no effect: the video keeps looping.

Thanks for the help,

kind regards


Mikołaj Smoleński staff answered 5 years ago


Hi there,

No-repeat value is connected with the background-image css property, not video. To disable loop Your video element should have the following attributes:

playsinline autoplay muted

Best regards


FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.6.1
  • Device: iMac
  • Browser: Latest
  • OS: Mac osX
  • Provided sample code: No
  • Provided link: Yes