Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda