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

132
Vistas
Adding video captions tracks dynamically puts them in the wrong order

When I try and add video text tracks to videoJs player, it adds them in the wrong order where the new track appears above the previous track.

I have created a jsFiddle to show this, can anyone help solve how I fix this?

https://jsfiddle.net/ts9qogdh/3/

enter image description here

  <video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268" 
  data-setup='{ }' muted>
    <source src="http://vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>
  </video>
var currPlayer = videojs("my_video_1")

currPlayer.play()
currPlayer.addTextTrack("captions", 'english', 'en');

window.setInterval(() => {
  let currentTime = currPlayer.currentTime();
  const activeCue = new VTTCue(currentTime, currentTime + 2, currentTime + 2)

  var tracks = currPlayer.textTracks();
  let existing = tracks.tracks_.find(x => x.kind === 'captions' && x.language === 'en');

  existing.mode = 'showing';
  existing.addCue(activeCue);
}, 1000)
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This CSS should work. Although, in IE11 the captions are a bit spaced-out...

.vjs-text-track-display > div {
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.vjs-text-track-cue {
    position: initial !important;
}

about 4 years ago · Juan Pablo Isaza Denunciar
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