Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Change button image on jwplayer

I have implemented the newest JW Player (8.24) and I would like to customize it, so that it has a fast forward button. Standard only has a -10 sec rewind. it would be nice with a forward +10 sec as well. And someone has already done it! And I have also implemented this script but it only show the icon in - transform = "scaleX(-1)"; - which shows the icon reversed, which is kind a drag. Is there anyone who is good at javascript who can help a noob with this small problem?

How can I get the icon/image not to be shown in reverse, or how can I replace it?

The script which I implemented is this:

const playerContainerSelector = '#jwplayer-container';
const player = jwplayer('#player');
const playerContainer = document.querySelector(playerContainerSelector);

// display icon
const rewindContainer = playerContainer.querySelector('.jw-display-icon-rewind');
const forwardContainer = rewindContainer.cloneNode(true);
const forwardDisplayButton = forwardContainer.querySelector('.jw-icon-rewind');
forwardDisplayButton.style.transform = "scaleX(-1)";
forwardDisplayButton.ariaLabel = "Forward 10 Seconds"
const nextContainer = playerContainer.querySelector('.jw-display-icon-next');
nextContainer.parentNode.insertBefore(forwardContainer, nextContainer);


// control bar icon
playerContainer.querySelector('.jw-display-icon-next').style.display = 'none'; // 
hide next button
const buttonContainer = playerContainer.querySelector('.jw-button-container');
const rewindControlBarButton = buttonContainer.querySelector(".jw-icon-rewind");
const forwardControlBarButton = rewindControlBarButton.cloneNode(true);
forwardControlBarButton.style.transform = "scaleX(-1)";
forwardControlBarButton.ariaLabel = "Forward 10 Seconds";
rewindControlBarButton.parentNode.insertBefore(forwardControlBarButton, 
rewindControlBarButton.nextElementSibling);

// add onclick handlers
[forwardDisplayButton, forwardControlBarButton].forEach(button => {
   button.onclick = () => {
    player.seek((player.getPosition() + 10));
   }
})

The script is from this github thread: https://github.com/jwplayer/jwplayer/issues/3894

Any help is is much obliged.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!