Questions tagged [hls.js]

hls.js is a JavaScript library which implements an HTTP Live Streaming client

About

hls.js is a JavaScript library which implements an HTTP Live Streaming client. It relies on HTML5 video and MediaSource Extensions for playback.

It works by transmuxing MPEG-2 Transport Stream and AAC/MP3 streams into ISO BMFF (MP4) fragments. This transmuxing could be performed asynchronously using Web Worker if available in the browser. hls.js also supports HLS + fmp4, as announced during WWDC2016.

Links

218 questions
10
votes
2 answers

Why is Chromecast unable to stream this HLS video? "Neither ID3 nor ADTS header was found" / Error NETWORK/315

I'm trying to stream some URLs to my Chromecast through a sender app. They're HLS/m3u8 URLs. Here's one such example URL:…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
7
votes
2 answers

hls.js CORS using AWS Cloudfront issues with Cookies

I'm trying to set up a video streaming using Cloudfront HLS capabilities but I'm having trouble getting Hls.js to send my credential cookies in the request. I already have Cloudfront configured to forward cookies and to forward Access-control…
Ismakun
  • 151
  • 1
  • 1
  • 6
6
votes
1 answer

AWS S3 signing for HLS Videos on iOS Safari

I'm using HLS.js to handle HLS streams and I've been able to get it working fine on Android. The issue is that Safari iOS has HLS support built in, so it doesn't support Media Source Extensions (MSE). This means that I can't use the custom loader to…
6
votes
0 answers

How to HLS-live-stream incoming batches of individual frames, "appending" to a m3u8 playlist in real time, with ffmpeg?

My overall goal: Server-side: I have batches of sequential, JPEG-encoded frames (8-16) arriving from time to time, generated at roughly 2 FPS. I would like to host an HLS live stream, where, when a new batch of frames arrives, I encode those new…
Rob
  • 25,984
  • 32
  • 109
  • 155
6
votes
1 answer

How to use loadSource() with strings instead of m3u8 playlists?

In the demo by galeksandrp: https://github.com/galeksandrp/hls.js/tree/hlstorrent he uses webtorrent and hls.js to create a P2P stream. The demo works perfectly for me but I will need to use the strings variable instead of loading an external…
Marko Nikolov
  • 655
  • 2
  • 8
  • 15
5
votes
2 answers

How to restrict fetching hls segment files on pause in Safari (MacOS and iOS)

We generate hls files with segment size of 3 seconds. We use hlsjs for non Safari browsers and Safari has native hls support. In hlsjs world we were able to restrict how much ahead we should be in terms of buffer using maxMaxBufferLength, where as…
Charan Kumar
  • 553
  • 2
  • 13
5
votes
0 answers

Limit playback range of HLS m3u8 playlist

Is there an open-source implementation of limiting the playback range of HLS m3u8 playlists? I'm able to render the video using the hls.js library, specify a start time for the video and impose a duration to identify the end time. My goal here is to…
rahlf23
  • 8,869
  • 4
  • 24
  • 54
5
votes
1 answer

Can i merge multiple m3u8 files into one m3u8 file?

I have multiple m3u8 files which I want to play one after another in the same video player. Is there a way to include all of them in one m3u8 file? For example, let's say that I have these files: zebra.m3u8, giraffe.m3u8 and lion.m3u8, how can I…
Alon Yeager
  • 820
  • 2
  • 8
  • 17
5
votes
1 answer

HLS protocol: get absolute elapsed time during a live streaming

I have a very basic question and I didn't get if I googled wrong or if the answer is so simple that I haven't seen it. I'm implementing a web app using hls.js as Javascript library and I need a way to get the absolute elapsed time of a live…
lucataglia
  • 728
  • 5
  • 18
5
votes
1 answer

Query parameters for m3u8 and ts urls. Hls.js

Question: I'm struggling with adding query params to urls. I want to add ?md5=&expires= for each request url (m3u8, ts). I heard fetchSetup would be useful but I didn't see any examples, does anyone know how to solve this problem? I…
Arthur
  • 3,056
  • 7
  • 31
  • 61
5
votes
0 answers

Media player get stuck in the middle of a buffered range on Chrome

WHAT IS MY PROBLEM? My website's live streaming player use hls.js. From my server's stat, there is many case where player get stuck in the middle of a buffered range. Here is my server raw stat log(removed some useless params): tm=2019-09-27…
Feng Yu
  • 359
  • 1
  • 4
  • 17
5
votes
1 answer

HLS.js required send http header