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

147
Views
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
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!