Marquee video clip at half-speed playback

Hi - new to Wordpress and X Theme and I’m really swimming against the tide so far. I want to use a full-page short video clip as the marquee homepage image that plays at half-speed. I would have thought this would be an absolute slam-dunk but from everything I’ve researched thus far it seems like this isn’t supported?

I found a forum post with a user asking this same question 4 years ago (Video playback speed) where the user attempts to use JS to define the playback speed property. I’ve defined the video ID as shown in the screenshot below, but when I look at the page code I can’t see where this is actually defined.

image

I then added the following in the Custom Code section, Page JS (I couldn’t find the section that was shown in a screenshot by @tristup, labelled “Theme Options”, perhaps this has since moved) :

var vid = document.getElementById(‘marqueeVid’);
vid.playbackRate = 0.5;

document.querySelector(‘video’).playbackRate = 0.5;

Suffice to say none of this is working. I also would love to start the video blurred and transition to it coming into focus but I’m struggling so mightily to accomplish anything at this point that I might as well just start with this particular playback speed topic and see if we can get that done.

Try this instead. I have a feeling your code is running before we create the video element. Let us know if that helps.

const attach = window.csGlobal.rivet.attach;

attach('[data-x-element-mejs]', function(el) {
  el.querySelector('video').playbackRate = 0.5;
}, 0);

Charlie - thank you for getting back to me and the JS expertise. This totally works! The framerate is a bit noticeable at 50% with this video player, but at 75% it’s achieving the slower effect I’m looking for with a nice smooth playback.

More of a general update - I’m feeling much more comfortable with the Wordpress and X theme layouts and making things happen. This is a fantastic product and while I’m still a rookie learning the ropes, I’m confident that I will have a great website when this is done. Thank you!

1 Like

You are most welcome, Chris.
It is good to know @Charlie was able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.