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

145
Vistas
How to know if HLS video streaming it is started?

If I load the player before I have started live streaming and then start streaming after sometime it doesn't play the video, how i manage this issue?

There is my code i call for run html5 video with hls

  playVideo(videoLink:string){

console.log("video link", videoLink);
  const video = document.getElementsByTagName('video')[0];
  if (Hls.isSupported()) {
    /*var hls = new Hls({
      debug: true,
    });*/
    var hls = new Hls();
    hls.loadSource(videoLink);
    hls.attachMedia(video);
    hls.on(Hls.Events.MEDIA_ATTACHED, function () {
      video.play();
    });
  }
  // hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
  // When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element through the `src` property.
  // This is using the built-in support of the plain video element, without using hls.js.
  else if (video.canPlayType('application/vnd.apple.mpegurl')) {
    video.src = videoLink;
    video.addEventListener('canplay', function () {
      video.play();
    });
}

}

<div class="container-video" *ngIf="videoFinish == false; else videoStopped">
            <video id="video"
                width="700" 
                height="400" 
                preload="auto" controls>
            </video>
        </div>
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