Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

146
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda